[gnome-chess] Marking new strings for translation



commit ba7a105a7648d269c6a851b74eb31b1e38c22220
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Sat Apr 4 18:46:47 2015 +0530

    Marking new strings for translation
    
     * Marked new strings that print warnings on loading a bad pgn
     * Added config.vapi to lib/ and updated Makefile.am
     * Updated po/POTFILES
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746218

 lib/Makefile.am    |    4 +++-
 lib/chess-pgn.vala |   10 +++++-----
 lib/config.vapi    |    1 +
 po/POTFILES.in     |    1 +
 po/POTFILES.skip   |    1 +
 5 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f13e358..025fb1e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,6 +1,7 @@
 noinst_LTLIBRARIES = libchess.la
 
 libchess_la_SOURCES = \
+       config.vapi \
        chess-bitboard.vala \
        chess-clock.vala \
        chess-game.vala \
@@ -14,7 +15,8 @@ libchess_la_CFLAGS = \
        -w
 
 libchess_la_CPPFLAGS = \
-       $(LIBCHESS_CFLAGS)
+       $(LIBCHESS_CFLAGS) \
+       -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
 
 libchess_la_LIBADD = \
        $(LIBCHESS_LIBS)
diff --git a/lib/chess-pgn.vala b/lib/chess-pgn.vala
index 5e57751..b5156ff 100644
--- a/lib/chess-pgn.vala
+++ b/lib/chess-pgn.vala
@@ -241,13 +241,13 @@ public class PGN : Object
         {
         case "WhiteTimeLeft":
             if (int64.try_parse (tag_value) == false)
-                warning ("Invalid %s : %s in PGN, setting timer to infinity.", tag_name, tag_value);
+                warning (_("Invalid %s : %s in PGN, setting timer to infinity."), tag_name, tag_value);
             else
                 game.tags.insert (tag_name, tag_value);
             break;
         case "BlackTimeLeft":
             if (int64.try_parse (tag_value) == false)
-                warning ("Invalid %s : %s in PGN, setting timer to infinity.", tag_name, tag_value);
+                warning (_("Invalid %s : %s in PGN, setting timer to infinity."), tag_name, tag_value);
             else
                 game.tags.insert (tag_name, tag_value);
             break;
@@ -258,19 +258,19 @@ public class PGN : Object
                     game.tags.insert (tag_name, tag_value);
             }
             else
-                warning ("Invalid %s : %s in PGN, setting timer to infinity.", tag_name, tag_value);
+                warning (_("Invalid %s : %s in PGN, setting timer to infinity."), tag_name, tag_value);
             break;
         case "X-GNOME-ClockType":
             if (ClockType.string_to_enum (tag_value) == ClockType.INVALID)
             {
-                warning ("Invalid clock type in PGN: %s, using a simple clock.", tag_value);
+                warning (_("Invalid clock type in PGN: %s, using a simple clock."), tag_value);
                 game.tags.insert (tag_name, "simple");
             }
             break;
         case "X-GNOME-TimerIncrement":
             if (int64.try_parse (tag_value) == false)
             {
-                warning ("Invalid timer increment in PGN: %s, using a simple clock.", tag_value);
+                warning (_("Invalid timer increment in PGN: %s, using a simple clock."), tag_value);
                 game.tags["X-GNOME-ClockType"] = "simple";
                 game.tags.insert (tag_name, "0");
             }
diff --git a/lib/config.vapi b/lib/config.vapi
new file mode 100644
index 0000000..78cac13
--- /dev/null
+++ b/lib/config.vapi
@@ -0,0 +1 @@
+public const string GETTEXT_PACKAGE;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 384cc44..14b4b03 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,6 +8,7 @@ data/gnome-chess.desktop.in
 data/org.gnome.chess.gschema.xml
 [type: gettext/glade]data/preferences.ui
 [type: gettext/glade]data/promotion-type-selector.ui
+lib/chess-pgn.vala
 src/ai-profile.vala
 src/chess-engine-cecp.vala
 src/chess-engine-uci.vala
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 60393f5..7166016 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,3 +1,4 @@
+lib/chess-pgn.c
 src/ai-profile.c
 src/chess-engine.c
 src/chess-engine-cecp.c


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