Changeset - ff9eba8e2541
[Not reviewed]
default
0 1 0
domruf - 10 years ago 2016-03-03 18:53:16
dominikruf@gmail.com
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.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/config/environment.py
Show inline comments
 
@@ -23,6 +23,7 @@ import platform
 
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 @@ def load_environment(global_conf, app_co
 
    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
0 comments (0 inline, 0 general)