Просмотр исходного кода

Remove translations workaround for python 2

This works since babel 2.2.0
Peter Justin 9 лет назад
Родитель
Сommit
c87bc1abf8
1 измененных файлов с 0 добавлено и 11 удалено
  1. 0 11
      flaskbb/utils/translations.py

+ 0 - 11
flaskbb/utils/translations.py

@@ -5,8 +5,6 @@ import babel
 from flask_babelex import Domain, get_locale
 from flask_plugins import get_enabled_plugins
 
-from flaskbb._compat import PY2
-
 
 class FlaskBBDomain(Domain):
     def __init__(self, app):
@@ -52,15 +50,6 @@ class FlaskBBDomain(Domain):
             if not isinstance(translations, babel.support.Translations):
                 return translations
 
-            # Plugin translations are at the moment not supported under
-            # Python 3. There is currently a bug in Babel where it is
-            # not possible to merge two message catalogs.
-            # https://github.com/mitsuhiko/babel/pull/92
-            # So instead of adding/merging them, we are just skipping them
-            # Better then no python3 support though..
-            if not PY2:
-                return translations
-
             # now load and add the plugin translations
             for plugin in self.plugin_translations:
                 plugin_translation = babel.support.Translations.load(