Mercurial > kallithea
changeset 5742:ff9eba8e2541
localization: set language for formencode based on config file
Before, the language would be taken from the environment - such as LANG. Now it
will use exactly what has been configured as lang in .ini .
The formencode initialization could be done in many places and there is no
obvious place ... but this one seems ok.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Thu, 03 Mar 2016 18:53:16 +0100 |
parents | 95a33e5d0596 |
children | 20bf8e618bc9 |
files | kallithea/config/environment.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/config/environment.py Wed Mar 02 17:03:23 2016 +0100 +++ b/kallithea/config/environment.py Thu Mar 03 18:53:16 2016 +0100 @@ -23,6 +23,7 @@ import pylons import mako.lookup import beaker +import formencode # don't remove this import it does magic for celery from kallithea.lib import celerypylons @@ -138,4 +139,5 @@ if str2bool(config.get('initial_repo_scan', True)): repo2db_mapper(ScmModel().repo_scan(repos_path), remove_obsolete=False, install_git_hooks=False) + formencode.api.set_stdtranslation(languages=[config.get('lang')]) return config