]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
don't show pgettext en language warning 1349/head
authorst4lk <myhappydo@gmail.com>
Tue, 24 Feb 2015 10:48:10 +0000 (13:48 +0300)
committerst4lk <myhappydo@gmail.com>
Tue, 24 Feb 2015 10:48:10 +0000 (13:48 +0300)
tornado/locale.py

index 1a87ed1eb09a819bf6261fecb01a7b5fa9da865e..57faa295abf5439a1d27fb8138422400bc8b6f87 100644 (file)
@@ -427,7 +427,8 @@ class CSVLocale(Locale):
         return message_dict.get(message, message)
 
     def pgettext(self, context, message, plural_message=None, count=None):
-        gen_log.warning('pgettext is not supported by CSVLocale')
+        if self.translations:
+            gen_log.warning('pgettext is not supported by CSVLocale')
         return self.translate(message, plural_message, count)