From 376e1cef3f1ca01b4ddeb096639fb4aabd4fa068 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 8 Aug 2015 23:04:27 -0400 Subject: [PATCH] Third time's the charm for _locale_data.py --- tornado/_locale_data.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tornado/_locale_data.py b/tornado/_locale_data.py index d28ab8074..caf0f0605 100644 --- a/tornado/_locale_data.py +++ b/tornado/_locale_data.py @@ -17,7 +17,14 @@ """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")}, -- 2.47.3