[gnome-nibbles/arnaudb/kill-preferences-dialog: 5/8] Add translators comments.



commit 321e604dc9b598452b1e34f12f4a26c117aac0ae
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Jun 11 17:13:31 2020 +0200

    Add translators comments.

 data/controls-grid.ui      |  1 -
 data/controls.ui           |  2 ++
 data/first-run.ui          |  3 +++
 data/nibbles.ui            | 12 +++++++++++-
 data/player-score-box.ui   |  1 -
 data/players.ui            |  4 ++++
 data/preferences-dialog.ui | 12 ++++++++++++
 data/speed.ui              |  7 +++++++
 src/nibbles-view.vala      |  6 ++++++
 src/nibbles-window.vala    |  2 +-
 10 files changed, 46 insertions(+), 4 deletions(-)
---
diff --git a/data/controls-grid.ui b/data/controls-grid.ui
index c4c645a..49d6547 100644
--- a/data/controls-grid.ui
+++ b/data/controls-grid.ui
@@ -28,7 +28,6 @@
     <child>
       <object class="GtkLabel" id="name_label">
         <property name="visible">True</property>
-        <property name="label" translatable="yes">Player</property>
       </object>
       <packing>
         <property name="left-attach">0</property>
diff --git a/data/controls.ui b/data/controls.ui
index 17cdeae..a1247f7 100644
--- a/data/controls.ui
+++ b/data/controls.ui
@@ -30,6 +30,7 @@
         <child>
           <object class="GtkLabel">
             <property name="visible">True</property>
+            <!-- Translators: title of one of the panels displayed during game configuration; the panel 
shows the keyboard controls of each player -->
             <property name="label" translatable="yes">Controls</property>
             <property name="valign">center</property>
             <style><class name="menu-title"/></style>
@@ -50,6 +51,7 @@
         <property name="visible">True</property>
         <property name="can-default">True</property>
         <property name="use-underline">True</property>
+        <!-- Translators: label of a button in the last panel displayed during game configuration (the 
"Controls" one); starts the game -->
         <property name="label" translatable="yes">_Start</property>
         <property name="action-name">win.next-screen</property>
         <property name="halign">center</property>
diff --git a/data/first-run.ui b/data/first-run.ui
index 6f7df6b..ea98e57 100644
--- a/data/first-run.ui
+++ b/data/first-run.ui
@@ -27,6 +27,7 @@
       <object class="GtkButton">
         <property name="visible">True</property>
         <property name="use-underline">True</property>
+        <!-- Translators: label of a button in a panel shown only the first time the game is launched; to 
see it, launch `dconf write /org/gnome/nibbles/first-run 'true'` before launching the game -->
         <property name="label" translatable="yes">Let’s _Play</property>
         <property name="action-name">win.next-screen</property>
         <property name="halign">center</property>
@@ -60,6 +61,7 @@
         <child>
           <object class="GtkLabel">
             <property name="visible">True</property>
+            <!-- Translators: label displayed on a panel shown only the first time the game is launched; to 
see it, launch `dconf write /org/gnome/nibbles/first-run 'true'` before launching the game -->
             <property name="label" translatable="yes">Welcome, worms.</property>
             <style>
               <class name="menu-title"/>
@@ -69,6 +71,7 @@
         <child>
           <object class="GtkLabel">
             <property name="visible">True</property>
+            <!-- Translators: label displayed on a panel shown only the first time the game is launched; to 
see it, launch `dconf write /org/gnome/nibbles/first-run 'true'` before launching the game -->
             <property name="label" translatable="yes">Eat the treats before the other worms, but don’t hit 
anything!</property>
             <property name="valign">start</property>
             <style>
diff --git a/data/nibbles.ui b/data/nibbles.ui
index 20b334e..71e31be 100644
--- a/data/nibbles.ui
+++ b/data/nibbles.ui
@@ -22,43 +22,51 @@
   <menu id="app-menu">
     <section>
       <item>
+        <!-- Translators: toggleable entry of the hamburger menu (with a mnemonic that appears when pressing 
Alt); mutes or unmutes game sound -->
         <attribute name="label" translatable="yes">_Sound</attribute>
         <attribute name="action">win.sound</attribute>
       </item>
     </section>
     <section>
       <item>
