[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src config.cpp
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src config.cpp |
Date: |
Mon, 08 Nov 2004 17:46:57 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 04/11/08 22:30:54
Modified files:
src : config.cpp
Log message:
implement the possibility of arbitrary-located message catalogs
according to the translations= WML parameter, to allow user campaigns to ship
their translations
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/config.cpp.diff?tr1=1.110&tr2=1.111&r1=text&r2=text
Patches:
Index: wesnoth/src/config.cpp
diff -u wesnoth/src/config.cpp:1.110 wesnoth/src/config.cpp:1.111
--- wesnoth/src/config.cpp:1.110 Tue Oct 5 21:28:12 2004
+++ wesnoth/src/config.cpp Mon Nov 8 22:30:54 2004
@@ -1,4 +1,4 @@
-/* $Id: config.cpp,v 1.110 2004/10/05 21:28:12 silene Exp $ */
+/* $Id: config.cpp,v 1.111 2004/11/08 22:30:54 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -561,6 +561,7 @@
std::stack<std::map<std::string,config*> > last_element; //allows
[+element] syntax
std::stack<std::string> textdomains;
std::string current_textdomain = PACKAGE;
+ std::string current_textdomain_location = "";
elements.push(this);
element_names.push("");
element_locs.push(0);
@@ -647,6 +648,7 @@
current_textdomain =
textdomains.top();
textdomains.pop();
}
+ current_textdomain_location =
"";
state = IN_ELEMENT;
@@ -750,8 +752,13 @@
textdomains.push(current_textdomain);
current_textdomain =
value;
bindtextdomain(current_textdomain.c_str(),
-
get_intl_dir().c_str());
+
current_textdomain_location.empty() ?
+
get_intl_dir().c_str() :
+
current_textdomain_location.c_str());
bind_textdomain_codeset
(current_textdomain.c_str(), "UTF-8");
+ } else if (var ==
"translations") {
+ const std::string&
location = get_binary_file_location(value, ".");
+
current_textdomain_location = location;
}
}
- [Wesnoth-cvs-commits] wesnoth/src config.cpp,
Yann Dirson <=