You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by pe...@apache.org on 2013/05/10 20:17:01 UTC

[2/3] git commit: [#3905] Fix UnicodeEncodeError when system locale is not english

[#3905] Fix UnicodeEncodeError when system locale is not english

Signed-off-by: Peter Hartmann <pe...@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/09b8e762
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/09b8e762
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/09b8e762

Branch: refs/heads/ph/3905
Commit: 09b8e762cfb8fe7194440afecd5f55edd763f4b6
Parents: 7f08327
Author: Peter Hartmann <pe...@apache.org>
Authored: Tue Apr 30 01:08:51 2013 +0200
Committer: Peter Hartmann <pe...@apache.org>
Committed: Tue Apr 30 01:08:51 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/09b8e762/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 9cadf6b..e5caead 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
 
@@ -93,6 +94,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)