Add locale for modules
This commit is contained in:
@@ -55,4 +55,4 @@ target_link_libraries(obs-outputs
|
||||
${obs-outputs_PLATFORM_DEPS})
|
||||
|
||||
install_obs_plugin(obs-outputs)
|
||||
|
||||
install_obs_plugin_data(obs-outputs ../../build/data/obs-plugins/obs-outputs)
|
||||
|
@@ -16,7 +16,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#include <obs-avc.h>
|
||||
#include <util/platform.h>
|
||||
#include <util/dstr.h>
|
||||
@@ -34,8 +34,7 @@ struct flv_output {
|
||||
|
||||
static const char *flv_output_getname(void)
|
||||
{
|
||||
/* TODO: locale */
|
||||
return "FLV File Output";
|
||||
return obs_module_text("FLVOutput");
|
||||
}
|
||||
|
||||
static void flv_output_stop(void *data);
|
||||
@@ -193,8 +192,9 @@ static obs_properties_t flv_output_properties(void)
|
||||
{
|
||||
obs_properties_t props = obs_properties_create();
|
||||
|
||||
/* TODO: locale */
|
||||
obs_properties_add_text(props, "path", "File Path", OBS_TEXT_DEFAULT);
|
||||
obs_properties_add_text(props, "path",
|
||||
obs_module_text("FLVOutput.FilePath"),
|
||||
OBS_TEXT_DEFAULT);
|
||||
return props;
|
||||
}
|
||||
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#endif
|
||||
|
||||
OBS_DECLARE_MODULE()
|
||||
OBS_MODULE_USE_DEFAULT_LOCALE("obs-outputs", "en-US")
|
||||
|
||||
extern struct obs_output_info rtmp_output_info;
|
||||
extern struct obs_output_info flv_output_info;
|
||||
@@ -24,9 +25,11 @@ bool obs_module_load(uint32_t libobs_ver)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void obs_module_unload(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
}
|
||||
#endif
|
||||
|
||||
OBS_MODULE_FREE_DEFAULT_LOCALE();
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#include <obs-avc.h>
|
||||
#include <util/platform.h>
|
||||
#include <util/circlebuf.h>
|
||||
@@ -71,8 +71,7 @@ struct rtmp_stream {
|
||||
|
||||
static const char *rtmp_stream_getname(void)
|
||||
{
|
||||
/* TODO: locale stuff */
|
||||
return "RTMP Stream";
|
||||
return obs_module_text("RTMPStream");
|
||||
}
|
||||
|
||||
static void log_rtmp(int level, const char *format, va_list args)
|
||||
@@ -570,9 +569,9 @@ static obs_properties_t rtmp_stream_properties(void)
|
||||
{
|
||||
obs_properties_t props = obs_properties_create();
|
||||
|
||||
/* TODO: locale */
|
||||
obs_properties_add_int(props, OPT_DROP_THRESHOLD,
|
||||
"Drop threshold (milliseconds)", 200, 10000, 100);
|
||||
obs_module_text("RTMPStream.DropThreshold"),
|
||||
200, 10000, 100);
|
||||
return props;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user