Skip to content

Commit

Permalink
Create en-US.ini (#173)
Browse files Browse the repository at this point in the history
* Create en-US.ini

* Format
  • Loading branch information
umireon authored Mar 13, 2023
1 parent a36eb97 commit 570f197
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
21 changes: 21 additions & 0 deletions data/locale/en-US.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
BackgroundRemoval=Background Removal
PortraitBackgroundFilterPlugin=Portrait background filter plugin
Threshold=Threshold
ContourFilterPercentOfImage=Contour Filter (% of image)
SmoothSilhouette=Smooth silhouette
FeatherBlendSilhouette=Feather blend silhouette
BackgroundColor=Background Color
InferenceDevice=Inference device
CPU=CPU
GPUCUDA=GPU - CUDA
GPUDirectML=GPU - DirectML
CoreML=CoreML
SegmentationModel=Segmentation model
SINet=SINet
MODNet=MODNet
MediaPipe=MediaPipe
SelfieSegmentation=Selfie Segmentation
PPHumanSeg=PPHumanSeg
RobustVideoMatting=Robust Video Matting
CalculateMaskEveryXFrame=Calculate mask every X frame
BlurBackgroundDactor0NoBlurUseColor=Blur background factor (0 - no blur, use color)
22 changes: 11 additions & 11 deletions src/background-filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct background_removal_filter {
static const char *filter_getname(void *unused)
{
UNUSED_PARAMETER(unused);
return "Background Removal";
return obs_module_text("BackgroundRemoval");
}

/** PROPERTIES */
Expand All @@ -103,33 +103,33 @@ static obs_properties_t *filter_properties(void *data)
0.025);

obs_properties_add_float_slider(props, "contour_filter",
obs_module_text("Contour Filter (% of image)"), 0.0, 1.0, 0.025);
obs_module_text("ContourFilterPercentOfImage"), 0.0, 1.0, 0.025);

obs_properties_add_float_slider(props, "smooth_contour", obs_module_text("Smooth silhouette"),
0.0, 1.0, 0.05);
obs_properties_add_float_slider(props, "smooth_contour", obs_module_text("SmoothSilhouette"), 0.0,
1.0, 0.05);

obs_properties_add_float_slider(props, "feather", obs_module_text("Feather blend silhouette"),
0.0, 1.0, 0.05);
obs_properties_add_float_slider(props, "feather", obs_module_text("FeatherBlendSilhouette"), 0.0,
1.0, 0.05);

obs_properties_add_color(props, "replaceColor", obs_module_text("Background Color"));
obs_properties_add_color(props, "replaceColor", obs_module_text("BackgroundColor"));

obs_property_t *p_use_gpu = obs_properties_add_list(props, "useGPU",
obs_module_text("Inference device"),
obs_module_text("InferenceDevice"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

obs_property_list_add_string(p_use_gpu, obs_module_text("CPU"), USEGPU_CPU);
#ifdef WITH_CUDA
obs_property_list_add_string(p_use_gpu, obs_module_text("GPU - CUDA"), USEGPU_CUDA);
obs_property_list_add_string(p_use_gpu, obs_module_text("GPUCUDA"), USEGPU_CUDA);
#endif
#if _WIN32
obs_property_list_add_string(p_use_gpu, obs_module_text("GPU - DirectML"), USEGPU_DML);
obs_property_list_add_string(p_use_gpu, obs_module_text("GPUDirectML"), USEGPU_DML);
#endif
#if defined(__APPLE__)
obs_property_list_add_string(p_use_gpu, obs_module_text("CoreML"), USEGPU_COREML);
#endif

obs_property_t *p_model_select =
obs_properties_add_list(props, "model_select", obs_module_text("Segmentation model"),
obs_properties_add_list(props, "model_select", obs_module_text("SegmentationModel"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

obs_property_list_add_string(p_model_select, obs_module_text("SINet"), MODEL_SINET);
Expand Down
2 changes: 1 addition & 1 deletion src/plugin-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ OBS_MODULE_USE_DEFAULT_LOCALE(PLUGIN_NAME, "en-US")

MODULE_EXPORT const char *obs_module_description(void)
{
return "Portrait background filter plugin";
return obs_module_text("PortraitBackgroundFilterPlugin");
}

extern struct obs_source_info background_removal_filter_info;
Expand Down

0 comments on commit 570f197

Please sign in to comment.