[or-cvs] r14498: This allows Mozilla and Debian to use one locale internally (check/trunk/cgi-bin)
ioerror at seul.org
ioerror at seul.org
Tue Apr 29 00:55:17 UTC 2008
Author: ioerror
Date: 2008-04-28 20:55:17 -0400 (Mon, 28 Apr 2008)
New Revision: 14498
Modified:
check/trunk/cgi-bin/index.py
Log:
This allows Mozilla and Debian to use one locale internally but have two names that the user can supply. Thanks to sjmurdoch for the suggestion and one line patch.
Modified: check/trunk/cgi-bin/index.py
===================================================================
--- check/trunk/cgi-bin/index.py 2008-04-28 21:50:30 UTC (rev 14497)
+++ check/trunk/cgi-bin/index.py 2008-04-29 00:55:17 UTC (rev 14498)
@@ -89,6 +89,10 @@
# We'd really like these locales to be translated:
# locales = ( default_locale, 'ar', 'de', 'es', 'es_ES', 'fa-IR', 'fr', 'nl', 'pt-PT', 'ru', 'zh-CN')
+ # This is to deal with Mozilla and Debian having different ideas about
+ # what it means to be a locale
+ user_supplied_lang = user_supplied_lang.replace("-", "_")
+
for item in locales:
if item == user_supplied_lang:
locale = item
More information about the tor-commits
mailing list