Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace slow usage of gettext by faster one
The Python docs suggest against the current usage. In profiles it has shown that this is very slow as for every translation request the translation file is searched and an exception thrown as none is found. The change caches the translation which would be (temporarily) created by _gettext (on every call) and reuses it. If none is found a fallback (NullTranslation) is automatically used.
- Loading branch information