wesnoth-cvs-commits
[Top][All Lists]
Advanced

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

[Wesnoth-cvs-commits] wesnoth/src gettext.cpp gettext.hpp multiplayer...


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src gettext.cpp gettext.hpp multiplayer...
Date: Tue, 12 Apr 2005 18:03:42 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    05/04/12 22:03:42

Modified files:
        src            : gettext.cpp gettext.hpp multiplayer.cpp 
                         multiplayer_create.cpp 
        src/serialization: string_utils.cpp string_utils.hpp 

Log message:
        moved vegettext() to string_utils, since it is a wrapper around a 
higher-level function in there

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gettext.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gettext.hpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer.cpp.diff?tr1=1.155&tr2=1.156&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_create.cpp.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/string_utils.cpp.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/string_utils.hpp.diff?tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: wesnoth/src/gettext.cpp
diff -u wesnoth/src/gettext.cpp:1.10 wesnoth/src/gettext.cpp:1.11
--- wesnoth/src/gettext.cpp:1.10        Mon Mar 28 10:04:21 2005
+++ wesnoth/src/gettext.cpp     Tue Apr 12 22:03:41 2005
@@ -1,7 +1,6 @@
 #include "global.hpp"
 
 #include "gettext.hpp"
-#include "serialization/string_utils.hpp"
 
 #include <cstring>
 
@@ -36,10 +35,3 @@
        }
        return msgval;
 }
-
-std::string vgettext (const char *msgid, const utils::string_map& symbols)
-{
-       const std::string orig(gettext(msgid));
-       const std::string msg = utils::interpolate_variables_into_string(orig, 
&symbols);
-       return msg;
-}
Index: wesnoth/src/gettext.hpp
diff -u wesnoth/src/gettext.hpp:1.7 wesnoth/src/gettext.hpp:1.8
--- wesnoth/src/gettext.hpp:1.7 Sun Mar 27 23:06:17 2005
+++ wesnoth/src/gettext.hpp     Tue Apr 12 22:03:41 2005
@@ -3,16 +3,12 @@
 
 // gettext-related declarations
 
-#include "config.hpp"
-#include "serialization/string_utils.hpp"
-
 #include <libintl.h>
 #include <string>
 
 const char* egettext(const char*);
 const char* sgettext(const char*);
 const char* dsgettext(const char * domainname, const char *msgid);
-std::string vgettext(const char*, const utils::string_map&);
 
 #ifdef GETTEXT_DOMAIN
 # define _(String) dgettext(GETTEXT_DOMAIN,String)
Index: wesnoth/src/multiplayer.cpp
diff -u wesnoth/src/multiplayer.cpp:1.155 wesnoth/src/multiplayer.cpp:1.156
--- wesnoth/src/multiplayer.cpp:1.155   Mon Apr 11 18:57:26 2005
+++ wesnoth/src/multiplayer.cpp Tue Apr 12 22:03:41 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer.cpp,v 1.155 2005/04/11 18:57:26 gruikya Exp $ */
+/* $Id: multiplayer.cpp,v 1.156 2005/04/12 22:03:41 ydirson Exp $ */
 /*
    Copyright (C)
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -28,6 +28,7 @@
 #include "random.hpp"
 #include "replay.hpp"
 #include "video.hpp"
+#include "serialization/string_utils.hpp"
 
 #define LOG_NW LOG_STREAM(info, network)
 
Index: wesnoth/src/multiplayer_create.cpp
diff -u wesnoth/src/multiplayer_create.cpp:1.20 
wesnoth/src/multiplayer_create.cpp:1.21
--- wesnoth/src/multiplayer_create.cpp:1.20     Wed Mar 30 19:48:16 2005
+++ wesnoth/src/multiplayer_create.cpp  Tue Apr 12 22:03:41 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_create.cpp,v 1.20 2005/03/30 19:48:16 gruikya Exp $ */
+/* $Id: multiplayer_create.cpp,v 1.21 2005/04/12 22:03:41 ydirson Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -22,6 +22,7 @@
 #include "filesystem.hpp"
 #include "preferences.hpp"
 #include "video.hpp"
+#include "serialization/string_utils.hpp"
 
 namespace {
 const SDL_Rect null_rect = {0, 0, 0, 0};
Index: wesnoth/src/serialization/string_utils.cpp
diff -u wesnoth/src/serialization/string_utils.cpp:1.16 
wesnoth/src/serialization/string_utils.cpp:1.17
--- wesnoth/src/serialization/string_utils.cpp:1.16     Tue Apr 12 21:04:02 2005
+++ wesnoth/src/serialization/string_utils.cpp  Tue Apr 12 22:03:42 2005
@@ -1,4 +1,4 @@
-/* $Id: string_utils.cpp,v 1.16 2005/04/12 21:04:02 ydirson Exp $ */
+/* $Id: string_utils.cpp,v 1.17 2005/04/12 22:03:42 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -554,3 +554,10 @@
 }
 
 }
+
+std::string vgettext (const char *msgid, const utils::string_map& symbols)
+{
+       const std::string orig(gettext(msgid));
+       const std::string msg = utils::interpolate_variables_into_string(orig, 
&symbols);
+       return msg;
+}
Index: wesnoth/src/serialization/string_utils.hpp
diff -u wesnoth/src/serialization/string_utils.hpp:1.11 
wesnoth/src/serialization/string_utils.hpp:1.12
--- wesnoth/src/serialization/string_utils.hpp:1.11     Tue Apr 12 21:04:03 2005
+++ wesnoth/src/serialization/string_utils.hpp  Tue Apr 12 22:03:42 2005
@@ -1,4 +1,4 @@
-/* $Id: string_utils.hpp,v 1.11 2005/04/12 21:04:03 ydirson Exp $ */
+/* $Id: string_utils.hpp,v 1.12 2005/04/12 22:03:42 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -107,4 +107,7 @@
 
 }
 
+// handy wrapper around interpolate_variables_into_string and gettext
+std::string vgettext(const char*, const utils::string_map&);
+
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]