[four-in-a-row] Add some translators comments.



commit 78aaf797f48318812bf75d96506b146d0a9cd85a
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Dec 21 16:07:29 2019 +0100

    Add some translators comments.

 src/four-in-a-row.vala | 80 +++++++++++++++++++++++++++++++++++++++++---------
 src/scorebox.vala      |  8 +++++
 src/theme.vala         |  5 ++++
 3 files changed, 79 insertions(+), 14 deletions(-)
---
diff --git a/src/four-in-a-row.vala b/src/four-in-a-row.vala
index 7438281..6e6f864 100644
--- a/src/four-in-a-row.vala
+++ b/src/four-in-a-row.vala
@@ -131,17 +131,24 @@ private class FourInARow : Gtk.Application
         /* Translators: hamburger menu entry; "Appearance" submenu (with a mnemonic that appears pressing 
Alt) */
         section.append_submenu (_("A_ppearance"), (!) appearance_menu);
 
-        section.append (_("Sound"), "app.sound");
+
+        /* Translators: hamburger menu entry with checkbox, for activating or disactivating sound (with a 
mnemonic that appears pressing Alt) */
+        section.append (_("_Sound"), "app.sound");
         section.freeze ();
         app_menu.append_section (null, section);
 
         section = new GLib.Menu ();
+        /* Translators: hamburger menu entry; opens the Scores dialog */
         section.append (_("_Scores"), "app.scores");
         section.freeze ();
         app_menu.append_section (null, section);
 
         section = new GLib.Menu ();
+        /* Translators: hamburger menu entry; opens the application help */
         section.append (_("_Help"), "app.help");
+
+
+        /* Translators: hamburger menu entry; opens the About dialog */
         section.append (_("_About Four-in-a-row"), "app.about");
         section.freeze ();
         app_menu.append_section (null, section);
@@ -376,6 +383,7 @@ private class FourInARow : Gtk.Application
             if (score [PlayerID.NOBODY] == 0)
                 set_status_message (null);
             else
+                /* Translators: text displayed on game end in the headerbar/actionbar, if the game is a tie 
*/
                 set_status_message (_("It’s a draw!"));
             return;
         }
@@ -385,15 +393,19 @@ private class FourInARow : Gtk.Application
             if (human)
             {
                 if (gameover)
+                    /* Translators: text displayed on a one-player game end in the headerbar/actionbar, if 
the human player won */
                     set_status_message (_("You win!"));
                 else
+                    /* Translators: text displayed during a one-player game in the headerbar/actionbar, if 
it is the human player's turn */
                     set_status_message (_("Your Turn"));
             }
             else
             {
                 if (gameover)
+                    /* Translators: text displayed on a one-player game end in the headerbar/actionbar, if 
the computer player won */
                     set_status_message (_("I win!"));
                 else
+                    /* Translators: text displayed during a one-player game in the headerbar/actionbar, if 
it is the computer player's turn */
                     set_status_message (_("I’m Thinking…"));
             }
         }
@@ -687,6 +699,7 @@ private class FourInARow : Gtk.Application
         window.allow_hint (false);
         window.allow_undo (false);
 
+        /* Translators: text *briefly* displayed in the headerbar/actionbar, when a hint is requested */
         set_status_message (_("I’m Thinking…"));
 
         vstr [0] = vlevel [/* strong */ 3];
@@ -701,6 +714,7 @@ private class FourInARow : Gtk.Application
 
         blink_tile (0, c, game_board [0, c], 6);
 
+        /* Translators: text displayed in the headerbar/actionbar, when a hint is requested; the %d is 
replaced by the number of the suggested column */
         s = _("Hint: Column %d").printf (c + 1);
         set_status_message (s);
 
