Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create en-US.ini #173

Merged
merged 2 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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