[gnome-software: 2/3] Add translation contexts to various short translatable strings




commit 38daef00ce606c7070f19536fe4519a2ffd3956e
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Mar 1 16:28:24 2021 +0000

    Add translation contexts to various short translatable strings
    
    Strings like ‘Unknown’, ‘High’, ‘Low’, etc., where the context may
    affect the gender the word is conjugated as in some languages.
    
    This is a translatable string change.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #1158

 plugins/odrs/gs-plugin-odrs.c |  2 +-
 src/gs-details-page.c         | 10 +++++-----
 src/gs-details-page.ui        |  2 +-
 src/gs-review-row.c           |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index fe9d12b12..86a115568 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -156,7 +156,7 @@ gs_plugin_initialize (GsPlugin *plugin)
 
        /* Fallback */
        if (priv->distro == NULL)
-               priv->distro = g_strdup ("Unknown");
+               priv->distro = g_strdup (C_("Distribution name", "Unknown"));
 
        /* add source */
        priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 5e61cb12f..2959f6c8b 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1336,15 +1336,15 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
                if (permissions != GS_APP_PERMISSIONS_UNKNOWN) {
                        if (permissions == GS_APP_PERMISSIONS_NONE)
-                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
_("None"));
+                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
C_("App permissions", "None"));
                        else if ((permissions & ~LIMITED_PERMISSIONS) == 0)
-                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
_("Low"));
+                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
C_("App permissions", "Low"));
                        else if ((permissions & ~MEDIUM_PERMISSIONS) == 0)
-                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
_("Medium"));
+                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
C_("App permissions", "Medium"));
                        else
-                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
_("High"));
+                               gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
C_("App permissions", "High"));
                } else {
-                       gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), 
_("Unknown"));
+                       gtk_button_set_label (GTK_BUTTON (self->button_details_permissions_value), C_("App 
permissions", "Unknown"));
                }
 
                gtk_widget_set_visible (self->label_details_permissions_title, TRUE);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index c60da937c..2941769ad 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -1096,7 +1096,7 @@
                                     </child>
                                     <child>
                                       <object class="GtkButton" id="button_details_license_unknown">
-                                        <property name="label" translatable="yes" comments="This refers to 
the license of the application">Unknown</property>
+                                        <property name="label" translatable="yes" comments="This refers to 
the license of the application" context="Application license">Unknown</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">True</property>
diff --git a/src/gs-review-row.c b/src/gs-review-row.c
index a2b65ad6e..a178e6ff2 100644
--- a/src/gs-review-row.c
+++ b/src/gs-review-row.c
@@ -55,7 +55,7 @@ gs_review_row_refresh (GsReviewRow *row)
        reviewer = as_review_get_reviewer_name (priv->review);
        if (reviewer == NULL) {
                /* TRANSLATORS: this is when a user doesn't specify a name */
-               reviewer = _("Unknown");
+               reviewer = C_("Reviewer name", "Unknown");
        }
        gtk_label_set_text (GTK_LABEL (priv->author_label), reviewer);
        date = as_review_get_date (priv->review);


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