[gnome-software: 1/2] ui: Add translation contexts to the string ‘Installed’




commit 9ab103ba94b1d5a187209095702e3c7157278135
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu May 5 10:16:36 2022 +0100

    ui: Add translation contexts to the string ‘Installed’
    
    Disambiguate it between it referring to the status of a single app, or
    referring to a list of all installed apps. Some languages will conjugate
    it differently in the singular vs the plural.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #1749

 src/gs-app-addon-row.c  | 2 +-
 src/gs-app-row.ui       | 2 +-
 src/gs-app-tile.ui      | 2 +-
 src/gs-feature-tile.c   | 2 +-
 src/gs-installed-page.c | 2 +-
 src/gs-shell.ui         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app-addon-row.c b/src/gs-app-addon-row.c
index 4c048fb6f..e43f1d767 100644
--- a/src/gs-app-addon-row.c
+++ b/src/gs-app-addon-row.c
@@ -108,7 +108,7 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
        case GS_APP_STATE_UPDATABLE_LIVE:
        case GS_APP_STATE_INSTALLED:
                gtk_widget_set_visible (row->label, TRUE);
-               gtk_label_set_label (GTK_LABEL (row->label), _("Installed"));
+               gtk_label_set_label (GTK_LABEL (row->label), C_("Single app", "Installed"));
                break;
        case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (row->label, TRUE);
diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui
index d7a2fc93b..e2ab24ce4 100644
--- a/src/gs-app-row.ui
+++ b/src/gs-app-row.ui
@@ -195,7 +195,7 @@
                     <child>
                       <object class="GtkLabel" id="installed-label">
                         <property name="valign">center</property>
-                        <property name="label" translatable="yes">Installed</property>
+                        <property name="label" translatable="yes" context="Single app">Installed</property>
                         <style>
                           <class name="caption"/>
                           <class name="subtitle"/>
diff --git a/src/gs-app-tile.ui b/src/gs-app-tile.ui
index 639c8a2f4..833384365 100644
--- a/src/gs-app-tile.ui
+++ b/src/gs-app-tile.ui
@@ -47,7 +47,7 @@
                     </style>
                     <child>
                       <object class="GtkLabel" id="installed-label">
-                        <property name="label" translatable="yes">Installed</property>
+                        <property name="label" translatable="yes" context="Single app">Installed</property>
                         <property name="margin-start">16</property>
                         <property name="margin-end">16</property>
                         <property name="margin-top">4</property>
diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c
index 724d0dd94..cff5a5067 100644
--- a/src/gs-feature-tile.c
+++ b/src/gs-feature-tile.c
@@ -544,7 +544,7 @@ gs_feature_tile_refresh (GsAppTile *self)
        case GS_APP_STATE_UPDATABLE_LIVE:
                name = g_strdup_printf ("%s (%s)",
                                        gs_app_get_name (app),
-                                       _("Installed"));
+                                       C_("Single app", "Installed"));
                break;
        case GS_APP_STATE_AVAILABLE:
        case GS_APP_STATE_INSTALLING:
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index b93dc0e92..5d1c4c3eb 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -706,7 +706,7 @@ gs_installed_page_get_property (GObject    *object,
                break;
        case PROP_TITLE:
                /* Translators: This is in the context of a list of apps which are installed on the system. */
-               g_value_set_string (value, _("Installed"));
+               g_value_set_string (value, C_("List of installed apps", "Installed"));
                break;
        default:
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff --git a/src/gs-shell.ui b/src/gs-shell.ui
index 4a990e158..6f37dcdd8 100644
--- a/src/gs-shell.ui
+++ b/src/gs-shell.ui
@@ -304,7 +304,7 @@
                                             <property name="name">installed</property>
                                             <!-- FIXME: Add mnemonics support when it’s supported in GTK 
(same for the other pages).
                                                  See https://gitlab.gnome.org/GNOME/gtk/-/issues/3134 -->
-                                            <property name="title" translatable="yes" comments="Translators: 
A label for a button to show only software which is already installed.">Installed</property>
+                                            <property name="title" translatable="yes" comments="Translators: 
A label for a button to show only software which is already installed." context="List of installed 
apps">Installed</property>
                                             <property name="icon-name">app-installed-symbolic</property>
                                             <property name="child">
                                               <object class="GsInstalledPage" id="installed_page">


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