[gnome-2048] Add translators comments.



commit 075b499e7d337817ac04cc9d41896dd220fb87ee
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Jan 24 15:36:51 2019 +0100

    Add translators comments.
    
    Improve also a bit the about dialog.

 data/congrats.ui                |  3 +++
 data/mainwindow.ui              |  6 ++++++
 data/org.gnome.2048.gschema.xml | 20 ++++++++++++++++++++
 data/preferences.ui             |  7 +++++++
 src/application.vala            | 22 ++++++++++++++++++----
 5 files changed, 54 insertions(+), 4 deletions(-)
---
diff --git a/data/congrats.ui b/data/congrats.ui
index 7914d90..43342c2 100644
--- a/data/congrats.ui
+++ b/data/congrats.ui
@@ -5,6 +5,7 @@
   <object class="GtkDialog" id="congratsdialog">
     <property name="can_focus">False</property>
     <property name="border_width">12</property>
+    <!-- Translators: title of the dialog that appears (with default settings) when you reach 2048 -->
     <property name="title" translatable="yes">Congratulations!</property>
     <property name="resizable">False</property>
     <property name="type_hint">dialog</property>
@@ -19,6 +20,7 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button1">
+                <!-- Translators: button in the "Congratulations" dialog that appears (with default 
settings) when you reach 2048 -->
                 <property name="label" translatable="yes">New Game</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -35,6 +37,7 @@
             </child>
             <child>
               <object class="GtkButton" id="button2">
+                <!-- Translators: button in the "Congratulations" dialog that appears (with default 
settings) when you reach 2048; the player can continue playing after 2048 -->
                 <property name="label" translatable="yes">Keep Playing</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
diff --git a/data/mainwindow.ui b/data/mainwindow.ui
index b8e1d15..e9c9391 100644
--- a/data/mainwindow.ui
+++ b/data/mainwindow.ui
@@ -13,6 +13,7 @@
       <object class="GtkHeaderBar" id="headerbar">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <!-- Translators: title of the window, displayed in the headerbar -->
         <property name="title" translatable="yes">GNOME 2048</property>
         <property name="show_close_button">True</property>
         <child>
@@ -21,6 +22,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="action_name">app.undo</property>
+            <!-- Translators: tooltip text of the Undo button in the headerbar -->
             <property name="tooltip_text" translatable="yes">Undo</property>
             <property name="always_show_image">True</property>
             <property name="focus-on-click">False</property>
@@ -41,6 +43,7 @@
         </child>
         <child>
           <object class="GtkButton" id="new-game-button">
+            <!-- Translators: button in the headerbar -->
             <property name="label" translatable="yes">_New Game</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -121,12 +124,14 @@
   <menu id="hamburger-menu">
     <section>
       <item>
+        <!-- Translators: entry in the hamburger menu; opens a window showing best scores -->
         <attribute name="label" translatable="yes">Scores</attribute>
         <attribute name="action">app.scores</attribute>
       </item>
     </section>
     <section>
       <item>
+        <!-- Translators: entry in the hamburger menu; opens a window for configuring application -->
         <attribute name="label" translatable="yes">Preferences</attribute>
         <attribute name="action">app.preferences</attribute>
       </item>
@@ -135,6 +140,7 @@
         <attribute name="action">app.help</attribute>
       </item -->
       <item>
+        <!-- Translators: entry in the hamburger menu -->
         <attribute name="label" translatable="yes">About 2048</attribute>
         <attribute name="action">app.about</attribute>
       </item>
diff --git a/data/org.gnome.2048.gschema.xml b/data/org.gnome.2048.gschema.xml
index 4bf5241..2e64040 100644
--- a/data/org.gnome.2048.gschema.xml
+++ b/data/org.gnome.2048.gschema.xml
@@ -2,52 +2,72 @@
   <schema id="org.gnome.2048" path="/org/gnome/2048/">
     <key name="window-width" type="i">
       <default>600</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/window-width' -->
       <summary>Window width</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/window-width' -->
       <description>Window width.</description>
     </key>
     <key name="window-height" type="i">
       <default>600</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/window-height' -->
       <summary>Window height</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/window-height' -->
       <description>Window height.</description>
     </key>
     <key name="window-maximized" type="b">
       <default>false</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/window-maximized' -->
       <summary>Window maximized</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/window-maximized' 
-->
       <description>Window maximization state.</description>
     </key>
     <key name="rows" type="i">
       <default>4</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/rows' -->
       <summary>Number of rows</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/rows' -->
       <description>Game grid number of rows.</description>
     </key>
     <key name="cols" type="i">
       <default>4</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/cols' -->
       <summary>Number of columns</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/cols' -->
       <description>Game grid number of columns.</description>
     </key>
     <key name="target-value" type="i">
       <default>2048</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/target-value' -->
       <summary>Target value</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/target-value' -->
       <description>Tile value at which user is congratulated.</description>
     </key>
     <key name="do-congrat" type="b">
       <default>true</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/do-congrat' -->
       <summary>Congrat on target tile</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/do-congrat' -->
       <description>Whether the user shall be congratulated on obtaining target tile.</description>
     </key>
     <key name="animations-speed" type="d">
       <default>100.0</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/animations-speed' -->
       <summary>Animations speed</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/animations-speed' 
-->
       <description>Duration of animations: show tile, move tile, and dim tile.</description>
     </key>
     <key name="allow-undo" type="b">
       <default>false</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/allow-undo' -->
       <summary>Allow undo</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/allow-undo' -->
       <description>Whether tile movements can be undone.</description>
     </key>
     <key name="allow-undo-max" type="i">
       <default>10</default>
