aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java87
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_de.properties (renamed from id/ConfigWebTool/src/main/resources/applicationResources.properties)4
-rw-r--r--id/server/stork2-saml-engine/pom.xml4
3 files changed, 52 insertions, 43 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java
index 73b2708ae..b207e7118 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java
@@ -27,81 +27,90 @@ import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider;
import at.gv.egovernment.moa.id.configuration.exception.ConfigurationException;
import at.gv.egovernment.moa.logging.Logger;
+import javax.servlet.http.HttpServletRequest;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
-import javax.servlet.http.HttpServletRequest;
-
public class LanguageHelper {
- private static ResourceBundle errorRes_DE = ResourceBundle.getBundle("applicationResources", Locale.GERMAN);
- private static ResourceBundle guiRes_DE = ResourceBundle.getBundle("applicationResources", Locale.GERMAN);
+ private static ResourceBundle errorRes_DE = ResourceBundle.getBundle("applicationResources_de", Locale.GERMAN);
+ private static ResourceBundle guiRes_DE = ResourceBundle.getBundle("applicationResources_de", Locale.GERMAN);
private static ResourceBundle errorRes_EN = ResourceBundle.getBundle("applicationResources_en", Locale.ENGLISH);
private static ResourceBundle guiRes_EN = ResourceBundle.getBundle("applicationResources_en", Locale.ENGLISH);
- private static ResourceBundle errorLanguage() {
+ private static String errorLanguage(String code) {
Logger.setHierarchy("moa.id.configuration");
try {
ConfigurationProvider configurationProvider = ConfigurationProvider.getInstance();
if (configurationProvider.getDefaultLanguage().equals("en")) {
- return errorRes_EN;
+ Logger.trace("Returning EN error message");
+ return errorRes_EN.getString(code);
} else {
- return errorRes_DE;
+ Logger.trace("Returning DE error message");
}
} catch (ConfigurationException e) {
Logger.error("Configuration exception while getting ConfigurationProvider instance");
e.printStackTrace();
- return errorRes_DE;
+ return errorRes_DE.getString(code);
+ } catch (Exception ex) {
+ Logger.error("General exception while returning translated message");
+ return errorRes_DE.getString(code);
}
+ return errorRes_DE.getString(code);
}
- private static ResourceBundle guiLanguage() {
+ private static String guiLanguage(String code) {
Logger.setHierarchy("moa.id.configuration");
try {
ConfigurationProvider configurationProvider = ConfigurationProvider.getInstance();
if (configurationProvider.getDefaultLanguage().equals("en")) {
- return guiRes_EN;
+ Logger.trace("Returning EN gui message: " + guiRes_EN.getString(code));
+ return guiRes_EN.getString(code);
} else {
- return guiRes_DE;
+ Logger.trace("Returning DE gui message: " + guiRes_DE.getString(code) + " /en>" + guiRes_EN.getString(code));
+ return guiRes_DE.getString(code);
}
} catch (ConfigurationException e) {
Logger.error("Configuration exception while getting ConfigurationProvider instance");
e.printStackTrace();
- return guiRes_DE;
+ return guiRes_DE.getString(code);
+ } catch (Exception ex) {
+ Logger.error("General exception while returning translated message");
+ return guiRes_DE.getString(code);
}
}
public static String getGUIString(String code, HttpServletRequest request) {
- return guiRes_DE.getString(code);
- }
-
- public static String getGUIString(String code) {
- return guiRes_DE.getString(code);
- }
-
- public static String getErrorString(String code, HttpServletRequest request) {
- return errorLanguage().getString(code);
- }
-
- public static String getErrorString(String code) {
- return errorLanguage().getString(code);
- }
-
- public static String getGUIString(String code, String parameter, HttpServletRequest request) {
+ return guiLanguage(code);
+ }
+
+ public static String getGUIString(String code) {
+ return guiLanguage(code);
+ }
+
+ public static String getErrorString(String code, HttpServletRequest request) {
+ return errorLanguage(code);
+ }
+
+ public static String getErrorString(String code) {
+ return errorLanguage(code);
+ }
+
+ public static String getGUIString(String code, String parameter, HttpServletRequest request) {
+ return MessageFormat.format(getGUIString(code, request), parameter);
+ }
+
+ public static String getErrorString(String code, Object[] parameter, HttpServletRequest request) {
+
return MessageFormat.format(getGUIString(code, request), parameter);
- }
-
- public static String getErrorString(String code, Object[] parameter, HttpServletRequest request) {
-
- return MessageFormat.format(getGUIString(code, request), parameter);
- }
-
- public static String getErrorString(String code, Object[] parameter) {
-
- return MessageFormat.format(getGUIString(code), parameter);
- }
+ }
+
+ public static String getErrorString(String code, Object[] parameter) {
+
+ return MessageFormat.format(getGUIString(code), parameter);
+ }
}
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
index f48cac0c8..916206cf1 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
@@ -99,7 +99,7 @@ webpages.moaconfig.save.success=Die MOA-ID Konfiguration wurde erfolgreich gespe
webpages.moaconfig.header=Allgemeine Konfiguration
webpages.oaconfig.general.publicURLPreFix=Public URL Prefix
webpages.moaconfig.defaultbkus.header=Default BKUs
-webpages.moaconfig.slrequesttemplates.header=SecurtiyLayer Request Templates
+webpages.moaconfig.slrequesttemplates.header=SecurityLayer Request Templates
webpages.moaconfig.slrequesttemplates.local=Locale BKU
webpages.moaconfig.slrequesttemplates.handy=Handy BKU
webpages.moaconfig.slrequesttemplates.online=Online BKU
@@ -402,7 +402,7 @@ validation.general.target.valid=Der Target f\u00FCr die Online-Applikation hat k
validation.general.target.subsector.valid=Der Target-Subsektor hat kein g\u00FCltiges Format.
validation.general.target.admin.valid=Der Admin-Target f\u00FCr die Online-Applikation hat kein g\u00FCltiges Format.
validation.general.target.publicserviceurl=Die Domain des eindeutigen Identifiers f\u00FCr die Online-Applikation erlaubt nur Applikationen aus dem privatwirtschaftlichen Bereich.
-validation.general.slversion=Die SecurtiyLayer Version ist kein Zahlenformat.
+validation.general.slversion=Die SecurityLayer Version ist kein Zahlenformat.
validation.general.slversion.business=Im privatwirtschaftlichen Bereich muss die SecurityLayerversion mindestes 1.2 betragen. Die SLVersion wurde auf 1.2 ge\u00E4ndert.
validation.general.targetfriendlyname=Der Name des Bereichs (Target) enth\u00E4lt nicht erlaubte Zeichen. Folgende Zeichen sind nicht erlaubt\: {0}
validation.general.identificationtype.valid=Der Identifikationstype wird nicht unterst\u00FCtzt.
diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml
index e4af3d90e..015697c5c 100644
--- a/id/server/stork2-saml-engine/pom.xml
+++ b/id/server/stork2-saml-engine/pom.xml
@@ -133,8 +133,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>