@@ -833,32 +847,70 @@ private class FourInARow : Gtk.Application
 
     private inline void on_help_about (/* SimpleAction action, Variant? parameter */)
     {
-        const string authors [] = {
-            "Tim Musson <trmusson ihug co nz>",
-            "David Neary <bolsh gimp org>",
-            "Nikhar Agrawal <nikharagrawal2006 gmail com>",
-            "Jacob Humphrey <jacob ryan humphrey gmail com>"
+        string [] authors = {
+            /* Translators: in the About dialog, name of an author of the game */
+            _("Tim Musson") + " <trmusson ihug co nz>",
+
+
+            /* Translators: in the About dialog, name of an author of the game */
+            _("David Neary") + " <bolsh gimp org>",
+
+
+            /* Translators: in the About dialog, name of an author of the game */
+            _("Nikhar Agrawal") + " <nikharagrawal2006 gmail com>",
+
+
+            /* Translators: in the About dialog, name of an author of the game */
+            _("Jacob Humphrey") + " <jacob ryan humphrey gmail com>",
+
+
+            /* Translators: in the About dialog, name of an author of the game */
+            _("Arnaud Bonatti") + " <arnaud bonatti gmail com>"
         };
 
-        const string artists [] = {
-            "Alan Horkan",
-            "Anatol Drlicek",
-            "Based on the Faenza icon theme by Matthieu James"
+        string [] artists = {
+            /* Translators: in the About dialog, name of a theme designer */
+            _("Alan Horkan"),
+
+
+            /* Translators: in the About dialog, name of a theme designer */
+            _("Anatol Drlicek"),
+
+
+            /* Translators: in the About dialog, indication about some themes origin */
+            _("Based on the Faenza icon theme by Matthieu James")
         };
 
-        const string documenters[] = { "Timothy Musson" };
+        /* Translators: in the About dialog, name of a documenter */
+        string [] documenters = { _("Timothy Musson") };
+
+
+        /* Translators: text crediting a maintainer, in the about dialog text */
+        string copyright = _("Copyright \xc2\xa9 1999-2008 – Tim Musson and David Neary") + "\n"
+
+
+        /* Translators: text crediting a maintainer, in the about dialog text */
+                         + _("Copyright \xc2\xa9 2014 – Michael Catanzaro") + "\n"
+
+
+        /* Translators: text crediting a maintainer, in the about dialog text */
+                         + _("Copyright \xc2\xa9 2018 – Jacob Humphrey") + "\n"
+
+
+        /* Translators: text crediting a maintainer, in the about dialog text; the %u are replaced with the 
years of start and end */
+                         + _("Copyright \xc2\xa9 %u-%u – Arnaud Bonatti").printf (2019, 2020);
 
         show_about_dialog (window,
             name: PROGRAM_NAME,
             version: VERSION,
-            copyright: "Copyright © 1999–2008 Tim Musson and David Neary\n" +
-                       "Copyright © 2014 Michael Catanzaro\n" +
-                       "Copyright © 2018 Jacob Humphrey",
+            copyright: copyright,
             license_type: License.GPL_3_0,
+            /* Translators: about dialog text, introducing the game */
             comments: _("Connect four in a row to win"),
             authors: authors,
             documenters: documenters,
             artists: artists,
+            /* 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"),
             logo_icon_name: "org.gnome.Four-in-a-row",
             website: "https://wiki.gnome.org/Apps/Four-in-a-row";);
diff --git a/src/scorebox.vala b/src/scorebox.vala
index b316f01..f824ec1 100644
--- a/src/scorebox.vala
+++ b/src/scorebox.vala
@@ -25,6 +25,7 @@ private class Scorebox : Dialog {
     private Label[] label_score;
 
     internal Scorebox(Window parent, FourInARow application) {
+        /* Translators: title of the Scores dialog; plural noun */
         Object(title: _("Scores"),
                use_header_bar: 1,
                destroy_with_parent: true,
@@ -72,6 +73,7 @@ private class Scorebox : Dialog {
         label_score[PlayerID.PLAYER2].set_xalign(0);
         label_score[PlayerID.PLAYER2].set_yalign(0.5f);
 
+        /* Translators: in the Scores dialog, label of the line where is indicated the number of tie games */
         label_name[PlayerID.NOBODY] = new Label(_("Drawn:"));
         grid2.attach(label_name[PlayerID.NOBODY], 0, 2, 1, 1);
         label_name[PlayerID.NOBODY].set_xalign(0);
@@ -92,13 +94,19 @@ private class Scorebox : Dialog {
     internal void update(int[] scores, bool one_player_game) {
         if (one_player_game) {
             if (scores[PlayerID.PLAYER1] >= scores[PlayerID.PLAYER2]) {
+                /* Translators: in the Scores dialog, label of the line where is indicated the number of 
games won by the human player */
                 label_name[0].set_text(_("You:"));
+
+                /* Translators: in the Scores dialog, label of the line where is indicated the number of 
games won by the computer player */
                 label_name[1].set_text(_("Me:"));
 
                 label_score[0].label = scores[PlayerID.PLAYER1].to_string();
                 label_score[1].label = scores[PlayerID.PLAYER2].to_string();
             } else {
+                /* Translators: in the Scores dialog, label of the line where is indicated the number of 
games won by the computer player */
                 label_name[0].set_text(_("Me:"));
+
+                /* Translators: in the Scores dialog, label of the line where is indicated the number of 
games won by the human player */
                 label_name[1].set_text(_("You:"));
 
                 label_score[0].label = scores[1].to_string();
diff --git a/src/theme.vala b/src/theme.vala
index 9a7b679..20b16a8 100644
--- a/src/theme.vala
+++ b/src/theme.vala
@@ -67,6 +67,7 @@ private static string theme_get_player (PlayerID who)
 
 private const Theme theme [] = {
     {
+        /* Translators: name of a black-on-white theme, for helping people with visual misabilities */
         N_("High Contrast"),
         "tileset_50x50_hcontrast.svg",
         null,
@@ -76,6 +77,7 @@ private const Theme theme [] = {
         N_("Circle’s turn"),    N_("Cross’s turn")
     },
     {
+        /* Translators: name of a white-on-black theme, for helping people with visual misabilities */
         N_("High Contrast Inverse"),
         "tileset_50x50_hcinverse.svg",
         null,
@@ -85,6 +87,7 @@ private const Theme theme [] = {
         N_("Circle’s turn"),    N_("Cross’s turn")
     },
     {
+        /* Translators: name of a red-versus-green theme */
         N_("Red and Green Marbles"),
         "tileset_50x50_faenza-glines-icon1.svg",
         "bg_toplight.png",
@@ -94,6 +97,7 @@ private const Theme theme [] = {
         N_("Red’s turn"),       N_("Green’s turn")
     },
     {
+        /* Translators: name of a blue-versus-red theme */
         N_("Blue and Red Marbles"),
         "tileset_50x50_faenza-glines-icon2.svg",
         "bg_toplight.png",
@@ -103,6 +107,7 @@ private const Theme theme [] = {
         N_("Blue’s turn"),      N_("Red’s turn")
     },
     {
+        /* Translators: name of a red-versus-green theme with drawing on the tiles */
         N_("Stars and Rings"),
         "tileset_50x50_faenza-gnect-icon.svg",
         "bg_toplight.png",


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