[gnome-software] Add a lot of translator comments for review



commit 068e7f4e2bfc9ca6edea4141ace5e3e4bd37114f
Author: Richard Hughes <richard hughsie com>
Date:   Thu Sep 12 17:16:06 2013 +0100

    Add a lot of translator comments for review

 src/gnome-software.ui              |    2 +-
 src/gs-app-widget.c                |   10 ++++++++++
 src/gs-application.c               |    4 ++++
 src/gs-category.c                  |    2 ++
 src/gs-plugin-loader.c             |    3 +++
 src/gs-shell-details.c             |   30 +++++++++++++++++++++---------
 src/gs-shell-installed.c           |   14 ++++++++++++--
 src/gs-shell-search.c              |    4 ++++
 src/gs-shell-updates.c             |    5 ++++-
 src/gs-shell.c                     |    1 +
 src/gs-utils.c                     |    3 +++
 src/plugins/gs-plugin-packagekit.c |    7 ++++++-
 12 files changed, 71 insertions(+), 14 deletions(-)
---
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index 0683b6f..a3b5610 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -764,7 +764,7 @@
                         <property name="halign">start</property>
                         <property name="valign">start</property>
                         <property name="hexpand">True</property>
-                        <property name="label" translatable="yes">The Gimp</property>
+                        <property name="label"></property>
                         <property name="margin_bottom">20</property>
                       </object>
                       <packing>
diff --git a/src/gs-app-widget.c b/src/gs-app-widget.c
index fbbb028..33321f5 100644
--- a/src/gs-app-widget.c
+++ b/src/gs-app-widget.c
@@ -104,11 +104,15 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
        case GS_APP_STATE_AVAILABLE:
                gtk_widget_set_visible (priv->spinner, FALSE);
                gtk_widget_set_visible (priv->button, TRUE);
+               /* TRANSLATORS: this is a button next to the search results that
+                * allows the application to be easily installed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Install"));
                break;
        case GS_APP_STATE_INSTALLED:
                gtk_widget_set_visible (priv->spinner, FALSE);
                gtk_widget_set_visible (priv->button, TRUE);
+               /* TRANSLATORS: this is a button next to the search results that
+                * allows the application to be easily removed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
                if (priv->colorful)
                        gtk_style_context_add_class (context, "destructive-action");
@@ -116,6 +120,8 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
        case GS_APP_STATE_UPDATABLE:
                gtk_widget_set_visible (priv->spinner, FALSE);
                gtk_widget_set_visible (priv->button, FALSE);
+               /* TRANSLATORS: this is a button next to the search results that
+                * allows the application to be updated. not normally shown */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Update"));
                break;
        case GS_APP_STATE_INSTALLING:
@@ -123,6 +129,8 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
                gtk_widget_set_visible (priv->spinner, TRUE);
                gtk_widget_set_visible (priv->button, TRUE);
                gtk_widget_set_sensitive (priv->button, FALSE);
+               /* TRANSLATORS: this is a button next to the search results that
+                * shows the status of an application being installed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Installing"));
                break;
        case GS_APP_STATE_REMOVING:
@@ -130,6 +138,8 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
                gtk_widget_set_visible (priv->spinner, TRUE);
                gtk_widget_set_visible (priv->button, TRUE);
                gtk_widget_set_sensitive (priv->button, FALSE);
+               /* TRANSLATORS: this is a button next to the search results that
+                * shows the status of an application being erased */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Removing"));
                break;
        default:
