GoogleCloudPlatform / webapp2

webapp2 is a framework for Google App Engine
https://webapp2.readthedocs.org
Other
141 stars 63 forks source link

i18n modules do not merge #143

Open jkatrenic opened 5 years ago

jkatrenic commented 5 years ago

Hi,

we use setup

  'webapp2_extras.i18n': {
    'domains': ['messages', 'messages2']
  }

i18n modules never merge, just second is applied.

I think reason is in https://webapp2.readthedocs.io/en/latest/_modules/webapp2_extras/i18n.html

            _trans = support.Translations.load(dirname, locales, domain)
            if isinstance(_trans, NullTranslations):
                trans_null = _trans
                continue

isinstance(_trans, NullTranslations) is always true as support.Translations extends NullTranslations: https://github.com/python-babel/babel/blob/master/babel/support.py#L525

dogen-zeni commented 4 years ago

Duplicate of #85