[iagno] Add missing translations.



commit 266f4855d4b4da6859758e2ce8cc014a93a82ad0
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Oct 12 13:36:49 2019 +0200

    Add missing translations.

 src/iagno.vala        | 34 ++++++++++++++++++++--------------
 src/reversi-view.vala | 15 ++++++++-------
 2 files changed, 28 insertions(+), 21 deletions(-)
---
diff --git a/src/iagno.vala b/src/iagno.vala
index 4027619..a90d662 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -64,46 +64,52 @@ private class Iagno : Gtk.Application, BaseApplication
     private const OptionEntry [] option_entries =
     {
         /* Translators: command-line option description, see 'iagno --help' */
-        { "alternative-start", 0, OptionFlags.NONE, OptionArg.NONE, ref alternative_start, N_("Start with an 
alternative position"), null},
+        { "alternative-start", 0, OptionFlags.NONE, OptionArg.NONE, ref alternative_start, N_("Start with an 
alternative position"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "classic", 0, OptionFlags.NONE, OptionArg.NONE, ref classic_game,                N_("Play Classic 
Reversi"), null},
+        { "classic", 0, OptionFlags.NONE, OptionArg.NONE, ref classic_game,                N_("Play Classic 
Reversi"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "fast-mode", 'f', OptionFlags.NONE, OptionArg.NONE, ref fast_mode,               N_("Reduce delay 
before AI moves"), null},
+        { "fast-mode", 'f', OptionFlags.NONE, OptionArg.NONE, ref fast_mode,               N_("Reduce delay 
before AI moves"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "first", 0, OptionFlags.NONE, OptionArg.NONE, null,                              N_("Play first"), 
null},
+        { "first", 0, OptionFlags.NONE, OptionArg.NONE, null,                              N_("Play first"), 
null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "level", 'l', OptionFlags.NONE, OptionArg.STRING, ref level,                     N_("Set the level 
of the computer’s AI"), "LEVEL"},
+        { "level", 'l', OptionFlags.NONE, OptionArg.STRING, ref level,                     N_("Set the level 
of the computer’s AI"),
+
+        /* Translators: in the command-line options description, text to indicate the user should specify a 
level, see 'iagno --help' */
+                                                                                           N_("LEVEL") },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "mute", 0, OptionFlags.NONE, OptionArg.NONE, null,                               N_("Turn off the 
sound"), null},
+        { "mute", 0, OptionFlags.NONE, OptionArg.NONE, null,                               N_("Turn off the 
sound"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "random-start", 0, OptionFlags.NONE, OptionArg.NONE, ref random_start,           N_("Start with a 
random position"), null},
+        { "random-start", 0, OptionFlags.NONE, OptionArg.NONE, ref random_start,           N_("Start with a 
random position"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "reverse", 0, OptionFlags.NONE, OptionArg.NONE, ref reverse_game,                N_("Play Reverse 
Reversi"), null},
+        { "reverse", 0, OptionFlags.NONE, OptionArg.NONE, ref reverse_game,                N_("Play Reverse 
Reversi"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "second", 0, OptionFlags.NONE, OptionArg.NONE, null,                             N_("Play 
second"), null},
+        { "second", 0, OptionFlags.NONE, OptionArg.NONE, null,                             N_("Play 
second"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "size", 's', OptionFlags.NONE, OptionArg.INT, ref size,                          N_("Size of the 
board (debug only)"), "SIZE"},
+        { "size", 's', OptionFlags.NONE, OptionArg.INT, ref size,                          N_("Size of the 
board (debug only)"),
+
+        /* Translators: in the command-line options description, text to indicate the user should specify a 
size, see 'iagno --help' */
+                                                                                           N_("SIZE") },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "two-players", 0, OptionFlags.NONE, OptionArg.NONE, null,                        N_("Two-players 
mode"), null},
+        { "two-players", 0, OptionFlags.NONE, OptionArg.NONE, null,                        N_("Two-players 
mode"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "unmute", 0, OptionFlags.NONE, OptionArg.NONE, null,                             N_("Turn on the 
sound"), null},
+        { "unmute", 0, OptionFlags.NONE, OptionArg.NONE, null,                             N_("Turn on the 
sound"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "usual-start", 0, OptionFlags.NONE, OptionArg.NONE, ref usual_start,             N_("Start with 
the usual position"), null},
+        { "usual-start", 0, OptionFlags.NONE, OptionArg.NONE, ref usual_start,             N_("Start with 
the usual position"), null },
 
         /* Translators: command-line option description, see 'iagno --help' */
-        { "version", 'v', OptionFlags.NONE, OptionArg.NONE, null,                          N_("Print release 
version and exit"), null},
+        { "version", 'v', OptionFlags.NONE, OptionArg.NONE, null,                          N_("Print release 
version and exit"), null },
         {}
     };
 
diff --git a/src/reversi-view.vala b/src/reversi-view.vala
index 4846183..097c8a8 100644
--- a/src/reversi-view.vala
+++ b/src/reversi-view.vala
@@ -422,11 +422,12 @@ private class ReversiView : Gtk.DrawingArea
         tiles_pattern = new Cairo.Pattern.for_surface (surface);
 
         // noise pattern
-        Gdk.Pixbuf? noise_pixbuf = null;
         Cairo.Pattern? noise_pattern = null;
 
         if (apply_texture)
         {
+            Gdk.Pixbuf? noise_pixbuf = null;
+
             try
             {
                 noise_pixbuf = new Gdk.Pixbuf.from_resource_at_scale ("/org/gnome/Reversi/ui/noise.png",
@@ -486,7 +487,7 @@ private class ReversiView : Gtk.DrawingArea
         {
             cr.fill_preserve ();
 
-            var matrix = Cairo.Matrix.identity ();
+            Cairo.Matrix matrix = Cairo.Matrix.identity ();
             matrix.translate (-tile_x, -tile_y);
             ((!) noise_pattern).set_matrix (matrix);
             cr.set_source ((!) noise_pattern);
@@ -638,7 +639,7 @@ private class ReversiView : Gtk.DrawingArea
         if (pixmap == 0)
             return;
 
-        var matrix = Cairo.Matrix.identity ();
+        Cairo.Matrix matrix = Cairo.Matrix.identity ();
         matrix.translate (/* texture x */ (pixmap % 8) * tile_size - /* x position */ tile_x,
                           /* texture y */ (pixmap / 8) * tile_size - /* y position */ tile_y);
         ((!) tiles_pattern).set_matrix (matrix);
@@ -697,7 +698,7 @@ private class ReversiView : Gtk.DrawingArea
     }
     private void _draw_overture_playable (Cairo.Context cr, int tile_x, int tile_y, int pixmap)
     {
-        var matrix = Cairo.Matrix.identity ();
+        Cairo.Matrix matrix = Cairo.Matrix.identity ();
         matrix.translate (/* texture x */ (pixmap % 8) * tile_size - /* x position */ tile_x,
                           /* texture y */ (pixmap / 8) * tile_size - /* y position */ tile_y);
         ((!) tiles_pattern).set_matrix (matrix);
@@ -751,9 +752,9 @@ private class ReversiView : Gtk.DrawingArea
     {
         try
         {
-            var h = new Rsvg.Handle.from_file (pieces_file);
+            Rsvg.Handle h = new Rsvg.Handle.from_file (pieces_file);
 
-            var m = Cairo.Matrix.identity ();
+            Cairo.Matrix m = Cairo.Matrix.identity ();
             m.scale ((double) width / h.width, (double) height / h.height);
             c.set_matrix (m);
             h.render_cairo (c);
@@ -767,7 +768,7 @@ private class ReversiView : Gtk.DrawingArea
 
         try
         {
-            var p = new Gdk.Pixbuf.from_file_at_scale (pieces_file, width, height, false);
+            Gdk.Pixbuf p = new Gdk.Pixbuf.from_file_at_scale (pieces_file, width, height, false);
             Gdk.cairo_set_source_pixbuf (c, p, 0, 0);
             c.paint ();
         }


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