+      <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/2048/allow-undo-max' -->
       <summary>Number of undo movements</summary>
+      <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/2048/allow-undo-max' -->
       <description>Maximum number of tile movements that can be undone.</description>
     </key>
   </schema>
diff --git a/data/preferences.ui b/data/preferences.ui
index 5784191..2455fe7 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -12,6 +12,7 @@
   <object class="GtkDialog" id="preferencesdialog">
     <property name="can_focus">False</property>
     <property name="border_width">12</property>
+    <!-- Translators: title of the dialog that appears when the users clicks the "Preferences" entry in the 
hamburger menu -->
     <property name="title" translatable="yes">Preferences</property>
     <property name="resizable">False</property>
     <property name="window_position">center-on-parent</property>
@@ -51,6 +52,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">1</property>
+                <!-- Translators: in the preferences dialog; label introducing an option, to change grid 
size to 4 × 4 or 5 × 5 -->
                 <property name="label" translatable="yes">Grid size</property>
               </object>
               <packing>
@@ -64,7 +66,9 @@
                 <property name="can_focus">False</property>
                 <property name="active">0</property>
                 <items>
+                  <!-- Translators: in the preferences dialog; combobox entry, to change grid size to 4 × 4 
-->
                   <item id="0" translatable="yes">4 × 4</item>
+                  <!-- Translators: in the preferences dialog; combobox entry, to change grid size to 5 × 5 
-->
                   <item id="1" translatable="yes">5 × 5</item>
                 </items>
               </object>
@@ -77,6 +81,7 @@
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <!-- Translators: in the preferences dialog; label introducing an option, to change the 
animations speed -->
                 <property name="label" translatable="yes">Animations speed</property>
               </object>
               <packing>
@@ -103,6 +108,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">1</property>
+                <!-- Translators: in the preferences dialog; label introducing an option, a switch to 
display or no congratulations when reaching 2048 -->
                 <property name="label" translatable="yes">Display congrats</property>
               </object>
               <packing>
@@ -126,6 +132,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">1</property>
+                <!-- Translators: in the preferences dialog; label introducing an option, a switch to allow 
or not undoing a move -->
                 <property name="label" translatable="yes">Allow undo</property>
               </object>
               <packing>
diff --git a/src/application.vala b/src/application.vala
index 24f958b..36acea8 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -177,6 +177,7 @@ public class Application : Gtk.Application
                 _score.label = _game.score.to_string ();
             });
         _game.finished.connect ((s) => {
+                /* Translators: subtitle of the headerbar, when the user cannot move anymore */
                 _header_bar.subtitle = _("Game Over");
 
                 if (!_game_restored)
@@ -198,6 +199,7 @@ public class Application : Gtk.Application
         _game.target_value_reached.connect ((s, v) => {
                 if (_settings.get_boolean ("do-congrat"))
                 {
+                    /* Translators: text of the dialog that appears when the user obtains the first 2048 
tile in the game */
                     string message = _("You have obtained the %u tile".printf (v));
                     _congrats_message.set_text (message);
                     _congrats_dialog.present ();
@@ -341,9 +343,13 @@ public class Application : Gtk.Application
 
     private void _create_scores ()
     {
+        /* Translators: combobox entry in the dialog that appears when the user clicks the "Scores" entry in 
the hamburger menu, if the user has already finished at least one 4 × 4 and one 5 × 5 game */
         _grid4_cat = new Scores.Category ("grid4", _("Grid 4 × 4"));
+
+        /* Translators: combobox entry in the dialog that appears when the user clicks the "Scores" entry in 
the hamburger menu, if the user has already finished at least one 4 × 4 and one 5 × 5 game */
         _grid5_cat = new Scores.Category ("grid5", _("Grid 5 × 5"));
 
+        /* Translators: label introducing a combobox in the dialog that appears when the user clicks the 
"Scores" entry in the hamburger menu, if the user has already finished at least one 4 × 4 and one 5 × 5 game 
*/
         _scores_ctx = new Scores.Context ("gnome-2048", _("Grid Size:"), _window, category_request, 
Scores.Style.POINTS_GREATER_IS_BETTER);
     }
 
@@ -398,17 +404,25 @@ public class Application : Gtk.Application
     private void about_cb ()
     {
         string [] authors = { "Juan R. García Blanco", "Arnaud Bonatti" };
-        show_about_dialog (_window /* get_active_window () */,
+        show_about_dialog (_window,
+                           /* Translators: about dialog text; the program name */
                            "program-name", _("2048"),
                            "version", VERSION,
+
+                           /* Translators: about dialog text; a introduction to the game */
                            "comments", _("A clone of 2048 for GNOME"),
-                           "copyright", _("Copyright \xc2\xa9 2014-2015 – Juan R. García Blanco\nCopyright 
\xc2\xa9 2016 – Arnaud Bonatti"),
                            "license-type", License.GPL_3_0,
-                           "wrap-license", false /* TODO true? */,
+
+                           /* Translators: about dialog text; the main copyright holders */
+                           "copyright", _("Copyright \xc2\xa9 2014-2015 – Juan R. García Blanco\nCopyright 
\xc2\xa9 2016-2019 – Arnaud Bonatti"),
+                           "wrap-license", true,
                            "authors", authors,
+                           /* 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", "gnome-2048",
-                           "website", "http://www.gnome.org";, /* TODO remove? better? */
+                           "website", "https://wiki.gnome.org/Apps/2048";,
+                           /* Translators: about dialog text; label of the website link */
+                           "website-label", _("Page on GNOME wiki"),
                            null);
     }
 


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