+        <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt); 
opens the Scores dialog -->
         <attribute name="label" translatable="yes">_Scores</attribute>
         <attribute name="action">win.scores</attribute>
       </item>
     </section>
     <section>
       <item>
+        <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt); 
opens the Preferences dialog -->
         <attribute name="label" translatable="yes">_Preferences</attribute>
         <attribute name="action">win.preferences</attribute>
       </item>
       <item>
+        <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt); 
opens the help of the application -->
         <attribute name="label" translatable="yes">_Help</attribute>
         <attribute name="action">app.help</attribute>
         <attribute name="accel">F1</attribute>
       </item>
       <item>
+        <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt); 
opens the About dialog -->
         <attribute name="label" translatable="yes">_About Nibbles</attribute>
         <attribute name="action">app.about</attribute>
       </item>
     </section>
   </menu>
   <template class="NibblesWindow" parent="GtkApplicationWindow">
+    <!-- Translators: title of the window, as displayed by the window manager -->
     <property name="title" translatable="yes">Nibbles</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar">
         <property name="visible">True</property>
+        <!-- Translators: title of the window, as displayed in the headerbar -->
         <property name="title" translatable="yes">Nibbles</property>
         <property name="show-close-button">True</property>
         <child>
           <object class="GtkButton" id="new_game_button">
             <property name="visible">False</property>
             <property name="use-underline">True</property>
+            <!-- Translators: label of a button of the headerbar, visible during a game (with a mnemonic 
that appears when pressing Alt); starts a new game -->
             <property name="label" translatable="yes">_New Game</property>
             <property name="action-name">win.new-game</property>
           </object>
@@ -70,7 +78,8 @@
           <object class="GtkButton" id="pause_button">
             <property name="visible">False</property>
             <property name="use-underline">True</property>
-            <property name="label" translatable="yes">_Pause</property>
+            <!-- Translators: label of a button of the headerbar, visible during a game (with a mnemonic 
that appears when pressing Alt); pauses the game -->
+            <property name="label" translatable="yes">_Pause</property> <!-- duplicated in 
nibbles-window.vala; keep here else we see the button resize at game start -->
             <property name="action-name">win.pause</property>
           </object>
           <packing>
@@ -163,6 +172,7 @@
                     <child>
                       <object class="GtkLabel">
                         <property name="visible">True</property>
+                        <!-- Translators: text displayed at the bottom of the window, when the game is 
paused -->
                         <property name="label" translatable="yes">Paused</property>
                         <style><class name="menu-title"/></style>
                       </object>
diff --git a/data/player-score-box.ui b/data/player-score-box.ui
index ddcb00e..529dfb0 100644
--- a/data/player-score-box.ui
+++ b/data/player-score-box.ui
@@ -30,7 +30,6 @@
         <child>
           <object class="GtkLabel" id="name_label">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Worm</property>
           </object>
           <packing>
             <property name="pack-type">start</property>
diff --git a/data/players.ui b/data/players.ui
index b703f42..7ae9120 100644
--- a/data/players.ui
+++ b/data/players.ui
@@ -37,6 +37,7 @@
             <child>
               <object class="GtkLabel">
                 <property name="visible">True</property>
+                <!-- Translators: title of one of the panels displayed during game configuration; the panel 
allows to change the number of human and ai worms -->
                 <property name="label" translatable="yes">Number of players</property>
                 <style><class name="menu-title"/></style>
               </object>
@@ -51,6 +52,7 @@
             <child>
               <object class="GtkLabel">
                 <property name="visible">True</property>
+                <!-- Translators: label in one of the panels displayed during game configuration; allows to 
choose if the game has 1/2/3/4 human players -->
                 <property name="label" translatable="yes">Select the number of human players.</property>
               </object>
             </child>
@@ -126,6 +128,7 @@
             <child>
               <object class="GtkLabel">
                 <property name="visible">True</property>
+                <!-- Translators: label in one of the panels displayed during game configuration; allows to 
choose if the game has 0/1/2/3/4/5 ai-controlled worms -->
                 <property name="label" translatable="yes">Select the number of computer players.</property>
               </object>
             </child>
