Author: remi
Date: 2009-03-25 11:00:51 +0100 (Wed, 25 Mar 2009)
New Revision: 4207
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/util/i18n/I18n.py
Log:
* now arguments passed in a message are translated too
Modified: software_suite_v2/tuxware/tuxdroidserver/trunk/util/i18n/I18n.py
===================================================================
--- software_suite_v2/tuxware/tuxdroidserver/trunk/util/i18n/I18n.py
2009-03-25 09:47:12 UTC (rev 4206)
+++ software_suite_v2/tuxware/tuxdroidserver/trunk/util/i18n/I18n.py
2009-03-25 10:00:51 UTC (rev 4207)
@@ -86,7 +86,10 @@
value = message
value = value.replace("'", "''")
for i, argument in enumerate(arguments):
- value = value.replace("{%d}" % i, str(argument))
+ trArg = str(argument)
+ if self.__data.has_key(trArg):
+ trArg = self.__data[trArg]
+ value = value.replace("{%d}" % i, trArg)
return value
#
--------------------------------------------------------------------------
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn