From 91f73d5ea30dfff45cf739d36c8d0aa7fa729b71 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 13 Jul 2024 15:10:00 +0000 Subject: [PATCH 1/2] app: Specify Levels meaning for translation Some languages like Chinese use separate words for Levels when referring to a color scale versus a unit of measure. Currently we group all of them together. This patch distinguishes between Levels as "color-levels" versus "scale-levels" for translation purposes. --- app/actions/drawable-commands.c | 2 +- app/core/gimpdrawable-levels.c | 3 ++- app/tools/gimpforegroundselectoptions.c | 2 +- app/tools/gimplevelstool.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/actions/drawable-commands.c b/app/actions/drawable-commands.c index b82788e83b2..02709ecfab1 100644 --- a/app/actions/drawable-commands.c +++ b/app/actions/drawable-commands.c @@ -100,7 +100,7 @@ drawable_levels_stretch_cmd_callback (GimpAction *action, if (g_list_length (drawables) > 1) gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_DRAWABLE_MOD, - _("Levels")); + C_("color-levels", "Levels")); for (iter = drawables; iter; iter = iter->next) gimp_drawable_levels_stretch (iter->data, GIMP_PROGRESS (display)); diff --git a/app/core/gimpdrawable-levels.c b/app/core/gimpdrawable-levels.c index 301326b8d20..322ce5662f7 100644 --- a/app/core/gimpdrawable-levels.c +++ b/app/core/gimpdrawable-levels.c @@ -69,7 +69,8 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable, "config", config, NULL); - gimp_drawable_apply_operation (drawable, progress, _("Levels"), + gimp_drawable_apply_operation (drawable, progress, + C_("color-levels", "Levels"), levels); g_object_unref (levels); diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c index 24a48f7096c..911add2fe4b 100644 --- a/app/tools/gimpforegroundselectoptions.c +++ b/app/tools/gimpforegroundselectoptions.c @@ -129,7 +129,7 @@ gimp_foreground_select_options_class_init (GimpForegroundSelectOptionsClass *kla GIMP_CONFIG_PROP_INT (object_class, PROP_LEVELS, "levels", - _("Levels"), + C_("scale-levels", "Levels"), _("Number of downsampled levels to use"), 1, 10, 2, GIMP_PARAM_STATIC_STRINGS); diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index 23bd1f869a9..e5008483022 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -135,7 +135,7 @@ gimp_levels_tool_register (GimpToolRegisterCallback callback, gimp_color_options_gui, 0, "gimp-levels-tool", - _("Levels"), + C_("color-levels", "Levels"), _("Adjust color levels"), N_("_Levels..."), NULL, NULL, GIMP_HELP_TOOL_LEVELS, -- GitLab From b69d963a97934a369b889cbf800ac81a236d5338 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sun, 14 Jul 2024 01:18:59 +0000 Subject: [PATCH 2/2] Only categorize one line since the rest are the same type. --- app/actions/drawable-commands.c | 2 +- app/core/gimpdrawable-levels.c | 3 +-- app/tools/gimpforegroundselectoptions.c | 2 +- app/tools/gimplevelstool.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/actions/drawable-commands.c b/app/actions/drawable-commands.c index 02709ecfab1..b82788e83b2 100644 --- a/app/actions/drawable-commands.c +++ b/app/actions/drawable-commands.c @@ -100,7 +100,7 @@ drawable_levels_stretch_cmd_callback (GimpAction *action, if (g_list_length (drawables) > 1) gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_DRAWABLE_MOD, - C_("color-levels", "Levels")); + _("Levels")); for (iter = drawables; iter; iter = iter->next) gimp_drawable_levels_stretch (iter->data, GIMP_PROGRESS (display)); diff --git a/app/core/gimpdrawable-levels.c b/app/core/gimpdrawable-levels.c index 322ce5662f7..301326b8d20 100644 --- a/app/core/gimpdrawable-levels.c +++ b/app/core/gimpdrawable-levels.c @@ -69,8 +69,7 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable, "config", config, NULL); - gimp_drawable_apply_operation (drawable, progress, - C_("color-levels", "Levels"), + gimp_drawable_apply_operation (drawable, progress, _("Levels"), levels); g_object_unref (levels); diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c index 911add2fe4b..055237035e1 100644 --- a/app/tools/gimpforegroundselectoptions.c +++ b/app/tools/gimpforegroundselectoptions.c @@ -129,7 +129,7 @@ gimp_foreground_select_options_class_init (GimpForegroundSelectOptionsClass *kla GIMP_CONFIG_PROP_INT (object_class, PROP_LEVELS, "levels", - C_("scale-levels", "Levels"), + C_("measurement", "Levels"), _("Number of downsampled levels to use"), 1, 10, 2, GIMP_PARAM_STATIC_STRINGS); diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index e5008483022..23bd1f869a9 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -135,7 +135,7 @@ gimp_levels_tool_register (GimpToolRegisterCallback callback, gimp_color_options_gui, 0, "gimp-levels-tool", - C_("color-levels", "Levels"), + _("Levels"), _("Adjust color levels"), N_("_Levels..."), NULL, NULL, GIMP_HELP_TOOL_LEVELS, -- GitLab