@@ -190,6 +193,7 @@
         <property name="visible">True</property>
         <property name="can-default">True</property>
         <property name="use-underline">True</property>
+        <!-- Translators: label of a button in the "Number of players" panel displayed during game 
configuration (with a mnemonic that appears when pressing Alt); switch to next panel -->
         <property name="label" translatable="yes">_Next</property>
         <property name="action-name">win.next-screen</property>
         <property name="width-request">116</property>
diff --git a/data/preferences-dialog.ui b/data/preferences-dialog.ui
index 5b9eb40..4b5d25f 100644
--- a/data/preferences-dialog.ui
+++ b/data/preferences-dialog.ui
@@ -23,9 +23,13 @@
     <property name="visible">True</property>
     <property name="active-id">worm1</property>
     <items>
+      <!-- Translators: item in the title-combobox of the Preferences dialog; allows to configure 1st worm 
controls and color -->
       <item translatable="yes" id="worm1">Worm 1</item>
+      <!-- Translators: item in the title-combobox of the Preferences dialog; allows to configure 2nd worm 
controls and color -->
       <item translatable="yes" id="worm2">Worm 2</item>
+      <!-- Translators: item in the title-combobox of the Preferences dialog; allows to configure 3rd worm 
controls and color -->
       <item translatable="yes" id="worm3">Worm 3</item>
+      <!-- Translators: item in the title-combobox of the Preferences dialog; allows to configure 4th worm 
controls and color -->
       <item translatable="yes" id="worm4">Worm 4</item>
     </items>
     <signal name="changed" handler="on_worm_change"/>
@@ -54,6 +58,7 @@
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkLabel">
+                <!-- Translators: title of a section in the Preferences dialog (1st worm); allows to 
configure keyboard controls for the worm -->
                 <property name="label" translatable="yes">Controls</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -94,6 +99,7 @@
                 <property name="border_width">0</property>
                 <child>
                   <object class="GtkLabel">
+                    <!-- Translators: title of a section in the Preferences dialog (1st worm); allows to 
configure the worm color -->
                     <property name="label" translatable="yes">Worm color</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -128,6 +134,7 @@
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkLabel">
+                <!-- Translators: title of a section in the Preferences dialog (2nd worm); allows to 
configure keyboard controls for the worm -->
                 <property name="label" translatable="yes">Controls</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -168,6 +175,7 @@
                 <property name="border_width">0</property>
                 <child>
                   <object class="GtkLabel">
+                    <!-- Translators: title of a section in the Preferences dialog (2nd worm); allows to 
configure the worm color -->
                     <property name="label" translatable="yes">Worm color</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -202,6 +210,7 @@
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkLabel">
+                <!-- Translators: title of a section in the Preferences dialog (3rd worm); allows to 
configure keyboard controls for the worm -->
                 <property name="label" translatable="yes">Controls</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -242,6 +251,7 @@
                 <property name="border_width">0</property>
                 <child>
                   <object class="GtkLabel">
+                    <!-- Translators: title of a section in the Preferences dialog (3rd worm); allows to 
configure the worm color -->
                     <property name="label" translatable="yes">Worm color</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -276,6 +286,7 @@
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkLabel">
+                <!-- Translators: title of a section in the Preferences dialog (4th worm); allows to 
configure keyboard controls for the worm -->
                 <property name="label" translatable="yes">Controls</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -316,6 +327,7 @@
                 <property name="border_width">0</property>
                 <child>
                   <object class="GtkLabel">
+                    <!-- Translators: title of a section in the Preferences dialog (4th worm); allows to 
configure the worm color -->
                     <property name="label" translatable="yes">Worm color</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
diff --git a/data/speed.ui b/data/speed.ui
index db88a69..9541a2d 100644
--- a/data/speed.ui
+++ b/data/speed.ui
@@ -30,6 +30,7 @@
         <child>
           <object class="GtkLabel">
             <property name="visible">True</property>
+            <!-- Translators: title of one of the panels displayed during game configuration; the panel 
allows to change the worms speed (notably) -->
             <property name="label" translatable="yes">Preferences</property>
             <property name="valign">center</property>
             <style>
