From: st4lk Date: Tue, 24 Feb 2015 10:48:10 +0000 (+0300) Subject: don't show pgettext en language warning X-Git-Tag: v4.2.0b1~94^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5d23cb6ce2536cc978b5b4abbbb138ec8580b5c;p=thirdparty%2Ftornado.git don't show pgettext en language warning --- diff --git a/tornado/locale.py b/tornado/locale.py index 1a87ed1eb..57faa295a 100644 --- a/tornado/locale.py +++ b/tornado/locale.py @@ -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)