diff --git a/src/gs-application.c b/src/gs-application.c
index fddec0f..af69304 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -83,9 +83,12 @@ about_activated (GSimpleAction *action,
        logo = gtk_icon_theme_load_icon (icon_theme, "gnome-software", 256, 0, NULL);
 
        gtk_show_about_dialog (parent,
+                              /* TRANSLATORS: this is the title of the about window */
                               "title", _("About GNOME Software"),
+                              /* TRANSLATORS: this is the application name */
                               "program-name", _("GNOME Software"),
                               "authors", authors,
+                              /* TRANSLATORS: well, we seem to think so, anyway */
                               "comments", _("A nice way to manage the software on your system."),
                               "copyright", copyright,
                               "license-type", GTK_LICENSE_GPL_2_0,
@@ -207,6 +210,7 @@ gs_application_command_line (GApplication        *application,
        gboolean verbose = FALSE;
        const GOptionEntry options[] = {
                { "mode", '\0', 0, G_OPTION_ARG_STRING, &mode,
+                 /* TRANSLATORS: this is a command line option */
                  _("Start up mode, either 'updates', 'installed' or 'overview'"), _("MODE") },
                { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, NULL, NULL },
                { "help", '?', 0, G_OPTION_ARG_NONE, &help, NULL, NULL },
diff --git a/src/gs-category.c b/src/gs-category.c
index 581743d..e27fc8e 100644
--- a/src/gs-category.c
+++ b/src/gs-category.c
@@ -116,6 +116,8 @@ gs_category_sort_subcategories (GsCategory *category)
                }
        }
        if (!subcat_all) {
+               /* TRANSLATORS: this is where all applications that don't
+                * fit in other groups are put */
                all = gs_category_new (category, NULL, _("General"));
                gs_category_add_subcategory (category, all);
        }
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index afd684f..0d7c6ef 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -436,7 +436,10 @@ cd_plugin_loader_add_os_update_item (GList *list)
        gs_app_set_kind (app_os, GS_APP_KIND_OS_UPDATE);
        gs_app_set_state (app_os, GS_APP_STATE_UPDATABLE);
        gs_app_set_source (app_os, "os-update");
+       /* TRANSLATORS: this is a group of updates that are not packages and
+        * are ot shown in the main list */
        gs_app_set_name (app_os, _("OS Updates"));
+       /* TRANSLATORS: this is a longer description of the os-update item */
        gs_app_set_summary (app_os, _("Includes performance, stability and security improvements for all 
users."));
        gs_app_set_description (app_os, _("Includes performance, stability and security improvements for all 
users."));
        for (l = list; l != NULL; l = l->next) {
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 7364811..852ec13 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -86,12 +86,16 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
                gtk_widget_set_visible (widget, TRUE);
                gtk_widget_set_sensitive (widget, TRUE);
                gtk_style_context_add_class (gtk_widget_get_style_context (widget), "suggested-action");
+               /* TRANSLATORS: button text in the header when an application
+                * can be installed */
                gtk_button_set_label (GTK_BUTTON (widget), _("Install"));
                break;
        case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (widget, TRUE);
                gtk_widget_set_sensitive (widget, FALSE);
                gtk_style_context_remove_class (gtk_widget_get_style_context (widget), "suggested-action");
+               /* TRANSLATORS: button text in the header when an application
+                * is in the process of being installed */
                gtk_button_set_label (GTK_BUTTON (widget), _("Installing"));
                break;
        case GS_APP_STATE_INSTALLED:
@@ -115,12 +119,14 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
                        gtk_widget_set_visible (widget, TRUE);
                        gtk_widget_set_sensitive (widget, TRUE);
                        gtk_style_context_add_class (gtk_widget_get_style_context (widget), 
"destructive-action");
+                       /* TRANSLATORS: button text in the header when an application can be erased */
                        gtk_button_set_label (GTK_BUTTON (widget), _("Remove"));
                        break;
                case GS_APP_STATE_REMOVING:
                        gtk_widget_set_visible (widget, TRUE);
                        gtk_widget_set_sensitive (widget, FALSE);
                        gtk_style_context_remove_class (gtk_widget_get_style_context (widget), 
"destructive-action");
+                       /* TRANSLATORS: button text in the header when an application can be installed */
                        gtk_button_set_label (GTK_BUTTON (widget), _("Removing"));
                        break;
                case GS_APP_STATE_UPDATABLE:
@@ -283,6 +289,8 @@ gs_shell_details_app_remove_button_cb (GtkWidget *widget, GsShellDetails *shell_
        window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "window_software"));
        markup = g_string_new ("");
        g_string_append_printf (markup,
+                               /* TRANSLATORS: this is a prompt message, and
+                                * '%s' is an application summary, e.g. 'GNOME Clocks' */
                                _("Are you sure you want to remove %s?"),
                                gs_app_get_name (priv->app));
        g_string_prepend (markup, "<b>");
@@ -294,8 +302,10 @@ gs_shell_details_app_remove_button_cb (GtkWidget *widget, GsShellDetails *shell_
                                         NULL);
        gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), markup->str);
        gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog),
+                                                   /* TRANSLATORS: longer dialog text */
                                                    _("%s will be removed, and you will have to install it to 
use it again."),
                                                    gs_app_get_name (priv->app));
+       /* TRANSLATORS: this is button text to remove the application */
        gtk_dialog_add_button (GTK_DIALOG (dialog), _("Remove"), GTK_RESPONSE_OK);
        response = gtk_dialog_run (GTK_DIALOG (dialog));
        if (response == GTK_RESPONSE_OK) {
@@ -370,24 +380,26 @@ gs_shell_details_app_history_button_cb (GtkWidget *widget, GsShellDetails *shell
                /* add the action */
                switch (gs_app_get_state (app)) {
                case GS_APP_STATE_AVAILABLE:
+               case GS_APP_STATE_REMOVING:
+                       /* TRANSLATORS: this is the status in the history UI,
+                        * where we are showing the application was removed */
                        tmp = _("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");
                        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");
                        break;
-               case GS_APP_STATE_INSTALLING:
-                       tmp = _("Installing");
-                       break;
-               case GS_APP_STATE_REMOVING:
-                       tmp = _("Removing");
-                       break;
-               case GS_APP_STATE_LAST:
-                       tmp = _("Last");
-                       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");
                        break;
                }
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index df87081..148f7d6 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -145,6 +145,8 @@ gs_shell_installed_app_remove_cb (GsAppWidget *app_widget,
        markup = g_string_new ("");
        app = gs_app_widget_get_app (app_widget);
        g_string_append_printf (markup,
+                               /* TRANSLATORS: this is a prompt message, and
+                                * '%s' is an application summary, e.g. 'GNOME Clocks' */
                                _("Are you sure you want to remove %s?"),
                                gs_app_get_name (app));
        g_string_prepend (markup, "<b>");
@@ -156,8 +158,10 @@ gs_shell_installed_app_remove_cb (GsAppWidget *app_widget,
                                         NULL);
        gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), markup->str);
        gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog),
+                                                   /* TRANSLATORS: longer dialog text */
                                                    _("%s will be removed, and you will have to install it to 
use it again."),
                                                    gs_app_get_name (app));
+       /* TRANSLATORS: this is button text to remove the application */
        gtk_dialog_add_button (GTK_DIALOG (dialog), _("Remove"), GTK_RESPONSE_OK);
        response = gtk_dialog_run (GTK_DIALOG (dialog));
        if (response == GTK_RESPONSE_OK) {
@@ -397,10 +401,16 @@ gs_shell_installed_pending_apps_changed_cb (GsPluginLoader *plugin_loader,
        widget = GTK_WIDGET (gtk_builder_get_object (shell_installed->priv->builder,
                                                     "label_button_installed"));
        pending = gs_plugin_loader_get_pending (plugin_loader);
-       if (pending->len == 0)
+       if (pending->len == 0) {
+               /* TRANSLATORS: this is tab button to show the list of
+                * installed software */
                label = g_strdup (_("Installed"));
-       else
+       } else {
+               /* TRANSLATORS: this is tab button to show the list of
+                * installed software. The '%d' refers to the number of
+                * applications either installing or erasing */
                label = g_strdup_printf (_("Installed (%d)"), pending->len);
+       }
        for (i = 0; i < pending->len; i++) {
                app = GS_APP (g_ptr_array_index (pending, i));
                if (gs_app_get_state (app) == GS_APP_STATE_INSTALLING) {
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index da95c21..4f00a6e 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -92,6 +92,8 @@ gs_shell_search_app_remove (GsShellSearch *shell_search, GsApp *app)
        window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "window_software"));
        markup = g_string_new ("");
        g_string_append_printf (markup,
+                               /* TRANSLATORS: this is a prompt message, and
+                                * '%s' is an application summary, e.g. 'GNOME Clocks' */
                                _("Are you sure you want to remove %s?"),
                                gs_app_get_name (app));
        g_string_prepend (markup, "<b>");
@@ -103,8 +105,10 @@ gs_shell_search_app_remove (GsShellSearch *shell_search, GsApp *app)
                                         NULL);
        gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), markup->str);
        gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog),
+                                                   /* TRANSLATORS: longer dialog text */
                                                    _("%s will be removed, and you will have to install it to 
use it again."),
                                                    gs_app_get_name (app));
+       /* TRANSLATORS: this is button text to remove the application */
        gtk_dialog_add_button (GTK_DIALOG (dialog), _("Remove"), GTK_RESPONSE_OK);
        response = gtk_dialog_run (GTK_DIALOG (dialog));
        if (response == GTK_RESPONSE_OK) {
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 144239c..b81202a 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -145,8 +145,11 @@ gs_shell_updates_refresh (GsShellUpdates *shell_updates,
 
        /* set the window title to be more specific */
        window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "window_software"));
-       if (show_historical)
+       if (show_historical) {
+               /* TRANSLATORS: window title to suggest that we are showing
+                * the offline updates that have just been applied */
                gtk_window_set_title (window, _("Recent Software Updates"));
+       }
 
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_updates"));
        if (scroll_up) {
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 2e122bf..366a7d7 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -113,6 +113,7 @@ gs_shell_change_mode (GsShell *shell, GsShellMode mode, GsApp *app, GsCategory *
 
        /* set the window title back to default */
        window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "window_software"));
+       /* TRANSLATORS: this is the main window title */
        gtk_window_set_title (window, _("Software"));
 
        /* update main buttons according to mode */
diff --git a/src/gs-utils.c b/src/gs-utils.c
index 2aa0add..9e8afd3 100644
--- a/src/gs-utils.c
+++ b/src/gs-utils.c
@@ -161,8 +161,11 @@ gs_app_notify_installed (GsApp *app)
        gchar *summary;
        NotifyNotification *n;
 
+       /* TRANSLATORS: this is the summary of a notification that an application
+        * has been successfully installed */
        summary = g_strdup_printf (_("%s is now installed"), gs_app_get_name (app));
        n = notify_notification_new (summary, NULL, "system-software-install");
+       /* TRANSLATORS: this is button that opens the newly installed application */
        notify_notification_add_action (n, "launch", _("Launch"),
                                        launch_app, g_object_ref (app), g_object_unref);
        g_signal_connect (n, "closed", G_CALLBACK (on_notification_closed), NULL);
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index 719478b..8f36788 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -505,19 +505,24 @@ gs_plugin_add_categories (GsPlugin *plugin,
 {
        GsCategory *category;
 
-       /* Add Ons */
+       /* TRANSLATORS: these are extra things that add to existing programs,
+        * for instance fonts, codecs or language packs */
        category = gs_category_new (NULL, "PK::add-ons", _("Add-ons"));
        gs_category_add_subcategory (category, gs_category_new (category,
                                                                "PK::codecs",
+                                                               /* TRANSLATORS: audio/video decoders */
                                                                _("Codecs")));
        gs_category_add_subcategory (category, gs_category_new (category,
                                                                "PK::fonts",
+                                                               /* TRANSLATORS: fonts of different styles or 
languages */
                                                                _("Fonts")));
        gs_category_add_subcategory (category, gs_category_new (category,
                                                                "PK::inputs",
+                                                               /* TRANSLATORS: these are ways to enter text 
*/
                                                                _("Input Sources")));
        gs_category_add_subcategory (category, gs_category_new (category,
                                                                "PK::languages",
+                                                               /* TRANSLATORS: additional languages for apps 
*/
                                                                _("Language Packs")));
        *list = g_list_prepend (*list, category);
 


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