summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org
diff options
context:
space:
mode:
authorMürsel Türk2020-07-07 12:05:21 +0200
committerMürsel Türk2020-07-07 12:05:21 +0200
commita9413eba86f5de4e478c26de5ddc525abe5fc71d (patch)
tree32981f407569dd039bf90d2d5d44bc70b873b713 /dozentenmodul/src/main/java/org
parent[client] Add resource bundle files for helper classes. Update the helper clas... (diff)
downloadtutor-module-a9413eba86f5de4e478c26de5ddc525abe5fc71d.tar.gz
tutor-module-a9413eba86f5de4e478c26de5ddc525abe5fc71d.tar.xz
tutor-module-a9413eba86f5de4e478c26de5ddc525abe5fc71d.zip
[client] Add resource bundle files for window/layout classes. Update the window/layout classes accordingly.
Diffstat (limited to 'dozentenmodul/src/main/java/org')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/CheckUpdateWindowLayout.java23
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ConfigWindowLayout.java45
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/GenericNoticeWindowLayout.java12
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java68
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java39
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImagePublishedWindowLayout.java22
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureChangeImageLayout.java14
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java101
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java38
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java8
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java42
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java26
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/SatelliteListWindowLayout.java15
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java11
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtConfigEditorWindowLayout.java14
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtDropDownConfigEditorWindowLayout.java36
16 files changed, 258 insertions, 256 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/CheckUpdateWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/CheckUpdateWindowLayout.java
index 8667c944..017194b5 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/CheckUpdateWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/CheckUpdateWindowLayout.java
@@ -15,14 +15,11 @@ import javax.swing.JTextArea;
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;
@SuppressWarnings("serial")
public abstract class CheckUpdateWindowLayout extends JDialog {
- private final static String title = "Version";
- private final static String noticeLabel = "Update";
- private final static String closeButtonLabel = "Schließen";
-
protected static JButton btnLink;
protected static JButton btnClose;
@@ -34,8 +31,8 @@ public abstract class CheckUpdateWindowLayout extends JDialog {
protected final JTextArea txtChangelog;
public CheckUpdateWindowLayout(Window modalParent) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("CheckUpdate.Dialog.title"), modalParent != null
+ ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
setLayout(new BorderLayout());
setPreferredSize(Gui.getScaledDimension(680, 400));
@@ -47,13 +44,14 @@ public abstract class CheckUpdateWindowLayout extends JDialog {
// information before the disclaimer
JPanel infoPanel = new JPanel();
GridManager infoGrid = new GridManager(infoPanel, 4);
- infoPanel.setBorder(BorderFactory.createTitledBorder(noticeLabel));
- infoGrid.add(new QLabel("Ihre Version"));
+ infoPanel.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("CheckUpdate.TitledBorder.infoPanel.title")));
+ infoGrid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("CheckUpdate.Label.localVersion.text")));
infoGrid.add(Box.createHorizontalStrut(10));
infoGrid.add(lblLocalVersion);
infoGrid.add(Box.createHorizontalGlue()).fill(true, false).expand(true, false);
infoGrid.nextRow();
- infoGrid.add(new QLabel("Aktuelle Version"));
+ infoGrid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("CheckUpdate.Label.remoteVersion.text")));
infoGrid.add(Box.createHorizontalStrut(10));
infoGrid.add(lblRemoteVersion);
infoGrid.add(Box.createHorizontalGlue()).fill(true, false).expand(true, false);
@@ -64,11 +62,12 @@ public abstract class CheckUpdateWindowLayout extends JDialog {
txtChangelog.setWrapStyleWord(true);
JScrollPane changelogPanel = new JScrollPane(txtChangelog, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- changelogPanel.setBorder(BorderFactory.createTitledBorder("Changelog"));
+ changelogPanel.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("CheckUpdate.TitledBorder.changelogPanel.title")));
// checkbox for acknowledging the disclaimer
- btnLink = new JButton("Zum Download-Portal");
- btnClose = new JButton(closeButtonLabel);
+ btnLink = new JButton(I18n.WINDOW_LAYOUT.getString("CheckUpdate.Button.link.text"));
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("CheckUpdate.Button.close.text"));
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.add(Box.createHorizontalGlue());
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ConfigWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ConfigWindowLayout.java
index bf37dc42..cf126587 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ConfigWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ConfigWindowLayout.java
@@ -24,12 +24,11 @@ import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.WordWrapLabel;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class ConfigWindowLayout extends JDialog {
- private static String title = Branding.getApplicationName() + " - Konfiguration";
-
protected final JRadioButton btnProxyNone;
protected final JRadioButton btnProxyAuto;
protected final JRadioButton btnProxySocks = null;
@@ -44,8 +43,8 @@ public class ConfigWindowLayout extends JDialog {
protected final JButton btnClose;
public ConfigWindowLayout(Window modalParent) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("Config.Dialog.title", Branding.getApplicationName()),
+ modalParent != null ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
// regular layout as a helper for the whole page
getContentPane().setLayout(new BorderLayout());
@@ -57,22 +56,21 @@ public class ConfigWindowLayout extends JDialog {
GridManager grid = new GridManager(contentPanel, 1, false, new Insets(4, 3, 1, 3));
// mail config
- grid.add(new WordWrapLabel("E-Mail-Benachrichtigungen", true, false))
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.mailNotifications.text"), true, false))
.insets(headingInset)
.expand(true, false)
.fill(true, false);
- chkSendMeMail = new JCheckBox("Über VM- und Veranstaltungsänderungen per E-Mail informiert werden");
+ chkSendMeMail = new JCheckBox(I18n.WINDOW_LAYOUT.getString("Config.CheckBox.sendMeMail.text"));
grid.add(chkSendMeMail).fill(true, false).expand(true, false);
grid.add(
- new WordWrapLabel("Für diese Option muss der Server"
- + " für den Mailversand konfiguriert sein.", false, true))
+ new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.sendMeMail.text"), false, true))
.expand(true, false)
.fill(true, false);
lblYourAddress = new QLabel();
grid.add(lblYourAddress).fill(true, false).expand(true, false);
// proxy config
- grid.add(new WordWrapLabel("Proxyserver", true, false))
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.proxyConfig.text"), true, false))
.insets(headingInset)
.fill(true, false)
.expand(true, false);
@@ -80,8 +78,8 @@ public class ConfigWindowLayout extends JDialog {
radioGroupPanel.setLayout(new BoxLayout(radioGroupPanel, BoxLayout.LINE_AXIS));
// radio buttons
ButtonGroup radioGroup = new ButtonGroup();
- btnProxyNone = new JRadioButton("Keinen Proxy verwenden");
- btnProxyAuto = new JRadioButton("Automatisch nach Proxy suchen");
+ btnProxyNone = new JRadioButton(I18n.WINDOW_LAYOUT.getString("Config.RadioButton.proxyNone.text"));
+ btnProxyAuto = new JRadioButton(I18n.WINDOW_LAYOUT.getString("Config.RadioButton.proxyAuto.text"));
radioGroup.add(btnProxyNone);
radioGroup.add(btnProxyAuto);
radioGroupPanel.add(btnProxyNone);
@@ -89,12 +87,12 @@ public class ConfigWindowLayout extends JDialog {
grid.add(radioGroupPanel).expand(true, false).fill(true, false);
// font config
- grid.add(new WordWrapLabel("Schriftgröße (%)", true, false))
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.fontConfig.text"), true, false))
.insets(headingInset)
.fill(true, false)
.expand(true, false);
grid.add(
- new WordWrapLabel("Diese Funktion ist experimentell. Es kann zu Anzeigefehlern kommen.",
+ new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.fontConfigInfo.text"),
false, true))
.expand(true, false)
.fill(true, false);
@@ -110,14 +108,12 @@ public class ConfigWindowLayout extends JDialog {
grid.add(sldFontSize).fill(true, false).expand(true, false);
// look and feel
- grid.add(new WordWrapLabel("LookAndFeel", true, false))
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.lookAndFeel.text"),
+ true, false))
.insets(headingInset)
.fill(true, false)
.expand(true, false);
- grid.add(
- new WordWrapLabel("Hier können Sie die Darstellung der Oberfläche zwischen unterschiedlichen"
- + " 'LookAndFeels' umstellen.",
- false, true))
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.lookAndFeelInfo.text"), false, true))
.fill(true, false)
.expand(true, false);
JPanel lafGroupPanel = new JPanel();
@@ -133,16 +129,13 @@ public class ConfigWindowLayout extends JDialog {
grid.add(lafGroupPanel).expand(true, false).fill(true, false);
// Concurrent Connections
- grid.add(new WordWrapLabel("Verbindungen pro Transfer", true, false))
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.concurrentConnections.text"),
+ true, false))
.insets(headingInset)
.fill(true, false)
.expand(true, false);
grid.add(
- new WordWrapLabel("Im Normalfall werden beste Ergebnisse erzielt,"
- + " wenn die Einstellung auf 1 belassen wird. Falls die Übertragungsgeschwindigkeit"
- + " ihre Netzwerkanbindung nicht auslastet, probieren Sie den nächsthöheren"
- + " Wert. Zu hohe Werte können einen negativen Effekt auf die"
- + " Übertragungsgeschwindigkeit haben, und belasten den Satellitenserver stärker.",
+ new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.concurrentConnectionsInfo.text"),
false, true))
.fill(true, false)
.expand(true, false);
@@ -158,8 +151,8 @@ public class ConfigWindowLayout extends JDialog {
// bottom button panel
JPanel buttonPanel = new JPanel();
- btnClose = new JButton("Schließen");
- btnSave = new JButton("Speichern");
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("Config.Button.close.text"));
+ btnSave = new JButton(I18n.WINDOW_LAYOUT.getString("Config.Button.save.text"));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.add(Box.createGlue());
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/GenericNoticeWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/GenericNoticeWindowLayout.java
index bd28189a..9bbce4f1 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/GenericNoticeWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/GenericNoticeWindowLayout.java
@@ -17,19 +17,18 @@ import org.openslx.dozmod.Branding;
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;
@SuppressWarnings("serial")
public abstract class GenericNoticeWindowLayout extends JDialog {
- protected String info = "Bitte lesen und bestätigen Sie folgende rechtliche Hinweise:";
+ protected String info = I18n.WINDOW_LAYOUT.getString("GenericNotice.Label.noticePanel.text");
protected JTextArea notice;
protected JScrollPane disclaimerPanel;
- protected String checkboxText = "Ja, ich akzeptiere die Vereinbarung. Benachrichtigung nicht mehr anzeigen.";
+ protected String checkboxText = I18n.WINDOW_LAYOUT.getString("GenericNotice.CheckBox.agree.text");
private static String title = Branding.getApplicationName();
- private static String noticeLabel = "Hinweis";
- private static String continueButtonLabel = "Weiter";
// Buttons
protected final JCheckBox chkAgreeBox;
@@ -47,7 +46,8 @@ public abstract class GenericNoticeWindowLayout extends JDialog {
// information before the notice
QLabel noticePanel = new QLabel();
- noticePanel.setBorder(BorderFactory.createTitledBorder(noticeLabel));
+ noticePanel.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("GenericNotice.TitledBorder.noticePanel.title")));
noticePanel.setText(info);
// the disclaimer text box with scrolling functionality
@@ -67,7 +67,7 @@ public abstract class GenericNoticeWindowLayout extends JDialog {
// spacer
buttonPanel.add(Box.createHorizontalGlue());
// the continue button
- btnContinue = new JButton(continueButtonLabel);
+ btnContinue = new JButton(I18n.WINDOW_LAYOUT.getString("GenericNotice.Button.continue.text"));
btnContinue.setEnabled(false);
buttonPanel.add(btnContinue);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java
index 2792e9fd..9d5f375c 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java
@@ -32,6 +32,7 @@ import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.ImageVersionTable;
import org.openslx.dozmod.gui.control.table.QScrollPane;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.thrifthelper.Comparators;
@SuppressWarnings("serial")
@@ -78,9 +79,6 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
protected ImagePermissionConfigurator ctlImagePermissionConfigurator;
- private static String infoTextDefPerms = "<html><body style='width:100%'>"
- + "Hier können Sie Rechte für nicht in der Liste angegebene Nutzer festlegen:" + "</body></html>";
-
public ImageDetailsWindowLayout(Frame modalParent) {
super(modalParent, "<init>", ModalityType.APPLICATION_MODAL);
setResizable(true);
@@ -106,7 +104,8 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
txtDescription = new JTextArea();
txtDescription.setLineWrap(true);
txtDescription.setWrapStyleWord(true);
- grid.add(new QLabel("Beschreibung")).anchor = GridBagConstraints.FIRST_LINE_START;
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.description.text")))
+ .anchor = GridBagConstraints.FIRST_LINE_START;
JScrollPane jsp = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jsp.setMinimumSize(Gui.getScaledDimension(0, 110));
@@ -116,27 +115,27 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
// owner
lblOwner = new PersonLabel();
- btnChangeOwner = new JButton("Ändern");
- grid.add(new QLabel("Besitzer"));
+ btnChangeOwner = new JButton(I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.changeOwner.text"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.owner.text")));
grid.add(lblOwner).expand(true, false);
grid.add(btnChangeOwner).fill(true, false);
grid.nextRow();
// creation time
lblCreateTime = new QLabel();
- grid.add(new QLabel("Erstellt am"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.createTime.text")));
grid.add(lblCreateTime, 2);
grid.nextRow();
// last updater
lblUpdater = new PersonLabel();
- grid.add(new QLabel("Geändert durch"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.updater.text")));
grid.add(lblUpdater, 2);
grid.nextRow();
// last updated
lblUpdateTime = new QLabel();
- grid.add(new QLabel("Geändert am"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.updateTime.text")));
grid.add(lblUpdateTime, 2);
grid.nextRow();
@@ -151,7 +150,7 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
});
cboOperatingSystem.setEditable(false);
- grid.add(new QLabel("Betriebssystem"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.OS.text")));
grid.add(cboOperatingSystem, 2).expand(true, false).fill(true, false);
grid.nextRow();
@@ -167,39 +166,40 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
return item.name();
}
});
- grid.add(new QLabel("Freigabemodus"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.shareMode.text")));
grid.add(cboShareMode, 2).expand(true, false).fill(true, false);
grid.nextRow();
// template
- chkIsTemplate = new JCheckBox("Vorlage");
+ chkIsTemplate = new JCheckBox(I18n.WINDOW_LAYOUT.getString("ImageDetails.CheckBox.isTemplate.text"));
grid.add(Box.createGlue());
grid.add(chkIsTemplate, 2);
grid.nextRow();
// version
txtVersion = new JTextField();
- grid.add(new QLabel("Versions-ID"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.version.text")));
grid.add(txtVersion, 2).expand(true, false).fill(true, false);
grid.nextRow();
// id
txtId = new JTextField();
txtId.setEditable(false);
- grid.add(new QLabel("VM-ID"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.ID.text")));
grid.add(txtId, 2).expand(true, false).fill(true, false);
grid.nextRow();
// virtualizer
lblVirtualizer = new QLabel();
- grid.add(new QLabel("Virtualisierer"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.virtualizer.text")));
grid.add(lblVirtualizer, 2).expand(true, false).fill(true, false);
grid.nextRow();
- grid.add(new QLabel("Veranstaltungen"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.linkedLectureCount.text")));
lblLinkedLectureCount = new QLabel();
grid.add(lblLinkedLectureCount).expand(true, false);
- btnShowLinkingLectures = new JButton("Anzeigen");
+ btnShowLinkingLectures = new JButton(
+ I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.showLinkingLectures.text"));
grid.add(btnShowLinkingLectures).fill(true, false);
grid.nextRow();
grid.add(Box.createVerticalGlue(), 3).expand(true, true).fill(true, true);
@@ -208,11 +208,14 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
JPanel buttonBar = new JPanel();
BoxLayout buttons = new BoxLayout(buttonBar, BoxLayout.LINE_AXIS);
buttonBar.setLayout(buttons);
- btnUpdateImage = new JButton("Neue VM-Version hochladen",
- Gui.getScaledIconResource("/img/upload-icon.png", "New VM", ICON_SIZE_Y, buttonBar));
+ btnUpdateImage = new JButton(I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.updateImage.text"),
+ Gui.getScaledIconResource("/img/upload-icon.png",
+ I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.updateImage.description"), ICON_SIZE_Y, buttonBar));
buttonBar.add(btnUpdateImage);
- btnUploadToMaster = new JButton("Landesweit veröffentlichen",
- Gui.getScaledIconResource("/img/publish-icon.png", "Publish VM", ICON_SIZE_Y, buttonBar));
+ btnUploadToMaster = new JButton(I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.uploadToMaster.text"),
+ Gui.getScaledIconResource("/img/publish-icon.png",
+ I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.uploadToMaster.description"),
+ ICON_SIZE_Y, buttonBar));
buttonBar.add(btnUploadToMaster);
grid.add(buttonBar, 3).fill(true, false).expand(true, false);
grid.nextRow();
@@ -242,9 +245,10 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
grdImagePermissionConfigurator.add(ctlImagePermissionConfigurator).fill(true, true).expand(true, true);
// Panel with the permissions for other users
JPanel defaultPermissionPane = new JPanel();
- defaultPermissionPane.setBorder(BorderFactory.createTitledBorder("Andere Nutzer"));
+ defaultPermissionPane.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("ImageDetails.TitledBorder.defaultPermissionPane.title")));
defaultPermissionPane.setLayout(new BoxLayout(defaultPermissionPane, BoxLayout.PAGE_AXIS));
- JLabel txtDefaultPerms = new JLabel(infoTextDefPerms);
+ JLabel txtDefaultPerms = new JLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.defaultPerms.text"));
JPanel txtDefaultPermsPanel = new JPanel();
// Panel + BoxLayout + Label = wordwrap
@@ -252,10 +256,10 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
txtDefaultPermsPanel.add(txtDefaultPerms);
JPanel defaultPermsSubPanel = new JPanel();
defaultPermsSubPanel.setLayout(new BoxLayout(defaultPermsSubPanel, BoxLayout.LINE_AXIS));
- chkDefaultPermAdmin = new JCheckBox("Admin");
- chkDefaultPermDownload = new JCheckBox("Download");
- chkDefaultPermEdit = new JCheckBox("Bearbeiten");
- chkDefaultPermLink = new JCheckBox("Verlinken");
+ chkDefaultPermAdmin = new JCheckBox(I18n.WINDOW_LAYOUT.getString("ImageDetails.CheckBox.permAdmin.text"));
+ chkDefaultPermDownload = new JCheckBox(I18n.WINDOW_LAYOUT.getString("ImageDetails.CheckBox.permDownload.text"));
+ chkDefaultPermEdit = new JCheckBox(I18n.WINDOW_LAYOUT.getString("ImageDetails.CheckBox.permEdit.text"));
+ chkDefaultPermLink = new JCheckBox(I18n.WINDOW_LAYOUT.getString("ImageDetails.CheckBox.permLink.text"));
defaultPermsSubPanel.add(chkDefaultPermLink);
defaultPermsSubPanel.add(chkDefaultPermDownload);
@@ -276,8 +280,8 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
JPanel pnlButtons = new JPanel();
pnlButtons.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
pnlButtons.setLayout(new BoxLayout(pnlButtons, BoxLayout.LINE_AXIS));
- btnSaveChanges = new JButton("Speichern");
- btnClose = new JButton("Schließen");
+ btnSaveChanges = new JButton(I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.saveChanges.text"));
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("ImageDetails.Button.close.text"));
// user feedback slot
lblError = new QLabel("");
lblError.setForeground(Color.RED);
@@ -292,9 +296,9 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
*
********************************************************************************/
pnlTabs = new JTabbedPane();
- pnlTabs.addTab("Übersicht", pnlTabOverview);
- pnlTabs.addTab("VM-Versionen", pnlTabVersions);
- pnlTabs.addTab("Berechtigungen", pnlTabPermissions);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("ImageDetails.Tab.overview.title"), pnlTabOverview);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("ImageDetails.Tab.versions.title"), pnlTabVersions);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("ImageDetails.Tab.permissions.title"), pnlTabPermissions);
add(pnlTabs, BorderLayout.CENTER);
add(pnlButtons, BorderLayout.PAGE_END);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
index 071a6312..67ed8ec9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
@@ -16,6 +16,7 @@ import org.openslx.dozmod.gui.control.ImageListViewer.FilterType;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public abstract class ImageListWindowLayout extends CompositePage {
@@ -24,15 +25,15 @@ public abstract class ImageListWindowLayout extends CompositePage {
private static final int ICON_SIZE_Y = 24;
private final ImageListWindowLayout me = this;
- protected final static String infoTextString = "Hier können Sie Virtuelle Maschinen hochladen, herunterladen, bearbeiten und löschen.";
- protected final static String infoTitleString = "Übersicht Virtuelle Maschinen";
- protected final static String newButtonLabel = "Neue VM";
- protected final static String newLectureButtonLabel = "Neue Veranstaltung";
- protected final static String editButtonLabel = "Bearbeiten";
- protected final static String downloadButtonLabel = "Download";
- protected final static String deleteButtonLabel = "Löschen";
- protected final static String switchViewButtonLabel = "Veranstaltungen zeigen";
- protected final static String showPublishedImagesLabel = "Öffentliche VMs";
+ protected final static String infoTextString = I18n.WINDOW_LAYOUT.getString("ImageList.Label.title.text");
+ protected final static String infoTitleString = I18n.WINDOW_LAYOUT.getString("ImageList.Label.info.text");
+ protected final static String newButtonLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.newVM.text");
+ protected final static String newLectureButtonLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.newLecture.text");
+ protected final static String editButtonLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.edit.text");
+ protected final static String downloadButtonLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.download.text");
+ protected final static String deleteButtonLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.delete.text");
+ protected final static String switchViewButtonLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.switchView.text");
+ protected final static String showPublishedImagesLabel = I18n.WINDOW_LAYOUT.getString("ImageList.Button.showPublishedImages.text");
// --------------------------------------
// search field, table and buttons
@@ -65,21 +66,23 @@ public abstract class ImageListWindowLayout extends CompositePage {
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
- btnNewVm = new JButton(newButtonLabel, Gui.getScaledIconResource("/img/new-vm-icon.png", "New VM",
- ICON_SIZE_Y, buttonPanel));
+ btnNewVm = new JButton(newButtonLabel, Gui.getScaledIconResource("/img/new-vm-icon.png",
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.newVM.description"), ICON_SIZE_Y, buttonPanel));
btnEditDetails = new JButton(editButtonLabel, Gui.getScaledIconResource("/img/edit-icon.png",
- "Edit VM", ICON_SIZE_Y, buttonPanel));
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.edit.description"), ICON_SIZE_Y, buttonPanel));
btnDelete = new JButton(deleteButtonLabel, Gui.getScaledIconResource("/img/delete-icon.png",
- "Delete VM", ICON_SIZE_Y, buttonPanel));
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.delete.description"), ICON_SIZE_Y, buttonPanel));
btnDownload = new JButton(downloadButtonLabel, Gui.getScaledIconResource("/img/download-icon.png",
- "New VM", ICON_SIZE_Y, buttonPanel));
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.download.description"), ICON_SIZE_Y, buttonPanel));
btnNewLecture = new JButton(newLectureButtonLabel, Gui.getScaledIconResource("/img/new-lecture-icon.png",
- "New Lecture", ICON_SIZE_Y, buttonPanel));
- btnShowPublishedImages = new JButton(showPublishedImagesLabel, Gui.getScaledIconResource("/img/published-vm-icon.png",
- "Published Lectures", ICON_SIZE_Y, buttonPanel));
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.newLecture.description"), ICON_SIZE_Y, buttonPanel));
+ btnShowPublishedImages = new JButton(showPublishedImagesLabel,
+ Gui.getScaledIconResource("/img/published-vm-icon.png",
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.showPublishedImages.description"),
+ ICON_SIZE_Y, buttonPanel));
btnShowPublishedImages.setVisible(false); // this gets enabled later when the API version can be queried
btnSwitchView = new JButton(switchViewButtonLabel, Gui.getScaledIconResource("/img/switch-icon.png",
- "Switch", ICON_SIZE_Y, buttonPanel));
+ I18n.WINDOW_LAYOUT.getString("ImageList.Button.switchView.description"), ICON_SIZE_Y, buttonPanel));
buttonPanel.add(btnNewVm);
buttonPanel.add(btnEditDetails);
buttonPanel.add(btnDelete);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImagePublishedWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImagePublishedWindowLayout.java
index 8f69d1f4..317479db 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImagePublishedWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImagePublishedWindowLayout.java
@@ -16,6 +16,7 @@ import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.ImagePublishedTable;
import org.openslx.dozmod.gui.control.table.QScrollPane;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class ImagePublishedWindowLayout extends JDialog {
@@ -28,18 +29,16 @@ public class ImagePublishedWindowLayout extends JDialog {
protected final JButton btnSatDownload;
protected final JButton btnClose;
- private static String title = "Öffentliche VMs";
-
protected ImagePublishedWindowLayout(Window modalParent) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("ImagePublished.Dialog.title"), modalParent != null
+ ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
GridManager grid = new GridManager(this, 1);
// --------------- filter field --------------------------------------
JPanel filterPanel = new JPanel();
filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS));
filterPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
- filterPanel.add(new QLabel("Suchen: "));
+ filterPanel.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImagePublished.Label.filterPanel.text")));
txtSearch = new JTextField();
filterPanel.add(txtSearch);
// --------------- end filter field --------------------------------
@@ -58,14 +57,17 @@ public class ImagePublishedWindowLayout extends JDialog {
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
- btnDownload = new JButton("Herunterladen", Gui.getScaledIconResource("/img/download-icon.png",
- "Herunterladen", ICON_SIZE_Y, buttonPanel));
+ btnDownload = new JButton(I18n.WINDOW_LAYOUT.getString("ImagePublished.Button.download.text"),
+ Gui.getScaledIconResource("/img/download-icon.png",
+ I18n.WINDOW_LAYOUT.getString("ImagePublished.Button.download.description"), ICON_SIZE_Y, buttonPanel));
buttonPanel.add(btnDownload);
- btnSatDownload = new JButton("Auf Satellit herunterladen", Gui.getScaledIconResource("/img/download-to-sat-icon.png",
- "Auf Satellit herunterladen", ICON_SIZE_Y, buttonPanel));
+ btnSatDownload = new JButton(I18n.WINDOW_LAYOUT.getString("ImagePublished.Button.satDownload.text"),
+ Gui.getScaledIconResource("/img/download-to-sat-icon.png",
+ I18n.WINDOW_LAYOUT.getString("ImagePublished.Button.satDownload.description"),
+ ICON_SIZE_Y, buttonPanel));
buttonPanel.add(btnSatDownload);
buttonPanel.add(Box.createHorizontalGlue());
- btnClose = new JButton("Schließen");
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("ImagePublished.Button.close.text"));
buttonPanel.add(btnClose);
// --------------- end button panel ----------------------------------
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureChangeImageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureChangeImageLayout.java
index d24db283..a9948308 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureChangeImageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureChangeImageLayout.java
@@ -14,6 +14,7 @@ import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.ImageListViewer;
import org.openslx.dozmod.gui.control.ImageListViewer.FilterType;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
/**
* Layout for the ChangeLinkedImage of a lecture
@@ -34,14 +35,9 @@ public class LectureChangeImageLayout extends JDialog {
*/
protected final ImageListViewer imageListViewer;
- /**
- * The title of the window.
- */
- private static String title = "VM zum Verlinken auswählen";
-
protected LectureChangeImageLayout(Window modalParent) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("LectureChangeImage.Dialog.title"), modalParent != null
+ ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
// Panel to add everything into, needed for the border.
JPanel contentPanel = new JPanel();
@@ -56,10 +52,10 @@ public class LectureChangeImageLayout extends JDialog {
// Panel for the buttons at the bottom
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
- btnOk = new JButton("Übernehmen");
+ btnOk = new JButton(I18n.WINDOW_LAYOUT.getString("LectureChangeImage.Button.ok.text"));
buttonPane.add(Box.createGlue());
buttonPane.add(btnOk);
- btnClose = new JButton("Abbrechen");
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("LectureChangeImage.Button.close.text"));
buttonPane.add(btnClose);
// Put everything into the grid
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java
index 0dc3cee2..09ad8918 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java
@@ -41,6 +41,7 @@ import org.openslx.dozmod.gui.control.QDatePickerImpl;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.WordWrapLabel;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.dozmod.util.FormatHelper;
@@ -107,7 +108,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
protected final JPanel pnlTabLdapFilter;
public LectureDetailsWindowLayout(Frame modalParent) {
- super(modalParent, "Veranstaltungsdetails", ModalityType.APPLICATION_MODAL);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("LectureDetails.Dialog.title"), ModalityType.APPLICATION_MODAL);
setResizable(true);
setPreferredSize(Gui.getScaledDimension(570, 650));
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
@@ -126,41 +127,41 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
grdInfo.nextRow();
// lblOwner
lblOwnerInfo = new PersonLabel();
- grdInfo.add(new QLabel("Besitzer"));
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.owner.text")));
grdInfo.add(lblOwnerInfo, 2).expand(true, false);
grdInfo.nextRow();
// creation time
lblCreateTime = new QLabel();
- grdInfo.add(new QLabel("Erstellt am"));
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.createTime.text")));
grdInfo.add(lblCreateTime, 2);
grdInfo.nextRow();
// last updater
lblUpdater = new PersonLabel();
- grdInfo.add(new QLabel("Geändert durch"));
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.updater.text")));
grdInfo.add(lblUpdater, 2);
grdInfo.nextRow();
// last updated
lblUpdateTime = new QLabel();
- grdInfo.add(new QLabel("Geändert am"));
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.updateTime.text")));
grdInfo.add(lblUpdateTime, 2);
grdInfo.nextRow();
lblVersionInfo = new QLabel(); // UNUSED
lblImageNameInfo = new QLabel();
- grdInfo.add(new QLabel("Verknüpfte VM"), 2);
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.imageName.text")), 2);
grdInfo.add(lblImageNameInfo);
grdInfo.nextRow();
lblStartTime = new QLabel();
- grdInfo.add(new QLabel("Startdatum"), 2);
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.startTime.text")), 2);
grdInfo.add(lblStartTime);
grdInfo.nextRow();
lblEndTime = new QLabel();
- grdInfo.add(new QLabel("Enddatum"), 2);
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.endTime.text")), 2);
grdInfo.add(lblEndTime);
grdInfo.nextRow();
lblUseCount = new QLabel();
- grdInfo.add(new QLabel("Aufrufe"));
+ grdInfo.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.useCount.text")));
grdInfo.add(lblUseCount, 2);
grdInfo.finish(true);
@@ -170,7 +171,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
GridManager grdGeneral = new GridManager(pnlTabGeneral, 5, true, new Insets(3, 3, 3, 3));
// lecture title
txtTitle = new JTextField();
- grdGeneral.add(new QLabel("Name"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.title.text")));
grdGeneral.add(txtTitle, 4).expand(true, false).fill(true, false);
grdGeneral.nextRow();
@@ -178,7 +179,8 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
txtDescription = new JTextArea();
txtDescription.setLineWrap(true);
txtDescription.setWrapStyleWord(true);
- grdGeneral.add(new QLabel("Beschreibung")).anchor(GridBagConstraints.FIRST_LINE_START);
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.description.text")))
+ .anchor(GridBagConstraints.FIRST_LINE_START);
JScrollPane jsp = new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jsp.setMinimumSize(Gui.getScaledDimension(450, 120));
@@ -190,14 +192,14 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
txtId = new JTextField();
txtId.setEditable(false);
txtId.setFont(txtId.getFont().deriveFont(Font.BOLD, txtId.getFont().getSize2D() * 0.66f));
- grdGeneral.add(new QLabel("ID"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.ID.text")));
grdGeneral.add(txtId, 4).expand(true, false).fill(true, false);
grdGeneral.nextRow();
// owner
lblOwner = new PersonLabel();
- btnChangeOwner = new JButton("Ändern");
- grdGeneral.add(new QLabel("Besitzer"));
+ btnChangeOwner = new JButton(I18n.WINDOW_LAYOUT.getString("LectureDetails.Button.changeOwner.text"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.owner.text")));
grdGeneral.add(lblOwner, 3).expand(true, false);
grdGeneral.add(btnChangeOwner).fill(true, false);
grdGeneral.nextRow();
@@ -205,17 +207,17 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
// linked image
// name
txtImageName = new QLabel();
- grdGeneral.add(new QLabel("Verknüpfte VM"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.imageName.text")));
grdGeneral.add(txtImageName, 3).expand(true, false);
// link button for image
- btnLinkImage = new JButton("Ändern");
+ btnLinkImage = new JButton(I18n.WINDOW_LAYOUT.getString("LectureDetails.Button.linkImage.text"));
grdGeneral.add(btnLinkImage).fill(true, false);
grdGeneral.nextRow();
// image version handling
// auto update
- chkAutoUpdate = new JCheckBox("Immer aktuellste Version verwenden");
+ chkAutoUpdate = new JCheckBox(I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.autoUpdate.text"));
// versions combo
cboVersions = new ComboBox<>(Comparators.imageVersionDetails,
new ComboBoxRenderer<ImageVersionDetails>() {
@@ -226,16 +228,18 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
if (item.isValid) {
return FormatHelper.longDate(item.getCreateTime());
} else {
- return FormatHelper.longDate(item.getCreateTime()) + " [ungültig]";
+ return FormatHelper.longDate(item.getCreateTime())
+ + I18n.WINDOW_LAYOUT.getString("LectureDetails.ComboBox.versionInvalid.text");
}
}
});
- btnDownloadImage = new JButton("Download");
- btnDownloadImage.setToolTipText("Momentan verwendete Version herunterladen");
+ btnDownloadImage = new JButton(I18n.WINDOW_LAYOUT.getString("LectureDetails.Button.downloadImage.text"));
+ btnDownloadImage.setToolTipText(
+ I18n.WINDOW_LAYOUT.getString("LectureDetails.Button.downloadImage.toolTipText"));
JPanel versionPanel = new JPanel(new BorderLayout());
versionPanel.add(cboVersions, BorderLayout.CENTER);
versionPanel.add(chkAutoUpdate, BorderLayout.SOUTH);
- grdGeneral.add(new QLabel("VM-Version"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.version.text")));
grdGeneral.add(versionPanel, 3);
grdGeneral.add(btnDownloadImage).fill(true, false);
grdGeneral.nextRow();
@@ -249,7 +253,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
startTimePanel.add(spnStartTime);
startTimePanel.setMinimumSize(startTimePanel.getPreferredSize());
startTimePanel.setMaximumSize(startTimePanel.getPreferredSize());
- grdGeneral.add(new QLabel("Startdatum"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.startTime.text")));
grdGeneral.add(startTimePanel, 4);
grdGeneral.nextRow();
@@ -262,12 +266,12 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
endTimePanel.add(spnEndTime);
endTimePanel.setMinimumSize(endTimePanel.getPreferredSize());
endTimePanel.setMaximumSize(endTimePanel.getPreferredSize());
- grdGeneral.add(new QLabel("Enddatum"));
+ grdGeneral.add(new QLabel(I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.endTime.text")));
grdGeneral.add(endTimePanel, 4);
grdGeneral.nextRow();
// lecture active
- chkIsActive = new JCheckBox("Veranstaltung aktiv");
+ chkIsActive = new JCheckBox(I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.isActive.text"));
grdGeneral.skip();
grdGeneral.add(chkIsActive, 4);
grdGeneral.nextRow();
@@ -280,14 +284,13 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
pnlTabNetrules = new JPanel();
GridManager grdNetrules = new GridManager(pnlTabNetrules, 1, true, new Insets(9, 4, 2, 4));
// "restrictions": internet access / usb access / exam
- chkHasInternetAccess = new JCheckBox("Netzwerk-/Internetzugriff zulassen");
+ chkHasInternetAccess = new JCheckBox(
+ I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.hasInternetAccess.text"));
grdNetrules.add(chkHasInternetAccess).expand(true, false).insets(firstInset);
grdNetrules.nextRow();
grdNetrules.add(
new WordWrapLabel(
- "Legen Sie hier fest, ob die Veranstaltung Zugriff zum Internet haben soll."
- + " In der Liste können Sie bestimmte Adressen und Services"
- + " ein- oder ausschließen.", false, true))
+ I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.hasInternetAccess.text"), false, true))
.fill(true, false)
.expand(true, false)
.insets(descriptionInset);
@@ -301,25 +304,24 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
pnlTabRestrictions = new JPanel();
GridManager grdRestrictions = new GridManager(pnlTabRestrictions, 2, true, new Insets(9, 4, 2, 4));
- chkHasUsbAccess = new JCheckBox("Externe Speichermedien zulassen");
+ chkHasUsbAccess = new JCheckBox(I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.hasUSBAccess.text"));
grdRestrictions.add(chkHasUsbAccess, 2);
grdRestrictions.nextRow();
grdRestrictions.add(
- new WordWrapLabel("Legen Sie hier fest, ob die Veranstaltung den Zugriff"
- + " auf Speichermedien (CD, USB, ...) erlauben soll", false, true), 2)
+ new WordWrapLabel(
+ I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.hasUSBAccess.text"), false, true), 2)
.fill(true, false)
.expand(true, false)
.insets(descriptionInset);
grdRestrictions.nextRow();
- chkIsExam = new JCheckBox("Prüfungsmodus");
+ chkIsExam = new JCheckBox(I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.isExam.text"));
grdRestrictions.add(chkIsExam, 2);
grdRestrictions.nextRow();
grdRestrictions.add(
new WordWrapLabel(
- "Markieren Sie diese Veranstaltung als E-Prüfung.\n"
- + "Die Veranstaltung wird nur dann startbar sein, wenn " + Branding.getServiceName() + " in den"
- + " Prüfungsmodus versetzt wird. Kontaktieren Sie dazu Ihren lokalen " + Branding.getServiceName() + "-Administrator.",
+ I18n.WINDOW_LAYOUT.getString("LectureDetails.Label.isExam.text",
+ Branding.getServiceName(), Branding.getServiceName()),
false, true), 2)
.fill(true, false)
.expand(true, false)
@@ -335,9 +337,10 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
pnlTabPermissions = new JPanel();
GridManager grdPermissions = new GridManager(pnlTabPermissions, 1, false);
JPanel defaultPermissionPane = new JPanel();
- defaultPermissionPane.setBorder(BorderFactory.createTitledBorder("Andere Nutzer"));
- chkCustomPermEdit = new JCheckBox("Bearbeiten");
- chkCustomPermAdmin = new JCheckBox("Admin");
+ defaultPermissionPane.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("LectureDetails.TitledBorder.defaultPermissionPane.title")));
+ chkCustomPermEdit = new JCheckBox(I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.permEdit.text"));
+ chkCustomPermAdmin = new JCheckBox(I18n.WINDOW_LAYOUT.getString("LectureDetails.CheckBox.permAdmin.text"));
defaultPermissionPane.add(chkCustomPermEdit);
defaultPermissionPane.add(chkCustomPermAdmin);
grdPermissions.add(ctlPermissionManager).fill(true, true).expand(true, true);
@@ -396,32 +399,32 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
********************************************************************************/
// finally build the tabbedPane and add it to the main view
pnlTabs = new JTabbedPane();
- pnlTabs.addTab("Übersicht", pnlTabInfo);
- pnlTabs.addTab("Allgemein", pnlTabGeneral);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.info.title"), pnlTabInfo);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.general.title"), pnlTabGeneral);
if (Session.isLectureRestrictionsSupported()) {
- pnlTabs.addTab("Beschränkungen", pnlTabRestrictions);
- pnlTabs.addTab("Firewall", pnlTabNetrules);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.restrictions.title"), pnlTabRestrictions);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.netRules.title"), pnlTabNetrules);
}
if (MetaDataCache.getLocations() != null && !MetaDataCache.getLocations().isEmpty()) {
- pnlTabs.addTab("Raumauswahl", pnlTabLocations);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.locations.title"), pnlTabLocations);
}
if (Session.isLectureRestrictionsSupported()) {
- pnlTabs.addTab("VM-Start", pnlTabRunscript);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.runScript.title"), pnlTabRunscript);
}
- pnlTabs.addTab("Berechtigungen", pnlTabPermissions);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.permissions.title"), pnlTabPermissions);
if (Session.hasFeature(Feature.NETWORK_SHARES)) {
- pnlTabs.addTab("Netzlaufwerke", pnlTabNetshare);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.netShare.title"), pnlTabNetshare);
}
if (Session.hasFeature(Feature.LECTURE_FILTER_LDAP)) {
- pnlTabs.addTab("LDAP-Filter", pnlTabLdapFilter);
+ pnlTabs.addTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.ldapFilter.title"), pnlTabLdapFilter);
}
add(pnlTabs, BorderLayout.CENTER);
// usage counter + button panel on the bottom
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
- btnClose = new JButton("Schließen");
- btnSaveChanges = new JButton("Speichern");
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("LectureDetails.Button.close.text"));
+ btnSaveChanges = new JButton(I18n.WINDOW_LAYOUT.getString("LectureDetails.Button.saveChanges.text"));
lblError = new QLabel("");
lblError.setForeground(Color.RED);
buttonPanel.add(lblError);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
index 03847488..31ccf5b5 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
@@ -21,6 +21,7 @@ import org.openslx.dozmod.gui.control.table.LectureTable;
import org.openslx.dozmod.gui.control.table.QScrollPane;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.window.LectureListWindow.FilterType;
@SuppressWarnings("serial")
@@ -28,14 +29,6 @@ public abstract class LectureListWindowLayout extends CompositePage {
private static final int ICON_SIZE_Y = 24;
- private static final String infoTitleString = "Übersicht Veranstaltungen";
- private static final String newButtonLabel = "Neue Veranstaltung";
- private static final String editButtonLabel = "Bearbeiten";
- private static final String deleteButtonLabel = "Löschen";
- private static final String switchViewButtonLabel = "VMs zeigen";
- private static final String filterPanelLabel = "Suchen";
- private static final String infoTextString = "Hier können Sie Veranstaltungen anlegen, bearbeiten und löschen.";
-
// buttons
protected final JButton btnNewLecture;
protected final JButton btnDeleteLecture;
@@ -56,9 +49,9 @@ public abstract class LectureListWindowLayout extends CompositePage {
// --------- info group with title and text -------------------------
JPanel infoPanel = new JPanel(new BorderLayout());
- QLabel infoTitle = new QLabel(infoTitleString);
+ QLabel infoTitle = new QLabel(I18n.WINDOW_LAYOUT.getString("LectureList.Label.title.text"));
infoTitle.setFont(infoTitle.getFont().deriveFont(Font.BOLD));
- QLabel infoText = new QLabel(infoTextString);
+ QLabel infoText = new QLabel(I18n.WINDOW_LAYOUT.getString("LectureList.Label.info.text"));
infoPanel.add(infoTitle, BorderLayout.NORTH);
infoPanel.add(infoText, BorderLayout.CENTER);
// ---------------- end group of title ------------------------------
@@ -69,7 +62,8 @@ public abstract class LectureListWindowLayout extends CompositePage {
// filterPanel with filter text field and filter combo
JPanel filterPanel = new JPanel();
- filterPanel.setBorder(new TitledBorder(filterPanelLabel));
+ filterPanel.setBorder(new TitledBorder(
+ I18n.WINDOW_LAYOUT.getString("LectureList.TitledBorder.filterPanel.title")));
filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS));
txtSearch = new JTextField();
cboFilter = new JComboBox<FilterType>();
@@ -82,7 +76,7 @@ public abstract class LectureListWindowLayout extends CompositePage {
// Panel for itemCount
JPanel lectureCountPanel = new JPanel();
lblVisibleLectureCount = new QLabel();
- lectureCountPanel.add(new JLabel("Sichtbar:"));
+ lectureCountPanel.add(new JLabel(I18n.WINDOW_LAYOUT.getString("LectureList.Label.visibleLectureCount.text")));
lectureCountPanel.add(lblVisibleLectureCount);
filterPanel.add(lectureCountPanel);
@@ -104,10 +98,22 @@ public abstract class LectureListWindowLayout extends CompositePage {
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
- btnNewLecture = new JButton(newButtonLabel, Gui.getScaledIconResource("/img/new-lecture-icon.png", "New Lecture", ICON_SIZE_Y, buttonPanel));
- btnEditLecture = new JButton(editButtonLabel, Gui.getScaledIconResource("/img/edit-icon.png", "Edit Lecture", ICON_SIZE_Y, buttonPanel));
- btnDeleteLecture = new JButton(deleteButtonLabel, Gui.getScaledIconResource("/img/delete-icon.png", "Delete Lecture", ICON_SIZE_Y, buttonPanel));
- btnSwitchView = new JButton(switchViewButtonLabel, Gui.getScaledIconResource("/img/switch-icon.png", "Switch", ICON_SIZE_Y, buttonPanel));
+ btnNewLecture = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.newLecture.text"),
+ Gui.getScaledIconResource("/img/new-lecture-icon.png",
+ I18n.WINDOW_LAYOUT.getString("LectureList.Button.newLecture.description"),
+ ICON_SIZE_Y, buttonPanel));
+ btnEditLecture = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.editLecture.text"),
+ Gui.getScaledIconResource("/img/edit-icon.png",
+ I18n.WINDOW_LAYOUT.getString("LectureList.Button.editLecture.description"),
+ ICON_SIZE_Y, buttonPanel));
+ btnDeleteLecture = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.deleteLecture.text"),
+ Gui.getScaledIconResource("/img/delete-icon.png",
+ I18n.WINDOW_LAYOUT.getString("LectureList.Button.deleteLecture.description"),
+ ICON_SIZE_Y, buttonPanel));
+ btnSwitchView = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.switchView.text"),
+ Gui.getScaledIconResource("/img/switch-icon.png",
+ I18n.WINDOW_LAYOUT.getString("LectureList.Button.switchView.description"),
+ ICON_SIZE_Y, buttonPanel));
buttonPanel.add(btnNewLecture);
buttonPanel.add(btnEditLecture);
buttonPanel.add(Box.createHorizontalStrut(5));
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java
index f8640c19..2e44139b 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java
@@ -17,6 +17,7 @@ import org.openslx.dozmod.gui.control.LocationSelector;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.WordWrapLabel;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
public class LocationSelectionWindowLayout extends JDialog {
@@ -35,8 +36,7 @@ public class LocationSelectionWindowLayout extends JDialog {
getRootPane().setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
GridManager grid = new GridManager(this, 1);
- WordWrapLabel header = new WordWrapLabel(
- "Hier können Sie die Räume auswählen, in denen diese Veranstaltung sichtbar sein soll.");
+ WordWrapLabel header = new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("LocationSelection.Label.info.text"));
ctlLocationSelector = new LocationSelector();
grid.add(header).fill(true, false).expand(true, false);
grid.nextRow();
@@ -49,8 +49,8 @@ public class LocationSelectionWindowLayout extends JDialog {
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
lblError = new QLabel();
lblError.setForeground(Color.RED);
- btnClose = new JButton("Abbrechen");
- btnSaveChanges = new JButton("Übernehmen");
+ btnClose = new JButton(I18n.WINDOW_LAYOUT.getString("LocationSelection.Button.close.text"));
+ btnSaveChanges = new JButton(I18n.WINDOW_LAYOUT.getString("LocationSelection.Button.saveChanges.text"));
buttonPanel.add(lblError);
buttonPanel.add(Box.createHorizontalGlue());
buttonPanel.add(btnClose);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
index 0264da11..0486c616 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
@@ -26,6 +26,7 @@ import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
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")
@@ -49,11 +50,6 @@ public abstract class LoginWindowLayout extends JDialog {
// authentication method to use for login attempts
protected LOGIN_TYPE loginType = null;
- private static final String TITLE = Branding.getApplicationName() + " - Login";
- private static final String AUTH_TYPE_LABEL = "Authentifizierungsart";
- private static final String LOGIN_FORM_LABEL = "Zugangsdaten";
- private static final String ADVANCED_LABEL = "Erweitert";
-
// login type panel
protected final JRadioButton[] rdoLoginType = new JRadioButton[3];
@@ -80,7 +76,8 @@ public abstract class LoginWindowLayout extends JDialog {
* The shell it should be added to
*/
public LoginWindowLayout(Frame modalParent) {
- super(modalParent, TITLE, ModalityType.APPLICATION_MODAL);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("Login.Dialog.title", Branding.getApplicationName()),
+ ModalityType.APPLICATION_MODAL);
setResizable(false);
GridManager grid = new GridManager(this, 2);
@@ -88,11 +85,12 @@ public abstract class LoginWindowLayout extends JDialog {
grid.add(new QLabel(getScaledLogo()), 2);
grid.nextRow();
- rdoLoginType[0] = new JRadioButton("Authentifizierung über " + Branding.getMasterServerIdm());
- rdoLoginType[1] = new JRadioButton("Test-Zugang mit festem Benutzer");
- rdoLoginType[2] = new JRadioButton("Direkter Zugang zum Satelliten");
- btnSettings = new JButton("Einstellungen");
- btnLogDir = new JButton("Logverzeichnis");
+ rdoLoginType[0] = new JRadioButton(
+ I18n.WINDOW_LAYOUT.getString("Login.RadioButton.loginType.text.0", Branding.getMasterServerIdm()));
+ rdoLoginType[1] = new JRadioButton(I18n.WINDOW_LAYOUT.getString("Login.RadioButton.loginType.text.1"));
+ rdoLoginType[2] = new JRadioButton(I18n.WINDOW_LAYOUT.getString("Login.RadioButton.loginType.text.2"));
+ btnSettings = new JButton(I18n.WINDOW_LAYOUT.getString("Login.Button.settings.text"));
+ btnLogDir = new JButton(I18n.WINDOW_LAYOUT.getString("Login.Button.logDir.text"));
cboOrganization = new ComboBox<>(new ComboBoxRenderer<Organization>() {
@Override
@@ -104,14 +102,14 @@ public abstract class LoginWindowLayout extends JDialog {
@Override
public String getEmptyText() {
- return "Wird geladen...";
+ return I18n.WINDOW_LAYOUT.getString("Login.ComboBox.organization.emptyText");
}
});
txtUsername = new JTextField();
txtPassword = new JPasswordField();
- btnLogin = new JButton("Login");
- chkSaveUsername = new JCheckBox("Benutzername speichern");
- btnOpenRegistration = new JButton("Registrieren");
+ btnLogin = new JButton(I18n.WINDOW_LAYOUT.getString("Login.Button.login.text"));
+ chkSaveUsername = new JCheckBox(I18n.WINDOW_LAYOUT.getString("Login.CheckBox.saveUsername.text"));
+ btnOpenRegistration = new JButton(I18n.WINDOW_LAYOUT.getString("Login.Button.openRegistration.text"));
pnlLoginType = makeLoginTypePanel();
grid.add(pnlLoginType).expand(0.25, 1).fill(true, true);
@@ -137,20 +135,21 @@ public abstract class LoginWindowLayout extends JDialog {
// login form panel
JPanel loginFormPanel = new JPanel();
- loginFormPanel.setBorder(new TitledBorder(LOGIN_FORM_LABEL));
+ loginFormPanel.setBorder(new TitledBorder(
+ I18n.WINDOW_LAYOUT.getString("Login.TitledBorder.loginFormPanel.title")));
GridManager grid = new GridManager(loginFormPanel, 4);
- grid.add(new QLabel("Identity Provider"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("Login.Label.organization.text")));
grid.add(cboOrganization, 3).expand(true, false).fill(true, false);
grid.nextRow();
// label + field for username
- grid.add(new QLabel("Benutzername"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("Login.Label.username.text")));
grid.add(txtUsername, 3).expand(true, false).fill(true, false);
grid.nextRow();
// label + field for password
- grid.add(new QLabel("Passwort"));
+ grid.add(new QLabel(I18n.WINDOW_LAYOUT.getString("Login.Label.password.text")));
grid.add(txtPassword, 3).expand(true, false).fill(true, false);
grid.nextRow();
@@ -166,7 +165,8 @@ public abstract class LoginWindowLayout extends JDialog {
private JPanel makeLoginTypePanel() {
JPanel loginTypePanel = new JPanel();
loginTypePanel.setLayout(new BoxLayout(loginTypePanel, BoxLayout.PAGE_AXIS));
- loginTypePanel.setBorder(new TitledBorder(AUTH_TYPE_LABEL));
+ loginTypePanel.setBorder(new TitledBorder(
+ I18n.WINDOW_LAYOUT.getString("Login.TitledBorder.loginTypePanel.title")));
ButtonGroup loginTypeButtonGroup = new ButtonGroup();
for (int i = 0; i < rdoLoginType.length; i++) {
loginTypeButtonGroup.add(rdoLoginType[i]);
@@ -179,7 +179,7 @@ public abstract class LoginWindowLayout extends JDialog {
private JPanel makeAdvancedPanel() {
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.LINE_AXIS));
- p.setBorder(new TitledBorder(ADVANCED_LABEL));
+ p.setBorder(new TitledBorder(I18n.WINDOW_LAYOUT.getString("Login.TitledBorder.advancedPanel.title")));
p.add(btnSettings);
p.add(btnLogDir);
return p;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java
index 88b49bae..8448659e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java
@@ -7,23 +7,16 @@ import javax.swing.JLabel;
import org.openslx.dozmod.Branding;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.util.ResourceLoader;
@SuppressWarnings("serial")
public abstract class MainMenuWindowLayout extends CompositePage {
// text for info for the vms selection
- protected String vmInfo = "<html><b>Übersicht Virtueller Maschinen</b><br>"
- + "Zur Übersicht über die verfügbaren Virtuellen Maschinen wechseln.<br>Hier können Sie:<br><br>"
- + "1) Veranstaltungen auf Basis einer Virtuellen Maschine erstellen<br>"
- + "2) Neue Virtuelle Maschinen hochladen<br>"
- + "3) Virtuelle Maschinen herunterladen<br>"
- + "4) Virtuelle Maschinen bearbeiten und löschen</html>";
+ protected String vmInfo = I18n.WINDOW_LAYOUT.getString("MainMenu.Label.vmInfo.text");
// text for the info for the lecture selection
- protected String lecturesInfo = "<html><b>Übersicht Veranstaltungen</b><br>"
- + "Zur Übersicht über verfügbare Veranstaltungen wechseln.<br>Hier können Sie:<br><br>"
- + "1) Veranstaltungen bearbeiten oder löschen<br>"
- + "2) Zu Veranstaltungen gehörende Virtuelle Maschinen herunterladen<br>&nbsp;</html>";
+ protected String lecturesInfo = I18n.WINDOW_LAYOUT.getString("MainMenu.Label.lecturesInfo.text");
// buttons
protected final JLabel lblVirtualMachinesLogo;
@@ -32,17 +25,20 @@ public abstract class MainMenuWindowLayout extends CompositePage {
protected final JButton btnShowLectures;
public MainMenuWindowLayout() {
- this.setBorder(BorderFactory.createTitledBorder(Branding.getApplicationName() + " Hauptmenü"));
+ this.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("MainMenu.TitledBorder.title", Branding.getApplicationName())));
GridManager grid = new GridManager(this, 2);
- lblVirtualMachinesLogo = new JLabel(ResourceLoader.getIcon("/img/virtualization.png", "VM-Übersicht"));
+ lblVirtualMachinesLogo = new JLabel(ResourceLoader.getIcon("/img/virtualization.png",
+ I18n.WINDOW_LAYOUT.getString("MainMenu.Label.vmLogo.description")));
JLabel vmInfoLabel = new JLabel(vmInfo);
vmInfoLabel.setVerticalAlignment(JLabel.TOP);
- lblLectureLogo = new JLabel(ResourceLoader.getIcon("/img/lecture.png", "Veranstaltungen"));
+ lblLectureLogo = new JLabel(ResourceLoader.getIcon("/img/lecture.png",
+ I18n.WINDOW_LAYOUT.getString("MainMenu.Label.lecturesLogo.description")));
JLabel lecturesInfoLabel = new JLabel(lecturesInfo);
lecturesInfoLabel.setVerticalAlignment(JLabel.TOP);
- btnShowVirtualMachines = new JButton("Zu den VMs");
- btnShowLectures = new JButton("Zu den Veranstaltungen");
+ btnShowVirtualMachines = new JButton(I18n.WINDOW_LAYOUT.getString("MainMenu.Button.showVMs.text"));
+ btnShowLectures = new JButton(I18n.WINDOW_LAYOUT.getString("MainMenu.Button.showLectures.text"));
grid.add(lblVirtualMachinesLogo).fill(true, false).expand(true, false);
grid.add(lblLectureLogo).fill(true, false).expand(true, false);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/SatelliteListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/SatelliteListWindowLayout.java
index 2e28a4b9..457c39d3 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/SatelliteListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/SatelliteListWindowLayout.java
@@ -19,6 +19,7 @@ import javax.swing.JTextField;
import org.openslx.bwlp.thrift.iface.Satellite;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class SatelliteListWindowLayout extends JDialog {
@@ -29,11 +30,9 @@ public class SatelliteListWindowLayout extends JDialog {
protected final JRadioButton rdoCusomAddress;
protected final Map<JRadioButton, Satellite> radioToSat = new HashMap<>();
- private static String title = "Satellitenserver wählen";
-
protected SatelliteListWindowLayout(Window modalParent, List<Satellite> satList) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("SatelliteList.Dialog.title"), modalParent != null
+ ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
JPanel radioPanel = new JPanel();
radioPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
GridManager selectionPanelGrid = new GridManager(radioPanel, 2);
@@ -41,7 +40,7 @@ public class SatelliteListWindowLayout extends JDialog {
// --------------- radio buttons sat selection --------------------------------------
if (satList != null && !satList.isEmpty()) {
- selectionPanelGrid.add(new JLabel("Vorgegebene Server"), 2);
+ selectionPanelGrid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("SatelliteList.Label.satList.text")), 2);
selectionPanelGrid.nextRow();
// create the radioButtons, add them to the map, button group and the selection grid.
for (Satellite sat : satList) {
@@ -56,7 +55,7 @@ public class SatelliteListWindowLayout extends JDialog {
// --------------- end radio buttons for sat selection ------------------------------------
// --------------- custom ip button and field --------------------------------------
- selectionPanelGrid.add(new JLabel("Server-Adresse selbst eingeben"), 2);
+ selectionPanelGrid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("SatelliteList.Label.customAddress.text")), 2);
selectionPanelGrid.nextRow();
rdoCusomAddress = new JRadioButton("");
btnGroup.add(rdoCusomAddress);
@@ -71,10 +70,10 @@ public class SatelliteListWindowLayout extends JDialog {
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
buttonPane.setBorder(BorderFactory.createEmptyBorder(1, 3, 3, 3));
- btnCancel = new JButton("Abbrechen");
+ btnCancel = new JButton(I18n.WINDOW_LAYOUT.getString("SatelliteList.Button.cancel.text"));
buttonPane.add(btnCancel);
buttonPane.add(Box.createHorizontalGlue());
- btnContinue = new JButton("Weiter");
+ btnContinue = new JButton(I18n.WINDOW_LAYOUT.getString("SatelliteList.Button.continue.text"));
buttonPane.add(btnContinue);
// --------------- end button panel ----------------------------------
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java
index 2cb55271..c82791d7 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java
@@ -17,6 +17,7 @@ import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.QScrollPane;
import org.openslx.dozmod.gui.control.table.UserTable;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class UserListWindowLayout extends JDialog {
@@ -27,11 +28,9 @@ public class UserListWindowLayout extends JDialog {
protected final JButton btnCancel;
protected final JTextField txtSearch;
- private static String title = "Benutzerliste";
-
protected UserListWindowLayout(Window modalParent, String buttonCaption) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("UserList.Dialog.title"), modalParent != null
+ ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
GridManager grid = new GridManager(this, 1);
@@ -39,7 +38,7 @@ public class UserListWindowLayout extends JDialog {
JPanel filterPanel = new JPanel();
filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS));
filterPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
- filterPanel.add(new QLabel("Suchen: "));
+ filterPanel.add(new QLabel(I18n.WINDOW_LAYOUT.getString("UserList.Label.filterPanel.text")));
txtSearch = new JTextField();
filterPanel.add(txtSearch);
// --------------- end filter field --------------------------------
@@ -59,7 +58,7 @@ public class UserListWindowLayout extends JDialog {
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
buttonPane.add(Box.createHorizontalGlue());
- btnCancel = new JButton("Schließen");
+ btnCancel = new JButton(I18n.WINDOW_LAYOUT.getString("UserList.Button.cancel.text"));
buttonPane.add(btnCancel);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
btnConfirm = new JButton(buttonCaption);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtConfigEditorWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtConfigEditorWindowLayout.java
index c8cc7f62..cfa25564 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtConfigEditorWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtConfigEditorWindowLayout.java
@@ -16,25 +16,25 @@ import javax.swing.JScrollPane;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class VirtConfigEditorWindowLayout extends JDialog {
- private static String title = "VM-Konfiguration Editor";
protected final JScrollPane pnlScrollPane;
protected final JEditorPane pnlEditor;
protected final JButton btnSave;
protected final JButton btnCancel;
protected VirtConfigEditorWindowLayout(Window modalParent) {
- super(modalParent, title,
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("VirtConfigEditor.Dialog.title"),
modalParent != null ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
GridManager grid = new GridManager(this, 1, true, new Insets(2, 2, 2, 2));
JPanel pnlWarning = new JPanel();
- pnlWarning.setBorder(BorderFactory.createTitledBorder("WARNUNG"));
- pnlWarning.add(new JLabel(
- "<html>Änderungen an der VM-Konfiguration können zu Funktionsstörungen führen.<br>Benutzung auf eigene Gefahr!</html>"));
+ pnlWarning.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("VirtConfigEditor.TitledBorder.pnlWarning.title")));
+ pnlWarning.add(new JLabel(I18n.WINDOW_LAYOUT.getString("VirtConfigEditor.Label.pnlWarning.text")));
pnlEditor = new JEditorPane("text/plain", null);
pnlScrollPane = new JScrollPane(pnlEditor, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
@@ -47,10 +47,10 @@ public class VirtConfigEditorWindowLayout extends JDialog {
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
buttonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
buttonPane.add(Box.createHorizontalGlue());
- btnCancel = new JButton("Abbrechen");
+ btnCancel = new JButton(I18n.WINDOW_LAYOUT.getString("VirtConfigEditor.Button.cancel.text"));
buttonPane.add(btnCancel);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
- btnSave = new JButton("Speichern");
+ btnSave = new JButton(I18n.WINDOW_LAYOUT.getString("VirtConfigEditor.Button.save.text"));
buttonPane.add(btnSave);
grid.add(buttonPane).fill(true, false).expand(true, false);
;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtDropDownConfigEditorWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtDropDownConfigEditorWindowLayout.java
index d8200578..1703e77e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtDropDownConfigEditorWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtDropDownConfigEditorWindowLayout.java
@@ -22,6 +22,7 @@ import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
import org.openslx.dozmod.gui.control.WordWrapLabel;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.Session;
import org.openslx.sat.thrift.version.Feature;
import org.openslx.util.vm.VmMetaData.DDAcceleration;
@@ -33,7 +34,6 @@ import org.openslx.util.vm.VmMetaData.UsbSpeed;
@SuppressWarnings("serial")
public class VirtDropDownConfigEditorWindowLayout extends JDialog {
- private static String title = "VM-Konfiguration Editor";
protected final JScrollPane pnlScrollPane;
protected final JEditorPane pnlEditor;
protected final JButton btnSave;
@@ -46,7 +46,7 @@ public class VirtDropDownConfigEditorWindowLayout extends JDialog {
protected final JComboBox<UsbSpeed> cboMaxUsbSpeed;
protected VirtDropDownConfigEditorWindowLayout(Window modalParent) {
- super(modalParent, title,
+ super(modalParent, I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Dialog.title"),
modalParent != null ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
GridManager grid = new GridManager(getContentPane(), 2, true, new Insets(2, 2, 2, 2));
@@ -55,14 +55,11 @@ public class VirtDropDownConfigEditorWindowLayout extends JDialog {
* extra JPanel for the Warning message
*/
JPanel pnlWarning = new JPanel();
- pnlWarning.setBorder(BorderFactory.createTitledBorder("WARNUNG"));
+ pnlWarning.setBorder(BorderFactory.createTitledBorder(
+ I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.TitledBorder.pnlWarning.title")));
pnlWarning.setLayout(new BorderLayout());
- pnlWarning.add(new WordWrapLabel("Hier können Sie einige Einstellungen bzgl. der"
- + " verwendeten virtuallen Hardware ändern. Bitte beachten Sie,"
- + " dass Änderungen erfordern können, dass in der VM neue Treiber"
- + " vorhanden sein müssen. In diesem Fall ist es notwendig, dass"
- + " Sie die Änderung nach dem Herunterladen einer VM lokal"
- + " durchführen, die notwendigen Treiber installieren, und die VM wieder hochladen."),
+ pnlWarning.add(new WordWrapLabel(
+ I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Label.pnlWarning.text")),
BorderLayout.CENTER);
/*
@@ -113,20 +110,25 @@ public class VirtDropDownConfigEditorWindowLayout extends JDialog {
grid.add(pnlWarning, 2).fill(true, false).expand(true, false);
grid.nextRow();
- grid.add(new JLabel("Soundkarte")).fill(true, false).expand(false, false);
+ grid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Label.sound.text")))
+ .fill(true, false).expand(false, false);
grid.add(cboSound).fill(true, false).expand(false, false);
grid.nextRow();
- grid.add(new JLabel("3D-Beschleunigung")).fill(true, false).expand(false, false);
+ grid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Label.3DAcceleration.text")))
+ .fill(true, false).expand(false, false);
grid.add(cbo3DAcceleration).fill(true, false).expand(true, false);
grid.nextRow();
- grid.add(new JLabel("VMWare HW-Version")).fill(true, false).expand(false, false);
+ grid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Label.HWVersion.text")))
+ .fill(true, false).expand(false, false);
grid.add(cboHWVersion).fill(true, false).expand(true, false);
grid.nextRow();
- grid.add(new JLabel("Netzwerkkarte")).fill(true, false).expand(false, false);
+ grid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Label.E0VirtDev.text")))
+ .fill(true, false).expand(false, false);
grid.add(cboE0VirtDev).fill(true, false).expand(true, false);
grid.nextRow();
if (Session.hasFeature(Feature.CONFIGURE_USB)) {
- grid.add(new JLabel("USB")).fill(true, false).expand(false, false);
+ grid.add(new JLabel(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Label.maxUSBSpeed.text")))
+ .fill(true, false).expand(false, false);
grid.add(cboMaxUsbSpeed).fill(true, false).expand(true, false);
grid.nextRow();
}
@@ -138,13 +140,13 @@ public class VirtDropDownConfigEditorWindowLayout extends JDialog {
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
buttonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
buttonPane.add(Box.createHorizontalGlue());
- btnMore = new JButton("Expertenmodus");
+ btnMore = new JButton(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Button.more.text"));
buttonPane.add(btnMore);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
- btnCancel = new JButton("Abbrechen");
+ btnCancel = new JButton(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Button.cancel.text"));
buttonPane.add(btnCancel);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
- btnSave = new JButton("Speichern");
+ btnSave = new JButton(I18n.WINDOW_LAYOUT.getString("VirtDropDownConfigEditor.Button.save.text"));
buttonPane.add(btnSave);
grid.add(buttonPane, 2).fill(true, false).expand(true, false);
grid.finish(false);