From 2c44689fe26e3f8681830e99e5b9388ad83fdf1f Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 29 Aug 2025 18:59:50 +0200 Subject: [PATCH] app, po: localize various strings which were blocked by string freeze. --- app/core/gimp-user-install.c | 16 ++++++---------- app/core/gimpdrawablefilter.c | 19 +++++++++---------- app/core/gimpdrawablefiltermask.c | 3 +-- app/core/gimppalette.c | 6 +----- app/tools/gimpfiltertool.c | 5 ++--- po/POTFILES.in | 1 + 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/app/core/gimp-user-install.c b/app/core/gimp-user-install.c index 45da90bd7e..772e2deca0 100644 --- a/app/core/gimp-user-install.c +++ b/app/core/gimp-user-install.c @@ -224,18 +224,14 @@ gimp_user_install_run (GimpUserInstall *install, if (install->migrate) { - gchar *verstring; - - /* TODO: these 2 strings should be merged into one, but it was not - * possible to do it at implementation time, in order not to break - * string freeze. - */ - verstring = g_strdup_printf ("%d.%d", install->old_major, install->old_minor); user_install_log (install, - _("It seems you have used GIMP %s before. " + /* TRANSLATORS: the %d.%d replacement strings + * will be a series version (e.g. 2.10). The %s + * replacement will be a directory. + */ + _("It seems you have used GIMP %d.%d before. " "GIMP will now migrate your user settings to '%s'."), - verstring, dirname); - g_free (verstring); + install->old_major, install->old_minor, dirname); } else { diff --git a/app/core/gimpdrawablefilter.c b/app/core/gimpdrawablefilter.c index 72a3e57528..4ee6141daf 100644 --- a/app/core/gimpdrawablefilter.c +++ b/app/core/gimpdrawablefilter.c @@ -56,6 +56,8 @@ #include "gimplist.h" #include "gimpprogress.h" +#include "gimp-intl.h" + enum { @@ -954,9 +956,8 @@ gimp_drawable_filter_update (GimpDrawableFilter *filter, * directly with bad data. */ g_set_error (error, GIMP_ERROR, GIMP_FAILED, - /* TODO: localize after string freeze. */ - "GEGL operation '%s' has been called with a " - "non-existent argument name '%s' (#%d).", + _("GEGL operation '%s' has been called with a " + "non-existent argument name '%s' (#%d)."), opname, pspec->name, i); break; } @@ -1019,10 +1020,9 @@ gimp_drawable_filter_update (GimpDrawableFilter *filter, else if (! G_TYPE_CHECK_VALUE_TYPE (new_value, G_PARAM_SPEC_VALUE_TYPE (pspec))) { g_set_error (error, GIMP_ERROR, GIMP_FAILED, - /* TODO: localize after string freeze. */ - "GEGL operation '%s' has been called with a " - "wrong value type for argument '%s' (#%d). " - "Expected %s, got %s.", + _("GEGL operation '%s' has been called with a " + "wrong value type for argument '%s' (#%d). " + "Expected %s, got %s."), opname, pspec->name, i, g_type_name (pspec->value_type), g_type_name (G_VALUE_TYPE (new_value))); @@ -1095,9 +1095,8 @@ gimp_drawable_filter_update (GimpDrawableFilter *filter, if (! gegl_node_has_pad (node, auxinputnames[i])) { g_set_error (error, GIMP_ERROR, GIMP_FAILED, - /* TODO: localize after string freeze. */ - "GEGL operation '%s' has been called with an " - "invalid aux input name '%s'.", + _("GEGL operation '%s' has been called with an " + "invalid aux input name '%s'."), opname, auxinputnames[i]); break; } diff --git a/app/core/gimpdrawablefiltermask.c b/app/core/gimpdrawablefiltermask.c index b79306141c..83223575c7 100644 --- a/app/core/gimpdrawablefiltermask.c +++ b/app/core/gimpdrawablefiltermask.c @@ -108,8 +108,7 @@ gimp_drawable_filter_mask_rename (GimpItem *item, GError **error) { g_set_error (error, GIMP_ERROR, GIMP_FAILED, - /* TODO: localized after string freeze. */ - "Cannot rename effect masks."); + _("Cannot rename effect masks.")); return FALSE; } diff --git a/app/core/gimppalette.c b/app/core/gimppalette.c index fa730c216d..5581d83ef2 100644 --- a/app/core/gimppalette.c +++ b/app/core/gimppalette.c @@ -496,11 +496,7 @@ gimp_palette_restrict_format (GimpPalette *palette, if (push_undo_if_image && gimp_data_get_image (GIMP_DATA (palette))) gimp_image_undo_push_image_colormap (gimp_data_get_image (GIMP_DATA (palette)), - /* TODO: use localized string - * after string freeze. - */ - /*C_("undo-type", "Change Colormap format restriction"));*/ - "Change Colormap format restriction"); + C_("undo-type", "Change Colormap format restriction")); palette->format = format; if (palette->format == NULL) diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c index bb5ab5dc4d..a5299dc6bc 100644 --- a/app/tools/gimpfiltertool.c +++ b/app/tools/gimpfiltertool.c @@ -443,9 +443,8 @@ gimp_filter_tool_initialize (GimpTool *tool, if (gegl_node_has_pad (filter_tool->operation, "aux")) disabled_reason = _("Disabled because this filter depends on another image."); else - /* TODO: localize when string freeze is over. */ - disabled_reason = "Disabled because GEGL Graph is unsafe.\nFor development purpose, " - "set environment variable GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT."; + disabled_reason = _("Disabled because GEGL Graph is unsafe.\nFor development purpose, " + "set environment variable GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT."); tooltip = g_strdup_printf ("%s\n%s", g_param_spec_get_blurb (param_spec), disabled_reason); gimp_help_set_help_data_with_markup (toggle, tooltip, NULL); diff --git a/po/POTFILES.in b/po/POTFILES.in index 6950838bf4..2800ce9687 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -149,6 +149,7 @@ app/core/gimpdrawable-levels.c app/core/gimpdrawable-offset.c app/core/gimpdrawable-stroke.c app/core/gimpdrawable-transform.c +app/core/gimpdrawablefilter.c app/core/gimpdrawablefiltermask.c app/core/gimpdynamicsoutput.c app/core/gimpfilloptions.c