[gnome-klotski] Add translators comments.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-klotski] Add translators comments.
- Date: Sat, 8 Feb 2020 20:48:57 +0000 (UTC)
commit 1373cd8a90574f2371cfca6f5fc496bd78e4d7a3
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Feb 8 21:43:22 2020 +0100
Add translators comments.
data/klotski.ui | 22 +++++++++++++++++-----
src/gnome-klotski.vala | 8 ++++++--
src/klotski-window.vala | 6 ++++--
3 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/data/klotski.ui b/data/klotski.ui
index b51bc10..618277a 100644
--- a/data/klotski.ui
+++ b/data/klotski.ui
@@ -20,16 +20,19 @@
<menu id="app-menu">
<section>
<item>
+ <!-- Translators: label of an entry in the Hamburger menu (with a mnemonic that appears pressing
Alt); opens the Scores dialog -->
<attribute name="label" translatable="yes">_Scores</attribute>
<attribute name="action">app.scores</attribute>
</item>
</section>
<section>
<item>
+ <!-- Translators: label of an entry in the Hamburger menu (with a mnemonic that appears pressing
Alt); opens the help of the application -->
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">app.help</attribute>
</item>
<item>
+ <!-- Translators: label of an entry in the Hamburger menu (with a mnemonic that appears pressing
Alt); opens the About dialog -->
<attribute name="label" translatable="yes">_About Klotski</attribute>
<attribute name="action">app.about</attribute>
</item>
@@ -71,6 +74,7 @@
<object class="GtkLabel">
<property name="name">pack-name</property>
<property name="visible">True</property>
+ <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; contains
classical levels -->
<property name="label" translatable="yes">Huarong Trail</property>
</object>
<packing>
@@ -82,6 +86,7 @@
<object class="GtkLabel">
<property name="name">pack-name</property>
<property name="visible">True</property>
+ <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; contains
medium-difficulty levels -->
<property name="label" translatable="yes">Challenge Pack</property>
</object>
<packing>
@@ -93,6 +98,7 @@
<object class="GtkLabel">
<property name="name">pack-name</property>
<property name="visible">True</property>
+ <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; contains
hardest levels -->
<property name="label" translatable="yes">Skill Pack</property>
</object>
<packing>
@@ -274,8 +280,9 @@
<child>
<object class="GtkButton">
<property name="visible">True</property>
- <!-- <property name="use-underline">True</property> TODO -->
+ <!-- Translators: in the Change Puzzle popover, label of the button for playing the previous
level -->
<property name="label" translatable="yes">Previous</property>
+ <!-- <property name="use-underline">True</property> TODO -->
<property name="action-name">win.prev-puzzle</property>
</object>
<packing>
@@ -286,8 +293,9 @@
<child>
<object class="GtkButton">
<property name="visible">True</property>
- <!-- <property name="use-underline">True</property> TODO -->
+ <!-- Translators: in the Change Puzzle popover, label of the button for playing the next
level -->
<property name="label" translatable="yes">Next</property>
+ <!-- <property name="use-underline">True</property> TODO -->
<property name="action-name">win.next-puzzle</property>
</object>
<packing>
@@ -301,8 +309,8 @@
</child>
</object>
<template class="KlotskiWindow" parent="GtkApplicationWindow">
- <!-- <initial-focus name=""/> -->
<property name="title" translatable="yes">Klotski</property>
+ <!-- <initial-focus name=""/> -->
<property name="width-request">600</property>
<property name="height-request">400</property>
<property name="border-width">25</property> <!-- TODO a view margin -->
@@ -318,10 +326,12 @@
<object class="GtkButton">
<property name="visible">True</property>
<property name="use-underline">True</property>
+ <!-- Translators: in the headerbar, button that allows to directly restart the current puzzle
(with a mnemonic that appears pressing Alt) -->
<property name="label" translatable="yes">_Start Over</property>
- <property name="tooltip-text" translatable="yes">Restart the current puzzle</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
+ <!-- Translators: tooltip text of the Start Over button, in the headerbar -->
+ <property name="tooltip-text" translatable="yes">Restart the current puzzle</property>
<property name="action-name">win.start-game</property>
</object>
<packing>
@@ -332,10 +342,12 @@
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="use-underline">True</property>
+ <!-- Translators: in the headerbar, button that allows via a popover to select a different
puzzle (with a mnemonic that appears pressing Alt) -->
<property name="label" translatable="yes">_Change Puzzle</property>
- <property name="tooltip-text" translatable="yes">Choose an other puzzle</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
+ <!-- Translators: tooltip text of the Change Puzzle menubutton, in the headerbar -->
+ <property name="tooltip-text" translatable="yes">Choose an other puzzle</property>
<property name="direction">down</property>
<property name="popover">puzzles_popover</property>
</object>
diff --git a/src/gnome-klotski.vala b/src/gnome-klotski.vala
index a960f3f..4056b09 100644
--- a/src/gnome-klotski.vala
+++ b/src/gnome-klotski.vala
@@ -21,8 +21,12 @@ using Gtk;
private class Klotski : Gtk.Application
{
+ /* Translators: application name, as used in the window manager, the window title, the about dialog... */
+ internal const string PROGRAM_NAME = _("Klotski");
+
private const OptionEntry [] option_entries =
{
+ /* Translators: command-line option description, see 'gnome-klotski --help' */
{ "version", 'v', OptionFlags.NONE, OptionArg.NONE, null, N_("Print release version and exit"), null
},
{}
};
@@ -72,7 +76,7 @@ private class Klotski : Gtk.Application
{
base.startup ();
- Environment.set_application_name (_("Klotski"));
+ Environment.set_application_name (PROGRAM_NAME);
Window.set_default_icon_name ("org.gnome.Klotski");
add_action_entries (action_entries, this);
@@ -141,7 +145,7 @@ private class Klotski : Gtk.Application
show_about_dialog (get_active_window (),
/* Translators: name of the program, seen in the About dialog */
- "program-name", _("Klotski"),
+ "program-name", PROGRAM_NAME,
"version", VERSION,
/* Translators: small description of the game, seen in the About dialog */
diff --git a/src/klotski-window.vala b/src/klotski-window.vala
index c941579..5a16590 100644
--- a/src/klotski-window.vala
+++ b/src/klotski-window.vala
@@ -533,7 +533,7 @@ private class KlotskiWindow : ApplicationWindow
scores_context = new Games.Scores.Context.with_importer (
"gnome-klotski",
- // Label on the scores dialog, next to dropdown */
+ /* Translators: in the Scores dialog, label indicating for which puzzle the best scores are
displayed */
_("Puzzle"),
this,
category_request,
@@ -792,10 +792,12 @@ private class KlotskiWindow : ApplicationWindow
private void update_moves_label ()
{
start_game.set_enabled (true);
+ /* Translators: headerbar subtitle; the %d is replaced by the number of moves already done in the
current game */
headerbar.set_subtitle (_("Moves: %d").printf (puzzle.moves));
if (puzzle.game_over ())
{
- headerbar.set_title (_("Level completed."));
+ /* Translators: headerbar title, when the puzzle is solved */
+ headerbar.set_title (_("Level completed.")); // FIXME remove the dot
game_score ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]