]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Third time's the charm for _locale_data.py
authorBen Darnell <ben@bendarnell.com>
Sun, 9 Aug 2015 03:04:27 +0000 (23:04 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 9 Aug 2015 03:04:27 +0000 (23:04 -0400)
tornado/_locale_data.py

index d28ab807439fb6c330762625aea2ef7d14ac63c8..caf0f06051dea955716c4cd0dd9042d267311f9c 100644 (file)
 
 """Data used by the tornado.locale module."""
 
-from tornado.util import u
+# NOTE: This file is supposed to contain unicode strings, which is
+# exactly what you'd get with e.g. u"EspaƱol" in most python versions.
+# However, Python 3.2 doesn't support the u"" syntax, so we use a u()
+# function instead. tornado.util.u cannot be used because it doesn't
+# support non-ascii characters on python 2.
+# When we drop support for Python 3.2, we can remove the parens
+# and make these plain unicode strings.
+from tornado.escape import to_unicode as u
 
 LOCALE_NAMES = {
     "af_ZA": {"name_en": u("Afrikaans"), "name": u("Afrikaans")},