[gnome-tetravex] Add translators comments.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Add translators comments.
- Date: Wed, 18 Sep 2019 00:46:01 +0000 (UTC)
commit 385483f11a350b28372e8397cb71f86b827fad59
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Sep 17 19:55:23 2019 +0200
Add translators comments.
Also, improve some strings;
and remove Ctlr-W shortcut.
src/app-menu.ui | 21 ++++++++++++++++-----
src/gnome-tetravex.ui | 1 +
src/gnome-tetravex.vala | 36 +++++++++++++++++++++++++++---------
src/help-overlay.ui | 11 ++++++++++-
src/puzzle-view.vala | 1 +
src/score-dialog.vala | 8 ++++++++
6 files changed, 63 insertions(+), 15 deletions(-)
---
diff --git a/src/app-menu.ui b/src/app-menu.ui
index c050267..84f95e4 100644
--- a/src/app-menu.ui
+++ b/src/app-menu.ui
@@ -2,40 +2,48 @@
<menu id="app-menu">
<section>
<item>
+ <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt);
starts a new game -->
<attribute name="label" translatable="yes">_New Game</attribute>
<attribute name="action">app.new-game</attribute>
</item>
<item>
+ <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt);
displays Scores dialog -->
<attribute name="label" translatable="yes">_Scores</attribute>
<attribute name="action">app.scores</attribute>
</item>
</section>
<section>
<submenu>
+ <!-- Translators: submenu of the hamburger menu (with a mnemonic that appears when pressing Alt);
allows to change the size of the board -->
<attribute name="label" translatable="yes">Si_ze</attribute>
<section>
<item>
- <attribute name="label" translatable="yes">_2x2</attribute>
+ <!-- Translators: entry of the Size submenu of the hamburger menu (with a mnemonic that appears
when pressing Alt); set board size to 2 by 2; possible sizes between 2 and 6 -->
+ <attribute name="label" translatable="yes">_2 × 2</attribute>
<attribute name="action">app.size</attribute>
<attribute name="target">2</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">_3x3</attribute>
+ <!-- Translators: entry of the Size submenu of the hamburger menu (with a mnemonic that appears
when pressing Alt); set board size to 3 by 3; possible sizes between 2 and 6 -->
+ <attribute name="label" translatable="yes">_3 × 3</attribute>
<attribute name="action">app.size</attribute>
<attribute name="target">3</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">_4x4</attribute>
+ <!-- Translators: entry of the Size submenu of the hamburger menu (with a mnemonic that appears
when pressing Alt); set board size to 4 by 4; possible sizes between 2 and 6 -->
+ <attribute name="label" translatable="yes">_4 × 4</attribute>
<attribute name="action">app.size</attribute>
<attribute name="target">4</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">_5x5</attribute>
+ <!-- Translators: entry of the Size submenu of the hamburger menu (with a mnemonic that appears
when pressing Alt); set board size to 5 by 5; possible sizes between 2 and 6 -->
+ <attribute name="label" translatable="yes">_5 × 5</attribute>
<attribute name="action">app.size</attribute>
<attribute name="target">5</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">_6x6</attribute>
+ <!-- Translators: entry of the Size submenu of the hamburger menu (with a mnemonic that appears
when pressing Alt); set board size to 6 by 6; possible sizes between 2 and 6 -->
+ <attribute name="label" translatable="yes">_6 × 6</attribute>
<attribute name="action">app.size</attribute>
<attribute name="target">6</attribute>
</item>
@@ -44,14 +52,17 @@
</section>
<section>
<item>
+ <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt);
displays Keyboard Shortcuts dialog -->
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
+ <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt);
shows application help -->
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">app.help</attribute>
</item>
<item>
+ <!-- Translators: entry of the hamburger menu (with a mnemonic that appears when pressing Alt);
shows About dialog -->
<attribute name="label" translatable="yes">_About Tetravex</attribute>
<attribute name="action">app.about</attribute>
</item>
diff --git a/src/gnome-tetravex.ui b/src/gnome-tetravex.ui
index 9605003..4670533 100644
--- a/src/gnome-tetravex.ui
+++ b/src/gnome-tetravex.ui
@@ -4,6 +4,7 @@
<!-- interface-requires gtk+ 3.10 -->
<object class="GtkApplicationWindow" id="gnome-tetravex-window">
<property name="can_focus">False</property>
+ <!-- Translators: application name, as seen in GNOME Shell -->
<property name="title" translatable="yes">Tetravex</property>
<property name="icon-name">org.gnome.Tetravex</property>
<child>
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index b27e2e3..7dcaa5b 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -13,7 +13,7 @@ using Gtk;
private class Tetravex : Gtk.Application
{
- /* Translators: that is the name of the program, as seen in the headerbar, in GNOME Shell, or in the
about dialog */
+ /* Translators: name of the program, as seen in the headerbar, in GNOME Shell, or in the about dialog */
private const string PROGRAM_NAME = _("Tetravex");
private const string KEY_GRID_SIZE = "grid-size";
@@ -44,9 +44,14 @@ private class Tetravex : Gtk.Application
private const OptionEntry [] option_entries =
{
+ /* Translators: command-line option description, see 'gnome-tetravex --help' */
+ { "paused", 'p', 0, OptionArg.NONE, null, N_("Start the game paused"), null },
+
+ /* Translators: command-line option description, see 'gnome-tetravex --help' */
+ { "size", 's', 0, OptionArg.INT, null, N_("Set size of board (2-6)"), null },
+
+ /* Translators: command-line option description, see 'gnome-tetravex --help' */
{ "version", 'v', 0, OptionArg.NONE, null, N_("Print release version and exit"), null },
- { "paused", 'p', 0, OptionArg.NONE, null, N_("Start the game paused"), null },
- { "size", 's', 0, OptionArg.INT, null, N_("Set size of board (2-6)"), null },
{}
};
@@ -96,8 +101,7 @@ private class Tetravex : Gtk.Application
set_accels_for_action ("app.pause", {"<Primary>p",
"Pause" });
set_accels_for_action ("app.help", { "F1" });
- set_accels_for_action ("app.quit", {"<Primary>q",
- "<Primary>w" });
+ set_accels_for_action ("app.quit", {"<Primary>q" });
set_accels_for_action ("app.move-up", {"<Primary>Up" });
set_accels_for_action ("app.move-down", {"<Primary>Down" });
set_accels_for_action ("app.move-left", {"<Primary>Left" });
@@ -151,10 +155,11 @@ private class Tetravex : Gtk.Application
Image image = new Image.from_icon_name ("media-playback-start-symbolic", IconSize.DND);
image.margin = 10;
play_button.add (image);
+ play_button.action_name = "app.pause"; /* not a typo */
play_button.valign = Align.CENTER;
play_button.halign = Align.START;
play_button.margin_start = 35;
- play_button.action_name = "app.pause"; /* not a typo */
+ /* Translators: tooltip text of the "play"/unpause button, in the bottom bar */
play_button.tooltip_text = _("Resume the game");
sizegroup.add_widget (play_button);
@@ -163,10 +168,11 @@ private class Tetravex : Gtk.Application
image = new Image.from_icon_name ("media-playback-pause-symbolic", IconSize.DND);
image.margin = 10;
pause_button.add (image);
+ pause_button.action_name = "app.pause";
pause_button.valign = Align.CENTER;
pause_button.halign = Align.START;
pause_button.margin_start = 35;
- pause_button.action_name = "app.pause";
+ /* Translators: tooltip text of the pause button, in the bottom bar */
pause_button.tooltip_text = _("Pause the game");
sizegroup.add_widget (pause_button);
@@ -180,10 +186,11 @@ private class Tetravex : Gtk.Application
image = new Image.from_icon_name ("view-refresh-symbolic", IconSize.DND);
image.margin = 10;
new_game_button.add (image);
+ new_game_button.action_name = "app.new-game";
new_game_button.valign = Align.CENTER;
new_game_button.halign = Align.END;
new_game_button.margin_end = 35;
- new_game_button.action_name = "app.new-game";
+ /* Translators: tooltip text of the "restart"/new game button, in the bottom bar */
new_game_button.tooltip_text = _("Start a new game");
sizegroup.add_widget (new_game_button);
@@ -192,10 +199,11 @@ private class Tetravex : Gtk.Application
image = new Image.from_icon_name ("dialog-question-symbolic", IconSize.DND);
image.margin = 10;
solve_button.add (image);
+ solve_button.action_name = "app.solve";
solve_button.valign = Align.CENTER;
solve_button.halign = Align.END;
solve_button.margin_end = 35;
- solve_button.action_name = "app.solve";
+ /* Translators: tooltip text of the "solve"/give up button, in the bottom bar */
solve_button.tooltip_text = _("Give up and view the solution");
sizegroup.add_widget (solve_button);
@@ -275,6 +283,7 @@ private class Tetravex : Gtk.Application
game_size = (int) options.lookup_value ("size", VariantType.INT32);
if ((game_size < 2) || (game_size > 6))
{
+ /* Translators: command-line error message, displayed on invalid game size request; see
'gnome-tetravex -s 1' */
stderr.printf (N_("Size could only be from 2 to 6.\n"));
return Posix.EXIT_FAILURE;
}
@@ -392,9 +401,13 @@ private class Tetravex : Gtk.Application
DialogFlags.MODAL,
MessageType.QUESTION,
ButtonsType.NONE,
+ /* Translators: popup dialog main text; appearing when user clicks the "Give up" button in the
bottom bar; possible answers are "Keep playing"/"Give up" */
_("Are you sure you want to give up and view the
solution?"));
+ /* Translators: popup dialog possible answer (with a mnemonic that appears pressing Alt); appearing
when user clicks the "Give up" button in the bottom bar; other possible answer is "_Give Up" */
dialog.add_buttons (_("_Keep Playing"), ResponseType.REJECT,
+
+ /* Translators: popup dialog possible answer (with a mnemonic that appears pressing Alt); appearing
when user clicks the "Give up" button in the bottom bar; other possible answer is "_Keep Playing" */
_("_Give Up"), ResponseType.ACCEPT,
null);
@@ -481,8 +494,13 @@ private class Tetravex : Gtk.Application
DialogFlags.MODAL,
MessageType.QUESTION,
ButtonsType.NONE,
+ /* Translators: popup dialog main text; appearing when user changes size from the hamburger menu
submenu, while a game is started; possible answers are "Keep playing"/"Start New Game" */
_("Are you sure you want to start a new game with a
different board size?"));
+
+ /* Translators: popup dialog possible answer (with a mnemonic that appears pressing Alt); appearing
when user clicks the "Give up" button in the bottom bar; other possible answer is "_Start New Game" */
dialog.add_buttons (_("_Keep Playing"), ResponseType.REJECT,
+
+ /* Translators: popup dialog possible answer (with a mnemonic that appears pressing Alt); appearing
when user clicks the "Give up" button in the bottom bar; other possible answer is "_Keep Playing" */
_("_Start New Game"), ResponseType.ACCEPT,
null);
diff --git a/src/help-overlay.ui b/src/help-overlay.ui
index ab7faf9..239e936 100644
--- a/src/help-overlay.ui
+++ b/src/help-overlay.ui
@@ -13,6 +13,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>N</property>
+ <!-- Translators: Ctrl-N shortcut description in the Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Start a new
game</property>
</object>
</child>
@@ -20,6 +21,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>P Pause</property>
+ <!-- Translators: Ctrl-P shortcut description in the Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Pause the game</property>
</object>
</child>
@@ -27,6 +29,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>Up</property>
+ <!-- Translators: Ctrl-Up shortcut description in the Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Move all the pieces in
the left box up by one</property>
</object>
</child>
@@ -34,6 +37,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>Down</property>
+ <!-- Translators: Ctrl-Down shortcut description in the Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Move all the pieces in
the left box down by one</property>
</object>
</child>
@@ -41,6 +45,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>Left</property>
+ <!-- Translators: Ctrl-Left shortcut description in the Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Move all the pieces in
the left box left by one</property>
</object>
</child>
@@ -48,6 +53,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>Right</property>
+ <!-- Translators: Ctrl-Right shortcut description in the Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Move all the pieces in
the left box right by one</property>
</object>
</child>
@@ -55,13 +61,15 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">F1</property>
+ <!-- Translators: F1 shortcut description in the Keyboard Shortcuts dialog; shows
application help -->
<property name="title" translatable="yes" context="shortcut window">Show Help</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
- <property name="accelerator"><Primary>question <Primary>F1</property>
+ <property name="accelerator"><Primary>question</property>
+ <!-- Translators: Ctrl-F1 shortcut description in the Keyboard Shortcuts dialog; displays
Keyboard Shortcuts dialog -->
<property name="title" translatable="yes" context="shortcut window">Show Keyboard
Shortcuts</property>
</object>
</child>
@@ -69,6 +77,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator"><Ctrl>Q</property>
+ <!-- Translators: Ctrl-Q shortcut description in the Keyboard Shortcuts dialog; quits the
application -->
<property name="title" translatable="yes" context="shortcut window">Quit</property>
</object>
</child>
diff --git a/src/puzzle-view.vala b/src/puzzle-view.vala
index dcf1f7d..3af0050 100644
--- a/src/puzzle-view.vala
+++ b/src/puzzle-view.vala
@@ -359,6 +359,7 @@ private class PuzzleView : Gtk.DrawingArea
context.select_font_face ("Sans", Cairo.FontSlant.NORMAL, Cairo.FontWeight.BOLD);
context.set_font_size (get_allocated_width () * 0.125);
+ /* Translators: text that appears as an overlay on the board when the game is paused */
var text = _("Paused");
Cairo.TextExtents extents;
context.text_extents (text, out extents);
diff --git a/src/score-dialog.vala b/src/score-dialog.vala
index 8bbccc3..9eaf393 100644
--- a/src/score-dialog.vala
+++ b/src/score-dialog.vala
@@ -26,10 +26,15 @@ private class ScoreDialog : Gtk.Dialog
if (show_quit)
{
+ /* Translators: label of a button of the Scores dialog, is it is displayed at the end of a game;
quits the application */
add_button (_("Quit"), Gtk.ResponseType.CLOSE);
+
+
+ /* Translators: label of a button of the Scores dialog, is it is displayed at the end of a game;
starts a new game */
add_button (_("New Game"), Gtk.ResponseType.OK);
}
else
+ /* Translators: label of a button of the Scores dialog, is it is displayed when called from the
hamburger menu; closes the dialog */
add_button (_("OK"), Gtk.ResponseType.DELETE_EVENT);
set_size_request (200, 300);
@@ -42,6 +47,7 @@ private class ScoreDialog : Gtk.Dialog
hbox.show ();
vbox.pack_start (hbox, false, false, 0);
+ /* Translators: in the Scores dialog, label introducing the combobox that allows showing scores for
various sizes */
var label = new Gtk.Label (_("Size:"));
label.show ();
hbox.pack_start (label, false, false, 0);
@@ -67,9 +73,11 @@ private class ScoreDialog : Gtk.Dialog
scores = new Gtk.TreeView ();
renderer = new Gtk.CellRendererText ();
+ /* Translators: in the Scores dialog, in the scores list, label of the column displaying when games
were played */
scores.insert_column_with_attributes (-1, _("Date"), renderer, "text", 0, "weight", 2);
renderer = new Gtk.CellRendererText ();
renderer.xalign = 1.0f;
+ /* Translators: in the Scores dialog, in the scores list, label of the column displaying the
duration of played games */
scores.insert_column_with_attributes (-1, _("Time"), renderer, "text", 1, "weight", 2);
scores.model = score_model;
scores.show ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]