summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java20
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java17
-rw-r--r--BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.pngbin4035 -> 0 bytes
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java11
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java9
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java11
-rw-r--r--BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties86
-rw-r--r--BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_de.properties62
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java10
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java6
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java16
11 files changed, 156 insertions, 92 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index 50d66d80..bde055ec 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -40,7 +40,6 @@ public class BKUApplet extends JApplet {
private static Log log = LogFactory.getLog(BKUApplet.class);
public static final String GUI_STYLE = "GuiStyle";
- public final static String RESOURCE_BUNDLE_BASE = "at/gv/egiz/bku/online/applet/Messages";
public final static String LOCALE_PARAM_KEY = "Locale";
public final static String LOGO_URL_KEY = "LogoURL";
public final static String WSDL_URL = "WSDL_URL";
@@ -52,7 +51,6 @@ public class BKUApplet extends JApplet {
public static final String REDIRECT_URL = "RedirectURL";
public static final String REDIRECT_TARGET = "RedirectTarget";
public static final String HASHDATA_DISPLAY_INTERNAL = "internal";
- protected ResourceBundle resourceBundle;
protected BKUWorker worker;
protected Thread workerThread;
@@ -64,14 +62,9 @@ public class BKUApplet extends JApplet {
log.info("Welcome to MOCCA\n");
log.debug("Called init()");
HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory.getInstance());
- String localeString = getMyAppletParameter(LOCALE_PARAM_KEY);
- Locale locale = null;
- if (localeString != null) {
- locale = new Locale(localeString);
- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE,
- locale);
- } else {
- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE);
+ String locale = getMyAppletParameter(LOCALE_PARAM_KEY);
+ if (locale != null) {
+ this.setLocale(new Locale(locale));
}
String backgroundString = getMyAppletParameter(BACKGROUND_PARAM);
URL background = null;
@@ -84,15 +77,16 @@ public class BKUApplet extends JApplet {
}
String guiStyle = getMyAppletParameter(GUI_STYLE);
BKUGUIFacade gui = BKUGUIFactory.createGUI(guiStyle);
+ log.debug("setting GUI locale to " + getLocale());
AppletHelpListener helpListener = null;
try {
URL helpURL = getMyAppletParameterURL(HELP_URL);
- helpListener = new AppletHelpListener(getAppletContext(), helpURL, locale);
+ helpListener = new AppletHelpListener(getAppletContext(), helpURL, getLocale());
} catch (MalformedURLException ex) {
log.error("invalid help URL: " + ex.getMessage());
}
- gui.init(getContentPane(), localeString, background, helpListener);
- worker = new BKUWorker(gui, this, resourceBundle);
+ gui.init(getContentPane(), getLocale(), background, helpListener);
+ worker = new BKUWorker(gui, this);
}
@Override
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java
index 78f3dc12..843f6c4c 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java
@@ -48,7 +48,6 @@ import at.gv.egiz.stal.service.types.ObjectFactory;
import at.gv.egiz.stal.service.types.RequestType;
import at.gv.egiz.stal.service.types.ResponseType;
import at.gv.egiz.stal.util.STALTranslator;
-import javax.naming.ConfigurationException;
public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
ActionListener, SMCCSTALRequestHandler {
@@ -57,25 +56,22 @@ public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
protected BKUGUIFacade gui;
protected BKUApplet parent;
private STALPortType stalPort;
-// private URL hashDataURL;
protected List<String> actionCommandList = new ArrayList<String>();
protected Boolean actionPerformed = false;
protected boolean finished = false;
- protected ResourceBundle errorMessages;
/**
*
* @param gui
* must not be null
*/
- public BKUWorker(BKUGUIFacade gui, BKUApplet parent,
- ResourceBundle errorMessageBundle) {
- if ((gui == null) || (parent == null) || (errorMessageBundle == null)) {
+ public BKUWorker(BKUGUIFacade gui, BKUApplet parent) {
+ if (gui == null || parent == null) {
throw new NullPointerException("Parameter must not be set to null");
}
this.gui = gui;
+ this.locale = gui.getLocale();
this.parent = parent;
- this.errorMessages = errorMessageBundle;
addRequestHandler(QuitRequest.class, this);
// register SignRequestHandler once we have a webservice port
}
@@ -86,9 +82,9 @@ public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
* @param gui
* @param errorMessageBundle
*/
- protected BKUWorker(BKUGUIFacade gui, ResourceBundle errorMessageBundle) {
+ protected BKUWorker(BKUGUIFacade gui) {
this.gui = gui;
- this.errorMessages = errorMessageBundle;
+ this.locale = gui.getLocale();
addRequestHandler(QuitRequest.class, this);
}
@@ -342,8 +338,7 @@ public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
}
break;
case SMCCHelper.CARD_FOUND:
- // gui.showWaitDialog(null);
- signatureCard = smccHelper.getSignatureCard(errorMessages.getLocale());
+ signatureCard = smccHelper.getSignatureCard(locale);
return false;
}
smccHelper.update(3000);
diff --git a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png
deleted file mode 100644
index eee4be4f..00000000
--- a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png
+++ /dev/null
Binary files differ
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
index 27841d1c..9f733a14 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
@@ -92,10 +92,10 @@ public class BKUGUI implements BKUGUIFacade {
* @param localeString may be null
*/
@Override
- public void init(final Container contentPane, String localeString, final URL background, ActionListener helpListener) {
+ public void init(final Container contentPane, Locale locale, final URL background, ActionListener helpListener) {
- if (localeString != null) {
- messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, new Locale(localeString));
+ if (locale != null) {
+ messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, locale);
} else {
messages = ResourceBundle.getBundle(MESSAGES_BUNDLE);
}
@@ -249,6 +249,11 @@ public class BKUGUI implements BKUGUIFacade {
}
@Override
+ public Locale getLocale() {
+ return messages.getLocale();
+ }
+
+ @Override
public void showLoginDialog(ActionListener loginListener, String actionCommand) {
log.debug("scheduling login dialog");
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
index 4ef1b7d9..6655cf64 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
@@ -24,6 +24,7 @@ import java.awt.Container;
import java.awt.event.ActionListener;
import java.net.URL;
import java.util.List;
+import java.util.Locale;
public interface BKUGUIFacade {
@@ -85,7 +86,13 @@ public interface BKUGUIFacade {
public static final String SAVE_HASHDATAINPUT_PREFIX = "save.hashdatainput.prefix";
- public void init(Container contentPane, String localeString, URL background, ActionListener helpListener);
+ public void init(Container contentPane, Locale locale, URL background, ActionListener helpListener);
+
+ /**
+ *
+ * @return the locale of the message bundle (what if no message bundle could be loaded for the requested locale?)
+ */
+ public Locale getLocale();
public void showWelcomeDialog();
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java
index 195db27a..a005292e 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java
@@ -90,10 +90,10 @@ public class SimpleGUI implements BKUGUIFacade {
* @param localeString may be null
*/
@Override
- public void init(final Container contentPane, String localeString, final URL background, ActionListener helpListener) {
+ public void init(final Container contentPane, Locale locale, final URL background, ActionListener helpListener) {
- if (localeString != null) {
- messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, new Locale(localeString));
+ if (locale != null) {
+ messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, locale);
} else {
messages = ResourceBundle.getBundle(MESSAGES_BUNDLE);
}
@@ -244,6 +244,11 @@ public class SimpleGUI implements BKUGUIFacade {
}
@Override
+ public Locale getLocale() {
+ return messages.getLocale();
+ }
+
+ @Override
public void showLoginDialog(ActionListener loginListener, String actionCommand) {
log.debug("scheduling login dialog");
diff --git a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties
index 1f51de77..2e6b7b14 100644
--- a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties
+++ b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties
@@ -13,51 +13,49 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-title.welcome=<html>Willkommen</html>
-title.insertcard=<html>Bitte B\u00FCrgerkarte in den Kartenleser stecken</html>
-title.cardnotsupported=<html>Die Karte wird nicht unterst\u00FCtzt</html>
-title.cardpin=<html>{0} eingeben</html>
-title.sign=<html>Signatur erstellen</html>
-title.error=<html>Ein Fehler trat auf</html>
-title.retry=<html>Falscher PIN</html>
-title.wait=<html>Bitte warten</html>
-title.hashdata=<html>Signaturdaten</html>
-windowtitle.save=Signaturdaten speichern
-windowtitle.savedir=Signaturdaten in Verzeichnis speichern
-windowtitle.overwrite=Datei \u00FCberschreiben?
-message.wait=<html>Bitte warten...</html>
-message.insertcard=<html>Bitte die B\u00FCrgerkarte in den Kartenleser stecken</html>
-message.enterpin=<html>{0} eingeben</html>
-message.hashdatalink=<html><a href=\"anzeige\">Signaturdaten anzeigen</a></html>
-message.hashdata=<html>Signaturdaten:</html>
-#message.hashdata=<html>Referenz Id: {0}</html>
-message.hashdatalist=<html>{0} Signaturdaten:</html>
-message.retries=<html>Noch {0} Versuch(e)</html>
-message.overwrite=<html>M\u00F6chten Sie das existierende Dokument {0} \u00FCberschreiben?</html>
+title.welcome=<html>Welcome</html>
+title.insertcard=<html>Please insert your citizen-card into the reader</html>
+title.cardnotsupported=<html>This card is not supported</html>
+title.cardpin=<html>Enter {0}</html>
+title.sign=<html>Create signature</html>
+title.error=<html>Error</html>
+title.retry=<html>Wrong PIN</html>
+title.wait=<html>Please wait</html>
+title.hashdata=<html>Signature data</html>
+windowtitle.save=Save signature data
+windowtitle.savedir=Save signature data to directory
+windowtitle.overwrite=Overwrite file?
+message.wait=<html>Please wait...</html>
+message.insertcard=<html>Please insert your citizen-card into the reader</html>
+message.enterpin=<html>Enter {0}</html>
+message.hashdatalink=<html><a href=\"anzeige\">Display signature data</a></html>
+message.hashdata=<html>Signature data:</html>
+message.hashdatalist=<html>{0} signature data objects:</html>
+message.retries=<html>{0} tries left</html>
+message.overwrite=<html>Overwrite {0}?</html>
label.pin=<html>{0}:</html>
-label.pinsize=<html>({0} stellig)</html>
+label.pinsize=<html>({0} digits)</html>
button.ok=OK
-button.cancel=Abbrechen
-button.back=Zur\u00FCck
-button.sign=Signieren
-button.save=Speichern...
-mimetype.desc.xml=XML-Dateien (.xml)
-mimetype.desc.html=HTML-Dateien (.html, .htm)
-mimetype.desc.xhtml=XHTML-Dateien (.xhtml)
-mimetype.desc.txt=Textdateien (.txt)
-mimetype.desc.pdf=Adobe PDF-Dateien (.pdf)
-mimetype.desc.bin=Bin\u00E4rdateien (.bin)
-save.hashdatainput.prefix=Signaturdaten
+button.cancel=Cancel
+button.back=Back
+button.sign=Sign
+button.save=Save...
+mimetype.desc.xml=XML-files (.xml)
+mimetype.desc.html=HTML-files (.html, .htm)
+mimetype.desc.xhtml=XHTML-files (.xhtml)
+mimetype.desc.txt=Textfiles (.txt)
+mimetype.desc.pdf=Adobe PDF-files (.pdf)
+mimetype.desc.bin=Binary files (.bin)
+save.hashdatainput.prefix=signaturedata
# Error Messages
-error.no.hashdata=<html>Keine Signaturdaten verf\u00FCgbar: {0}</html>
-error.display.hashdata=<html>Signaturdaten konnten nicht dargestellt werden: {0}</html>
-error.write.hashdata=<html>Die Signaturdaten konnten nicht gespeichert werden: {0}</html>
-error.invalid.hash=<html>Die Signaturdaten sind ung\u00FCltig: {0}</html>
-error.ws.unreachable=<html>Das Web-Service ist nicht erreichbar: {0}</html>
-error.pcsc=<html>Java(TM) scheint keine PC/SC Schnittstelle f\u00FCr den Smartcard-Zugriff zur Verf\u00FCgung zu stellen.</html>
-error.cardterminal=<html>Es konnte kein Smartcard-Leser gefunden werden.<p>Entweder ist kein Leser angeschlossen oder kein PC/SC Treiber installiert.</p></html>
-error.unknown=<html>Leider trat ein Fehler auf: {0}</html>
-error.test=<html>Fehler1 {0} - Fehler2 {1}</html>
-error.card.locked=<html>B\u00FCrgerkarte ist gesperrt</html>
-error.card.notactivated=<html>B\u00FCrgerkartenfunktion ist nicht aktiviert</html> \ No newline at end of file
+error.no.hashdata=<html>No signature data available: {0}</html>
+error.display.hashdata=<html>Could not display signature data: {0}</html>
+error.write.hashdata=<html>Could not save signature data: {0}</html>
+error.invalid.hash=<html>Invalid signature data: {0}</html>
+error.ws.unreachable=<html>Web-service unreachable: {0}</html>
+error.pcsc=<html>No PC/SC interface for smartcard access provided</html>
+error.cardterminal=<html>Could not find smartcard reader</html>
+error.unknown=<html>An error occured: {0}</html>
+error.card.locked=<html>Citizen-card is locked</html>
+error.card.notactivated=<html>Citizen-card not activated</html> \ No newline at end of file
diff --git a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_de.properties b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_de.properties
new file mode 100644
index 00000000..af0cb016
--- /dev/null
+++ b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_de.properties
@@ -0,0 +1,62 @@
+# Copyright 2008 Federal Chancellery Austria and
+# Graz University of Technology
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+title.welcome=<html>Willkommen</html>
+title.insertcard=<html>Bitte B\u00FCrgerkarte in den Kartenleser stecken</html>
+title.cardnotsupported=<html>Die Karte wird nicht unterst\u00FCtzt</html>
+title.cardpin=<html>{0} eingeben</html>
+title.sign=<html>Signatur erstellen</html>
+title.error=<html>Fehler</html>
+title.retry=<html>Falscher PIN</html>
+title.wait=<html>Bitte warten</html>
+title.hashdata=<html>Signaturdaten</html>
+windowtitle.save=Signaturdaten speichern
+windowtitle.savedir=Signaturdaten in Verzeichnis speichern
+windowtitle.overwrite=Datei \u00FCberschreiben?
+message.wait=<html>Bitte warten...</html>
+message.insertcard=<html>Bitte die B\u00FCrgerkarte in den Kartenleser stecken</html>
+message.enterpin=<html>{0} eingeben</html>
+message.hashdatalink=<html><a href=\"anzeige\">Signaturdaten anzeigen</a></html>
+message.hashdata=<html>Signaturdaten:</html>
+message.hashdatalist=<html>{0} Signaturdaten:</html>
+message.retries=<html>Noch {0} Versuch(e)</html>
+message.overwrite=<html>M\u00F6chten Sie das existierende Dokument {0} \u00FCberschreiben?</html>
+label.pin=<html>{0}:</html>
+label.pinsize=<html>({0} stellig)</html>
+button.ok=OK
+button.cancel=Abbrechen
+button.back=Zur\u00FCck
+button.sign=Signieren
+button.save=Speichern...
+mimetype.desc.xml=XML-Dateien (.xml)
+mimetype.desc.html=HTML-Dateien (.html, .htm)
+mimetype.desc.xhtml=XHTML-Dateien (.xhtml)
+mimetype.desc.txt=Textdateien (.txt)
+mimetype.desc.pdf=Adobe PDF-Dateien (.pdf)
+mimetype.desc.bin=Bin\u00E4rdateien (.bin)
+save.hashdatainput.prefix=Signaturdaten
+
+# Error Messages
+error.no.hashdata=<html>Keine Signaturdaten verf\u00FCgbar: {0}</html>
+error.display.hashdata=<html>Signaturdaten konnten nicht dargestellt werden: {0}</html>
+error.write.hashdata=<html>Die Signaturdaten konnten nicht gespeichert werden: {0}</html>
+error.invalid.hash=<html>Die Signaturdaten sind ung\u00FCltig: {0}</html>
+error.ws.unreachable=<html>Das Web-Service ist nicht erreichbar: {0}</html>
+error.pcsc=<html>Java(TM) scheint keine PC/SC Schnittstelle f\u00FCr den Smartcard-Zugriff zur Verf\u00FCgung zu stellen.</html>
+error.cardterminal=<html>Es konnte kein Smartcard-Leser gefunden werden.<p>Entweder ist kein Leser angeschlossen oder kein PC/SC Treiber installiert.</p></html>
+error.unknown=<html>Leider trat ein Fehler auf: {0}</html>
+error.test=<html>Fehler1 {0} - Fehler2 {1}</html>
+error.card.locked=<html>B\u00FCrgerkarte ist gesperrt</html>
+error.card.notactivated=<html>B\u00FCrgerkartenfunktion ist nicht aktiviert</html> \ No newline at end of file
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
index 8a850549..44cae8a0 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
@@ -10,6 +10,7 @@ import java.awt.event.WindowEvent;
import java.net.URL;
import java.util.List;
+import java.util.Locale;
import javax.swing.JDialog;
import at.gv.egiz.bku.gui.BKUGUIFacade;
@@ -37,8 +38,13 @@ public class BKUGuiProxy implements BKUGUIFacade {
}
@Override
- public void init(Container contentPane, String localeString, URL bgImage, ActionListener helpListener) {
- delegate.init(contentPane, localeString, bgImage, helpListener);
+ public void init(Container contentPane, Locale locale, URL bgImage, ActionListener helpListener) {
+ delegate.init(contentPane, locale, bgImage, helpListener);
+ }
+
+ @Override
+ public Locale getLocale() {
+ return delegate.getLocale();
}
@Override
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
index 1bbb2e3c..6bf37c40 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
@@ -1,7 +1,6 @@
package at.gv.egiz.bku.local.stal;
import java.util.List;
-import java.util.ResourceBundle;
import javax.swing.JDialog;
@@ -16,9 +15,8 @@ public class SMCCSTAL extends BKUWorker {
private JDialog container;
- public SMCCSTAL(BKUGUIFacade gui, JDialog container,
- ResourceBundle errorMessageBundle) {
- super(gui, errorMessageBundle);
+ public SMCCSTAL(BKUGUIFacade gui, JDialog container) {
+ super(gui);
this.container = container;
addRequestHandler(SignRequest.class, new LocalSignRequestHandler());
}
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
index 4cc7bcd3..ad7b9646 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
@@ -28,7 +28,6 @@ import javax.swing.WindowConstants;
import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.bku.gui.BKUGUIFactory;
import at.gv.egiz.bku.local.gui.LocalHelpListener;
-import at.gv.egiz.bku.online.applet.BKUApplet;
import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALFactory;
import java.net.URL;
@@ -45,28 +44,23 @@ public class SMCCSTALFactory implements STALFactory {
public STAL createSTAL() {
SMCCSTAL stal;
- JDialog dialog;
- ResourceBundle resourceBundle;
+ JDialog dialog = new JDialog();
if (locale != null) {
- resourceBundle = ResourceBundle.getBundle(BKUApplet.RESOURCE_BUNDLE_BASE,
- locale);
- } else {
- resourceBundle = ResourceBundle.getBundle(BKUApplet.RESOURCE_BUNDLE_BASE);
+ dialog.setLocale(locale);
}
- dialog = new JDialog();
BKUGUIFacade gui = BKUGUIFactory.createGUI(BKUGUIFactory.ADVANCED_GUI);
LocalHelpListener helpListener = null;
try {
if (helpURL != null) {
- helpListener = new LocalHelpListener(new URL(helpURL), locale);
+ helpListener = new LocalHelpListener(new URL(helpURL), dialog.getLocale());
} else {
log.warn("no HELP URL configured, help system disabled");
}
} catch (MalformedURLException ex) {
log.error("failed to configure help listener: " + ex.getMessage(), ex);
}
- gui.init(dialog.getContentPane(), locale.toString(), null, helpListener);
- stal = new SMCCSTAL(new BKUGuiProxy(dialog, gui), dialog, resourceBundle);
+ gui.init(dialog.getContentPane(), dialog.getLocale(), null, helpListener);
+ stal = new SMCCSTAL(new BKUGuiProxy(dialog, gui), dialog);
dialog.setPreferredSize(new Dimension(400, 200));
dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
dialog.setTitle("MOCCA");