[five-or-more/arnaudb/kill-preferences-dialog: 10/10] Add translators comments.



commit 6c5b776120880259a13afc92e9b57c656d58d792
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri May 8 17:59:49 2020 +0200

    Add translators comments.

 src/game.vala   | 11 ++++++++---
 src/main.vala   | 43 ++++++++++++++++++++++++++++++-------------
 src/window.vala | 22 ++++++++++++++++++----
 3 files changed, 56 insertions(+), 20 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 1442365..e7ac859 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -83,14 +83,19 @@ private class Game : Object
 
     internal const GameDifficulty[] game_difficulty = {
         { -1, -1, -1, -1 },
-        { 7, 7, 5, 3 },
-        { 9, 9, 7, 3 },
-        { 20, 15, 7, 7 }
+        {  7,  7,  5,  3 },
+        {  9,  9,  7,  3 },
+        { 20, 15,  7,  7 }
     };
 
     internal const KeyValue scorecats[] = {
+        /* Translators: board size, as displayed in the Scores dialog */
         { "Small",  NC_("board size", "Small")  },
+
+        /* Translators: board size, as displayed in the Scores dialog */
         { "Medium", NC_("board size", "Medium") },
+
+        /* Translators: board size, as displayed in the Scores dialog */
         { "Large",  NC_("board size", "Large")  }
     };
 
diff --git a/src/main.vala b/src/main.vala
index 1e51331..3cc7add 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -23,6 +23,9 @@
 
 private class FiveOrMoreApp: Gtk.Application
 {
+    /* Translators: name of the application, as displayed in the About dialog, some window managers, etc. */
+    private const string PROGRAM_NAME = _("Five or More");
+
     internal const string KEY_SIZE = "size";
     internal const string KEY_BACKGROUND_COLOR = "background-color";
     internal const string KEY_THEME = "ball-theme";
@@ -45,7 +48,7 @@ private class FiveOrMoreApp: Gtk.Application
         Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         Intl.textdomain (GETTEXT_PACKAGE);
 
-        Environment.set_application_name (_("Five or More"));
+        Environment.set_application_name (PROGRAM_NAME);
         Gtk.Window.set_default_icon_name ("org.gnome.five-or-more");
 
         FiveOrMoreApp app = new FiveOrMoreApp ();
@@ -91,36 +94,50 @@ private class FiveOrMoreApp: Gtk.Application
     {
         /* Appears on the About dialog. */
         const string authors[] = {
-            "Robert Szokovacs <szo appaloosacorp hu>",
-            "Szabolcs B\xc3\xa1n <shooby gnome hu>",
-            null
+            /* Translators: About dialog text, name and email of one of the authors */
+            _("Robert Szokovacs <szo appaloosacorp hu>"),
+
+            /* Translators: About dialog text, name and email of one of the authors */
+            _("Szabolcs B\xc3\xa1n <shooby gnome hu>")
         };
 
         const string artists[] = {
-            "Callum McKenzie",
-            "Kenney.nl",
-            "Robert Roth",
+            /* Translators: About dialog text, name of one of the artists */
+            _("Callum McKenzie"),
+
+            /* Translators: About dialog text, name of a website that provided some artworks */
+            _("kenney.nl"),
+
+            /* Translators: About dialog text, name of one of the artists */
+            _("Robert Roth")
         };
 
         const string documenters[] = {
-            "Tiffany Antopolski",
-            "Lanka Rathnayaka",
-            null
+            /* Translators: About dialog text, name of one of the documenters */
+            _("Tiffany Antopolski"),
+
+            /* Translators: About dialog text, name of one of the documenters */
+            _("Lanka Rathnayaka")
         };
 
-        const string copyright = "Copyright © 1997–2008 Free Software Foundation, Inc.\n
-            Copyright © 2013–2014 Michael Catanzaro";
+        /* Translators: About dialog text, first line of the copyright notice */
+        const string copyright = _("Copyright © 1997–2008 Free Software Foundation, Inc.") + "\n"
+
+        /* Translators: About dialog text, second line of the copyright notice */
+                               + _("Copyright © 2013–2014 Michael Catanzaro");
 
         Gtk.show_about_dialog (window,
-                               "program-name", _("Five or More"),
+                               "program-name", PROGRAM_NAME,
                                "logo-icon-name", "org.gnome.five-or-more",
                                "version", VERSION,
+                               /* Translators: About dialog text, describing the application */
                                "comments", _("GNOME port of the once-popular Color Lines game"),
                                "copyright", copyright,
                                "license-type", Gtk.License.GPL_2_0,
                                "authors", authors,
                                "artists", artists,
                                "documenters", documenters,
+                               /* Translators: about dialog text; this string should be replaced by a text 
crediting yourselves and your translation team, or should be left empty. Do not translate literally! */
                                "translator-credits", _("translator-credits"),
                                "website", "https://wiki.gnome.org/Apps/Five%20or%20more";);
     }
diff --git a/src/window.vala b/src/window.vala
index 0097575..eac7a33 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -46,10 +46,17 @@ private class GameWindow : ApplicationWindow
 
     private Games.Scores.Context highscores;
     private string[] status = {
-            _("Match five objects of the same type in a row to score!"),
-            _("You can’t move there!"),
-            _("Game Over!"),
-            _("Score: %d")
+        /* Translators: subtitle of the headerbar, at the application start */
+        _("Match five objects of the same type in a row to score!"),
+
+        /* Translators: subtitle of the headerbar, when the user clicked on a tile where the selected marble 
cannot move */
+        _("You can’t move there!"),
+
+        /* Translators: subtitle of the headerbar, at the end of a game */
+        _("Game Over!"),
+
+        /* Translators: subtitle of the headerbar, during a game; the %d is replaced by the score */
+        _("Score: %d")
     };
 
     private const GLib.ActionEntry win_actions [] =
@@ -113,6 +120,7 @@ private class GameWindow : ApplicationWindow
 
         var importer = new Games.Scores.DirectoryImporter ();
         highscores = new Games.Scores.Context.with_importer ("five-or-more",
+                                                             /* Translators: text in the Scores dialog, 
introducing the combobox */
                                                              _("Board Size: "),
                                                              this,
                                                              create_category_from_key,
@@ -181,6 +189,7 @@ private class GameWindow : ApplicationWindow
     private inline void change_background ()
     {
         string old_color_string = settings.get_string (FiveOrMoreApp.KEY_BACKGROUND_COLOR);
+        /* Translators: title of the ColorChooser dialog that appears from the hamburger menu > "Appearance" 
submenu > "Background" section > "Select color" entry */
         ColorChooserDialog dialog = new ColorChooserDialog (_("Background color"), this);
         if (!dialog.rgba.parse (old_color_string))
             return;
@@ -233,8 +242,13 @@ private class GameWindow : ApplicationWindow
                                                          flags,
                                                          MessageType.WARNING,
                                                          ButtonsType.NONE,
+                                                         /* Translators: text of a dialog that appears when 
the user starts a new game while the score is not null */
                                                          _("Are you sure you want to start a new %u × %u 
game?").printf (n_rows, n_cols));
+
+            /* Translators: button of a dialog that appears when the user starts a new game while the score 
is not null; the other answer is "_Restart" */
             restart_game_dialog.add_buttons (_("_Cancel"), ResponseType.CANCEL,
+
+            /* Translators: button of a dialog that appears when the user starts a new game while the score 
is not null; the other answer is "_Cancel" */
                                              _("_Restart"), ResponseType.OK);
 
             var result = restart_game_dialog.run ();


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