incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/3] git commit: [#3905] Fix UnicodeEncodeError when system locale is not english
Date Tue, 14 May 2013 18:59:14 GMT
[#3905] Fix UnicodeEncodeError when system locale is not english

Signed-off-by: Peter Hartmann <peterhartmann@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a83595a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a83595a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a83595a6

Branch: refs/heads/master
Commit: a83595a66776ebc33210da8f075b3f24d1bd5675
Parents: 5983da7
Author: Peter Hartmann <peterhartmann@apache.org>
Authored: Tue Apr 30 01:08:51 2013 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue May 14 18:58:54 2013 +0000

----------------------------------------------------------------------
 Allura/allura/config/middleware.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a83595a6/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 5bcb32b..bd73dce 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -33,6 +33,7 @@ from pylons.middleware import StatusCodeRedirect
 
 import activitystream
 import ew
+import formencode
 import ming
 from ming.orm.middleware import MingMiddleware
 
@@ -99,6 +100,9 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
 
     # Configure EW variable provider
     ew.render.TemplateEngine.register_variable_provider(get_tg_vars)
+    
+    # Set FormEncode language to english, as we don't support any other locales
+    formencode.api.set_stdtranslation(domain='FormEncode', languages=['en'])
 
     # Create base app
     base_config = ForgeConfig(root)


Mime
View raw message