[gnome-software] Add translation context in a number of places



commit 8c114809df6e06ebb01ed725d5f145c2f0a0aec6
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 15 18:03:06 2014 -0400

    Add translation context in a number of places
    
    We use "Unknown" in several contexts, and several other strings
    could do with disambiguating as well.
    https://bugzilla.gnome.org/show_bug.cgi?id=726428

 src/gs-history-dialog.c |    8 ++++----
 src/gs-shell-details.c  |   16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/gs-history-dialog.c b/src/gs-history-dialog.c
index f1e5ab2..8adc226 100644
--- a/src/gs-history-dialog.c
+++ b/src/gs-history-dialog.c
@@ -79,24 +79,24 @@ gs_history_dialog_set_app (GsHistoryDialog *dialog, GsApp *app)
                case GS_APP_STATE_REMOVING:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing the application was removed */
-                       tmp = _("Removed");
+                       tmp = C_("app status", "Removed");
                        break;
                case GS_APP_STATE_INSTALLED:
                case GS_APP_STATE_INSTALLING:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing the application was installed */
-                       tmp = _("Installed");
+                       tmp = C_("app status", "Installed");
                        break;
                case GS_APP_STATE_UPDATABLE:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing the application was updated */
-                       tmp = _("Updated");
+                       tmp = C_("app status", "Updated");
                        break;
                default:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing that something happened to the
                         * application but we don't know what */
-                       tmp = _("Unknown");
+                       tmp = C_("app status", "Unknown");
                        break;
                }
                widget = gtk_label_new (tmp);
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index dcb94af..345c93b 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -590,12 +590,12 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        tmp = gs_app_get_licence (priv->app);
        if (tmp == NULL) {
                /* TRANSLATORS: this is where the licence is not known */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_licence_value), _("Unknown"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_licence_value), C_("license", "Unknown"));
                gtk_widget_set_tooltip_text (priv->label_details_licence_value, NULL);
        } else if (strlen (tmp) > 40) {
                /* TRANSLATORS: this is where the licence is insanely
                 * complicated and the full string is put into the tooltip */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_licence_value), _("Complicated!"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_licence_value), C_("license", 
"Complicated!"));
                gtk_widget_set_tooltip_text (priv->label_details_licence_value, tmp);
        } else {
                gtk_label_set_label (GTK_LABEL (priv->label_details_licence_value), tmp);
@@ -608,16 +608,16 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
                gtk_label_set_label (GTK_LABEL (priv->label_details_version_value), tmp);
        } else {
                /* TRANSLATORS: this is where the version is not known */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_version_value), _("Unknown"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_version_value), C_("version", "Unknown"));
        }
 
        /* set the size */
        if (gs_app_get_size (priv->app) == GS_APP_SIZE_UNKNOWN) {
                /* TRANSLATORS: this is where the size is being worked out */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_size_value), _("Calculating…"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_size_value), C_("size", "Calculating…"));
        } else if (gs_app_get_size (priv->app) == GS_APP_SIZE_MISSING) {
                /* TRANSLATORS: this is where the size is not known */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_size_value), _("Unknown"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_size_value), C_("size", "Unknown"));
        } else {
                size = g_format_size (gs_app_get_size (priv->app));
                gtk_label_set_label (GTK_LABEL (priv->label_details_size_value), size);
@@ -629,7 +629,7 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        if (updated == GS_APP_INSTALL_DATE_UNKNOWN ||
            updated == GS_APP_INSTALL_DATE_UNSET) {
                /* TRANSLATORS: this is where the updated date is not known */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_updated_value), _("Never"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_updated_value), C_("updated", "Never"));
        } else {
                GDateTime *dt;
                dt = g_date_time_new_from_unix_utc (updated);
@@ -644,7 +644,7 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        if (tmp == NULL || tmp[0] == '\0') {
                /* TRANSLATORS: this is the application isn't in any
                 * defined menu category */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_category_value), _("None"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_category_value), C_("menu category", 
"None"));
        } else {
                gtk_label_set_label (GTK_LABEL (priv->label_details_category_value), tmp);
        }
@@ -654,7 +654,7 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        if (tmp == NULL || tmp[0] == '\0') {
                /* TRANSLATORS: this is where we don't know the origin of the
                 * application */
-               gtk_label_set_label (GTK_LABEL (priv->label_details_origin_value), _("Unknown"));
+               gtk_label_set_label (GTK_LABEL (priv->label_details_origin_value), C_("origin", "Unknown"));
        } else {
                gtk_label_set_label (GTK_LABEL (priv->label_details_origin_value), tmp);
        }


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