damned-lies r865 - trunk



Author: claudep
Date: Fri May  2 13:29:52 2008
New Revision: 865
URL: http://svn.gnome.org/viewvc/damned-lies?rev=865&view=rev

Log:
2008-05-02  Claude Paroz  <claude 2xlibre net>

	* l10n.py: Temporary workaround when error messages contain placeholders by
	accident.

Modified:
   trunk/ChangeLog
   trunk/l10n.py

Modified: trunk/l10n.py
==============================================================================
--- trunk/l10n.py	(original)
+++ trunk/l10n.py	Fri May  2 13:29:52 2008
@@ -64,6 +64,11 @@
                 val = unicode(val).capitalize()
                 del kw['CAPITALIZE']
             val = val.replace(u'%20', ' ')
-            return val % kw
+            try:
+                val = val % kw
+            except:
+                # FIXME:It may happen that val contains %s/%d placeholders by accident (e.g. in an error message)
+                pass
+            return val
         else:
             return unicode(val)



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