unicorn commit: deactivate translation form with a variable

changeset:   1741:eb3b6a3dfa34
tag:         tip
user:        Jean-Guilhem Rouel <jean-gui@w3.org>
date:        Fri Mar 27 11:31:17 2015 +0100
files:       src/org/w3c/unicorn/action/LanguageAction.java
description:
deactivate translation form with a variable


diff -r c1b45041e2c7 -r eb3b6a3dfa34 src/org/w3c/unicorn/action/LanguageAction.java
--- a/src/org/w3c/unicorn/action/LanguageAction.java	Mon Jan 13 11:12:55 2014 +0100
+++ b/src/org/w3c/unicorn/action/LanguageAction.java	Fri Mar 27 11:31:17 2015 +0100
@@ -151,6 +151,11 @@
 				return;
 			}
 		}
+
+    if("false".equals(Property.get("ENABLE_TRANSLATION_CONTRIBS"))) {
+        resp.sendError(404, "Translation contributions are disabled on this server");
+        return;
+    }
 		
 		req.setCharacterEncoding("UTF-8");
 		resp.setContentType("text/html; charset=UTF-8");

Received on Friday, 27 March 2015 10:31:37 UTC