Add locale for modules
This commit is contained in:
@@ -46,4 +46,4 @@ target_link_libraries(obs-ffmpeg
|
||||
${LIBSWRESAMPLE_LIBRARIES})
|
||||
|
||||
install_obs_plugin(obs-ffmpeg)
|
||||
|
||||
install_obs_plugin_data(obs-ffmpeg ../../build/data/obs-plugins/obs-ffmpeg)
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include <util/base.h>
|
||||
#include <util/circlebuf.h>
|
||||
#include <util/darray.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
@@ -46,8 +46,7 @@ struct aac_encoder {
|
||||
|
||||
static const char *aac_getname(void)
|
||||
{
|
||||
/* TODO: locale */
|
||||
return "FFmpeg Default AAC Encoder";
|
||||
return obs_module_text("FFmpegAAC");
|
||||
}
|
||||
|
||||
static void aac_warn(const char *func, const char *format, ...)
|
||||
@@ -242,8 +241,8 @@ static obs_properties_t aac_properties(void)
|
||||
{
|
||||
obs_properties_t props = obs_properties_create();
|
||||
|
||||
/* TODO: locale */
|
||||
obs_properties_add_int(props, "bitrate", "Bitrate", 32, 320, 32);
|
||||
obs_properties_add_int(props, "bitrate",
|
||||
obs_module_text("Bitrate"), 32, 320, 32);
|
||||
return props;
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#include <util/circlebuf.h>
|
||||
#include <util/threading.h>
|
||||
#include <util/dstr.h>
|
||||
@@ -398,8 +398,7 @@ fail:
|
||||
|
||||
static const char *ffmpeg_output_getname(void)
|
||||
{
|
||||
/* TODO: locale */
|
||||
return "FFmpeg file output";
|
||||
return obs_module_text("FFmpegOutput");
|
||||
}
|
||||
|
||||
static void ffmpeg_log_callback(void *param, int level, const char *format,
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <obs-module.h>
|
||||
|
||||
OBS_DECLARE_MODULE()
|
||||
OBS_MODULE_USE_DEFAULT_LOCALE("obs-ffmpeg", "en-US")
|
||||
|
||||
extern struct obs_output_info ffmpeg_output;
|
||||
extern struct obs_encoder_info aac_encoder_info;
|
||||
@@ -13,3 +14,8 @@ bool obs_module_load(uint32_t obs_version)
|
||||
UNUSED_PARAMETER(obs_version);
|
||||
return true;
|
||||
}
|
||||
|
||||
void obs_module_unload(void)
|
||||
{
|
||||
OBS_MODULE_FREE_DEFAULT_LOCALE();
|
||||
}
|
||||
|
Reference in New Issue
Block a user