summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java15
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java8
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java11
-rw-r--r--dozentenmodul/src/main/properties/i18n/wizard.properties26
-rw-r--r--dozentenmodul/src/main/properties/i18n/wizard_en_US.properties26
6 files changed, 74 insertions, 19 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java
index 845c4e3f..0f310c15 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java
@@ -9,6 +9,7 @@ import org.apache.thrift.TException;
import org.openslx.bwlp.thrift.iface.ImageBaseWrite;
import org.openslx.bwlp.thrift.iface.ImageVersionWrite;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.QuitNotification;
import org.openslx.dozmod.gui.helper.UiFeedback;
@@ -56,7 +57,7 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
@Override
public String getWindowTitle() {
- return "Neue VM erzeugen";
+ return I18n.WIZARD.getString("ImageCreation.Wizard.title");
}
@Override
@@ -67,7 +68,7 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
// check state
if (!isStateValid()) {
// TODO: Show what went wrong
- Gui.showMessageBox(this, "Ein interner Fehler ist aufgetreten.\n\nDetails in der Logdatei.",
+ Gui.showMessageBox(this, I18n.WIZARD.getString("ImageCreation.Message.error.stateInvalid"),
MessageType.ERROR, null, null);
return false;
}
@@ -77,7 +78,7 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
ThriftActions.updateImageBase(state.uuid, imageBaseWriteFromState());
} catch (TException e) {
ThriftError.showMessage(null, LOGGER, e,
- "Konnte die Metadaten der VM nicht auf dem Satelliten speichern!");
+ I18n.WIZARD.getString("ImageCreation.Message.error.baseNotWritten"));
return false;
}
baseWritten = true;
@@ -88,7 +89,7 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
try {
ThriftActions.writeImagePermissions(state.uuid, state.permissionMap);
} catch (TException e) {
- Gui.showMessageBox(this, "Konnte die Berechtigungen nicht auf dem Satelliten speichern!",
+ Gui.showMessageBox(this, I18n.WIZARD.getString("ImageCreation.Message.error.permissionsNotWritten"),
MessageType.ERROR, null, null);
ThriftActions.deleteImageBase(JOptionPane.getFrameForComponent(this), state.uuid);
return false;
@@ -106,8 +107,8 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
state.isRestricted));
} catch (TException e) {
if (state.isRestricted) {
- Gui.showMessageBox(null, "Unerwarteter Fehler beim Setzen der Option"
- + " 'Enthält lizenzpflichtige Software' für diese Virtuelle Maschine.",
+ Gui.showMessageBox(null,
+ I18n.WIZARD.getString("ImageCreation.Message.error.updateImageVersionFailed"),
MessageType.WARNING, LOGGER, e);
}
}
@@ -193,7 +194,7 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
protected boolean onCancelRequest() {
if (state.uuid == null)
return true;
- boolean confirmed = Gui.showMessageBox(this, "Möchten Sie den Vorgang wirklich abbrechen?",
+ boolean confirmed = Gui.showMessageBox(this, I18n.WIZARD.getString("ImageCreation.Message.yesNo.cancelRequest"),
MessageType.QUESTION_YESNO, null, null);
if (confirmed) {
QuickTimer.scheduleOnce(new Task() {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java
index b7f5370c..d807e85c 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java
@@ -7,6 +7,7 @@ import org.apache.thrift.TException;
import org.openslx.bwlp.thrift.iface.ImageDetailsRead;
import org.openslx.bwlp.thrift.iface.ImageVersionWrite;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.QuitNotification;
import org.openslx.dozmod.gui.helper.UiFeedback;
@@ -49,8 +50,7 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific
if (state.isRestricted) {
Gui.showMessageBox(
null,
- "Unerwarteter Fehler beim Setzen der Option"
- + " 'Enthält lizenzpflichtige Software' für diese Virtuelle Maschine.",
+ I18n.WIZARD.getString("ImageUpdate.Message.error.updateImageVersionFailed"),
MessageType.WARNING, LOGGER, e);
}
}
@@ -70,7 +70,7 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific
protected boolean onCancelRequest() {
if (state.uuid == null)
return true;
- boolean confirmed = Gui.showMessageBox(this, "Möchten Sie den Vorgang wirklich abbrechen?",
+ boolean confirmed = Gui.showMessageBox(this, I18n.WIZARD.getString("ImageUpdate.Message.yesNo.cancelRequest"),
MessageType.QUESTION_YESNO, null, null);
if (confirmed && state.upload != null) {
QuickTimer.scheduleOnce(new Task() {
@@ -95,7 +95,7 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific
@Override
public String getWindowTitle() {
- return "Neue VM-Version";
+ return I18n.WIZARD.getString("ImageUpdate.Wizard.title");
}
@Override
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
index 577cd16e..a5b235a9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/LectureWizard.java
@@ -9,6 +9,7 @@ import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.bwlp.thrift.iface.LectureWrite;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.UiFeedback;
import org.openslx.dozmod.gui.window.LectureListWindow;
@@ -61,12 +62,12 @@ public class LectureWizard extends Wizard implements UiFeedback {
@Override
public String getWindowTitle() {
- return "Neue Veranstaltung erzeugen";
+ return I18n.WIZARD.getString("Lecture.Wizard.title");
}
@Override
protected boolean onCancelRequest() {
- return Gui.showMessageBox(this, "Möchten Sie den Vorgang wirklich abbrechen?",
+ return Gui.showMessageBox(this, I18n.WIZARD.getString("Lecture.Message.yesNo.cancelRequest"),
MessageType.QUESTION_YESNO, null, null);
}
@@ -109,7 +110,7 @@ public class LectureWizard extends Wizard implements UiFeedback {
}
// all good, refresh cache and change to LectureList
- Gui.showMessageBox(this, "Veranstaltung erstellt!", MessageType.INFO, null, null);
+ Gui.showMessageBox(this, I18n.WIZARD.getString("Lecture.Message.info.finish"), MessageType.INFO, null, null);
LectureCache.get(true);
MainWindow.showPage(LectureListWindow.class);
return true;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java
index 6a5afa3f..82a3c7a4 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java
@@ -25,6 +25,7 @@ import javax.swing.SwingConstants;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.util.ResourceLoader;
@SuppressWarnings("serial")
@@ -76,10 +77,10 @@ public abstract class Wizard extends JDialog {
footer.setLayout(new BoxLayout(footer, BoxLayout.LINE_AXIS));
footer.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
footer.add(Box.createHorizontalGlue());
- btnPrev = new JButton("< Zurück");
- btnNext = new JButton("Weiter >");
- btnCancel = new JButton("Abbrechen");
- btnFinish = new JButton("Fertigstellen");
+ btnPrev = new JButton(I18n.WIZARD.getString("Wizard.Button.prev.text"));
+ btnNext = new JButton(I18n.WIZARD.getString("Wizard.Button.next.text"));
+ btnCancel = new JButton(I18n.WIZARD.getString("Wizard.Button.cancel.text"));
+ btnFinish = new JButton(I18n.WIZARD.getString("Wizard.Button.finish.text.0"));
footer.add(btnPrev);
footer.add(btnNext);
footer.add(Box.createRigidArea(new Dimension(10, 10)));
@@ -286,7 +287,7 @@ public abstract class Wizard extends JDialog {
isPostFinish = true;
btnPrev.setVisible(false);
btnNext.setVisible(false);
- btnFinish.setText("Schließen");
+ btnFinish.setText(I18n.WIZARD.getString("Wizard.Button.finish.text.1"));
postFinishPage.setVisible(false);
contentPanel.add(postFinishPage);
showPage(-1);
diff --git a/dozentenmodul/src/main/properties/i18n/wizard.properties b/dozentenmodul/src/main/properties/i18n/wizard.properties
new file mode 100644
index 00000000..ac115ba3
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/wizard.properties
@@ -0,0 +1,26 @@
+# ImageCreationWizard
+ImageCreation.Wizard.title=Neue VM erzeugen
+ImageCreation.Message.error.stateInvalid=Ein interner Fehler ist aufgetreten.\n\nDetails in der Logdatei.
+ImageCreation.Message.error.baseNotWritten=Konnte die Metadaten der VM nicht auf dem Satelliten speichern!
+ImageCreation.Message.error.permissionsNotWritten=Konnte die Berechtigungen nicht auf dem Satelliten speichern!
+ImageCreation.Message.error.updateImageVersionFailed=Unerwarteter Fehler beim Setzen der Option \
+ 'Enthält lizenzpflichtige Software' für diese Virtuelle Maschine.
+ImageCreation.Message.yesNo.cancelRequest=Möchten Sie den Vorgang wirklich abbrechen?
+
+# ImageUpdateWizard
+ImageUpdate.Message.error.updateImageVersionFailed=Unerwarteter Fehler beim Setzen der Option \
+ 'Enthält lizenzpflichtige Software' für diese Virtuelle Maschine.
+ImageUpdate.Message.yesNo.cancelRequest=Möchten Sie den Vorgang wirklich abbrechen?
+ImageUpdate.Wizard.title=Neue VM-Version
+
+# LectureWizard
+Lecture.Wizard.title=Neue Veranstaltung erzeugen
+Lecture.Message.yesNo.cancelRequest=Möchten Sie den Vorgang wirklich abbrechen?
+Lecture.Message.info.finish=Veranstaltung erstellt!
+
+# Wizard
+Wizard.Button.prev.text=< Zurück
+Wizard.Button.next.text=Weiter >
+Wizard.Button.cancel.text=Abbrechen
+Wizard.Button.finish.text.0=Fertigstellen
+Wizard.Button.finish.text.1=Schließen \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/wizard_en_US.properties b/dozentenmodul/src/main/properties/i18n/wizard_en_US.properties
new file mode 100644
index 00000000..2f72d225
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/wizard_en_US.properties
@@ -0,0 +1,26 @@
+# ImageCreationWizard
+ImageCreation.Wizard.title=Create new VM
+ImageCreation.Message.error.stateInvalid=An internal error has occurred.\n\nDetails in the log file.
+ImageCreation.Message.error.baseNotWritten=Could not save the metadata of the VM on the satellite!
+ImageCreation.Message.error.permissionsNotWritten=Could not save the permissions on the satellite!
+ImageCreation.Message.error.updateImageVersionFailed=Unexpected error while setting the \
+ 'contains software requiring a license' for this virtual machine.
+ImageCreation.Message.yesNo.cancelRequest=Do you really want to cancel the process?
+
+# ImageUpdateWizard
+ImageUpdate.Message.error.updateImageVersionFailed=Unexpected error while setting the \
+ 'contains software requiring a license' for this virtual machine.
+ImageUpdate.Message.yesNo.cancelRequest=Do you really want to cancel the process?
+ImageUpdate.Wizard.title=New VM version
+
+# LectureWizard
+Lecture.Wizard.title=Create new lecture
+Lecture.Message.yesNo.cancelRequest=Do you really want to cancel the process?
+Lecture.Message.info.finish=Lecture created!
+
+# Wizard
+Wizard.Button.prev.text=< Back
+Wizard.Button.next.text=Next >
+Wizard.Button.cancel.text=Cancel
+Wizard.Button.finish.text.0=Finish
+Wizard.Button.finish.text.1=Close \ No newline at end of file