@@ -52,6 +53,7 @@
                 <property name="halign">fill</property>
                 <property name="xalign">0.0</property>
                 <property name="use-underline">True</property>
+                <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game 
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "really slow" -->
                 <property name="label" translatable="yes">_Beginner</property>
                 <property name="action-name">speed.change-speed</property>
                 <property name="action-target">@i 4</property>
@@ -68,6 +70,7 @@
                 <property name="halign">fill</property>
                 <property name="xalign">0.0</property>
                 <property name="use-underline">True</property>
+                <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game 
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "quite slow" -->
                 <property name="label" translatable="yes">_Slow</property>
                 <property name="action-name">speed.change-speed</property>
                 <property name="action-target">@i 3</property>
@@ -84,6 +87,7 @@
                 <property name="halign">fill</property>
                 <property name="xalign">0.0</property>
                 <property name="use-underline">True</property>
+                <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game 
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "normal" -->
                 <property name="label" translatable="yes">_Medium</property>
                 <property name="action-name">speed.change-speed</property>
                 <property name="action-target">@i 2</property>
@@ -100,6 +104,7 @@
                 <property name="halign">fill</property>
                 <property name="xalign">0.0</property>
                 <property name="use-underline">True</property>
+                <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game 
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "fast" -->
                 <property name="label" translatable="yes">_Fast</property>
                 <property name="action-name">speed.change-speed</property>
                 <property name="action-target">@i 1</property>
@@ -124,6 +129,7 @@
                 <property name="hexpand">True</property>
                 <property name="halign">fill</property>
                 <property name="use-underline">True</property>
+                <!-- Translators: label of a togglebutton in the "Preferences" panel displayed during game 
configuration (with a mnemonic that appears when pressing Alt); activates special bonuses -->
                 <property name="text" translatable="yes">_Enable fake bonuses</property>
                 <property name="action-name">win.fakes</property>
                 <style>
@@ -140,6 +146,7 @@
         <property name="visible">True</property>
         <property name="can-default">True</property>
         <property name="use-underline">True</property>
+        <!-- Translators: label of a button in the "Preferences" panel displayed during game configuration 
(with a mnemonic that appears when pressing Alt); switch to next panel -->
         <property name="label" translatable="yes">_Next</property>
         <property name="action-name">win.next-screen</property>
         <property name="halign">center</property>
diff --git a/src/nibbles-view.vala b/src/nibbles-view.vala
index a6f1275..107a11d 100644
--- a/src/nibbles-view.vala
+++ b/src/nibbles-view.vala
@@ -898,11 +898,17 @@ private class NibblesView : GtkClutter.Embed
     internal const int NUM_COLORS = 6;      // only used in preferences-dialog.vala
     private static string[,] color_lookup =
     {
+        /* Translators: possible color of a worm, as displayed in the Preferences dialog combobox */
         { "red",    N_("red")    },
+        /* Translators: possible color of a worm, as displayed in the Preferences dialog combobox */
         { "green",  N_("green")  },
+        /* Translators: possible color of a worm, as displayed in the Preferences dialog combobox */
         { "blue",   N_("blue")   },
+        /* Translators: possible color of a worm, as displayed in the Preferences dialog combobox */
         { "yellow", N_("yellow") },
+        /* Translators: possible color of a worm, as displayed in the Preferences dialog combobox */
         { "cyan",   N_("cyan")   },
+        /* Translators: possible color of a worm, as displayed in the Preferences dialog combobox */
         { "purple", N_("purple") }
     };
 
diff --git a/src/nibbles-window.vala b/src/nibbles-window.vala
index 4d5d3fc..eaf22d1 100644
--- a/src/nibbles-window.vala
+++ b/src/nibbles-window.vala
@@ -372,7 +372,7 @@ private class NibblesWindow : ApplicationWindow
         else
         {
             /* Translators: label of the Pause button, when the game is running */
-            pause_button.set_label (_("_Pause"));
+            pause_button.set_label (_("_Pause"));   // duplicated in nibbles.ui
         }
     }
 


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