[gimp] libgimp: procedure's arguments labels are now localized plug-in side.



commit 27b09104d9ed455cca804d07337688e26c3a916c
Author: Jehan <jehan girinstud io>
Date:   Tue Jul 5 14:02:10 2022 +0200

    libgimp: procedure's arguments labels are now localized plug-in side.
    
    Continuing the changes in #8124, let's have properties labels and blurbs
    both localized on plug-in code, i.e. with gettext calls directly in
    GIMP_PROC_ARG_*() calls.
    Note that it was already the case for blurbs (longer description,
    tooltip) as I couldn't find code where we'd localize it further down the
    line. But we were running gettext on nicks (shorter description, label)
    inside GimpProcedureDialog code. Let's not do this anymore.
    
    This will make the whole localization much more clear and obvious. There
    is no "later localized" case anymore. Now let's localize everything
    directly when the arguments are created.

 libgimp/gimpproceduredialog.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libgimp/gimpproceduredialog.c b/libgimp/gimpproceduredialog.c
index 1e13c6b9cd..f3e126da1d 100644
--- a/libgimp/gimpproceduredialog.c
+++ b/libgimp/gimpproceduredialog.c
@@ -611,11 +611,11 @@ gimp_procedure_dialog_get_widget (GimpProcedureDialog *dialog,
       if (widget_type == G_TYPE_NONE || widget_type == GTK_TYPE_CHECK_BUTTON)
         widget = gimp_prop_check_button_new (G_OBJECT (dialog->priv->config),
                                              property,
-                                             _(g_param_spec_get_nick (pspec)));
+                                             g_param_spec_get_nick (pspec));
       else if (widget_type == GTK_TYPE_SWITCH)
         widget = gimp_prop_switch_new (G_OBJECT (dialog->priv->config),
                                        property,
-                                       _(g_param_spec_get_nick (pspec)),
+                                       g_param_spec_get_nick (pspec),
                                        &label, NULL);
     }
   else if (G_PARAM_SPEC_TYPE (pspec) == G_TYPE_PARAM_INT ||
@@ -652,7 +652,7 @@ gimp_procedure_dialog_get_widget (GimpProcedureDialog *dialog,
         {
           widget = gimp_prop_scale_entry_new (G_OBJECT (dialog->priv->config),
                                               property,
-                                              _(g_param_spec_get_nick (pspec)),
+                                              g_param_spec_get_nick (pspec),
                                               1.0, FALSE, 0.0, 0.0);
         }
       else if (widget_type == GIMP_TYPE_SPIN_SCALE)
@@ -917,7 +917,7 @@ gimp_procedure_dialog_get_int_combo (GimpProcedureDialog *dialog,
                                             property, store);
       gtk_widget_set_vexpand (widget, FALSE);
       gtk_widget_set_hexpand (widget, TRUE);
-      widget = gimp_label_int_widget_new (_(g_param_spec_get_nick (pspec)),
+      widget = gimp_label_int_widget_new (g_param_spec_get_nick (pspec),
                                           widget);
     }
   g_object_unref (store);
@@ -1162,7 +1162,7 @@ gimp_procedure_dialog_get_scale_entry (GimpProcedureDialog *dialog,
 
   widget = gimp_prop_scale_entry_new (G_OBJECT (dialog->priv->config),
                                       property,
-                                      _(g_param_spec_get_nick (pspec)),
+                                      g_param_spec_get_nick (pspec),
                                       factor, FALSE, 0.0, 0.0);
 
   gtk_size_group_add_widget (dialog->priv->label_group,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]