[gnome-taquin] Add translators comments.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin] Add translators comments.
- Date: Fri, 11 Jan 2019 16:54:22 +0000 (UTC)
commit 49b2c2ed366c094e60bfaee097f12db2a35a9a10
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Jan 10 05:47:35 2019 +0100
Add translators comments.
And some TODOs.
data/org.gnome.taquin.desktop.in | 6 +++++
data/org.gnome.taquin.gschema.xml | 13 +++++++++++
data/taquin-screens.ui | 7 ++++++
data/taquin.ui | 6 +++++
src/game-window.vala | 7 +++++-
src/taquin-main.vala | 47 ++++++++++++++++++++++++++++++---------
6 files changed, 74 insertions(+), 12 deletions(-)
---
diff --git a/data/org.gnome.taquin.desktop.in b/data/org.gnome.taquin.desktop.in
index fdd9da5..55f5ae2 100644
--- a/data/org.gnome.taquin.desktop.in
+++ b/data/org.gnome.taquin.desktop.in
@@ -1,8 +1,12 @@
[Desktop Entry]
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=gnome-taquin
_Name=Taquin
+# Translators: a GenericName that gives the application goal, as defined in the desktop file spec
_GenericName=15-puzzle
+# Translators: a Comment that gives the application function, as defined in the desktop file spec
_Comment=Slide tiles to their correct places
+# Translators: some search Keywords to find this application, as defined in the desktop file spec. Do NOT
translate or localize the semicolons! The list MUST also end with a semicolon!
_Keywords=puzzle;
Exec=gnome-taquin
Terminal=false
@@ -12,9 +16,11 @@ StartupNotify=true
Actions=Fifteen;Sixteen;
[Desktop Action Fifteen]
+# Translators: an action Name, as defined in the desktop file spec; name of the traditional Taquin game
_Name=15-Puzzle
Exec=gnome-taquin --fifteen
[Desktop Action Sixteen]
+# Translators: an action Name, as defined in the desktop file spec; name of the alternative game
_Name=16-Puzzle
Exec=gnome-taquin --sixteen
diff --git a/data/org.gnome.taquin.gschema.xml b/data/org.gnome.taquin.gschema.xml
index 35a9f41..7531308 100644
--- a/data/org.gnome.taquin.gschema.xml
+++ b/data/org.gnome.taquin.gschema.xml
@@ -7,34 +7,47 @@
<schema id="org.gnome.taquin" path="/org/gnome/taquin/" gettext-domain="gnome-taquin">
<key name="type" enum="org.gnome.taquin.GameType">
<default>'fifteen'</default>
+ <!-- TODO add summary and description -->
</key>
<key name="size" type="i">
<default>4</default>
<range min="2" max="9"/>
+ <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/taquin/size' -->
<summary>Number of tiles on each edge.</summary>
+ <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/taquin/size' -->
<description>The game offers to play with a board size from 3 to 5. The setting could be set from 2
(good for testing) to 9, limited by the way files are selected.</description>
</key>
<key name="theme" type="s">
<default>'cats'</default>
+ <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/taquin/theme' -->
<summary>Name of the theme folder.</summary>
+ <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/taquin/theme'; TODO the
themes names are translated in the UI, but not in the settings; not sure what to do for now -->
<description>Taquin has two default themes: 'cats' and 'numbers'.</description>
</key>
<key name="sound" type="b">
<default>true</default>
+ <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/taquin/sound' -->
<summary>Sound</summary>
+ <!-- Translators: description of a settings key, see 'dconf-editor /org/gnome/taquin/sound' -->
<description>Whether or not to play event sounds.</description>
</key>
<key name="window-width" type="i">
<default>540</default>
+ <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/taquin/window-width' -->
<summary>Width of the window in pixels.</summary>
+ <!-- TODO add description? -->
</key>
<key name="window-height" type="i">
<default>500</default>
+ <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/taquin/window-height' -->
<summary>Height of the window in pixels.</summary>
+ <!-- TODO add description? -->
</key>
<key name="window-is-maximized" type="b">
<default>false</default>
+ <!-- Translators: summary of a settings key, see 'dconf-editor /org/gnome/taquin/window-is-maximized'
-->
<summary>true if the window is maximized.</summary>
+ <!-- TODO add description? -->
</key>
</schema>
</schemalist>
diff --git a/data/taquin-screens.ui b/data/taquin-screens.ui
index 123f38f..adb7da9 100644
--- a/data/taquin-screens.ui
+++ b/data/taquin-screens.ui
@@ -4,16 +4,19 @@
<menu id="size-menu"><!-- TODO 3/4/5 accels? -->
<section>
<item>
+ <!-- Translators: when configuring a new game, entry in the menu of the game size menubutton -->
<attribute name="label" translatable="yes">3 × 3</attribute>
<attribute name="action">app.change-size</attribute>
<attribute name="target">3</attribute>
</item>
<item>
+ <!-- Translators: when configuring a new game, entry in the menu of the game size menubutton -->
<attribute name="label" translatable="yes">4 × 4</attribute>
<attribute name="action">app.change-size</attribute>
<attribute name="target">4</attribute>
</item>
<item>
+ <!-- Translators: when configuring a new game, entry in the menu of the game size menubutton -->
<attribute name="label" translatable="yes">5 × 5</attribute>
<attribute name="action">app.change-size</attribute>
<attribute name="target">5</attribute>
@@ -23,11 +26,13 @@
<menu id="theme-menu">
<section>
<item>
+ <!-- Translators: when configuring a new game, entry in the menu of the game theme menubutton; play
with cats images -->
<attribute name="label" translatable="yes">Cats</attribute>
<attribute name="action">app.change-theme</attribute>
<attribute name="target">cats</attribute>
</item>
<item>
+ <!-- Translators: when configuring a new game, entry in the menu of the game theme menubutton; play
with numbers -->
<attribute name="label" translatable="yes">Numbers</attribute>
<attribute name="action">app.change-theme</attribute>
<attribute name="target">numbers</attribute>
@@ -53,6 +58,7 @@
<property name="focus-on-click">False</property>
<property name="action-name">app.type</property>
<property name="action-target">'fifteen'</property>
+ <!-- Translators: when configuring a new game, label of the first big button; name of the
traditional Taquin game -->
<property name="text" translatable="yes">15-Puzzle</property>
<property name="iconic">True</property>
<property name="centered">True</property>
@@ -66,6 +72,7 @@
<property name="focus-on-click">False</property>
<property name="action-name">app.type</property>
<property name="action-target">'sixteen'</property>
+ <!-- Translators: when configuring a new game, label of the second big button; name of the
non-traditional game -->
<property name="text" translatable="yes">16-Puzzle</property>
<property name="iconic">True</property>
<property name="centered">True</property>
diff --git a/data/taquin.ui b/data/taquin.ui
index 0530a00..169884a 100644
--- a/data/taquin.ui
+++ b/data/taquin.ui
@@ -18,6 +18,7 @@
<property name="visible">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
+ <!-- Translators: when configuring a new game, if the user has a started game, tooltip text of
the Go back button -->
<property name="tooltip-text" translatable="yes">Go back to the current game</property>
<property name="use-underline">True</property>
<property name="action-name">win.back</property>
@@ -40,9 +41,11 @@
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
+ <!-- Translators: during a game, label of the Start Over button (with a mnemonic that appears
pressing Alt) -->
<property name="label" translatable="yes">_Start Over</property>
<property name="use-underline">True</property>
<property name="action-name">win.new-game</property>
+ <!-- Translators: during a game, tooltip text of the Start Over button -->
<property name="tooltip-text" translatable="yes">Start a new game</property>
</object>
<packing>
@@ -114,16 +117,19 @@
<menu id="window-menu">
<section>
<item>
+ <!-- Translators: hamburger menu entry; sound togglebutton (with a mnemonic that appears pressing
Alt) -->
<attribute name="label" translatable="yes">_Sound</attribute>
<attribute name="action">app.sound</attribute>
</item>
</section>
<section>
<item>
+ <!-- Translators: hamburger menu entry; open help (with a mnemonic that appears pressing Alt) -->
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">app.help</attribute>
</item>
<item>
+ <!-- Translators: hamburger menu entry; open about dialog (with a mnemonic that appears pressing
Alt) -->
<attribute name="label" translatable="yes">_About Taquin</attribute>
<attribute name="action">app.about</attribute>
</item>
diff --git a/src/game-window.vala b/src/game-window.vala
index 9ebc797..c2d4dde 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -125,12 +125,14 @@ public class GameWindow : ApplicationWindow
new_game_box.pack_start (new_game_screen, true, true, 0);
if (GameWindowFlags.SHOW_START_BUTTON in flags)
{
+ /* Translators: when configuring a new game, label of the blue Start button (with a mnemonic
that appears pressing Alt) */
start_game_button = new Button.with_mnemonic (_("_Start Game"));
- // start_game_button.set_tooltip_text (_("Start a new game as configured"));
start_game_button.width_request = 222;
start_game_button.height_request = 60;
start_game_button.halign = Align.CENTER;
start_game_button.set_action_name ("win.start-game");
+ /* Translators: when configuring a new game, tooltip text of the blue Start button */
+ // start_game_button.set_tooltip_text (_("Start a new game as configured"));
((StyleContext) start_game_button.get_style_context ()).add_class ("suggested-action");
start_game_button.show ();
new_game_box.pack_end (start_game_button, false, false, 0);
@@ -150,6 +152,7 @@ public class GameWindow : ApplicationWindow
Button undo_button = new Button.from_icon_name ("edit-undo-symbolic", Gtk.IconSize.BUTTON);
undo_button.action_name = "win.undo";
+ /* Translators: during a game, tooltip text of the Undo button */
undo_button.set_tooltip_text (_("Undo your most recent move"));
undo_button.valign = Align.CENTER;
undo_button.show ();
@@ -159,6 +162,7 @@ public class GameWindow : ApplicationWindow
{
Button redo_button = new Button.from_icon_name ("edit-redo-symbolic", Gtk.IconSize.BUTTON);
redo_button.action_name = "app.redo";
+ / Translators: during a game, tooltip text of the Redo button /
redo_button.set_tooltip_text (_("Redo your most recent undone move"));
redo_button.valign = Align.CENTER;
redo_button.show ();
@@ -172,6 +176,7 @@ public class GameWindow : ApplicationWindow
{
Button hint_button = new Button.from_icon_name ("dialog-question-symbolic", Gtk.IconSize.BUTTON);
hint_button.action_name = "app.hint";
+ / Translators: during a game, tooltip text of the Hint button /
hint_button.set_tooltip_text (_("Receive a hint for your next move"));
hint_button.valign = Align.CENTER;
hint_button.show ();
diff --git a/src/taquin-main.vala b/src/taquin-main.vala
index e937b70..1155382 100644
--- a/src/taquin-main.vala
+++ b/src/taquin-main.vala
@@ -22,6 +22,9 @@ using Gtk;
public class Taquin : Gtk.Application
{
+ /* Translators: application name, as used in the window manager, the window title, the about dialog... */
+ internal const string PROGRAM_NAME = _("Taquin");
+
/* Settings */
private GLib.Settings settings;
private static int tmp_size = 0;
@@ -42,13 +45,26 @@ public class Taquin : Gtk.Application
private static const OptionEntry[] option_entries =
{
- { "fifteen", 0, 0, OptionArg.NONE, null, N_("Play the classical 1880s’ 15-puzzle"), null},
- { "sixteen", 0, 0, OptionArg.NONE, null, N_("Try this fun alternative 16-puzzle"), null},
- { "size", 's', 0, OptionArg.INT, ref tmp_size, N_("Sets the puzzle edges’ size (3-5, 2-9 for
debug)"), null},
- { "mute", 0, 0, OptionArg.NONE, null, N_("Turn off the sound"), null},
- { "unmute", 0, 0, OptionArg.NONE, null, N_("Turn on the sound"), null},
- { "version", 'v', 0, OptionArg.NONE, null, N_("Print release version and exit"), null},
- /* { "no-gtk", 0, 0, OptionArg.NONE, null, N_("Begins a console game"), null}, TODO */
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ { "fifteen", 0, 0, OptionArg.NONE, null, N_("Play the classical 1880s’ 15-puzzle"), null},
+
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ { "sixteen", 0, 0, OptionArg.NONE, null, N_("Try this fun alternative 16-puzzle"), null},
+
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ { "size", 's', 0, OptionArg.INT, ref tmp_size, N_("Sets the puzzle edges’ size (3-5, 2-9 for
debug)"), null},
+
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ { "mute", 0, 0, OptionArg.NONE, null, N_("Turn off the sound"), null},
+
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ { "unmute", 0, 0, OptionArg.NONE, null, N_("Turn on the sound"), null},
+
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ { "version", 'v', 0, OptionArg.NONE, null, N_("Print release version and exit"), null},
+
+ /* Translators: command-line option description, see 'gnome-taquin --help' */
+ /* { "no-gtk", 0, 0, OptionArg.NONE, null, N_("Begins a console game"), null}, TODO */
{ null }
};
@@ -73,7 +89,7 @@ public class Taquin : Gtk.Application
Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
Intl.textdomain (GETTEXT_PACKAGE);
- Environment.set_application_name (_("Taquin"));
+ Environment.set_application_name (PROGRAM_NAME);
Window.set_default_icon_name ("gnome-taquin");
return new Taquin ().run (args);
@@ -130,7 +146,7 @@ public class Taquin : Gtk.Application
/* Window */
window = new GameWindow ("/org/gnome/taquin/ui/taquin.css",
- _("Taquin"),
+ PROGRAM_NAME,
settings.get_int ("window-width"),
settings.get_int ("window-height"),
settings.get_boolean ("window-is-maximized"),
@@ -141,7 +157,6 @@ public class Taquin : Gtk.Application
window.play.connect (start_game);
window.undo.connect (undo_cb);
- // TODO use UI file?
set_accels_for_action ("win.new-game", { "<Primary>n" });
set_accels_for_action ("win.start-game", { "<Shift><Primary>n" });
set_accels_for_action ("app.quit", { "<Primary>q" });
@@ -234,18 +249,21 @@ public class Taquin : Gtk.Application
"Mueller-rech.muenchen (Wikimedia)",
"Ruskis (Wikimedia)",
"Toyah (Wikimedia)",
+ /* Translators: about dialog text; in the Credits, text at the end of the
"Artwork by" section */
_("(see COPYING.themes for informations)"),
null };
string[] documenters = { "Arnaud Bonatti", null };
show_about_dialog (window,
- "name", _("Taquin"),
+ "name", PROGRAM_NAME,
"version", VERSION,
"copyright", "Copyright © 2014-2019 Arnaud Bonatti",
"license-type", License.GPL_3_0,
+ /* Translators: about dialog text */
"comments", _("A classic 15-puzzle game"),
"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"),
"logo-icon-name", "gnome-taquin",
"website", "https://wiki.gnome.org/Apps/Taquin",
@@ -287,12 +305,14 @@ public class Taquin : Gtk.Application
private void cannot_move_cb ()
{
+ /* Translators: notification, as a subtitle of the headerbar; on the 15-Puzzle game, if the user
clicks a tile that cannot move */
window.set_subtitle (_("You can’t move this tile!"));
}
private void game_complete_cb ()
{
window.finish_game ();
+ /* Translators: notification, as a subtitle of the headerbar; on both games, if the user solves the
puzzle */
window.set_subtitle (_("Bravo! You finished the game!"));
window.undo_action.set_enabled (false); // Taquin specific
play_sound ("gameover");
@@ -311,6 +331,7 @@ public class Taquin : Gtk.Application
}
private void update_size_button_label (int size)
{
+ /* Translators: when configuring a new game, button label for the size of the game ("3 × 3", or 4,
or 5) */
size_button.set_label (_("Size: %d × %d ▾").printf (size, size));
}
@@ -325,8 +346,12 @@ public class Taquin : Gtk.Application
{
switch (theme)
{
+ /* Translators: when configuring a new game, button label for the theme, if the current theme is
Cats */
case "cats": theme_button.set_label (_("Theme: Cats ▾")); break;
+
+ /* Translators: when configuring a new game, button label for the theme, if the current theme is
Numbers */
case "numbers": theme_button.set_label (_("Theme: Numbers ▾")); break;
+
default: warn_if_reached (); break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]