summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rwxr-xr-xdozentenmodul/pom.xml5
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/App.java67
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/Config.java18
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java20
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java61
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/DownloadPanel.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/PassiveUploadPanel.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java15
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UpdatePanel.java13
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UploadPanel.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ContainerBindMountConfigurator.java112
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ImagePermissionConfigurator.java7
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java30
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LecturePermissionConfigurator.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetrulesConfigurator.java71
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetshareConfigurator.java54
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/StartupConfigurator.java39
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java53
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ContainerBindMountTable.java28
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePermissionTable.java16
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePublishedTable.java17
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java34
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageVersionTable.java19
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureLdapFilterTable.java10
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LecturePermissionTable.java10
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureTable.java19
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java36
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/NetshareTable.java20
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/UserTable.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/ExpiryDateChooser.java8
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java53
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Language.java18
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/MessageType.java14
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/UTF8Control.java54
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/BwIdmLinkWindow.java18
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ConfigWindow.java29
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ContainerBindMountWindow.java78
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/window/GenericNoticeWindow.java9
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java407
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java23
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java10
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureChangeImage.java9
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java54
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java89
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java47
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java4
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java6
-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.java86
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java69
-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.java156
-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.java102
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java54
-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
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageCreationWizard.java186
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java47
-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.java75
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/WizardPage.java2
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java116
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageCustomPermissionPageLayout.java25
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java38
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageOvfConversionPageLayout.java78
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageTypePageLayout.java52
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java24
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java13
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCustomPermissionPageLayout.java19
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureImageListPageLayout.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureLocationSelectionPageLayout.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureOptionsPageLayout.java20
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureRestrictionPageLayout.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java260
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java57
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageOvfConversionPage.java231
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageTypePage.java35
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java119
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java24
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java27
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureOptionsPage.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBindMount.java62
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBuildContextMethod.java10
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java216
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerMeta.java92
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/state/UploadWizardState.java11
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/thrift/GuiErrorCallback.java15
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ImageLocalDetailsActions.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/thrift/Session.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java157
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftError.java62
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/ConversionTaskWorker.java107
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/ImageWrapper.java93
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java8
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/TarArchiveUtil.java30
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/VmMetaDataDummy.java121
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/VmWrapper.java5
-rw-r--r--dozentenmodul/src/main/properties/i18n/activity.properties27
-rw-r--r--dozentenmodul/src/main/properties/i18n/activity_de_DE.properties27
-rw-r--r--dozentenmodul/src/main/properties/i18n/activity_tr_TR.properties27
-rw-r--r--dozentenmodul/src/main/properties/i18n/app.properties6
-rw-r--r--dozentenmodul/src/main/properties/i18n/app_de_DE.properties6
-rw-r--r--dozentenmodul/src/main/properties/i18n/app_tr_TR.properties6
-rw-r--r--dozentenmodul/src/main/properties/i18n/configurator.properties131
-rw-r--r--dozentenmodul/src/main/properties/i18n/configurator_de_DE.properties131
-rw-r--r--dozentenmodul/src/main/properties/i18n/configurator_tr_TR.properties131
-rw-r--r--dozentenmodul/src/main/properties/i18n/control.properties82
-rw-r--r--dozentenmodul/src/main/properties/i18n/control_de_DE.properties82
-rw-r--r--dozentenmodul/src/main/properties/i18n/control_tr_TR.properties82
-rw-r--r--dozentenmodul/src/main/properties/i18n/gui.properties40
-rw-r--r--dozentenmodul/src/main/properties/i18n/gui_de_DE.properties40
-rw-r--r--dozentenmodul/src/main/properties/i18n/gui_tr_TR.properties40
-rw-r--r--dozentenmodul/src/main/properties/i18n/helper.properties23
-rw-r--r--dozentenmodul/src/main/properties/i18n/helper_de_DE.properties23
-rw-r--r--dozentenmodul/src/main/properties/i18n/helper_tr_TR.properties23
-rw-r--r--dozentenmodul/src/main/properties/i18n/page.properties107
-rw-r--r--dozentenmodul/src/main/properties/i18n/page_de_DE.properties103
-rw-r--r--dozentenmodul/src/main/properties/i18n/page_layout.properties105
-rw-r--r--dozentenmodul/src/main/properties/i18n/page_layout_de_DE.properties104
-rw-r--r--dozentenmodul/src/main/properties/i18n/page_layout_tr_TR.properties105
-rw-r--r--dozentenmodul/src/main/properties/i18n/page_tr_TR.properties107
-rw-r--r--dozentenmodul/src/main/properties/i18n/thrift.properties96
-rw-r--r--dozentenmodul/src/main/properties/i18n/thrift_de_DE.properties96
-rw-r--r--dozentenmodul/src/main/properties/i18n/thrift_tr_TR.properties96
-rw-r--r--dozentenmodul/src/main/properties/i18n/window.properties147
-rw-r--r--dozentenmodul/src/main/properties/i18n/window_de_DE.properties147
-rw-r--r--dozentenmodul/src/main/properties/i18n/window_layout.properties245
-rw-r--r--dozentenmodul/src/main/properties/i18n/window_layout_de_DE.properties245
-rw-r--r--dozentenmodul/src/main/properties/i18n/window_layout_tr_TR.properties245
-rw-r--r--dozentenmodul/src/main/properties/i18n/window_tr_TR.properties147
-rw-r--r--dozentenmodul/src/main/properties/i18n/wizard.properties27
-rw-r--r--dozentenmodul/src/main/properties/i18n/wizard_de_DE.properties27
-rw-r--r--dozentenmodul/src/main/properties/i18n/wizard_tr_TR.properties27
-rw-r--r--dozentenmodul/src/main/resources/img/docker-icon.pngbin0 -> 2256 bytes
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java52
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java5
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java2
154 files changed, 6944 insertions, 1200 deletions
diff --git a/.gitignore b/.gitignore
index 84c4cf10..c90a3ea3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,7 @@ target/
bin/
gen-java/
dependency-reduced-pom.xml
+
+*.uml
+*.iml
+.idea/
diff --git a/dozentenmodul/pom.xml b/dozentenmodul/pom.xml
index 1b7c6154..e4cfa85f 100755
--- a/dozentenmodul/pom.xml
+++ b/dozentenmodul/pom.xml
@@ -220,6 +220,11 @@
<version>[2.0,]</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.kamranzafar</groupId>
+ <artifactId>jtar</artifactId>
+ <version>2.3</version>
+ </dependency>
</dependencies>
</project>
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
index 7c450c59..eaffd76c 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
@@ -8,16 +8,20 @@ import java.awt.event.ContainerEvent;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.net.ssl.SSLContext;
+import javax.swing.ListCellRenderer;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
+import javax.swing.table.TableCellRenderer;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.BasicConfigurator;
@@ -28,6 +32,8 @@ import org.apache.log4j.spi.LoggingEvent;
import org.openslx.dozmod.Config.ProxyMode;
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.Language;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.util.ClientVersion;
import org.openslx.dozmod.util.FormatHelper;
@@ -152,12 +158,29 @@ public class App {
try {
Config.init();
} catch (Exception e) {
- Gui.showMessageBox(null, "Error loading configuration", MessageType.ERROR, LOGGER, e);
+ Gui.showMessageBox(null, I18n.APP.getString("App.Message.error.loadingConfigurationFailed"),
+ MessageType.ERROR, LOGGER, e);
return;
}
setupLogger();
+ // Setting the locale
+ if (!setPreferredLanguage()) {
+ // Detect operating system language
+ String ul = System.getProperty("user.language");
+ if (ul.equals("de")) {
+ Locale.setDefault(new Locale("de", "DE"));
+ Config.setPreferredLanguage(Language.DE_DE.value);
+ } else if (ul.equals("tr")) {
+ Locale.setDefault(new Locale("tr", "TR"));
+ Config.setPreferredLanguage(Language.TR_TR.value);
+ } else {
+ Locale.setDefault(new Locale("en", "US"));
+ Config.setPreferredLanguage(Language.EN_US.value);
+ }
+ }
+
// Setup swing style
System.setProperty("awt.useSystemAAFontSettings", "on");
System.setProperty("swing.aatext", "true");
@@ -226,8 +249,7 @@ public class App {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
- boolean ret = Gui.showMessageBox(null,
- "SSL nicht verfügbar. Wollen Sie sich trotzdem unverschlüsselt verbinden?",
+ boolean ret = Gui.showMessageBox(null, I18n.APP.getString("App.Message.yesNo.SSLNotAvailable"),
MessageType.QUESTION_YESNO, LOGGER, e1);
if (!ret) {
System.exit(1);
@@ -256,10 +278,9 @@ public class App {
if (e.getMessage().contains("SurfaceData"))
return;
}
- Gui.showMessageBox(null, "Ungefangene Ausnahme in Faden " + t.getName() + "\n\n"
- + "Die Anwendung könnte instabil laufen.\n"
- + "Zur Sicherheit sollten Sie sie neustarten.", MessageType.WARNING, LOGGER,
- e);
+ Gui.showMessageBox(null,
+ I18n.APP.getString("App.Message.warning.uncaughtException", t.getName()),
+ MessageType.WARNING, LOGGER, e);
}
});
MainWindow.open();
@@ -294,6 +315,13 @@ public class App {
ContainerEvent containerEvent = (ContainerEvent) event;
if (containerEvent.getID() == ContainerEvent.COMPONENT_ADDED) {
Font font = containerEvent.getChild().getFont();
+ // Do not update font in tables and ComboBoxes on every renderer call to prevent weirdness.
+ // This prevents multiple instances of fonts being scaled multiple times.
+ if (containerEvent.getChild().getName() != null &&
+ (containerEvent.getChild().getName().toLowerCase().contains("render") ||
+ (containerEvent.getChild().getName().toLowerCase().contains("combo")))){
+ return;
+ }
if (font != null && font.getSize2D() <= defaultSize) {
containerEvent.getChild().setFont(
new Font(font.getName(), font.getStyle(), Math.round(font.getSize2D()
@@ -350,6 +378,31 @@ public class App {
}
}
+ /**
+ * Check if any default language is already set and valid.
+ * @return true, if any default language exists and is valid.
+ */
+ private static boolean setPreferredLanguage() {
+ // Check if any preferred language exists
+ String language = Config.getPreferredLanguage();
+ // Check whether the provided string is null or empty
+ if (language == null || language.trim().isEmpty()) {
+ return false;
+ }
+ // Check if the provided string has the format language_country e.g. en_US
+ String[] parts = language.split("_");
+ if (parts.length != 2) {
+ return false;
+ }
+ Locale locale = new Locale(parts[0], parts[1]);
+ // Check now if the locale is valid
+ if (!Arrays.asList(Locale.getAvailableLocales()).contains(locale)) {
+ return false;
+ }
+ Locale.setDefault(locale);
+ return true;
+ }
+
public static synchronized boolean isInitDone() {
return proxyInitDone;
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java b/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java
index 904d0693..a0e41689 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java
@@ -458,6 +458,24 @@ public class Config {
}
/**
+ * Set the language which should be used
+ *
+ * @param value the language consists of language and country
+ */
+ public static void setPreferredLanguage(String value) {
+ setString("gui.language", value);
+ }
+
+ /**
+ * Get the language preferred by the user
+ *
+ * @return the saved language, null otherwise
+ */
+ public static String getPreferredLanguage() {
+ return getString("gui.language", null);
+ }
+
+ /**
* Gets the boolean from the given key.
* If nothing is found, return the given default value
*
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java
index 99c03373..c1432614 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java
@@ -15,6 +15,7 @@ import javax.net.ssl.X509TrustManager;
import org.apache.log4j.Logger;
import org.openslx.dozmod.authentication.FingerprintManager;
import org.openslx.dozmod.gui.Gui.GuiCallable;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
public class GraphicalCertHandler {
@@ -34,9 +35,8 @@ public class GraphicalCertHandler {
@Override
public Boolean run() {
return Gui.showMessageBox(null,
- "Der Satellit besitzt kein Zertifikat. Verschlüsselte Verbindung nicht möglich.\n\n"
- + "Möchten Sie trotzdem fortfahren?", MessageType.WARNING, LOGGER,
- null);
+ I18n.GUI.getString("GraphicalCertHandler.Message.warning.noCertificate"),
+ MessageType.WARNING, LOGGER, null);
}
});
if (ret)
@@ -76,11 +76,8 @@ public class GraphicalCertHandler {
return;
}
// Known, mismatch, panic!
- question = "!!! ALARM !!!! ALARM !!!\n\n" + "Der Fingerabdruck von " + address
- + " hat sich verändert.\n" + "Erwartet: "
- + new BigInteger(expectedFingerprint).toString(16) + "\n" + "Vorgefunden: "
- + actualFingerprintReadable + "\n\n"
- + "Möchten Sie trotzdem zu diesem Satelliten verbinden?";
+ question = I18n.GUI.getString("GraphicalCertHandler.Message.yesNo.fingerprintChanged", address,
+ new BigInteger(expectedFingerprint).toString(16), actualFingerprintReadable);
}
// Some question needs to be asked
Boolean userOk = Gui.syncExec(new GuiCallable<Boolean>() {
@@ -112,13 +109,16 @@ public class GraphicalCertHandler {
try {
ctx = SSLContext.getInstance("TLSv1.2");
} catch (NoSuchAlgorithmException e) {
- Gui.asyncMessageBox("Could not get TLSv1.2 SSL context", MessageType.ERROR, LOGGER, e);
+ Gui.asyncMessageBox(I18n.GUI.getString("GraphicalCertHandler.Message.error.couldNotGetSSLContext"),
+ MessageType.ERROR, LOGGER, e);
}
if (ctx != null) {
try {
ctx.init(null, new TrustManager[] { new GuiTrustManager() }, null);
} catch (KeyManagementException e) {
- Gui.asyncMessageBox("Could not initialize TLSv1.2 SSL context", MessageType.ERROR, LOGGER, e);
+ Gui.asyncMessageBox(
+ I18n.GUI.getString("GraphicalCertHandler.Message.error.couldNotInitializeSSLContext"),
+ MessageType.ERROR, LOGGER, e);
ctx = null;
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
index 6a9997d9..f65c650d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
@@ -48,12 +48,7 @@ import org.openslx.dozmod.gui.activity.PassiveUploadPanel;
import org.openslx.dozmod.gui.activity.UpdatePanel;
import org.openslx.dozmod.gui.activity.UploadPanel;
import org.openslx.dozmod.gui.control.QLabel;
-import org.openslx.dozmod.gui.helper.CompositePage;
-import org.openslx.dozmod.gui.helper.DebugWindow;
-import org.openslx.dozmod.gui.helper.GridManager;
-import org.openslx.dozmod.gui.helper.MessageType;
-import org.openslx.dozmod.gui.helper.QuitNotification;
-import org.openslx.dozmod.gui.helper.UiFeedback;
+import org.openslx.dozmod.gui.helper.*;
import org.openslx.dozmod.gui.window.CheckUpdateWindow;
import org.openslx.dozmod.gui.window.ConfigWindow;
import org.openslx.dozmod.gui.window.DisclaimerWindow;
@@ -169,8 +164,10 @@ public abstract class MainWindow {
});
// Set up thrift error message displaying
- ThriftManager.setMasterErrorCallback(new GuiErrorCallback(mainWindow, "dem " + Branding.getServiceName() + "-Zentralserver"));
- ThriftManager.setSatelliteErrorCallback(new GuiErrorCallback(mainWindow, "dem Satellitenserver"));
+ ThriftManager.setMasterErrorCallback(new GuiErrorCallback(mainWindow,
+ I18n.GUI.getString("MainWindow.GuiErrorCallback.master.serverString", Branding.getServiceName())));
+ ThriftManager.setSatelliteErrorCallback(new GuiErrorCallback(mainWindow,
+ I18n.GUI.getString("MainWindow.GuiErrorCallback.satellite.serverString")));
// Same for config errors
Config.setErrorCallback(new Config.ErrorCallback() {
@@ -179,7 +176,8 @@ public abstract class MainWindow {
Gui.asyncExec(new Runnable() {
@Override
public void run() {
- Gui.showMessageBox(mainWindow, "Konnte Programmeinstellungen nicht speichern",
+ Gui.showMessageBox(mainWindow,
+ I18n.GUI.getString("MainWindow.Message.warning.couldNotSaveConfig"),
MessageType.WARNING, LOGGER, t);
}
});
@@ -324,7 +322,7 @@ public abstract class MainWindow {
}
}
if (!keepOpen
- || Gui.showMessageBox(mainWindow, "Möchten Sie das Programm wirklich beenden?",
+ || Gui.showMessageBox(mainWindow, I18n.GUI.getString("MainWindow.Message.yesNo.applicationQuit"),
MessageType.QUESTION_YESNO, null, null)) {
if (windows == null) {
windows = Window.getWindows();
@@ -424,42 +422,43 @@ public abstract class MainWindow {
JMenuBar menuBar = new JMenuBar();
mainWindow.setJMenuBar(menuBar);
- JMenu cascadeSessionMenu = new JMenu("Sitzung");
+ JMenu cascadeSessionMenu = new JMenu(I18n.GUI.getString("MainWindow.Menu.session.s"));
menuBar.add(cascadeSessionMenu);
- JMenuItem configItem = new JMenuItem("Einstellungen");
+ JMenuItem configItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.config.text"));
cascadeSessionMenu.add(configItem);
- JMenuItem logDirItem = new JMenuItem("Logverzeichnis öffnen");
+ JMenuItem logDirItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.logDir.text"));
cascadeSessionMenu.add(logDirItem);
cascadeSessionMenu.addSeparator();
- JMenuItem logoutItem = new JMenuItem("Abmelden und beenden");
+ JMenuItem logoutItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.logout.text"));
cascadeSessionMenu.add(logoutItem);
- JMenuItem exitItem = new JMenuItem("Beenden");
+ JMenuItem exitItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.exit.text"));
cascadeSessionMenu.add(exitItem);
- JMenu cascadeViewMenu = new JMenu("Ansicht");
+ JMenu cascadeViewMenu = new JMenu(I18n.GUI.getString("MainWindow.Menu.view.s"));
menuBar.add(cascadeViewMenu);
- JMenuItem homeItem = new JMenuItem("Startseite");
+ JMenuItem homeItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.home.text"));
cascadeViewMenu.add(homeItem);
- JMenuItem imagesItem = new JMenuItem("Virtuelle Maschinen");
+ JMenuItem imagesItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.images.text"));
cascadeViewMenu.add(imagesItem);
// Prevent switching to imageList when user is student
if (!Session.canListImages()) {
imagesItem.setEnabled(false);
+ homeItem.setEnabled(false);
}
- JMenuItem lecturesItem = new JMenuItem("Veranstaltungen");
+ JMenuItem lecturesItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.lectures.text"));
cascadeViewMenu.add(lecturesItem);
// the About menu button
- JMenu cascadeAboutMenu = new JMenu("Über");
+ JMenu cascadeAboutMenu = new JMenu(I18n.GUI.getString("MainWindow.Menu.about.s"));
menuBar.add(cascadeAboutMenu);
- JMenuItem disclaimerItem = new JMenuItem("Nutzungsvereinbarung");
- JMenuItem privacyNoticeItem = new JMenuItem("Datenschutzerklärung");
- JMenuItem virtualizerNoticeItem = new JMenuItem("Virtualisierer");
+ JMenuItem disclaimerItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.disclaimer.text"));
+ JMenuItem privacyNoticeItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.privacyNotice.text"));
+ JMenuItem virtualizerNoticeItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.virtualizer.text"));
JMenuItem wikiItem = new JMenuItem(Branding.getServiceFAQWebsite());
- JMenuItem updateCheckItem = new JMenuItem("Software-Aktualisierung");
+ JMenuItem updateCheckItem = new JMenuItem(I18n.GUI.getString("MainWindow.MenuItem.updateCheck.text"));
cascadeAboutMenu.add(disclaimerItem);
cascadeAboutMenu.add(privacyNoticeItem);
cascadeAboutMenu.add(virtualizerNoticeItem);
@@ -590,16 +589,8 @@ public abstract class MainWindow {
timeDiffChecked = true;
if (diffSecs > TimeUnit.MINUTES.toMillis(10)) {
Gui.asyncMessageBox(
- "ACHTUNG: Die Uhrzeit Ihres Computers weicht von der Uhrzeit auf dem Satellitenserver ab.\n"
- + "Bitte stellen Sie sicher, dass die Uhr Ihres Computers richtig gestellt ist.\n"
- + "Falls Ihre Sytemzeit korrekt gesetzt ist, ist möglicherweise die Uhrzeit auf\n"
- + "dem Satellitenserver nicht korrekt eingestellt.\n"
- + "In diesem Fall kann es - je nach Abweichung - zu unerwarteten Problemen mit den\n"
- + "Start- und Endzeiten von Veranstaltungen kommen. Kontaktieren Sie in diesem\n"
- + "Fall den zuständigen Administrator, damit die Uhrzeit auf dem Satellitenserver\n"
- + "korrigiert werden kann.\n\n" + "Ihr Computer: "
- + FormatHelper.longDate(now) + "\nSatellitenserver: "
- + FormatHelper.longDate(status.serverTime),
+ I18n.GUI.getString("MainWindow.Message.warning.incorrectTime",
+ FormatHelper.longDate(now), FormatHelper.longDate(status.serverTime)),
MessageType.WARNING, LOGGER, null);
}
}
@@ -631,7 +622,7 @@ public abstract class MainWindow {
public PleaseWait() {
GridManager grid = new GridManager(this, 3);
grid.add(Box.createHorizontalGlue()).expand(true, true);
- grid.add(new JLabel("Bitte warten, suche Proxy-Konfiguration..."))
+ grid.add(new JLabel(I18n.GUI.getString("MainWindow.Label.pleaseWait.text")))
.expand(false, true)
.fill(true, true);
grid.add(Box.createHorizontalGlue()).expand(true, true);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/DownloadPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/DownloadPanel.java
index a9631097..2a9b2334 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/DownloadPanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/DownloadPanel.java
@@ -9,6 +9,7 @@ import org.openslx.bwlp.thrift.iface.TransferState;
import org.openslx.dozmod.filetransfer.DownloadTask;
import org.openslx.dozmod.filetransfer.TransferEvent;
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.util.DesktopEnvironment;
@@ -24,7 +25,7 @@ public class DownloadPanel extends TransferPanel implements ActionListener, Quit
public DownloadPanel(String displayName, String diskFile, DownloadTask download) {
super(download, displayName, diskFile);
- btnOpenFolder = new JButton("Ordner öffnen");
+ btnOpenFolder = new JButton(I18n.ACTIVITY.getString("DownloadPanel.Button.openFolder.text"));
btnOpenFolder.setEnabled(false);
header.add(btnOpenFolder, 6);
btnOpenFolder.addActionListener(this);
@@ -37,7 +38,7 @@ public class DownloadPanel extends TransferPanel implements ActionListener, Quit
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnClose) {
if (!download.isCanceled()) {
- if (!Gui.showMessageBox(panel, "Wollen Sie diesen Transfer wirklich abbrechen?",
+ if (!Gui.showMessageBox(panel, I18n.ACTIVITY.getString("DownloadPanel.Message.yesNo.cancelTransfer"),
MessageType.QUESTION_YESNO, null, null))
return;
download.cancel();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/PassiveUploadPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/PassiveUploadPanel.java
index 64e6b994..aa461286 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/PassiveUploadPanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/PassiveUploadPanel.java
@@ -5,6 +5,7 @@ import java.awt.event.ActionListener;
import org.apache.log4j.Logger;
import org.openslx.dozmod.filetransfer.TransferEventEmitter;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class PassiveUploadPanel extends TransferPanel {
@@ -16,11 +17,11 @@ public class PassiveUploadPanel extends TransferPanel {
private final PassiveUploadPanel panel = this;
public PassiveUploadPanel(TransferEventEmitter state, String name) {
- super(state, name, "<Transfer zwischen Masterserver und Satellitenserver>");
+ super(state, name, I18n.ACTIVITY.getString("PassiveUploadPanel.TransferPanel.fileName"));
btnClose.addActionListener(new ButtonAction());
this.state = state;
state.addListener(this);
- btnClose.setText("Ausblenden");
+ btnClose.setText(I18n.ACTIVITY.getString("PassiveUploadPanel.Button.close.text"));
}
private class ButtonAction implements ActionListener {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java
index 00ce10d3..eb752b30 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java
@@ -17,6 +17,7 @@ import org.openslx.dozmod.filetransfer.TransferEventListener;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.BlockProgressBar;
import org.openslx.dozmod.gui.control.QLabel;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public abstract class TransferPanel extends ActivityPanel implements TransferEventListener {
@@ -56,7 +57,7 @@ public abstract class TransferPanel extends ActivityPanel implements TransferEve
// Header: [status] VM-Name ---- fileName [Button]
header = new JPanel();
header.setLayout(new BoxLayout(header, BoxLayout.LINE_AXIS));
- lblStatus = new QLabel("Initialisiere");
+ lblStatus = new QLabel(I18n.ACTIVITY.getString("TransferPanel.TransferState.initialize"));
header.add(lblStatus);
header.add(Box.createHorizontalStrut(10));
QLabel vmName = new QLabel(displayName);
@@ -68,7 +69,7 @@ public abstract class TransferPanel extends ActivityPanel implements TransferEve
lblFilename.setMinimumSize(new Dimension(0, 0));
header.add(lblFilename);
header.add(Box.createHorizontalStrut(10));
- btnClose = new JButton("Abbrechen");
+ btnClose = new JButton(I18n.ACTIVITY.getString("TransferPanel.Button.close.text.0"));
header.add(btnClose);
add(header);
progressWrapper = new JPanel();
@@ -124,20 +125,20 @@ public abstract class TransferPanel extends ActivityPanel implements TransferEve
switch (event.state) {
case ERROR:
errorCountdown = 20;
- status = "Fehler";
+ status = I18n.ACTIVITY.getString("TransferPanel.TransferState.error");
if (transfer.isCanceled()) {
transfer.removeListener(panel);
}
break;
case FINISHED:
transferDone();
- status = "Beendet";
+ status = I18n.ACTIVITY.getString("TransferPanel.TransferState.finished");
break;
case IDLE:
- status = "Inaktiv";
+ status = I18n.ACTIVITY.getString("TransferPanel.TransferState.idle");
break;
case WORKING:
- status = "Übertragung läuft";
+ status = I18n.ACTIVITY.getString("TransferPanel.TransferState.working");
break;
default:
status = event.state.toString();
@@ -168,7 +169,7 @@ public abstract class TransferPanel extends ActivityPanel implements TransferEve
private void transferDone() {
transfer.removeListener(panel);
lblRemaining.setText("-");
- btnClose.setText("Schließen");
+ btnClose.setText(I18n.ACTIVITY.getString("TransferPanel.Button.close.text.1"));
lblFilename.setText("");
footer.setVisible(false);
progressWrapper.setVisible(false);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UpdatePanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UpdatePanel.java
index 41b53302..4c4c392b 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UpdatePanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UpdatePanel.java
@@ -11,6 +11,7 @@ import javax.swing.SwingUtilities;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.QLabel;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.window.CheckUpdateWindow;
import org.openslx.dozmod.util.DesktopEnvironment;
import org.openslx.dozmod.util.DesktopEnvironment.Link;
@@ -40,12 +41,16 @@ public class UpdatePanel extends ActivityPanel implements ActionListener {
// Header: Neue Version verfügbar: <newVersion> [Button]
header = new JPanel();
header.setLayout(new BoxLayout(header, BoxLayout.LINE_AXIS));
- lblInfo = new QLabel("Neue Version verfügbar: " + newVersion, Gui.getScaledIconResource("/img/upload-icon.png", "!", 32, this), QLabel.LEFT);
+ lblInfo = new QLabel(I18n.ACTIVITY.getString("UpdatePanel.Label.info.text", newVersion),
+ Gui.getScaledIconResource("/img/upload-icon.png", "!", 32, this), QLabel.LEFT);
header.add(lblInfo);
header.add(Box.createHorizontalGlue());
- btnLink = new JButton("Im Browser öffnen", Gui.getScaledIconResource("/img/download-icon.png", "!", 24, this));
- btnDetails = new JButton("Changelog", Gui.getScaledIconResource("/img/info-icon.png", "?", 24, this));
- btnClose = new JButton("Schließen", Gui.getScaledIconResource("/img/delete-icon.png", "X", 24, this));
+ btnLink = new JButton(I18n.ACTIVITY.getString("UpdatePanel.Button.link.text"),
+ Gui.getScaledIconResource("/img/download-icon.png", "!", 24, this));
+ btnDetails = new JButton(I18n.ACTIVITY.getString("UpdatePanel.Button.details.text"),
+ Gui.getScaledIconResource("/img/info-icon.png", "?", 24, this));
+ btnClose = new JButton(I18n.ACTIVITY.getString("UpdatePanel.Button.close.text"),
+ Gui.getScaledIconResource("/img/delete-icon.png", "X", 24, this));
btnLink.addActionListener(this);
btnClose.addActionListener(this);
header.add(btnLink);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UploadPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UploadPanel.java
index bc24758a..b9b106f6 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UploadPanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/UploadPanel.java
@@ -13,6 +13,7 @@ import org.openslx.bwlp.thrift.iface.TAuthorizationException;
import org.openslx.bwlp.thrift.iface.TInvalidTokenException;
import org.openslx.bwlp.thrift.iface.UploadOptions;
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.state.UploadWizardState;
@@ -40,7 +41,7 @@ public class UploadPanel extends TransferPanel implements QuitNotification {
|| Session.getSatelliteConfig().serverSideCopy != SscMode.USER) {
chkServerSideCopy = null;
} else {
- chkServerSideCopy = new JCheckBox("ServerSide Copy");
+ chkServerSideCopy = new JCheckBox(I18n.ACTIVITY.getString("UploadPanel.CheckBox.serverSideCopy.text"));
footer.add(Box.createHorizontalStrut(15));
footer.add(chkServerSideCopy);
chkServerSideCopy.addActionListener(new SscToggle());
@@ -54,7 +55,7 @@ public class UploadPanel extends TransferPanel implements QuitNotification {
@Override
public void actionPerformed(ActionEvent e) {
if (!state.getUploadTask().isCanceled()) {
- if (!Gui.showMessageBox(panel, "Wollen Sie diesen Transfer wirklich abbrechen?",
+ if (!Gui.showMessageBox(panel, I18n.ACTIVITY.getString("UploadPanel.Message.yesNo.cancelTransfer"),
MessageType.QUESTION_YESNO, null, null))
return;
QuickTimer.scheduleOnce(new Task() {
@@ -84,7 +85,7 @@ public class UploadPanel extends TransferPanel implements QuitNotification {
} catch (TAuthorizationException | TInvalidTokenException e) {
dis = true;
} catch (TException e) {
- Gui.asyncMessageBox("Unerwarteter Fehler beim Setzen der Transferoptionen",
+ Gui.asyncMessageBox(I18n.ACTIVITY.getString("UploadPanel.Message.error.setUploadOptions"),
MessageType.ERROR, LOGGER, e);
}
final UploadOptions newOptions = newOpt;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ContainerBindMountConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ContainerBindMountConfigurator.java
new file mode 100644
index 00000000..d7e73e3d
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ContainerBindMountConfigurator.java
@@ -0,0 +1,112 @@
+package org.openslx.dozmod.gui.configurator;
+
+import org.apache.log4j.Logger;
+import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.changemonitor.GenericControlWindow;
+import org.openslx.dozmod.gui.control.QLabel;
+import org.openslx.dozmod.gui.control.table.ContainerBindMountTable;
+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.dozmod.gui.window.ContainerBindMountWindow;
+import org.openslx.dozmod.model.ContainerBindMount;
+
+import javax.swing.*;
+import javax.swing.event.ChangeListener;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContainerBindMountConfigurator extends JPanel
+ implements GenericControlWindow<List<ContainerBindMount>> {
+ private final Logger LOGGER = Logger.getLogger(ContainerBindMountConfigurator.class);
+
+ private final ContainerBindMountTable bindMountTable;
+
+ public ContainerBindMountConfigurator() {
+ super();
+
+ GridManager grid = new GridManager(this, 3, false);
+ QLabel lblBindMount = new QLabel(I18n.CONFIGURATOR.getString("ContainerBindMount.BindMount.text"));
+ bindMountTable = new ContainerBindMountTable();
+ QScrollPane scrollPaneTable = new QScrollPane(bindMountTable);
+ scrollPaneTable.setMinimumSize(Gui.getScaledDimension(0, 70));
+ scrollPaneTable.setPreferredSize(Gui.getScaledDimension(0, 70));
+ grid.add(lblBindMount).fill(false, false);
+ grid.add(scrollPaneTable, 2).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ JPanel buttonPanel = new JPanel();
+ GridManager gridButtonPanel = new GridManager(buttonPanel, 3);
+ buttonPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
+ buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
+
+ JButton btnAddBindMount = new JButton(I18n.CONFIGURATOR.getString("ContainerBindMount.Button.AddBindMount.text"));
+ JButton btnDelBindMount = new JButton(I18n.CONFIGURATOR.getString("ContainerBindMount.Button.DeleteBindMount.text"));
+
+ // add glue box to move Buttons to the right border.
+ buttonPanel.add(Box.createGlue());
+ buttonPanel.add(btnAddBindMount);
+ buttonPanel.add(btnDelBindMount);
+
+ grid.add(Box.createGlue()).fill(true, false);
+ grid.add(buttonPanel, 2).fill(true, false);
+ grid.finish(false);
+
+ btnAddBindMount.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ addBindMount();
+ }
+ });
+ btnDelBindMount.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ deleteBindMount();
+ }
+ });
+ }
+
+ private void addBindMount() {
+ ContainerBindMountWindow.open(SwingUtilities.getWindowAncestor(this), bindMountTable);
+ fireUserChangeEvent();
+ }
+
+ private void deleteBindMount() {
+ if (null == bindMountTable.getSelectedItem())
+ return;
+ List<ContainerBindMount> data = new ArrayList<>(bindMountTable.getData());
+ if (data.remove(bindMountTable.getSelectedItem()))
+ LOGGER.info("Bind Mount Entry Deleted");
+ bindMountTable.setData(data, true);
+ fireUserChangeEvent();
+ }
+
+ public void setData(List<ContainerBindMount> bindMountConfig, boolean sort) {
+ bindMountTable.setData(bindMountConfig, sort);
+ }
+
+ public List<ContainerBindMount> getData() {
+ return bindMountTable.getData();
+ }
+
+
+ /* ################################
+ For dialog change monitor
+ ################################### */
+
+ @Override public List<ContainerBindMount> getState() {
+ return bindMountTable.getData();
+ }
+
+ void fireUserChangeEvent() {
+ for (ChangeListener cl : listeners) {
+ cl.stateChanged(null);
+ }
+ }
+
+ private final List<ChangeListener> listeners = new ArrayList<>(1);
+
+ @Override public void addChangeListener(ChangeListener l) {
+ listeners.add(l);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ImagePermissionConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ImagePermissionConfigurator.java
index efba020c..cf082e27 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ImagePermissionConfigurator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/ImagePermissionConfigurator.java
@@ -33,6 +33,7 @@ import org.openslx.dozmod.gui.control.table.ImagePermissionTable;
import org.openslx.dozmod.gui.control.table.ImagePermissionTable.UserImagePermissions;
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.dozmod.gui.window.UserListWindow;
import org.openslx.dozmod.gui.window.UserListWindow.UserAddedCallback;
import org.openslx.dozmod.thrift.cache.UserCache;
@@ -69,9 +70,9 @@ public class ImagePermissionConfigurator extends JPanel implements GenericContro
userButtonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
userButtonPane.setLayout(new BoxLayout(userButtonPane, BoxLayout.LINE_AXIS));
- btnAddUser = new JButton("Benutzer hinzufügen");
+ btnAddUser = new JButton(I18n.CONFIGURATOR.getString("ImagePermission.Button.addUser.text"));
userButtonPane.add(btnAddUser);
- btnRemoveUser = new JButton("Benutzer entfernen");
+ btnRemoveUser = new JButton(I18n.CONFIGURATOR.getString("ImagePermission.Button.removeUser.text"));
userButtonPane.add(btnRemoveUser);
userButtonPane.add(Box.createGlue());
@@ -105,7 +106,7 @@ public class ImagePermissionConfigurator extends JPanel implements GenericContro
permissionTable.setData(permissionList, false);
fireUserChangeEvent();
}
- }, "Hinzufügen", ownerId);
+ }, I18n.CONFIGURATOR.getString("ImagePermission.Button.addUser.caption"), ownerId);
}
});
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java
index 15959322..817289be 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java
@@ -29,6 +29,7 @@ import org.openslx.dozmod.gui.control.table.CheckListTable.Wrapper;
import org.openslx.dozmod.gui.control.table.LectureLdapFilterTable;
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.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
@@ -63,7 +64,7 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout {
txtAttribute.setEnabled(editable);
txtValue.setEnabled(editable);
if (editable)
- btnAdd.setText("Ändern");
+ btnAdd.setText(I18n.CONFIGURATOR.getString("LdapFilter.Button.add.text.0"));
if (item == null) {
clearInputFields();
return;
@@ -82,7 +83,8 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout {
LdapFilter input = new LdapFilter();
input.attribute = txtAttribute.getText();
if (input.attribute == null || input.attribute.isEmpty()) {
- Gui.showMessageBox("Kein Attribut angegeben", MessageType.ERROR, null, null);
+ Gui.showMessageBox(I18n.CONFIGURATOR.getString("LdapFilter.Message.error.noAttribute"),
+ MessageType.ERROR, null, null);
return;
}
input.value = txtValue.getText();
@@ -97,7 +99,8 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout {
// creating a new one, either way add it to the list and update
// the table, if its not present already
if (oldList.contains(newEntry)) {
- Gui.showMessageBox("Eintrag bereits vorhanden", MessageType.ERROR, null, null);
+ Gui.showMessageBox(I18n.CONFIGURATOR.getString("LdapFilter.Message.error.entryAlreadyExists"),
+ MessageType.ERROR, null, null);
return;
}
// now decide whether to create a new entry or update existing one
@@ -143,7 +146,7 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout {
btnDel.setEnabled(false);
txtAttribute.setText(null);
txtValue.setText(null);
- btnAdd.setText("Hinzufügen");
+ btnAdd.setText(I18n.CONFIGURATOR.getString("LdapFilter.Button.add.text.1"));
}
public List<LdapFilter> getState() {
@@ -205,11 +208,6 @@ class LdapFilterConfiguratorLayout extends JPanel {
private static final long serialVersionUID = 6479838641542743622L;
- private final static String HELPTEXT = "Geben Sie hier LDAP Filter ein, die die Sichtbarkeit"
- + " der Veranstaltung abhängig vom angemeldeten Benutzer einschränken. Eine Veranstaltung"
- + " ist sichtbar, sobald einer der angegebenen Filter zutrifft. Zusätzliche Raumbeschränkungen"
- + " greifen weiterhin.";
-
protected final LectureLdapFilterTable tblFilters = new LectureLdapFilterTable();
protected final JTextField txtAttribute, txtValue;
protected final JButton btnAdd, btnDel;
@@ -217,27 +215,29 @@ class LdapFilterConfiguratorLayout extends JPanel {
public LdapFilterConfiguratorLayout() {
GridManager grid = new GridManager(this, 1, true, new Insets(3, 3, 3, 3));
// top info panel
- grid.add(new WordWrapLabel(HELPTEXT)).fill(true, false).expand(true, false);
+ grid.add(new WordWrapLabel(I18n.CONFIGURATOR.getString("LdapFilter.Label.info.text")))
+ .fill(true, false).expand(true, false);
grid.nextRow();
// middle filter list
grid.add(new QScrollPane(tblFilters)).fill(true, true).expand(true, true);
grid.nextRow();
- btnDel = new JButton("Entfernen");
+ btnDel = new JButton(I18n.CONFIGURATOR.getString("LdapFilter.Button.delete.text"));
grid.add(btnDel).anchor(GridBagConstraints.EAST);
grid.nextRow();
JPanel pnlNewShare = new JPanel();
GridManager gridNewFilter = new GridManager(pnlNewShare, 3, true);
- pnlNewShare.setBorder(BorderFactory.createTitledBorder("Eigene Filter definieren"));
- gridNewFilter.add(new QLabel("Attribut"));
+ pnlNewShare.setBorder(BorderFactory.createTitledBorder(
+ I18n.CONFIGURATOR.getString("LdapFilter.TitledBorder.newShare.title")));
+ gridNewFilter.add(new QLabel(I18n.CONFIGURATOR.getString("LdapFilter.Label.attribute.text")));
txtAttribute = new JTextField();
gridNewFilter.add(txtAttribute, 2).fill(true, false).expand(true, false);
gridNewFilter.nextRow();
- gridNewFilter.add(new QLabel("Wert"));
+ gridNewFilter.add(new QLabel(I18n.CONFIGURATOR.getString("LdapFilter.Label.value.text")));
txtValue = new JTextField();
gridNewFilter.add(txtValue).fill(true, false).expand(true, false);
- btnAdd = new JButton("Hinzufügen");
+ btnAdd = new JButton(I18n.CONFIGURATOR.getString("LdapFilter.Button.add.text.1"));
gridNewFilter.add(btnAdd).anchor(GridBagConstraints.EAST);
gridNewFilter.nextRow();
gridNewFilter.finish(false);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LecturePermissionConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LecturePermissionConfigurator.java
index 5e4c1649..b659c3c9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LecturePermissionConfigurator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LecturePermissionConfigurator.java
@@ -31,6 +31,7 @@ import org.openslx.dozmod.gui.control.table.LecturePermissionTable;
import org.openslx.dozmod.gui.control.table.LecturePermissionTable.UserLecturePermissions;
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.dozmod.gui.window.UserListWindow;
import org.openslx.dozmod.gui.window.UserListWindow.UserAddedCallback;
@@ -76,9 +77,9 @@ public class LecturePermissionConfigurator extends JPanel implements GenericCont
userButtonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
userButtonPane.setLayout(new BoxLayout(userButtonPane, BoxLayout.LINE_AXIS));
- btnAddUser = new JButton("Benutzer hinzufügen");
+ btnAddUser = new JButton(I18n.CONFIGURATOR.getString("LecturePermission.Button.addUser.text"));
userButtonPane.add(btnAddUser);
- btnRemoveUser = new JButton("Benutzer entfernen");
+ btnRemoveUser = new JButton(I18n.CONFIGURATOR.getString("LecturePermission.Button.removeUser.text"));
userButtonPane.add(btnRemoveUser);
userButtonPane.add(Box.createGlue());
@@ -111,7 +112,7 @@ public class LecturePermissionConfigurator extends JPanel implements GenericCont
permissionTable.setData(permissionList, false);
fireUserChangeEvent();
}
- }, "Hinzufügen", ownerId);
+ }, I18n.CONFIGURATOR.getString("LecturePermission.Button.addUser.caption"), ownerId);
}
});
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetrulesConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetrulesConfigurator.java
index 3a0aabdd..8e11e484 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetrulesConfigurator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetrulesConfigurator.java
@@ -51,6 +51,7 @@ import org.openslx.dozmod.gui.changemonitor.GenericControlWindow;
import org.openslx.dozmod.gui.configurator.NetrulesConfigurator.StateWrapper;
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.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
@@ -196,11 +197,13 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
private void showPresetSelector() {
if (predefinedRules == null) {
- Gui.showMessageBox("Wah wah wah! Null preset list", MessageType.ERROR, null, null);
+ Gui.showMessageBox(I18n.CONFIGURATOR.getString("NetRules.Message.error.noPredefinedRules"),
+ MessageType.ERROR, null, null);
return;
}
final JDialog dialog = new JDialog(SwingUtilities.getWindowAncestor(this),
- "Auswahl", ModalityType.APPLICATION_MODAL);
+ I18n.CONFIGURATOR.getString("NetRules.Dialog.dialog.title"),
+ ModalityType.APPLICATION_MODAL);
JPanel pane = new JPanel();
pane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
@@ -216,7 +219,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
dialog.setMinimumSize(dd);
dialog.setPreferredSize(dd);
GridManager grid = new GridManager(pane, 3, true, new Insets(2, 2, 2, 2));
- grid.add(new WordWrapLabel("Vordefinierte Regelsets:"), 3);
+ grid.add(new WordWrapLabel(I18n.CONFIGURATOR.getString("NetRules.Label.predefinedRules.text")), 3);
grid.nextRow();
final Map<ButtonModel, Integer> mapper = new HashMap<>();
for (PresetNetRule ruleSet : predefinedRules) {
@@ -231,8 +234,8 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
grid.add(Box.createVerticalGlue(), 3).expand(true, true).fill(true, true);
grid.nextRow();
grid.add(Box.createHorizontalGlue()).expand(true, false).fill(true, false);
- JButton btnCancel = new JButton("Abbrechen");
- JButton btnOk = new JButton("Speichern");
+ JButton btnCancel = new JButton(I18n.CONFIGURATOR.getString("NetRules.Button.cancel.text"));
+ JButton btnOk = new JButton(I18n.CONFIGURATOR.getString("NetRules.Button.ok.text"));
grid.add(btnCancel);
grid.add(btnOk);
grid.finish(false);
@@ -386,9 +389,9 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
// log numbers for fields independently...
LOGGER.debug("Invalid number of fields! Expected 3, got: " + fields.length);
if (fields.length > 3) {
- errors.append("Zeile " + lineNo + ": Zu viele Felder.\n");
+ errors.append(I18n.CONFIGURATOR.getString("NetRules.Message.error.tooManyFields", lineNo));
} else {
- errors.append("Zeile " + lineNo + ": Zu wenig Felder.\n");
+ errors.append(I18n.CONFIGURATOR.getString("NetRules.Message.error.tooFewFields", lineNo));
}
invalid = true;
continue;
@@ -404,7 +407,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
if (!ruleDirection.equals("IN") && !ruleDirection.equals("OUT")) {
lineNo += addLine(newdoc, ruleLine, Color.RED, true);
LOGGER.debug("Invalid net direction! Expected 'in' or out'. Got: " + ruleDirection);
- errors.append("Zeile " + lineNo + ": Ungültige Richtung. Bitte nutzen Sie 'IN' bzw. 'OUT'.\n");
+ errors.append(I18n.CONFIGURATOR.getString("NetRules.Message.error.invalidNetDirection", lineNo));
invalid = true;
continue;
}
@@ -415,7 +418,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
if (port < 0 || port > 65535) {
lineNo += addLine(newdoc, ruleLine, Color.RED, true);
LOGGER.debug("Invalid port! Got: " + port);
- errors.append("Zeile " + lineNo + ": Ungültiger Port. Gültiger Bereich ist 0-65535.\n");
+ errors.append(I18n.CONFIGURATOR.getString("NetRules.Message.error.invalidPort", lineNo));
invalid = true;
continue;
}
@@ -429,7 +432,8 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
String checkRes = checkHostnameSimple(fields[0]);
if (checkRes != null) {
lineNo += addLine(newdoc, ruleLine, Color.RED, true);
- errors.append("Zeile " + lineNo + ": " + checkRes + "\n");
+ errors.append(I18n.CONFIGURATOR.getString("NetRules.Message.error.checkResWithLineNo",
+ lineNo, checkRes));
invalid = true;
continue;
}
@@ -442,10 +446,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
resetTabStops();
}
if (!silent && errors.length() != 0) {
- Gui.showMessageBox("Fehler beim Auswerten der angegebenen Netzwerkregeln.\n\n" + errors.toString()
- + "\nBitte geben Sie die Regeln zeilenweise im Format\n"
- + "<host> <port> <IN|OUT>\n"
- + "an.",
+ Gui.showMessageBox(I18n.CONFIGURATOR.getString("NetRules.Message.error.evaluatingNetRules", errors.toString()),
MessageType.ERROR, null, null);
}
if (invalid) {
@@ -486,7 +487,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
*/
private String checkHostnameSimple(String hostname) {
if (hostname.length() > 254) {
- return "Hostname ist zu lang.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.hostnameTooLong");
}
boolean allNumeric = true;
int netmask = -1;
@@ -495,7 +496,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
if (ls != -1) {
netmask = Util.parseInt(hostname.substring(ls + 1), -1);
if (netmask == -1) {
- return "Ungültige Netzmaske.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.invalidNetmask");
}
hostname = hostname.substring(0, ls);
}
@@ -509,18 +510,18 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
// v6
if ((hostname.startsWith(":") && !hostname.startsWith("::"))
|| (hostname.endsWith(":") && ! hostname.endsWith("::"))) {
- return "IPv6-Adresse darf nicht mit einem Doppelpunkt beginnen oder enden.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv6BeginOrEndWithColon");
}
int numCompressed = (hostname.length() - hostname.replace("::", "").length()) / 2;
if (numCompressed > 1) {
- return "IPv6-Adresse darf nicht mehr als einen komprimierten Teil enthalten.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv6MoreThanOneCompressedPart");
}
if (netmask > 128) {
- return "IPv6 Netzmaske kann nicht größer 128 Bit sein.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv6GreaterThan128Bits");
}
domainLabels = hostname.split(":");
if (domainLabels.length > 8) {
- return "IPv6-Adresse enthält zu viele Hextets."; // Yes it's called that apparently
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv6TooManyHextets"); // Yes it's called that apparently
}
for (String domainLabel : domainLabels) {
if (domainLabel.isEmpty())
@@ -528,26 +529,27 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
try {
int test = Integer.parseInt(domainLabel, 16);
if (test < 0 || test > 65535) {
- return "IPv6-Adresse enthält ungültiges Hextet.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv6InvalidHextet");
}
} catch (Exception e) {
- return "IPv6-Adresse enthält nicht-hexadezimale Zeichen.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv6NonHexadecimalCharacters");
}
}
if (!allNumeric
|| ((domainLabels.length == 8 || numCompressed > 0) && (netmask < -1 || netmask > 128))
|| (domainLabels.length < 8 && numCompressed == 0 && (netmask < 0 || netmask > 128))) {
- return "Fehlerhafte IPv6-Adresse/Netzmaske.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.incorrectIPv6AddressOrNetmask");
}
} else {
// v4 or hostname
if (netmask > 32) {
- return "IPv4 Netzmaske kann nicht größer 32 Bit sein.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.IPv4GreaterThan32Bits");
}
for (String domainLabel : domainLabels) {
if (domainLabel.length() > 63) {
// fail since domain level should be max 63 chars
- return "Domain-Ebene '" + domainLabel + "' länger als 63 Zeichen.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.domainLabelLongerThan63Characters",
+ domainLabel);
}
int i = Util.parseInt(domainLabel, -1);
if (i < 0 || i > 255) {
@@ -559,7 +561,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
if ((domainLabels.length == 4 && (netmask < -1 || netmask > 32))
|| domainLabels.length > 4
|| (domainLabels.length < 4 && (netmask < 0 || netmask > 32))) {
- return "Fehlerhafte IPv4-Adresse/Netzmaske.";
+ return I18n.CONFIGURATOR.getString("NetRules.Message.error.incorrectIPv4AddressOrNetmask");
}
}
}
@@ -574,13 +576,6 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout implements
class NetrulesConfiguratorLayout extends JPanel {
private static final long serialVersionUID = 5266120380443817325L;
- private final static String STR_RULES_DESCRIPTION = "Wenn Sie den Internetzugriff deaktiviert haben,"
- + " können Sie hier Ausnahmen definieren (Whitelist)."
- + " Bitte definieren Sie Ihre Regeln im Format\n<host> <port> <in|out>.\n"
- + "Sie können Port 0 angeben, was sämtlichen TCP und UDP Ports eines Hosts entspricht.";
- private final static String STR_RULES_ADD = "Wenn Sie Internetzugriff aktivieren,"
- + " hat diese Liste den gegenteiligen Effekt (Blacklist).";
- private final static String STR_TITLE = "Netzwerkregeln";
protected final JTextPane tpNetworkRules;
protected final JButton btnCheckRules;
@@ -592,19 +587,19 @@ class NetrulesConfiguratorLayout extends JPanel {
new Insets(5, 5, 5, 5));
// middle panel for network rules
- this.setBorder(BorderFactory.createTitledBorder(STR_TITLE));
+ this.setBorder(BorderFactory.createTitledBorder(I18n.CONFIGURATOR.getString("NetRules.TitledBorder.title")));
tpNetworkRules = new JTextPane();
resetTabStops();
grid
- .add(new WordWrapLabel(STR_RULES_DESCRIPTION), 2)
+ .add(new WordWrapLabel(I18n.CONFIGURATOR.getString("NetRules.Label.description.text")), 2)
.fill(true, false).expand(true, false);
grid.nextRow();
grid
- .add(new WordWrapLabel(STR_RULES_ADD))
+ .add(new WordWrapLabel(I18n.CONFIGURATOR.getString("NetRules.Label.add.text")))
.fill(true, false).expand(true, false);
- btnCheckRules = new JButton("Regeln überprüfen");
+ btnCheckRules = new JButton(I18n.CONFIGURATOR.getString("NetRules.Button.checkRules.text"));
grid.add(btnCheckRules);
grid.nextRow();
@@ -614,7 +609,7 @@ class NetrulesConfiguratorLayout extends JPanel {
.fill(true, true).expand(true, true);
grid.nextRow();
- btnShowPresets = new JButton("Vordefinierte Regelsets...");
+ btnShowPresets = new JButton(I18n.CONFIGURATOR.getString("NetRules.Button.showPresets.text"));
grid.add(btnShowPresets, 2).anchor(GridBagConstraints.LINE_END);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetshareConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetshareConfigurator.java
index 77f2e381..95c45282 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetshareConfigurator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/NetshareConfigurator.java
@@ -38,6 +38,7 @@ import org.openslx.dozmod.gui.control.table.CheckListTable.Wrapper;
import org.openslx.dozmod.gui.control.table.NetshareTable;
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.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.dozmod.util.FormatHelper;
@@ -79,7 +80,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
chkIsPrinter.setEnabled(editable);
chkShowPass.setEnabled(editable);
if (editable)
- btnAdd.setText("Ändern");
+ btnAdd.setText(I18n.CONFIGURATOR.getString("NetShare.Button.add.text.0"));
// clear the contents of the fields and return, if no share was selected.
if (item == null) {
@@ -145,7 +146,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
input.path = tfSharePath.getText();
if (input.path == null || input.path.isEmpty()) {
- lblError.setText("Kein Pfad angegeben!");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.noPath"));
return;
}
String inputShareName = tfShareName.getText();
@@ -156,7 +157,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
NetShareAuth inputNetShareAuth = cboNetshareAuth
.getItemAt(cboNetshareAuth.getSelectedIndex());
if (inputNetShareAuth == null) {
- lblError.setText("Kein Authentifizierungstyp angegeben!");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.noAuth"));
return;
}
input.auth = inputNetShareAuth;
@@ -170,7 +171,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
input.username = tfUsername.getText();
input.password = new String(tfPassword.getPassword());
if (input.username.isEmpty()) {
- lblError.setText("Kein Nutzername angegeben!");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.noUsername"));
return;
}
break;
@@ -179,7 +180,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
break;
}
if (input == null) {
- lblError.setText("Fehlerhafte Eingabe");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.incorrectInput"));
LOGGER.debug("Bad input, aborting.");
return;
}
@@ -189,7 +190,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
.getItemAt(cboNetshareMountPoint.getSelectedIndex());
if (!chkIsPrinter.isSelected()) {
if (inputMountPoint == null) {
- lblError.setText("Kein Laufwerk angegeben!");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.noMountPoint"));
return;
}
input.mountpoint = String.valueOf(inputMountPoint);
@@ -201,10 +202,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
// which we might want to implement one day...
if (input.password != null && !input.password.isEmpty()) {
if (!Gui.showMessageBox(
- "Das eingebene Passwort wird im Klartext gespeichert "
- + "und ist in der VM für jeden Nutzer sichtbar.\n"
- + "Verwenden Sie auf keinen Fall sicherheitskritische Passwörter!"
- + "\n\nMöchten Sie diesen Netzlaufwerk trotzdem hinzufügen?",
+ I18n.CONFIGURATOR.getString("NetShare.Message.yesNo.password"),
MessageType.QUESTION_YESNO, LOGGER, null)) {
return;
}
@@ -218,7 +216,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
if (oldEntry != null && oldList.contains(oldEntry)) {
// editing existing one, delete it from the internal data
if (!oldList.remove(oldEntry)) {
- lblError.setText("Änderung fehlgeschlagen!");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.changeFailed"));
LOGGER.error("Failed to remove selected share for replacement: " + oldEntry);
return;
}
@@ -228,7 +226,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
// creating a new one, either way add it to the list and update
// the table, if its not present already
if (oldList.contains(newEntry)) {
- lblError.setText("Existiert bereits!");
+ lblError.setText(I18n.CONFIGURATOR.getString("NetShare.Label.error.alreadyExists"));
LOGGER.error("Network share already in the list, aborting.");
return;
}
@@ -287,7 +285,7 @@ public class NetshareConfigurator extends NetshareConfiguratorLayout {
cboNetshareMountPoint.setSelectedItem(null);
chkIsPrinter.setSelected(false);
chkShowPass.setSelected(false);
- btnAdd.setText("Hinzufügen");
+ btnAdd.setText(I18n.CONFIGURATOR.getString("NetShare.Button.add.text.1"));
}
public List<NetShare> getState() {
@@ -335,10 +333,6 @@ class NetshareConfiguratorLayout extends JPanel {
private static final long serialVersionUID = 6479525981542743622L;
- private final static String txtNetshareDesc = "<html>Hier können Sie Netzlaufwerke angeben,"
- + " die automatisch beim Start der Veranstaltung eingebunden werden sollen."
- + " Der Platzhalter <em>%loginuser%</em> wird im Pfad durch den Loginnamen des Nutzers ersetzt.</html>";
-
protected final JLabel lblError;
protected final NetshareTable tblNetshare = new NetshareTable();
protected final JTextField tfSharePath, tfShareName, tfUsername;
@@ -369,7 +363,8 @@ class NetshareConfiguratorLayout extends JPanel {
public NetshareConfiguratorLayout() {
GridManager grid = new GridManager(this, 3, true, new Insets(3, 3, 3, 3));
// top info panel
- grid.add(new JLabel(txtNetshareDesc), 3).fill(true, false).expand(true, false);
+ grid.add(new JLabel(I18n.CONFIGURATOR.getString("NetShare.Label.description.text")), 3)
+ .fill(true, false).expand(true, false);
grid.nextRow();
// middle netshare list
grid.add(new QScrollPane(tblNetshare), 3).fill(true, true).expand(true, true);
@@ -377,17 +372,18 @@ class NetshareConfiguratorLayout extends JPanel {
JPanel pnlNewShare = new JPanel();
GridManager gridNewShare = new GridManager(pnlNewShare, 6, true, new Insets(0, 3, 0, 3));
- pnlNewShare.setBorder(BorderFactory.createTitledBorder("Eigenes Netzlaufwerk definieren"));
+ pnlNewShare.setBorder(BorderFactory.createTitledBorder(
+ I18n.CONFIGURATOR.getString("NetShare.TitledBorder.newShare.title")));
JPanel pnlSharePath = new JPanel();
pnlSharePath.setLayout(new BoxLayout(pnlSharePath, BoxLayout.LINE_AXIS));
- gridNewShare.add(new QLabel("Pfad"));
+ gridNewShare.add(new QLabel(I18n.CONFIGURATOR.getString("NetShare.Label.sharePath.text")));
tfSharePath = new JTextField();
pnlSharePath.add(tfSharePath);
pnlSharePath.add(Box.createGlue());
pnlSharePath.add(Box.createHorizontalStrut(5));
- chkIsPrinter = new JCheckBox("Drucker");
+ chkIsPrinter = new JCheckBox(I18n.CONFIGURATOR.getString("NetShare.CheckBox.isPrinter.text"));
pnlSharePath.add(chkIsPrinter);
pnlSharePath.add(Box.createHorizontalStrut(5));
gridNewShare.add(pnlSharePath, 5).fill(true, false).expand(true, false);
@@ -399,30 +395,30 @@ class NetshareConfiguratorLayout extends JPanel {
pnlShareName.setLayout(new BoxLayout(pnlShareName, BoxLayout.LINE_AXIS));
pnlShareName.add(tfShareName);
pnlShareName.add(Box.createHorizontalStrut(3));
- pnlShareName.add(new QLabel("Laufwerk"));
+ pnlShareName.add(new QLabel(I18n.CONFIGURATOR.getString("NetShare.Label.shareMountPoint.text")));
pnlShareName.add(Box.createHorizontalStrut(3));
pnlShareName.add(cboNetshareMountPoint);
- gridNewShare.add(new QLabel("Anzeigename"));
+ gridNewShare.add(new QLabel(I18n.CONFIGURATOR.getString("NetShare.Label.shareName.text")));
gridNewShare.add(pnlShareName, 5).fill(true, false).expand(true, false);
gridNewShare.nextRow();
- gridNewShare.add(new QLabel("Authentifizierung"));
+ gridNewShare.add(new QLabel(I18n.CONFIGURATOR.getString("NetShare.Label.shareAuth.text")));
gridNewShare.add(cboNetshareAuth, 5).fill(true, false).expand(true, false);
gridNewShare.nextRow();
- gridNewShare.add(new QLabel("Benutzername"));
+ gridNewShare.add(new QLabel(I18n.CONFIGURATOR.getString("NetShare.Label.username.text")));
tfUsername = new JTextField(20);
gridNewShare.add(tfUsername, 2).fill(true, false).expand(true, false);
- gridNewShare.add(new QLabel("Passwort"));
+ gridNewShare.add(new QLabel(I18n.CONFIGURATOR.getString("NetShare.Label.password.text")));
tfPassword = new JPasswordField(20);
gridNewShare.add(tfPassword, 2).fill(true, false).expand(true, false);
gridNewShare.nextRow();
- chkShowPass = new JCheckBox("Passwort anzeigen");
+ chkShowPass = new JCheckBox(I18n.CONFIGURATOR.getString("NetShare.CheckBox.showPassword.text"));
gridNewShare.add(Box.createGlue(), 5);
gridNewShare.add(chkShowPass).anchor(GridBagConstraints.EAST);
gridNewShare.nextRow();
grid.add(pnlNewShare, 3).fill(true, false).expand(true, false);
grid.nextRow();
- btnAdd = new JButton("Hinzufügen");
- btnDel = new JButton("Entfernen");
+ btnAdd = new JButton(I18n.CONFIGURATOR.getString("NetShare.Button.add.text.1"));
+ btnDel = new JButton(I18n.CONFIGURATOR.getString("NetShare.Button.delete.text"));
lblError = new QLabel("");
lblError.setForeground(Color.RED);
grid.add(lblError).fill(true, false).expand(true, false);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/StartupConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/StartupConfigurator.java
index 16267690..eadc7339 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/StartupConfigurator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/StartupConfigurator.java
@@ -41,6 +41,7 @@ import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
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.gui.helper.MessageType;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
@@ -96,11 +97,12 @@ public class StartupConfigurator extends StartupConfiguratorLayout {
private void showRunscriptSelector() {
if (scripts == null) {
- Gui.showMessageBox("Wah wah wah! Null scripts", MessageType.ERROR, null, null);
+ Gui.showMessageBox(I18n.CONFIGURATOR.getString("Startup.Message.error.noScripts"),
+ MessageType.ERROR, null, null);
return;
}
final JDialog dialog = new JDialog(SwingUtilities.getWindowAncestor(this),
- "Auswahl", ModalityType.APPLICATION_MODAL);
+ I18n.CONFIGURATOR.getString("Startup.Dialog.title"), ModalityType.APPLICATION_MODAL);
JPanel pane = new JPanel();
pane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
@@ -116,7 +118,8 @@ public class StartupConfigurator extends StartupConfiguratorLayout {
dialog.setMinimumSize(dd);
dialog.setPreferredSize(dd);
GridManager grid = new GridManager(pane, 3, true, new Insets(2, 2, 2, 2));
- grid.add(new WordWrapLabel("Vordefinierte Startskripte:"), 3).fill(true, false);
+ grid.add(new WordWrapLabel(I18n.CONFIGURATOR.getString("Startup.Label.predefinedScripts.text")), 3)
+ .fill(true, false);
grid.nextRow();
final Map<ButtonModel, Integer> mapper = new HashMap<>();
boolean haveDisabled = false;
@@ -135,15 +138,14 @@ public class StartupConfigurator extends StartupConfiguratorLayout {
}
}
if (haveDisabled) {
- grid.add(new WordWrapLabel("Ausgegraute Elemente sind mit dem zur"
- + " Veranstaltung gehörendem Betriebssystem nicht kompatibel."), 3)
+ grid.add(new WordWrapLabel(I18n.CONFIGURATOR.getString("Startup.Label.greyedOutElements.text")), 3)
.fill(true, false);
grid.nextRow();
}
grid.add(Box.createVerticalGlue(), 3).expand(true, true).fill(true, true);
grid.nextRow();
- JButton btnCancel = new JButton("Abbrechen");
- JButton btnOk = new JButton("Speichern");
+ JButton btnCancel = new JButton(I18n.CONFIGURATOR.getString("Startup.Button.cancel.text"));
+ JButton btnOk = new JButton(I18n.CONFIGURATOR.getString("Startup.Button.ok.text"));
grid.add(Box.createHorizontalGlue()).expand(true, true).fill(true, true);
grid.add(btnCancel);
grid.add(btnOk);
@@ -386,8 +388,6 @@ class StartupConfiguratorLayout extends JPanel {
private static final long serialVersionUID = 648729071828404053L;
- private final static String RUN_SCRIPT_HELP = "Ein hier eingetragenes Skript wird nach dem Start"
- + " der VM automatisch ausgeführt.";
protected final QLabel lblError;
protected final JTextArea taRunScript;
protected final ComboBox<RunscriptType> cboRunscriptType;
@@ -397,7 +397,7 @@ class StartupConfiguratorLayout extends JPanel {
public StartupConfiguratorLayout() {
GridManager grid = new GridManager(this, 2, true, new Insets(5, 5, 5, 5));
- grid.add(new QLabel("Audio"));
+ grid.add(new QLabel(I18n.CONFIGURATOR.getString("Startup.Label.audio.text")));
cboSoundState = new ComboBox<>(new ComboBoxRenderer<SoundState>() {
@Override
public String renderItem(SoundState item) {
@@ -411,7 +411,7 @@ class StartupConfiguratorLayout extends JPanel {
grid.add(Box.createVerticalStrut(4), 2);
grid.nextRow();
- grid.add(new WordWrapLabel(RUN_SCRIPT_HELP, false, true), 2)
+ grid.add(new WordWrapLabel(I18n.CONFIGURATOR.getString("Startup.Label.description.text"), false, true), 2)
.fill(true, false).expand(true, false);
grid.nextRow();
@@ -427,7 +427,7 @@ class StartupConfiguratorLayout extends JPanel {
cboRunscriptType.setModel(new DefaultComboBoxModel<RunscriptType>(
RunscriptType.values()));
cboRunscriptType.setEditable(true);
- grid.add(new QLabel("Dateinamenserweiterung: ")).fill(false, false)
+ grid.add(new QLabel(I18n.CONFIGURATOR.getString("Startup.Label.scriptType.text"))).fill(false, false)
.expand(false, false);
grid.add(cboRunscriptType).fill(true, false)
.expand(true, false);
@@ -442,7 +442,7 @@ class StartupConfiguratorLayout extends JPanel {
}
});
cboRunscriptVisibility.setModel(new DefaultComboBoxModel<RunscriptVisibility>(RunscriptVisibility.values()));
- grid.add(new QLabel("Sichtbarkeit: ")).fill(false, false)
+ grid.add(new QLabel(I18n.CONFIGURATOR.getString("Startup.Label.visibility.text"))).fill(false, false)
.expand(false, false);
grid.add(cboRunscriptVisibility).fill(true, false)
.expand(true, false);
@@ -457,7 +457,7 @@ class StartupConfiguratorLayout extends JPanel {
grid.add(scpRunScript, 2).fill(true, true).expand(true, true);
grid.nextRow();
- btnPredefinedScripts = new JButton("Vordefinierte Skripte...");
+ btnPredefinedScripts = new JButton(I18n.CONFIGURATOR.getString("Startup.Button.predefinedScripts.text"));
grid.add(btnPredefinedScripts, 2).anchor(GridBagConstraints.LINE_END);
grid.nextRow();
@@ -475,7 +475,8 @@ class StartupConfiguratorLayout extends JPanel {
enum RunscriptType {
- SHELL("Shellskript", "sh"), BATCH("Windows-Batch", "bat");
+ SHELL(I18n.CONFIGURATOR.getString("Startup.ScriptType.shell"), "sh"),
+ BATCH(I18n.CONFIGURATOR.getString("Startup.ScriptType.batch"), "bat");
public final String displayName;
public final String extension;
@@ -492,7 +493,9 @@ enum RunscriptType {
}
enum RunscriptVisibility {
- NORMAL("Normal", 1), MINIMIZED("Minimiert", 2), HIDDEN("Versteckt", 0);
+ NORMAL(I18n.CONFIGURATOR.getString("Startup.ScriptVisibility.normal"), 1),
+ MINIMIZED(I18n.CONFIGURATOR.getString("Startup.ScriptVisibility.minimized"), 2),
+ HIDDEN(I18n.CONFIGURATOR.getString("Startup.ScriptVisibility.hidden"), 0);
public final String displayName;
public final int value;
@@ -504,7 +507,9 @@ enum RunscriptVisibility {
}
enum SoundState {
- DEFAULT("Vorgabe des Pools", -1), MUTED("Stummschalten", 1), UNMUTED("Aktivieren", 0);
+ DEFAULT(I18n.CONFIGURATOR.getString("Startup.SoundState.default"), -1),
+ MUTED(I18n.CONFIGURATOR.getString("Startup.SoundState.muted"), 1),
+ UNMUTED(I18n.CONFIGURATOR.getString("Startup.SoundState.unmuted"), 0);
public final String displayName;
public final int value;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java
index 7ef4a800..3d82e2c9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java
@@ -8,13 +8,7 @@ import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import javax.swing.BoxLayout;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.RowFilter;
-import javax.swing.UIManager;
+import javax.swing.*;
import javax.swing.border.TitledBorder;
import org.apache.log4j.Logger;
@@ -25,6 +19,7 @@ import org.openslx.dozmod.gui.control.table.ImageTable;
import org.openslx.dozmod.gui.control.table.ListTable.ListModel;
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.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.permissions.ImagePerms;
import org.openslx.dozmod.thrift.Session;
@@ -42,6 +37,7 @@ public class ImageListViewer extends QLabel {
protected JTextField txtSearch;
protected JComboBox<FilterType> cboFilter;
protected JLabel imageCountLabel;
+ protected JCheckBox chkSearchInDescription;
// image table
protected ImageTable imageTable;
@@ -81,6 +77,15 @@ public class ImageListViewer extends QLabel {
ImageSummaryRead image = imageTable.getModelRow(entry.getIdentifier());
if (searchFieldPattern.matcher(image.imageName).find())
return true;
+ if (chkSearchInDescription.isSelected()) {
+ String description = image.description;
+ if (description != null) {
+ if (searchFieldPattern.matcher(description).find())
+ return true;
+ } else {
+ LOGGER.debug("Description is null: cannot be searched in description");
+ }
+ }
UserInfo user = UserCache.find(image.ownerId);
if (user == null)
return false;
@@ -95,11 +100,11 @@ public class ImageListViewer extends QLabel {
};
public static enum FilterType {
- ALL("Alle anzeigen"),
- OWN("Nur eigene/zugewiesene anzeigen"),
- USABLE("Nur verwendbare/linkbare anzeigen"),
- EDITABLE("Nur editierbare anzeigen"),
- TEMPLATES("Nur Vorlagen zeigen");
+ ALL(I18n.CONTROL.getString("ImageListViewer.FilterType.all")),
+ OWN(I18n.CONTROL.getString("ImageListViewer.FilterType.own")),
+ USABLE(I18n.CONTROL.getString("ImageListViewer.FilterType.usable")),
+ EDITABLE(I18n.CONTROL.getString("ImageListViewer.FilterType.editable")),
+ TEMPLATES(I18n.CONTROL.getString("ImageListViewer.FilterType.templates"));
private final String name;
@@ -121,7 +126,8 @@ public class ImageListViewer extends QLabel {
// the panel for the table and search field
// the search field and filter combo box
JPanel filterPanel = new JPanel();
- filterPanel.setBorder(new TitledBorder("Suchen"));
+ filterPanel.setBorder(new TitledBorder(
+ I18n.CONTROL.getString("ImageListViewer.TitledBorder.filterPanel.title")));
filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS));
txtSearch = new JTextField();
cboFilter = new JComboBox<FilterType>();
@@ -131,10 +137,15 @@ public class ImageListViewer extends QLabel {
filterPanel.add(txtSearch);
filterPanel.add(cboFilter);
+ // search in description
+ chkSearchInDescription = new JCheckBox(
+ I18n.CONTROL.getString("ImageListViewer.CheckBox.searchInDescription.text"));
+ filterPanel.add(chkSearchInDescription);
+
// Panel for itemCount
JPanel imageCountPanel = new JPanel();
imageCountLabel = new JLabel();
- imageCountPanel.add(new JLabel("Sichtbar:"));
+ imageCountPanel.add(new JLabel(I18n.CONTROL.getString("ImageListViewer.Label.imageCount.text")));
imageCountPanel.add(imageCountLabel);
filterPanel.add(imageCountPanel);
grid.add(filterPanel).fill(true, false).expand(true, false);
@@ -159,7 +170,7 @@ public class ImageListViewer extends QLabel {
searchFieldPattern = null;
} else {
try {
- searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE);
+ searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
txtSearch.setForeground(UIManager.getColor("TextField.foreground"));
} catch (PatternSyntaxException ex) {
txtSearch.setForeground(Color.RED);
@@ -176,6 +187,13 @@ public class ImageListViewer extends QLabel {
}
});
cboFilter.setSelectedItem(defaultFilter == null ? FilterType.USABLE : defaultFilter);
+
+ chkSearchInDescription.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ applyFilterOnTable();
+ }
+ });
}
/**
@@ -255,8 +273,11 @@ public class ImageListViewer extends QLabel {
public ImageTable getImageTable() {
return imageTable;
}
+ public JComboBox getCboFilter() {
+ return cboFilter;
+ }
- protected void setImageCountLabel(int i) {
+ protected void setImageCountLabel(final int i) {
imageCountLabel.setText(Integer.toString(i));
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java
index 863028f0..706a7d13 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java
@@ -26,6 +26,7 @@ import org.openslx.dozmod.gui.changemonitor.AbstractControlWrapper;
import org.openslx.dozmod.gui.changemonitor.DialogChangeMonitor;
import org.openslx.dozmod.gui.control.JCheckBoxTree.CheckChangeEventListener;
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.thrifthelper.Comparators;
@@ -70,9 +71,9 @@ public class LocationSelector extends JPanel {
*/
public LocationSelector() {
btnLimitToLocations = new JRadioButton(
- "Veranstaltung ausschließlich in den ausgewählten Räumen anzeigen");
+ I18n.CONTROL.getString("LocationSelector.RadioButton.limitToLocations.text"));
btnPrioritizeInLocations = new JRadioButton(
- "Veranstaltung mit höherer Priorität in den ausgewählten Räumen anzeigen");
+ I18n.CONTROL.getString("LocationSelector.RadioButton.prioritizeInLocations.text"));
btnPrioritizeInLocations.setSelected(true);
grpLocationExclusive = new ButtonGroup();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java
index 7c53bf96..9148ea4b 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java
@@ -10,6 +10,7 @@ import javax.swing.UIManager;
import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.dozmod.gui.helper.ColorUtil;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.util.FormatHelper;
import org.openslx.dozmod.util.DesktopEnvironment;
@@ -73,7 +74,7 @@ public class PersonLabel extends QLabel {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
setForeground(UIManager.getColor("Label.foreground"));
} else {
- setToolTipText("Klicken, um eine Mail an diese Person zu senden");
+ setToolTipText(I18n.CONTROL.getString("PersonLabel.Label.toolTipText"));
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
setForeground(linkColor);
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ContainerBindMountTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ContainerBindMountTable.java
new file mode 100644
index 00000000..170feba5
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ContainerBindMountTable.java
@@ -0,0 +1,28 @@
+package org.openslx.dozmod.gui.control.table;
+
+import org.openslx.dozmod.model.ContainerBindMount;
+
+import java.util.ArrayList;
+
+public class ContainerBindMountTable extends ListTable<ContainerBindMount> {
+
+ public static final ListTableColumn COL_SOURCE = new ListTableColumn("SOURCE");
+ public static final ListTableColumn COL_TARGET = new ListTableColumn("TARGET");
+ public static final ListTableColumn COL_OPTIONS = new ListTableColumn("OPTIONS");
+
+ public ContainerBindMountTable() {
+ super(COL_SOURCE, COL_TARGET, COL_OPTIONS);
+ // init with empty data list
+ this.setData(new ArrayList<ContainerBindMount>(), false);
+ }
+
+ @Override protected Object getValueAtInternal(ContainerBindMount item, ListTableColumn column) {
+ if (COL_SOURCE == column)
+ return item.getSource();
+ if (COL_TARGET == column)
+ return item.getTarget();
+ if (COL_OPTIONS == column)
+ return item.getOptions();
+ throw new IndexOutOfBoundsException();
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePermissionTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePermissionTable.java
index a2d99355..c539c751 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePermissionTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePermissionTable.java
@@ -2,17 +2,23 @@ package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.ImagePermissions;
import org.openslx.dozmod.gui.control.table.ImagePermissionTable.UserImagePermissions;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.cache.UserCache;
import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class ImagePermissionTable extends ListTable<UserImagePermissions> {
- public static final ListTableColumn COL_USER = new ListTableColumn("Benutzer");
- public static final ListTableColumn COL_LINK = new ListTableColumn("Verlinken", Boolean.class);
- public static final ListTableColumn COL_DOWNLOAD = new ListTableColumn("Download", Boolean.class);
- public static final ListTableColumn COL_EDIT = new ListTableColumn("Bearbeiten", Boolean.class);
- public static final ListTableColumn COL_ADMIN = new ListTableColumn("Admin", Boolean.class);
+ public static final ListTableColumn COL_USER = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePermissionTable.ListTableColumn.user.colName"));
+ public static final ListTableColumn COL_LINK = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePermissionTable.ListTableColumn.link.colName"), Boolean.class);
+ public static final ListTableColumn COL_DOWNLOAD = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePermissionTable.ListTableColumn.download.colName"), Boolean.class);
+ public static final ListTableColumn COL_EDIT = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePermissionTable.ListTableColumn.edit.colName"), Boolean.class);
+ public static final ListTableColumn COL_ADMIN = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePermissionTable.ListTableColumn.admin.colName"), Boolean.class);
public ImagePermissionTable() {
super(COL_USER, COL_LINK, COL_DOWNLOAD, COL_EDIT, COL_ADMIN);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePublishedTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePublishedTable.java
index c25748c1..49b125b8 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePublishedTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImagePublishedTable.java
@@ -4,6 +4,7 @@ import java.util.Comparator;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.bwlp.thrift.iface.UserInfo;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.Sorters;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.dozmod.thrift.cache.OrganizationCache;
@@ -17,11 +18,17 @@ public class ImagePublishedTable extends ListTable<ImageSummaryRead> {
// public static final ListTableColumn COL_USABLE = new ListTableColumn("Verwendbar", Boolean.class);
// public static final ListTableColumn COL_SIZE = new ListTableColumn("Größe", Long.class);
// public static final ListTableColumn COL_LASTCHANGE = new ListTableColumn("Geändert", Long.class);
- public static final ListTableColumn COL_NAME = new ListTableColumn("Name");
- public static final ListTableColumn COL_OS = new ListTableColumn("OS", Integer.class, Sorters.osNameById);
- public static final ListTableColumn COL_OWNER = new ListTableColumn("Besitzer", Sorters.userNameById);
- public static final ListTableColumn COL_UPLOADER = new ListTableColumn("Hochgeladen von", Sorters.userNameById);
- public static final ListTableColumn COL_ORG = new ListTableColumn("Organisation");
+ public static final ListTableColumn COL_NAME = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePublishedTable.ListTableColumn.name.colName"));
+ public static final ListTableColumn COL_OS = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePublishedTable.ListTableColumn.OS.colName"),
+ Integer.class, Sorters.osNameById);
+ public static final ListTableColumn COL_OWNER = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePublishedTable.ListTableColumn.owner.colName"), Sorters.userNameById);
+ public static final ListTableColumn COL_UPLOADER = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePublishedTable.ListTableColumn.uploader.colName"), Sorters.userNameById);
+ public static final ListTableColumn COL_ORG = new ListTableColumn(
+ I18n.CONTROL.getString("ImagePublishedTable.ListTableColumn.organization.colName"));
public ImagePublishedTable() {
super(new Comparator<ImageSummaryRead>() {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java
index 8829876c..9bf9b59e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java
@@ -6,6 +6,7 @@ import javax.swing.Icon;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.Sorters;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.dozmod.thrift.cache.UserCache;
@@ -14,17 +15,28 @@ import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class ImageTable extends ListTable<ImageSummaryRead> {
- public static final ListTableColumn COL_TEMPLATE = new ListTableColumn("Vorlage", Boolean.class);
- public static final ListTableColumn COL_USABLE = new ListTableColumn("Verwendbar", Boolean.class);
- public static final ListTableColumn COL_SIZE = new ListTableColumn("Größe", Long.class);
- public static final ListTableColumn COL_LASTCHANGE = new ListTableColumn("Geändert", Long.class);
- public static final ListTableColumn COL_EXPIRING = new ListTableColumn("Ablaufdatum", Long.class);
- public static final ListTableColumn COL_OWNER = new ListTableColumn("Besitzer", Sorters.userNameById);
- public static final ListTableColumn COL_OS = new ListTableColumn("OS", Integer.class, Sorters.osNameById);
- public static final ListTableColumn COL_NAME = new ListTableColumn("Name");
- public static final ListTableColumn COL_HYPERVISOR = new ListTableColumn("", Icon.class);
- public static final ListTableColumn COL_VERSIONCOUNT = new ListTableColumn("Versionen", Integer.class);
- public static final ListTableColumn COL_TOTALSIZE = new ListTableColumn("Gesamtgröße", Long.class);
+ public static final ListTableColumn COL_TEMPLATE = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.template.colName"), Boolean.class);
+ public static final ListTableColumn COL_USABLE = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.usable.colName"), Boolean.class);
+ public static final ListTableColumn COL_SIZE = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.size.colName"), Long.class);
+ public static final ListTableColumn COL_LASTCHANGE = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.lastChange.colName"), Long.class);
+ public static final ListTableColumn COL_EXPIRING = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.expiring.colName"), Long.class);
+ public static final ListTableColumn COL_OWNER = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.owner.colName"), Sorters.userNameById);
+ public static final ListTableColumn COL_OS = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.OS.colName"), Integer.class, Sorters.osNameById);
+ public static final ListTableColumn COL_NAME = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.name.colName"));
+ public static final ListTableColumn COL_HYPERVISOR = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.hypervisor.colName"), Icon.class);
+ public static final ListTableColumn COL_VERSIONCOUNT = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.versionCount.colName"), Integer.class);
+ public static final ListTableColumn COL_TOTALSIZE = new ListTableColumn(
+ I18n.CONTROL.getString("ImageTable.ListTableColumn.totalSize.colName"), Long.class);
public ImageTable() {
super(new Comparator<ImageSummaryRead>() {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageVersionTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageVersionTable.java
index f69d3c47..ff783370 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageVersionTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageVersionTable.java
@@ -1,18 +1,25 @@
package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.ImageVersionDetails;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.cache.UserCache;
import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class ImageVersionTable extends ListTable<ImageVersionDetails> {
- public static final ListTableColumn COL_CREATED = new ListTableColumn("Erstellungszeitpunkt", Long.class);
- public static final ListTableColumn COL_EXPIRING = new ListTableColumn("Ablaufszeitpunkt", Long.class);
- public static final ListTableColumn COL_UPLOADER = new ListTableColumn("Ersteller");
- public static final ListTableColumn COL_VALID = new ListTableColumn("Verwendbar", Boolean.class);
- public static final ListTableColumn COL_SIZE = new ListTableColumn("Größe", Long.class);
- public static final ListTableColumn COL_ID = new ListTableColumn("Interne ID");
+ public static final ListTableColumn COL_CREATED = new ListTableColumn(
+ I18n.CONTROL.getString("ImageVersionTable.ListTableColumn.created.colName"), Long.class);
+ public static final ListTableColumn COL_EXPIRING = new ListTableColumn(
+ I18n.CONTROL.getString("ImageVersionTable.ListTableColumn.expiring.colName"), Long.class);
+ public static final ListTableColumn COL_UPLOADER = new ListTableColumn(
+ I18n.CONTROL.getString("ImageVersionTable.ListTableColumn.uploader.colName"));
+ public static final ListTableColumn COL_VALID = new ListTableColumn(
+ I18n.CONTROL.getString("ImageVersionTable.ListTableColumn.valid.colName"), Boolean.class);
+ public static final ListTableColumn COL_SIZE = new ListTableColumn(
+ I18n.CONTROL.getString("ImageVersionTable.ListTableColumn.size.colName"), Long.class);
+ public static final ListTableColumn COL_ID = new ListTableColumn(
+ I18n.CONTROL.getString("ImageVersionTable.ListTableColumn.ID.colName"));
public ImageVersionTable() {
super(COL_CREATED, COL_EXPIRING, COL_UPLOADER, COL_VALID, COL_SIZE, COL_ID);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureLdapFilterTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureLdapFilterTable.java
index eb7b71dc..f037263e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureLdapFilterTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureLdapFilterTable.java
@@ -1,13 +1,17 @@
package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.LdapFilter;
+import org.openslx.dozmod.gui.helper.I18n;
@SuppressWarnings("serial")
public class LectureLdapFilterTable extends CheckListTable<LdapFilter> {
- public static final ListTableColumn COL_TITLE = new ListTableColumn("Name");
- public static final ListTableColumn COL_ATTRIBUTE = new ListTableColumn("Attribut");
- public static final ListTableColumn COL_VALUE = new ListTableColumn("Wert");
+ public static final ListTableColumn COL_TITLE = new ListTableColumn(
+ I18n.CONTROL.getString("LectureLdapFilterTable.ListTableColumn.title.colName"));
+ public static final ListTableColumn COL_ATTRIBUTE = new ListTableColumn(
+ I18n.CONTROL.getString("LectureLdapFilterTable.ListTableColumn.attribute.colName"));
+ public static final ListTableColumn COL_VALUE = new ListTableColumn(
+ I18n.CONTROL.getString("LectureLdapFilterTable.ListTableColumn.value.colName"));
public LectureLdapFilterTable() {
super(COL_TITLE, COL_ATTRIBUTE, COL_VALUE);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LecturePermissionTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LecturePermissionTable.java
index 9d8bd2a3..294123f8 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LecturePermissionTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LecturePermissionTable.java
@@ -2,15 +2,19 @@ package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.LecturePermissions;
import org.openslx.dozmod.gui.control.table.LecturePermissionTable.UserLecturePermissions;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.cache.UserCache;
import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class LecturePermissionTable extends ListTable<UserLecturePermissions> {
- public static final ListTableColumn COL_USER = new ListTableColumn("Benutzer");
- public static final ListTableColumn COL_EDIT = new ListTableColumn("Bearbeiten", Boolean.class);
- public static final ListTableColumn COL_ADMIN = new ListTableColumn("Admin", Boolean.class);
+ public static final ListTableColumn COL_USER = new ListTableColumn(
+ I18n.CONTROL.getString("LecturePermissionTable.ListTableColumn.user.colName"));
+ public static final ListTableColumn COL_EDIT = new ListTableColumn(
+ I18n.CONTROL.getString("LecturePermissionTable.ListTableColumn.edit.colName"), Boolean.class);
+ public static final ListTableColumn COL_ADMIN = new ListTableColumn(
+ I18n.CONTROL.getString("LecturePermissionTable.ListTableColumn.admin.colName"), Boolean.class);
public LecturePermissionTable() {
super(COL_USER, COL_EDIT, COL_ADMIN);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureTable.java
index 054e94fc..46cf9552 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/LectureTable.java
@@ -8,6 +8,7 @@ import javax.swing.UIManager;
import org.openslx.bwlp.thrift.iface.LectureSummary;
import org.openslx.dozmod.gui.helper.ColorUtil;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.Sorters;
import org.openslx.dozmod.thrift.cache.UserCache;
@@ -16,12 +17,18 @@ import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class LectureTable extends ListTable<LectureSummary> {
- public static final ListTableColumn COL_NAME = new ListTableColumn("Name");
- public static final ListTableColumn COL_OWNER = new ListTableColumn("Besitzer", Sorters.userNameById);
- public static final ListTableColumn COL_STARTTIME = new ListTableColumn("Startdatum", Long.class);
- public static final ListTableColumn COL_ENDTIME = new ListTableColumn("Ablaufdatum", Long.class);
- public static final ListTableColumn COL_ENABLED = new ListTableColumn("Aktiviert", Boolean.class);
- public static final ListTableColumn COL_VALID = new ListTableColumn("VM gültig", Boolean.class);
+ public static final ListTableColumn COL_NAME = new ListTableColumn(
+ I18n.CONTROL.getString("LectureTable.ListTableColumn.name.colName"));
+ public static final ListTableColumn COL_OWNER = new ListTableColumn(
+ I18n.CONTROL.getString("LectureTable.ListTableColumn.owner.colName"), Sorters.userNameById);
+ public static final ListTableColumn COL_STARTTIME = new ListTableColumn(
+ I18n.CONTROL.getString("LectureTable.ListTableColumn.startTime.colName"), Long.class);
+ public static final ListTableColumn COL_ENDTIME = new ListTableColumn(
+ I18n.CONTROL.getString("LectureTable.ListTableColumn.endTime.colName"), Long.class);
+ public static final ListTableColumn COL_ENABLED = new ListTableColumn(
+ I18n.CONTROL.getString("LectureTable.ListTableColumn.enabled.colName"), Boolean.class);
+ public static final ListTableColumn COL_VALID = new ListTableColumn(
+ I18n.CONTROL.getString("LectureTable.ListTableColumn.valid.colName"), Boolean.class);
private final Font boldFont;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java
index 47062258..8ac6441d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java
@@ -20,6 +20,7 @@ import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableRowSorter;
+import org.openslx.dozmod.Config;
import org.openslx.dozmod.gui.helper.TableColumnAdjuster;
@SuppressWarnings("serial")
@@ -71,6 +72,9 @@ public abstract class ListTable<T> extends JTable {
this.setDefaultEditor(Boolean.class, getDefaultEditor(Boolean.class));
this.setRowSelectionAllowed(true);
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ this.setRowHeight(this.getRowHeight() * Config.getFontScaling() / 100);
+ this.setOpaque(false);
+
sorter.addRowSorterListener(new RowSorterListener() {
@Override
public void sorterChanged(RowSorterEvent e) {
@@ -101,14 +105,14 @@ public abstract class ListTable<T> extends JTable {
}
return itemList;
}
-
+
public T getSelectedItem() {
int rowIndex = getSelectedRow();
if (rowIndex == -1)
return null;
return getViewRow(rowIndex);
}
-
+
public List<T> getData() {
if (model.data == null)
return null;
@@ -192,11 +196,11 @@ public abstract class ListTable<T> extends JTable {
* Called when rendering a column is being prepared. This is a good time to
* change the color or font for the given cell.
*
- * @param component The component representing the cell being rendered
- * @param row item of the row being rendered
+ * @param component The component representing the cell being rendered
+ * @param row item of the row being rendered
* @param listTableColumn column (model-based) of the cell being rendered
- * @param isSelected whether the row is currently selected
- * @return
+ * @param isSelected whether the row is currently selected
+ * @return
*/
public Component prepareRenderHook(Component component, T row, ListTableColumn listTableColumn,
boolean isSelected) {
@@ -209,7 +213,7 @@ public abstract class ListTable<T> extends JTable {
* displayable item. By default this is the identity function, returning the
* value as-is.
*
- * @param value Value to render
+ * @param value Value to render
* @param column Column index (model-based) being rendered
* @return Rendered version of value. This should match the column class
*/
@@ -222,7 +226,8 @@ public abstract class ListTable<T> extends JTable {
Component c = super.prepareRenderer(renderer, row, column);
T item = getViewRow(row);
if (c != null && item != null) {
- c = prepareRenderHook(c, item, model.getColumn(convertColumnIndexToModel(column)), isRowSelected(row));
+ c = prepareRenderHook(c, item, model.getColumn(convertColumnIndexToModel(column)),
+ isRowSelected(row));
}
return c;
}
@@ -275,12 +280,12 @@ public abstract class ListTable<T> extends JTable {
break;
}
}
-
+
@Override
public boolean isCellEditable(int row, int col) {
return columns[col].column.isEditable;
}
-
+
@Override
public void setValueAt(Object aValue, int row, int col) {
if (isCellEditable(row, col)) {
@@ -319,7 +324,7 @@ public abstract class ListTable<T> extends JTable {
return null;
return table.getValueAtInternal(item, columns[columnIndex].column);
}
-
+
public T getModelRow(int rowIndex) {
return table.getModelRow(rowIndex);
}
@@ -354,6 +359,8 @@ public abstract class ListTable<T> extends JTable {
value = modelValueToDisplayFormat(value, model.getColumn(convertColumnIndexToModel(column)));
}
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
+ // If selected the row should be opaque. Otherwise the selection background is not shown.
+ setOpaque(isSelected);
setBorder(null);
return this;
}
@@ -367,7 +374,7 @@ public abstract class ListTable<T> extends JTable {
if (value != null) {
value = modelValueToDisplayFormat(value, model.getColumn(convertColumnIndexToModel(column)));
}
- setIcon((Icon)value);
+ setIcon((Icon) value);
return this;
}
}
@@ -389,8 +396,9 @@ public abstract class ListTable<T> extends JTable {
public ListTableColumn(String colName, Class<?> colClass, Comparator<?> sortComparator) {
this(colName, colClass, sortComparator, false);
}
-
- public ListTableColumn(String colName, Class<?> colClass, Comparator<?> sortComparator, boolean isEditable) {
+
+ public ListTableColumn(String colName, Class<?> colClass, Comparator<?> sortComparator,
+ boolean isEditable) {
this.isEditable = isEditable;
this.colName = colName;
this.colClass = colClass;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/NetshareTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/NetshareTable.java
index 30994eae..3eb56748 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/NetshareTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/NetshareTable.java
@@ -3,19 +3,25 @@ package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.NetShare;
import org.openslx.bwlp.thrift.iface.NetShareAuth;
import org.openslx.dozmod.gui.configurator.NetshareConfigurator;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.Sorters;
import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class NetshareTable extends CheckListTable<NetShare> {
- public static final ListTableColumn COL_NAME = new ListTableColumn("Name");
- public static final ListTableColumn COL_MOUNT = new ListTableColumn("Ziel");
- public static final ListTableColumn COL_PATH = new ListTableColumn("Pfad");
- public static final ListTableColumn COL_AUTH = new ListTableColumn("Authentifizierung",
- Sorters.netShareAuth);
- public static final ListTableColumn COL_USER = new ListTableColumn("Username");
- public static final ListTableColumn COL_PASSWORD = new ListTableColumn("Passwort");
+ public static final ListTableColumn COL_NAME = new ListTableColumn(
+ I18n.CONTROL.getString("NetShareTable.ListTableColumn.name.colName"));
+ public static final ListTableColumn COL_MOUNT = new ListTableColumn(
+ I18n.CONTROL.getString("NetShareTable.ListTableColumn.mount.colName"));
+ public static final ListTableColumn COL_PATH = new ListTableColumn(
+ I18n.CONTROL.getString("NetShareTable.ListTableColumn.path.colName"));
+ public static final ListTableColumn COL_AUTH = new ListTableColumn(
+ I18n.CONTROL.getString("NetShareTable.ListTableColumn.auth.colName"), Sorters.netShareAuth);
+ public static final ListTableColumn COL_USER = new ListTableColumn(
+ I18n.CONTROL.getString("NetShareTable.ListTableColumn.user.colName"));
+ public static final ListTableColumn COL_PASSWORD = new ListTableColumn(
+ I18n.CONTROL.getString("NetShareTable.ListTableColumn.password.colName"));
public NetshareTable() {
super(COL_NAME, COL_PATH, COL_MOUNT, COL_AUTH, COL_USER, COL_PASSWORD);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/UserTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/UserTable.java
index b227916e..000384fa 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/UserTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/UserTable.java
@@ -1,13 +1,16 @@
package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.UserInfo;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class UserTable extends ListTable<UserInfo> {
- public static final ListTableColumn COL_NAME = new ListTableColumn("Name");
- public static final ListTableColumn COL_MAIL = new ListTableColumn("Mail");
+ public static final ListTableColumn COL_NAME = new ListTableColumn(
+ I18n.CONTROL.getString("UserTable.ListTableColumn.name.colName"));
+ public static final ListTableColumn COL_MAIL = new ListTableColumn(
+ I18n.CONTROL.getString("UserTable.ListTableColumn.mail.colName"));
public UserTable() {
super(COL_NAME, COL_MAIL);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/ExpiryDateChooser.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/ExpiryDateChooser.java
index d77e6f9a..855757f9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/ExpiryDateChooser.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/ExpiryDateChooser.java
@@ -58,11 +58,11 @@ class ExpiryDateChooserWindow extends JPanel {
private final GridManager grdPane = new GridManager(pane, 3, true);
private final JSlider sldDaysToExtend = new JSlider(JSlider.HORIZONTAL);
private final QLabel lblNewDate = new QLabel();
- private final QLabel lblNewDateLabel = new QLabel("Neues Ablaufdatum: ");
+ private final QLabel lblNewDateLabel = new QLabel(I18n.HELPER.getString("ExpiryDateChooser.Label.newDate.text"));
private final Component parent;
public ExpiryDateChooserWindow(final Component parent) {
this.parent = parent;
- grdPane.add(new QLabel("Geben Sie ein um wieviele Tage diese Version(en) verlängert werden soll:"), 3)
+ grdPane.add(new QLabel(I18n.HELPER.getString("ExpiryDateChooser.Label.daysToExtend.text")), 3)
.fill(true, true)
.expand(true, true);
grdPane.nextRow();
@@ -91,8 +91,8 @@ class ExpiryDateChooserWindow extends JPanel {
}
});
sldDaysToExtend.setValue(DEFAULT_EXTENSION_DURATION);
- int ret = JOptionPane.showConfirmDialog(parent, pane, "Ablaufdatum verlängern",
- JOptionPane.OK_CANCEL_OPTION);
+ int ret = JOptionPane.showConfirmDialog(parent, pane,
+ I18n.HELPER.getString("ExpiryDateChooser.ConfirmDialog.ret.title"), JOptionPane.OK_CANCEL_OPTION);
if (ret != 0)
return -1;
return sldDaysToExtend.getValue();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java
new file mode 100644
index 00000000..7c76d870
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/I18n.java
@@ -0,0 +1,53 @@
+package org.openslx.dozmod.gui.helper;
+
+import org.apache.log4j.Logger;
+
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+
+/**
+ * Helper enum for loading resource bundle files and getting values from them.
+ */
+public enum I18n {
+ ACTIVITY("activity"),
+ APP("app"),
+ CONFIGURATOR("configurator"),
+ CONTROL("control"),
+ HELPER("helper"),
+ GUI("gui"),
+ PAGE("page"),
+ PAGE_LAYOUT("page_layout"),
+ THRIFT("thrift"),
+ WINDOW("window"),
+ WINDOW_LAYOUT("window_layout"),
+ WIZARD("wizard");
+
+ /**
+ * Logger for this class
+ */
+ private final static Logger LOGGER = Logger.getLogger(I18n.class);
+
+ private final ResourceBundle resourceBundle;
+
+ I18n(String bundleFilename) {
+ String baseName = "i18n." + bundleFilename;
+ resourceBundle = ResourceBundle.getBundle(baseName, new UTF8Control());
+ }
+
+ /**
+ * Returns i18n value for a given key and format the output at the appropriate places for (a) given parameter(s).
+ * If no value found for the given key, return the key.
+ * @param key to get value
+ * @param params to get formatted output
+ * @return value represented by key or key on error
+ */
+ public String getString(String key, Object... params) {
+ try {
+ String value = resourceBundle.getString(key);
+ return MessageFormat.format(value, params);
+ } catch (Exception e) {
+ LOGGER.error("Could not find a value for the given key: " + key);
+ return key;
+ }
+ }
+} \ No newline at end of file
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Language.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Language.java
new file mode 100644
index 00000000..d038f292
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Language.java
@@ -0,0 +1,18 @@
+package org.openslx.dozmod.gui.helper;
+
+/**
+ * List of available languages as an enum.
+ */
+public enum Language {
+ DE_DE(I18n.HELPER.getString("Language.german"), "de_DE"),
+ EN_US(I18n.HELPER.getString("Language.english"), "en_US"),
+ TR_TR(I18n.HELPER.getString("Language.turkish"), "tr_TR");
+
+ public final String displayName;
+ public final String value;
+
+ Language(String name, String value) {
+ this.displayName = name;
+ this.value = value;
+ }
+} \ No newline at end of file
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/MessageType.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/MessageType.java
index 4ac0fbc8..0e0d2dc8 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/MessageType.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/MessageType.java
@@ -5,13 +5,13 @@ import javax.swing.JOptionPane;
import org.apache.log4j.Level;
public enum MessageType {
- DEBUG(JOptionPane.INFORMATION_MESSAGE, -1, "Debug", Level.DEBUG),
- INFO(JOptionPane.INFORMATION_MESSAGE, -1, "Hinweis", Level.INFO),
- WARNING(JOptionPane.WARNING_MESSAGE, -1, "Warnung", Level.WARN),
- WARNING_RETRY(JOptionPane.WARNING_MESSAGE, JOptionPane.OK_CANCEL_OPTION, "Fehler", Level.ERROR),
- ERROR(JOptionPane.ERROR_MESSAGE, -1, "Fehler", Level.ERROR),
- ERROR_RETRY(JOptionPane.ERROR_MESSAGE, JOptionPane.OK_CANCEL_OPTION, "Fehler", Level.ERROR),
- QUESTION_YESNO(JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, "Frage", Level.INFO);
+ DEBUG(JOptionPane.INFORMATION_MESSAGE, -1, I18n.HELPER.getString("MessageType.debug"), Level.DEBUG),
+ INFO(JOptionPane.INFORMATION_MESSAGE, -1, I18n.HELPER.getString("MessageType.info"), Level.INFO),
+ WARNING(JOptionPane.WARNING_MESSAGE, -1, I18n.HELPER.getString("MessageType.warning"), Level.WARN),
+ WARNING_RETRY(JOptionPane.WARNING_MESSAGE, JOptionPane.OK_CANCEL_OPTION, I18n.HELPER.getString("MessageType.warningRetry"), Level.ERROR),
+ ERROR(JOptionPane.ERROR_MESSAGE, -1, I18n.HELPER.getString("MessageType.error"), Level.ERROR),
+ ERROR_RETRY(JOptionPane.ERROR_MESSAGE, JOptionPane.OK_CANCEL_OPTION, I18n.HELPER.getString("MessageType.errorRetry"), Level.ERROR),
+ QUESTION_YESNO(JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, I18n.HELPER.getString("MessageType.questionYesNo"), Level.INFO);
public final String title;
public final int optionPaneId;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/UTF8Control.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/UTF8Control.java
new file mode 100644
index 00000000..2f759323
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/UTF8Control.java
@@ -0,0 +1,54 @@
+package org.openslx.dozmod.gui.helper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.charset.StandardCharsets;
+import java.util.Locale;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+/**
+ * Custom ResourceBundle.Control class to read properties files as UTF-8, where usually ISO-8859-1 is default.
+ */
+public class UTF8Control extends ResourceBundle.Control {
+
+ @Override
+ public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload)
+ throws IllegalAccessException, InstantiationException, IOException {
+ if (!format.equals("java.properties")) {
+ return super.newBundle(baseName, locale, format, loader, reload);
+ }
+
+ String bundleName = toBundleName(baseName, locale);
+ String resourceName = toResourceName(bundleName, "properties");
+
+ ResourceBundle bundle = null;
+ InputStream stream = null;
+
+ if (reload) {
+ URL url = loader.getResource(resourceName);
+ if (url != null) {
+ URLConnection connection = url.openConnection();
+ if (connection != null) {
+ connection.setUseCaches(false);
+ stream = connection.getInputStream();
+ }
+ }
+ } else {
+ stream = loader.getResourceAsStream(resourceName);
+ }
+
+ if (stream != null) {
+ try {
+ bundle = new PropertyResourceBundle(new InputStreamReader(stream, StandardCharsets.UTF_8));
+ } finally {
+ stream.close();
+ }
+ }
+
+ return bundle;
+ }
+} \ No newline at end of file
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/BwIdmLinkWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/BwIdmLinkWindow.java
index d24378ab..04fc2beb 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/BwIdmLinkWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/BwIdmLinkWindow.java
@@ -21,6 +21,7 @@ import org.openslx.dozmod.Branding;
import org.openslx.dozmod.authentication.ShibbolethEcp;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.UiFeedback;
import org.openslx.dozmod.util.DesktopEnvironment;
@@ -29,11 +30,6 @@ import org.openslx.dozmod.util.DesktopEnvironment;
*/
@SuppressWarnings("serial")
public class BwIdmLinkWindow extends JDialog implements UiFeedback {
- private static final String title = "Registrierung erforderlich";
- private static final String infoText = "<html><body style='width:100%'>"
- + "Sie sind nicht bei " + Branding.getServiceName() + " registriert. "
- + "Bitte rufen Sie die angegebene Seite auf um sich zu registrieren und versuchen Sie es erneut."
- + "</body></html>";
protected JButton btnLink;
protected JButton OkButton;
@@ -44,8 +40,8 @@ public class BwIdmLinkWindow extends JDialog implements UiFeedback {
* Don't use this, use static function open instead!
*/
public BwIdmLinkWindow(Frame modalParent) {
- super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL
- : ModalityType.MODELESS);
+ super(modalParent, I18n.WINDOW.getString("BwIdmLink.Dialog.title"),
+ modalParent != null ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
final BwIdmLinkWindow me = this;
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
@@ -57,13 +53,13 @@ public class BwIdmLinkWindow extends JDialog implements UiFeedback {
GridManager grid = new GridManager(contentPanel, 1);
// infotext
- JLabel infoLabel = new JLabel(infoText);
- infoLabel.setBorder(BorderFactory.createTitledBorder("Hinweis"));
+ JLabel infoLabel = new JLabel(I18n.WINDOW.getString("BwIdmLink.Label.info.text", Branding.getServiceName()));
+ infoLabel.setBorder(BorderFactory.createTitledBorder(I18n.WINDOW.getString("BwIdmLink.Label.info.title")));
grid.add(infoLabel).fill(true, true).expand(true, true).anchor(GridBagConstraints.CENTER);
grid.nextRow();
// button for opening the link
- btnLink = new JButton("Seite im Browser öffnen");
+ btnLink = new JButton(I18n.WINDOW.getString("BwIdmLink.Button.link.text"));
btnLink.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -92,7 +88,7 @@ public class BwIdmLinkWindow extends JDialog implements UiFeedback {
bottomPane.add(Box.createHorizontalGlue());
// close/ok button
- OkButton = new JButton("Schließen");
+ OkButton = new JButton(I18n.WINDOW.getString("BwIdmLink.Button.ok.text"));
OkButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ConfigWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ConfigWindow.java
index c8c0d9d0..15d26b92 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ConfigWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ConfigWindow.java
@@ -18,6 +18,8 @@ import org.openslx.dozmod.Config;
import org.openslx.dozmod.Config.ProxyMode;
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.Language;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.UiFeedback;
import org.openslx.dozmod.gui.window.layout.ConfigWindowLayout;
@@ -66,7 +68,7 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
chkSendMeMail.setSelected(false);
}
chkSendMeMail.addActionListener(this);
- lblYourAddress.setText("Ihre Adresse ist " + Session.getEMail());
+ lblYourAddress.setText(I18n.WINDOW.getString("Config.Label.yourAddress.text", Session.getEMail()));
}
// -- END USER CONFIG --
@@ -112,6 +114,15 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
sldConnections.setValue(Config.getTransferConnectionCount());
sldConnections.addChangeListener(changeListener);
+ // Language
+ for (Language language : Language.values()) {
+ if (language.value.equals(Config.getPreferredLanguage())) {
+ cboLanguage.setSelectedItem(language);
+ break;
+ }
+ }
+ cboLanguage.addActionListener(this);
+
// -- BOTTOM BUTTONS --
btnSave.addActionListener(this);
btnClose.addActionListener(this);
@@ -123,7 +134,7 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if (source == btnProxyAuto || source == btnProxyHttp || source == btnProxyNone
- || source == btnProxySocks || source == chkSendMeMail) {
+ || source == btnProxySocks || source == chkSendMeMail || source == cboLanguage) {
reactToInput();
}
if (source == btnSave) {
@@ -140,6 +151,7 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
// first check our initial state
ProxyMode initMode = Config.getProxyMode();
int fontScaling = Config.getFontScaling();
+ Language newLanguage = (Language)cboLanguage.getSelectedItem();
// now check if the buttons represent another state
if (btnProxyNone.isSelected() && initMode != ProxyMode.NONE) {
@@ -154,6 +166,8 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
changed = true;
} else if (!selectedLookAndFeel.getToolTipText().equals(Config.getLookAndFeel())) {
changed = true;
+ } else if (!newLanguage.value.equals(Config.getPreferredLanguage())) {
+ changed = true;
}
// en/disable the save button
@@ -167,7 +181,7 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
userConfig = ThriftManager.getSatClient().getUserConfig(Session.getSatelliteToken());
} catch (TException e) {
ThriftError.showMessage(this, LOGGER, e,
- "Konnte die benutzerspezifische Konfiguration nicht vom Satelliten holen");
+ I18n.WINDOW.getString("Config.Message.error.couldNotGetUserConfFromSat"));
}
return userConfig;
}
@@ -181,7 +195,7 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
userConfig = config;
} catch (TException e) {
ThriftError.showMessage(this, LOGGER, e,
- "Konnte die benutzerspezifische Konfiguration nicht auf dem Satelliten speichern");
+ I18n.WINDOW.getString("Config.Message.error.couldNotSaveUserConfOnSat"));
return false;
}
return true;
@@ -221,9 +235,14 @@ public class ConfigWindow extends ConfigWindowLayout implements UiFeedback, Acti
Config.setLookAndFeel(selectedLookAndFeel.getToolTipText());
}
+ // save language
+ Language newLanguage = (Language)cboLanguage.getSelectedItem();
+ restartRequired = restartRequired || !newLanguage.value.equals(Config.getPreferredLanguage());
+ Config.setPreferredLanguage(newLanguage.value);
+
if (restartRequired) {
// let the user know he needs to restart for the changes to apply
- Gui.showMessageBox(this, "Die Änderungen werden erst nach einem Programmneustart wirksam.",
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Config.Message.info.restartNeededToApplyChanges"),
MessageType.INFO, null, null);
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ContainerBindMountWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ContainerBindMountWindow.java
new file mode 100644
index 00000000..a7c141fb
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ContainerBindMountWindow.java
@@ -0,0 +1,78 @@
+package org.openslx.dozmod.gui.window;
+
+import org.openslx.dozmod.gui.control.table.ContainerBindMountTable;
+import org.openslx.dozmod.gui.helper.TextChangeListener;
+import org.openslx.dozmod.gui.window.layout.ContainerBindMountWindowLayout;
+import org.openslx.dozmod.model.ContainerBindMount;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContainerBindMountWindow extends ContainerBindMountWindowLayout {
+
+ private ContainerBindMountTable bindMountTable;
+
+ public ContainerBindMountWindow(Window modalParent, ContainerBindMountTable bindMountTable) {
+ super(modalParent);
+
+ this.bindMountTable = bindMountTable;
+
+ this.btnSave.setEnabled(false);
+ this.btnSave.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ saveEntry();
+ }
+ });
+ this.btnCancel.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ dispose();
+ }
+ });
+ this.txtBmSource.getDocument().addDocumentListener(new TextChangeListener() {
+ @Override public void changed() {
+ isInputComplete();
+ }
+ });
+ this.txtBmTarget.getDocument().addDocumentListener(new TextChangeListener() {
+ @Override public void changed() {
+ isInputComplete();
+ }
+ });
+
+ }
+
+ // TODO add text if input not finished
+ private boolean isInputComplete() {
+ btnSave.setEnabled(false);
+ if (txtBmSource == null || txtBmSource.getText().isEmpty())
+ return false;
+ if (txtBmTarget == null || txtBmTarget.getText().isEmpty()) {
+ return false;
+ }
+ btnSave.setEnabled(true);
+ return true;
+ }
+
+ private void saveEntry() {
+ ContainerBindMount bindMount = new ContainerBindMount();
+ bindMount.setSource(this.txtBmSource.getText());
+ bindMount.setTarget(this.txtBmTarget.getText());
+ bindMount.setOptions(this.txtBmOptions.getText());
+
+ List<ContainerBindMount> oldData = bindMountTable.getData();
+ List<ContainerBindMount> data = new ArrayList<>(oldData);
+
+ data.add(bindMount);
+ bindMountTable.setData(data, true);
+ dispose();
+ }
+
+ public static void open(Window modalParent, ContainerBindMountTable bindMountTable) {
+ ContainerBindMountWindow win = new ContainerBindMountWindow(modalParent, bindMountTable);
+ win.setVisible(true);
+ }
+
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/GenericNoticeWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/GenericNoticeWindow.java
index 94492d7f..09b22948 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/GenericNoticeWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/GenericNoticeWindow.java
@@ -13,6 +13,7 @@ import javax.swing.JScrollBar;
import org.apache.log4j.Logger;
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.UiFeedback;
import org.openslx.dozmod.gui.window.layout.GenericNoticeWindowLayout;
@@ -50,7 +51,7 @@ public abstract class GenericNoticeWindow extends GenericNoticeWindowLayout impl
});
if (!shouldBeShown) {
chkAgreeBox.setVisible(false);
- btnContinue.setText("Schließen");
+ btnContinue.setText(I18n.WINDOW.getString("GenericNotice.Button.continue.text"));
btnContinue.setEnabled(true);
} else {
disclaimerPanel.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
@@ -86,10 +87,8 @@ public abstract class GenericNoticeWindow extends GenericNoticeWindowLayout impl
*/
private void closeWindow() {
if (shouldBeShown) {
- if (Gui.showMessageBox(me,
- "Wenn diesen rechtlichen Hinweis nicht akzeptieren, können Sie die Software nicht verwenden! "
- + "Sind Sie sicher, dass sie abbrechen wollen?", MessageType.QUESTION_YESNO,
- LOGGER, null)) {
+ if (Gui.showMessageBox(me, I18n.WINDOW.getString("GenericNotice.Message.yesNo.closeWindow"),
+ MessageType.QUESTION_YESNO, LOGGER, null)) {
System.exit(ABORT);
}
} else {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
index f237e8bc..93d9d204 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
@@ -1,5 +1,7 @@
package org.openslx.dozmod.gui.window;
+import java.awt.*;
+import java.awt.event.*;
import java.awt.Color;
import java.awt.Frame;
import java.awt.event.ActionEvent;
@@ -15,12 +17,8 @@ import java.awt.event.WindowEvent;
import java.beans.Encoder;
import java.io.IOException;
import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
+import java.util.*;
import java.util.List;
-import java.util.Map;
import javax.swing.AbstractAction;
import javax.swing.Action;
@@ -40,31 +38,22 @@ import javax.swing.text.html.HTMLEditorKit;
import org.apache.log4j.Logger;
import org.apache.thrift.TException;
-import org.openslx.bwlp.thrift.iface.ImageBaseWrite;
-import org.openslx.bwlp.thrift.iface.ImageDetailsRead;
-import org.openslx.bwlp.thrift.iface.ImagePermissions;
-import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
-import org.openslx.bwlp.thrift.iface.ImageVersionDetails;
-import org.openslx.bwlp.thrift.iface.LectureSummary;
-import org.openslx.bwlp.thrift.iface.OperatingSystem;
-import org.openslx.bwlp.thrift.iface.ShareMode;
-import org.openslx.bwlp.thrift.iface.UserInfo;
-import org.openslx.bwlp.thrift.iface.Virtualizer;
+import org.openslx.bwlp.thrift.iface.*;
import org.openslx.dozmod.Branding;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.changemonitor.AbstractControlWrapper;
import org.openslx.dozmod.gui.changemonitor.DialogChangeMonitor;
import org.openslx.dozmod.gui.changemonitor.DialogChangeMonitor.TextNotEmptyConstraint;
-import org.openslx.dozmod.gui.helper.DateTimeHelper;
-import org.openslx.dozmod.gui.helper.ExpiryDateChooser;
-import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.PopupMenu;
-import org.openslx.dozmod.gui.helper.UiFeedback;
+import org.openslx.dozmod.gui.helper.*;
import org.openslx.dozmod.gui.window.UserListWindow.UserAddedCallback;
import org.openslx.dozmod.gui.window.layout.ImageDetailsWindowLayout;
import org.openslx.dozmod.gui.wizard.ImageUpdateWizard;
import org.openslx.dozmod.gui.wizard.LectureWizard;
+import org.openslx.dozmod.model.ContainerBuildContextMethod;
+import org.openslx.dozmod.model.ContainerDefinition;
+import org.openslx.dozmod.model.ContainerMeta;
import org.openslx.dozmod.permissions.ImagePerms;
import org.openslx.dozmod.thrift.ImageDetailsActions;
import org.openslx.dozmod.thrift.Session;
@@ -86,11 +75,18 @@ import org.openslx.util.QuickTimer.Task;
import org.openslx.util.ThriftUtil;
import org.openslx.util.Util;
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.*;
+
/**
* Window for displaying and editing the details of an image.
*/
-@SuppressWarnings("serial")
-public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFeedback {
+@SuppressWarnings("serial") public class ImageDetailsWindow extends ImageDetailsWindowLayout
+ implements UiFeedback {
private static final Logger LOGGER = Logger.getLogger(ImageDetailsWindow.class);
@@ -135,21 +131,23 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
/**
* Popup menu items
*/
- private final JMenuItem mnuNewLecture = new JMenuItem("Neue Veranstaltung");
- private final JMenuItem mnuDownload = new JMenuItem("Download");
- private final JMenuItem mnuVmConfig = new JMenuItem("VM-Konfiguration");
- private final JMenuItem mnuDelete = new JMenuItem("Löschen");
- private final JMenuItem mnuExtendExpiryDate = new JMenuItem("Ablaufzeitpunkt verlängern");
+ private final JMenuItem mnuNewLecture = new JMenuItem(I18n.WINDOW.getString("ImageDetails.MenuItem.newLecture.text"));
+ private final JMenuItem mnuDownload = new JMenuItem(I18n.WINDOW.getString("ImageDetails.MenuItem.download.text"));
+ private final JMenuItem mnuVmConfig = new JMenuItem(I18n.WINDOW.getString("ImageDetails.MenuItem.vmConfig.text"));
+ private final JMenuItem mnuDelete = new JMenuItem(I18n.WINDOW.getString("ImageDetails.MenuItem.delete.text"));
+ private final JMenuItem mnuExtendExpiryDate = new JMenuItem(I18n.WINDOW.getString("ImageDetails.MenuItem.extendExpirationDate.text"));
private DialogChangeMonitor changeMonitor;
private AbstractControlWrapper<?> changeListenerPermissions;
+ private ContainerDefinition containerDefinition = new ContainerDefinition();
+
/**
* Constructor
- *
+ *
* @param modalParent parent of this popup window
- * @param callback callback to be called when the image details have changed
+ * @param callback callback to be called when the image details have changed
*/
public ImageDetailsWindow(Frame modalParent, ImageUpdatedCallback callback,
ImageDetailsActions actionHandler) {
@@ -159,15 +157,13 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
// Set up change monitor
changeMonitor = new DialogChangeMonitor(new DialogChangeMonitor.Callback() {
- @Override
- public void validityChanged(String errorMessage) {
+ @Override public void validityChanged(String errorMessage) {
lblError.setText(errorMessage);
btnSaveChanges.setEnabled(changeMonitor.isValid() && changeMonitor.wasEverModified());
LOGGER.info("Valid: " + changeMonitor.isValid());
}
- @Override
- public void modificationChanged() {
+ @Override public void modificationChanged() {
btnSaveChanges.setEnabled(changeMonitor.isValid() && changeMonitor.wasEverModified());
LOGGER.info("Changed: " + changeMonitor.isCurrentlyModified());
}
@@ -175,45 +171,40 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
// Hook when user presses X (top right)
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent e) {
+ @Override public void windowClosing(WindowEvent e) {
safeClose();
}
});
- /**
+
+ /*
* Button listeners
*/
btnClose.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
+ @Override public void actionPerformed(ActionEvent e) {
safeClose();
}
});
btnSaveChanges.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
+ @Override public void actionPerformed(ActionEvent e) {
saveChanges();
}
});
btnUpdateImage.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
+ @Override public void actionPerformed(ActionEvent e) {
// FIXME: This will always discard all changes even if you cancel right away
new ImageUpdateWizard(me, image).setVisible(true);
- refresh(true);
+ refresh();
}
});
btnUploadToMaster.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
+ @Override public void actionPerformed(ActionEvent e) {
uploadToMaster();
}
});
btnShowLinkingLectures.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
+ @Override public void actionPerformed(ActionEvent e) {
if (safeClose()) {
LectureListWindow page = MainWindow.showPage(LectureListWindow.class);
page.filterByImageBaseId(image.imageBaseId);
@@ -223,20 +214,17 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
});
btnChangeOwner.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
+ @Override public void actionPerformed(ActionEvent e) {
UserListWindow.open(me, new UserAddedCallback() {
- @Override
- public void userAdded(UserInfo user, UserListWindow window) {
+ @Override public void userAdded(UserInfo user, UserListWindow window) {
window.dispose();
if (Gui.showMessageBox(me,
- "Sind Sie sicher, dass sie die Besitzerrechte an "
- + "einen anderen Benutzer übertragen wollen?",
+ I18n.WINDOW.getString("ImageDetails.Message.yesNo.changeOwner"),
MessageType.QUESTION_YESNO, LOGGER, null))
setImageOwner(user);
}
- }, "Besitzer festlegen", image.ownerId);
+ }, I18n.WINDOW.getString("ImageDetails.Button.changeOwner.caption"), image.ownerId);
}
});
@@ -338,7 +326,7 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
tblVersions.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- /**
+ /*
* Popup menu for the version table on the right side
*/
final PopupMenu pop = new PopupMenu(new ActionListener() {
@@ -348,7 +336,8 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
return;
if (e.getSource().equals(mnuNewLecture)) {
ImageSummaryRead summary = new ImageSummaryRead();
- summary.setImageName(image.getImageName()); // Maybe create a helper class/function some day that transforms all fields
+ summary.setImageName(
+ image.getImageName()); // Maybe create a helper class/function some day that transforms all fields
new LectureWizard(me, summary, selected.getVersionId()).setVisible(true);
}
if (e.getSource().equals(mnuDownload)) {
@@ -381,25 +370,22 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
tblVersions.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "delete");
tblVersions.getActionMap().put("delete", new AbstractAction() {
- @Override
- public void actionPerformed(ActionEvent ae) {
+ @Override public void actionPerformed(ActionEvent ae) {
if (ImagePerms.canEdit(image)) {
deleteVersions(tblVersions.getSelectedItems());
}
}
});
- /**
+ /*
* Mouse adapter for the version table
*/
final MouseAdapter ma = new MouseAdapter() {
- @Override
- public void mousePressed(MouseEvent e) {
+ @Override public void mousePressed(MouseEvent e) {
processClick(e);
}
- @Override
- public void mouseReleased(MouseEvent e) {
+ @Override public void mouseReleased(MouseEvent e) {
processClick(e);
}
@@ -428,11 +414,13 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
mnuNewLecture.setEnabled(
!multiSelection && selectedVersion.isValid && ImagePerms.canLink(image));
mnuDownload.setEnabled(!multiSelection && ImagePerms.canDownload(image));
- mnuVmConfig.setEnabled(!multiSelection && selectedVersion.isValid
- && ImagePerms.canEdit(image)); // Allow VMX edition for downloaded VMs for now
+ mnuVmConfig.setEnabled(
+ !multiSelection && selectedVersion.isValid && ImagePerms.canEdit(
+ image)); // Allow VMX edition for downloaded VMs for now
mnuDelete.setEnabled(ImagePerms.canEdit(image));
- mnuExtendExpiryDate.setEnabled(!multiSelection && (selectedVersion.isValid
- || Session.hasFeature(Feature.EXTEND_EXPIRED_VM)));
+ mnuExtendExpiryDate.setEnabled(
+ !multiSelection && (selectedVersion.isValid || Session.hasFeature(
+ Feature.EXTEND_EXPIRED_VM)));
pop.show(e.getComponent(), e.getX(), e.getY());
}
}
@@ -443,16 +431,18 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
tblVersions.addMouseListener(ma);
// add controls to change monitor to handle user actions
- changeMonitor.add(txtTitle).addConstraint(new TextNotEmptyConstraint("Name darf nicht leer sein"));
- changeMonitor.add(txtDescription)
- .addConstraint(new TextNotEmptyConstraint("Beschreibung darf nicht leer sein"));
+ changeMonitor.add(txtTitle).addConstraint(new TextNotEmptyConstraint(
+ I18n.WINDOW.getString("ImageDetails.TextField.title.error")));
+ changeMonitor.add(txtDescription).addConstraint(new TextNotEmptyConstraint(
+ I18n.WINDOW.getString("ImageDetails.TextField.description.error")));
changeMonitor.add(txtTags);
changeMonitor.addFixedCombo(cboOperatingSystem, Comparators.operatingSystem)
.addConstraint(new DialogChangeMonitor.ValidationConstraint<OperatingSystem>() {
public String checkStateValid(OperatingSystem userInput) {
- if (userInput != null && MetaDataCache.getOsById(userInput.osId) != null) // validating OS coming from the cache makes no sense?
+ if (userInput != null && MetaDataCache.getOsById(userInput.osId)
+ != null) // validating OS coming from the cache makes no sense?
return null;
- return "Ungültiges Betriebssystem ausgewählt!";
+ return I18n.WINDOW.getString("ImageDetails.ComboBox.OS.error");
}
});
changeMonitor.addFixedCombo(cboShareMode, null)
@@ -460,7 +450,7 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
public String checkStateValid(ShareMode userInput) {
if (userInput != null)
return null;
- return "Ungültiges Betriebssystem ausgewählt!";
+ return I18n.WINDOW.getString("ImageDetails.ComboBox.shareMode.error");
}
});
changeMonitor.add(chkIsTemplate);
@@ -472,8 +462,7 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
// update default permissions hook for the permission configurator to apply to newly added users
final ItemListener updateDefaultPermissionsListener = new ItemListener() {
- @Override
- public void itemStateChanged(ItemEvent e) {
+ @Override public void itemStateChanged(ItemEvent e) {
if (e.getSource() == chkDefaultPermLink)
image.defaultPermissions.link = chkDefaultPermLink.isSelected();
if (e.getSource() == chkDefaultPermDownload)
@@ -489,7 +478,7 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
chkDefaultPermEdit.addItemListener(updateDefaultPermissionsListener);
chkDefaultPermAdmin.addItemListener(updateDefaultPermissionsListener);
- /**
+ /*
* Initial state of GUI elements
*/
setFocusable(true);
@@ -507,8 +496,7 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
QuickTimer.scheduleOnce(new Task() {
ByteBuffer machineDescription = null;
- @Override
- public void fire() {
+ @Override public void fire() {
try {
machineDescription = ThriftManager.getSatClient()
.getImageVersionVirtConfig(Session.getSatelliteToken(), selected.versionId);
@@ -518,11 +506,11 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
return;
}
Gui.asyncExec(new Runnable() {
- @Override
- public void run() {
+ @Override public void run() {
if (machineDescription == null) {
- Gui.showMessageBox("Konnte VM-Konfiguration nicht abrufen.", MessageType.ERROR, LOGGER,
- null);
+ Gui.showMessageBox(
+ I18n.WINDOW.getString("ImageDetails.Message.error.couldNotRetrieveVMConfig"),
+ MessageType.ERROR, LOGGER, null);
return;
}
@@ -540,15 +528,55 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
});
}
+ /**
+ * Uploads ByteBuffer data to satellite server and stores it in ImageVersion.VirtConfig
+ * for the given imageVersionId.
+ *
+ * @param imageVersionId Id of the image version, which will be updated.
+ * @param data New virtConfig to store in database.
+ */
+ private void uploadContainerDef(final String imageVersionId, ByteBuffer data) {
+
+ try {
+ ThriftManager.getSatClient()
+ .setImageVersionVirtConfig(Session.getSatelliteToken(), imageVersionId, data);
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Loads binary file ImageVersion.VirtConfig from the Satellites Database.
+ *
+ * @param selected the selected Image Version. TODO: For now only just the latest Version.
+ */
+ private byte[] loadContainerDef(final ImageVersionDetails selected) {
+
+ byte[] rawVirtConfig = null;
+
+ try {
+ ByteBuffer byteBuffer = ThriftManager.getSatClient()
+ .getImageVersionVirtConfig(Session.getSatelliteToken(), selected.versionId);
+ rawVirtConfig = ThriftUtil.unwrapByteBuffer(byteBuffer);
+
+ } catch (TException e) {
+ LOGGER.error(
+ "Failed to retrieve virtualizer config for image version " + "'" + image.latestVersionId
+ + ", see trace: ", e);
+ }
+ return rawVirtConfig;
+ }
+
/********************************************************************************
- *
+ *
* Helper triggering the actual thrift calls
- *
+ *
********************************************************************************/
/**
- * Sets the image to the given imageBaseId. This will also trigger fill() which
- * will set the image details fields to the values represented by this image.
- *
+ * Sets the image to the given imageBaseId. This will also trigger fill()
+ * which will set the image details fields to the values represented by this
+ * image.
+ *
* @param imageBaseId the id of the image to be displayed
*/
public void setImage(final String imageBaseId) {
@@ -579,17 +607,18 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
/**
* Sets the owner of the selected image to the given user.
- *
+ *
* @param user UserInfo to set the owner to
*/
private void setImageOwner(final UserInfo user) {
if (!actionHandler.setImageOwner(image.getImageBaseId(), user)) {
return;
}
- Gui.showMessageBox(me, "Besitzrechte übertragen an " + FormatHelper.userName(user), MessageType.INFO, null,
- null);
+ Gui.showMessageBox(me,
+ I18n.WINDOW.getString("ImageDetails.Message.info.setImageOwner", FormatHelper.userName(user)),
+ MessageType.INFO, null, null);
makeEditable(false);
- refresh(true);
+ refresh();
}
/**
@@ -600,13 +629,13 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
// 04.2018: bail if we the user tries to publish a non-vmware image.
if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS) && !TConst.VIRT_VMWARE.equals(image.virtId)) {
Gui.showMessageBox(
- MetaDataCache.getVirtualizerById(image.virtId).virtName
- + " ist derzeit nicht für den öffentlichen Austausch freigegeben.",
+ I18n.WINDOW.getString("ImageDetails.Message.error.publishNonVMWareImage",
+ MetaDataCache.getVirtualizerById(image.virtId).virtName),
MessageType.ERROR, null, null);
return;
}
if (changeMonitor.isCurrentlyModified()) {
- if (Gui.showMessageBox("Sie haben unspeicherte Änderungen, wollen Sie diese erst speichern?",
+ if (Gui.showMessageBox(I18n.WINDOW.getString("ImageDetails.Message.yesNo.currentlyModified"),
MessageType.QUESTION_YESNO, null, null)) {
if (!saveChangesInternal()) {
return;
@@ -614,34 +643,29 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
}
}
// let the user confirm or abort
- if (!Gui.showMessageBox("Wollen Sie diese VM wirklich landesweit veröffentlichen?", MessageType.QUESTION_YESNO,
- null, null))
+ if (!Gui.showMessageBox(I18n.WINDOW.getString("ImageDetails.Message.yesNo.confirmOrAbort"),
+ MessageType.QUESTION_YESNO, null, null))
return;
// start upload to masterserver
QuickTimer.scheduleOnce(new Task() {
- @Override
- public void fire() {
+ @Override public void fire() {
final String transferId;
try {
- transferId = ThriftManager.getSatClient().publishImageVersion(Session.getSatelliteToken(),
- image.latestVersionId);
+ transferId = ThriftManager.getSatClient()
+ .publishImageVersion(Session.getSatelliteToken(), image.latestVersionId);
} catch (TException e1) {
- ThriftError.showMessage(me, LOGGER, e1, "Upload der VM auf den Masterserver fehlgeschlagen."
- + " Prüfen Sie, ob Sie bei der Registrierung dem landesweiten VM-Austausch zugestimmt haben.\n"
- + " Sie können dies hier überprüfen:\n"
- + DesktopEnvironment.Link.REGISTER_BWIDM.uri.toString() + "\n\n");
+ ThriftError.showMessage(me, LOGGER, e1,
+ I18n.WINDOW.getString("ImageDetails.Message.error.uploadFailed",
+ DesktopEnvironment.Link.REGISTER_BWIDM.uri.toString()));
return;
}
Gui.asyncExec(new Runnable() {
- @Override
- public void run() {
+ @Override public void run() {
MainWindow.addPassiveTransfer(transferId, image.imageName, true);
// Inform user
Gui.showMessageBox(ImageDetailsWindow.this,
- "Die Übertragung läuft direkt zwischen Satellitenserver und" + " dem "
- + Branding.getServiceName() + " Zentral-Server.\n" + "Wenn Sie die "
- + Branding.getApplicationName() + " schließen, wird der Transfer trotzdem"
- + "weiterlaufen.",
+ I18n.WINDOW.getString("ImageDetails.Message.info.passiveTransfer",
+ Branding.getServiceName(), Branding.getApplicationName()),
MessageType.INFO, null, null);
}
});
@@ -694,7 +718,8 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
actionHandler.updateImageBase(image.getImageBaseId(), ibw);
LOGGER.info("Successfully saved new metadata");
} catch (TException e) {
- ThriftError.showMessage(me, LOGGER, e, "Konnte aktualisierte Metadaten nicht an den Server übermitteln");
+ ThriftError.showMessage(me, LOGGER, e,
+ I18n.WINDOW.getString("ImageDetails.Message.error.saveChangesInternal"));
return false;
}
@@ -703,11 +728,44 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
return false;
}
}
+
+ // if image is container
+ // prepare to upload container definition to local satellite server.
+ // TODO
+ if (image.getVirtId().equals(TConst.VIRT_DOCKER))
+ saveContainerDefinition();
+
changeMonitor.reset();
return true;
}
/**
+ * If the user make changes and saves it this method will be executed.
+ * It makes a deep copy of the current containerDefinition to get all settings.
+ * After that, every user setting is set in that copy-object.
+ * If the copy-object and containerDefinition differ, the new settings will be uploaded.
+ */
+ private void saveContainerDefinition() {
+ // TODO do I really need this check? Maybe just get every setting and upload it.
+
+ ContainerDefinition newConDev = new ContainerDefinition(containerDefinition);
+
+ if (newConDev.getBuildContextMethod() == ContainerBuildContextMethod.FILE) {
+ newConDev.setContainerRecipe(txtContainerRecipe.getText());
+ }
+ // currently no update of the git url allowed
+
+ newConDev.getContainerMeta().setImageName(txtContainerImageName.getText());
+ newConDev.getContainerMeta().setRunOptions(txtContainerRun.getText());
+ newConDev.getContainerMeta().setBindMountConfig(bindMountConfigurator.getData());
+
+ if (!newConDev.equals(containerDefinition)) {
+ uploadContainerDef(image.versions.get(0).versionId, newConDev.toByteBuffer());
+ LOGGER.info("Upload new DockerDefinition");
+ }
+ }
+
+ /**
* Helper to save the custom user permissions (those not included in
* ImageBaseWrite).
*
@@ -719,7 +777,8 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
ctlImagePermissionConfigurator.getPermissions());
LOGGER.info("Successfully saved new custom permissions");
} catch (TException e) {
- ThriftError.showMessage(me, LOGGER, e, "Konnte geänderte Berechtigungen nicht an den Server übermitteln");
+ ThriftError.showMessage(me, LOGGER, e,
+ I18n.WINDOW.getString("ImageDetails.Message.error.saveCustomPermissions"));
return false;
}
return true;
@@ -732,7 +791,8 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
*/
private void performImageDownload(ImageVersionDetails selected) {
if (selected.getVersionId() == null) {
- Gui.showMessageBox(this, "Ausgewählte Version ist ungültig", MessageType.ERROR, null, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("ImageDetails.Message.error.performImageDownload"),
+ MessageType.ERROR, null, null);
return;
}
// using actionHandler here is not needed, as this ThriftAction works for
@@ -751,16 +811,15 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
if (version == null)
return;
actionHandler.deleteImageVersion(version, new DeleteCallback() {
- @Override
- public void isDeleted(boolean success) {
- refresh(success);
+ @Override public void isDeleted(boolean success) {
+ refresh();
}
});
}
/**
* Triggers the deletion of a list of versions.
- *
+ *
* @param versions to delete
*/
private void deleteVersions(List<ImageVersionDetails> versions) {
@@ -788,8 +847,8 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
}
int count = 0;
for (ImageVersionDetails img : versions) {
- long currentExpiryTime = img.expireTime < Util.unixTime() ? Util.unixTime() : img.expireTime;
- Date currentExpiryTimeAsDate = DateTimeHelper.endOfDay(new Date(currentExpiryTime * 1000l));
+ long currentExpiryTime = Math.max(img.expireTime, Util.unixTime());
+ Date currentExpiryTimeAsDate = DateTimeHelper.endOfDay(new Date(currentExpiryTime * 1000L));
if (daysToExtend == -1) {
daysToExtend = ExpiryDateChooser.askFutureExpiryDuration(this, currentExpiryTimeAsDate);
if (daysToExtend == -1)
@@ -797,29 +856,32 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
}
currentExpiryTimeAsDate = DateTimeHelper.addDaysTo(currentExpiryTimeAsDate, daysToExtend);
try {
- ThriftManager.getSatClient().setImageVersionExpiry(Session.getSatelliteToken(), img.versionId,
- currentExpiryTimeAsDate.getTime() / 1000L);
+ ThriftManager.getSatClient()
+ .setImageVersionExpiry(Session.getSatelliteToken(), img.versionId,
+ currentExpiryTimeAsDate.getTime() / 1000L);
count++;
} catch (TException e) {
ThriftError.showMessage(this, LOGGER, e,
- "Konnte Ablaufdatum der Version " + img.versionId + " nicht verlängern.");
+ I18n.WINDOW.getString("ImageDetails.Message.error.extendVersionExpiry", img.versionId));
}
}
if (count > 0) {
- Gui.showMessageBox(this, "Erfolgreich verlängerte Abbilder: " + count, MessageType.INFO, null, null);
- refresh(true);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("ImageDetails.Message.info.extendVersionExpiry", count),
+ MessageType.INFO, null, null);
+ refresh();
}
}
/********************************************************************************
- *
+ *
* General UI helpers
- *
+ *
********************************************************************************/
+
/**
- * @param forceRefresh
+ *
*/
- private void refresh(boolean forceRefresh) {
+ private void refresh() {
String baseId = image.getImageBaseId();
synchronized (me) {
image = null;
@@ -865,6 +927,45 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
if (virt != null)
lblVirtualizer.setText(virt.getVirtName());
+ if (TConst.VIRT_DOCKER.equals(image.getVirtId())) {
+ lblVirtualizer.setText(TConst.VIRT_DOCKER);
+ showContainerTab();
+
+ if (image.versions.isEmpty()) {
+ LOGGER.info("Close Window because no ImageVersions available!");
+ dispose();
+ return;
+ }
+ // TODO if only a single version is created an the user deletes it, next line will out of bounce!
+ containerDefinition = ContainerDefinition.fromByteArray(loadContainerDef(image.versions.get(0)));
+
+ ContainerMeta containerMeta = containerDefinition.getContainerMeta();
+ ContainerBuildContextMethod method = ContainerBuildContextMethod.fromInt(
+ containerMeta.getBuildContextMethod());
+
+ switch (method) {
+ case FILE:
+ txtContainerRecipe.setText(containerDefinition.getContainerRecipe());
+ break;
+ case GIT_REPOSITORY:
+ txtContainerRecipe.setText(containerMeta.getBuildContextUrl());
+ txtContainerRecipe.setEnabled(false);
+ break;
+ }
+
+ txtContainerImageName.setText(containerMeta.getImageName());
+ txtContainerRun.setText(containerMeta.getRunOptions());
+ bindMountConfigurator.setData(containerMeta.getBindMountConfig(), true);
+
+ changeMonitor.add(txtContainerRecipe).
+ addConstraint(new TextNotEmptyConstraint(I18n.WINDOW.getString("ImageDetails.Constraint.NoEmptyDockerfile.text")));
+ changeMonitor.add(txtContainerImageName)
+ .addConstraint(new TextNotEmptyConstraint(I18n.WINDOW.getString("ImageDetails.Constraint.NoEmptyName.text")));
+ changeMonitor.add(txtContainerRun)
+ .addConstraint(new TextNotEmptyConstraint(I18n.WINDOW.getString("ImageDetails.Constraint.NoEmptyRunOptions.text")));
+ changeMonitor.add(bindMountConfigurator);
+ }
+
// fill share mode combo, if not already done
if (cboShareMode.getItemCount() == 0) {
for (ShareMode mode : ShareMode.values()) {
@@ -913,14 +1014,14 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
/**
* Enables/disables the editable fields based on 'editable'
- *
+ *
* @param editable true to make fields editable, false otherwise.
*/
private void makeEditable(boolean editable) {
// always disable all buttons unless image's share mode is LOCAL or PUBLISH
- if (image != null)
+ if (image != null) {
editable &= image.shareMode == ShareMode.LOCAL || image.shareMode == ShareMode.PUBLISH;
-
+ }
// now do the regular permission check
editable = editable && (ImagePerms.canEdit(image) || ImagePerms.canAdmin(image));
txtTitle.setEditable(editable);
@@ -938,12 +1039,19 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
btnUpdateImage.setEnabled(editable);
if (actionHandler.isImagePublishSupported())
btnUploadToMaster.setEnabled(editable);
+
+ if (image != null && TConst.VIRT_DOCKER.equals(image.getVirtId())) {
+ // TODO Currently, do not allow user to upload a new version or share an Container Image.
+ btnUpdateImage.setEnabled(false);
+ btnUploadToMaster.setEnabled(false);
+ }
+
}
/**
* Opens a new ImageDetailsWindow showing the details of the image with ID =
* imageBaseId
- *
+ *
* @param modalParent parent of this window
* @param imageBaseId id of the image to set the details of
*/
@@ -954,18 +1062,13 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
win.setVisible(true);
}
- /*
- * *****************************************************************************
- * **
- *
+ /* *******************************************************************************
+ *
* Dialog class overrides
- *
- * *****************************************************************************
- * **
+ *
+ * *******************************************************************************
*/
- @SuppressWarnings("deprecation")
- @Override
- public void show() {
+ @SuppressWarnings("deprecation") @Override public void show() {
if (!isVisible()) {
pack();
MainWindow.centerShell(this);
@@ -973,22 +1076,17 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
super.show();
}
- /*
- * *****************************************************************************
- * **
- *
+ /* *******************************************************************************
+ *
* UIFeedback implementation
- *
- * *****************************************************************************
- * **
+ *
+ * *******************************************************************************
*/
- @Override
- public boolean wantConfirmQuit() {
+ @Override public boolean wantConfirmQuit() {
return changeMonitor.isCurrentlyModified();
}
- @Override
- public void escapePressed() {
+ @Override public void escapePressed() {
safeClose();
}
@@ -997,8 +1095,9 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
* confirmation if so
*/
private boolean safeClose() {
- if (changeMonitor.isCurrentlyModified() && !Gui.showMessageBox(me,
- "Änderungen werden verworfen, wollen Sie wirklich schließen?", MessageType.QUESTION_YESNO, null, null))
+ if (changeMonitor.isCurrentlyModified()
+ && !Gui.showMessageBox(me, I18n.WINDOW.getString("ImageDetails.Message.yesNo.safeClose"),
+ MessageType.QUESTION_YESNO, null, null))
return false;
dispose();
return true;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java
index 50034bf0..9167565a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java
@@ -24,6 +24,7 @@ import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.control.table.ImageTable;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.PopupMenu;
import org.openslx.dozmod.gui.window.ImageDetailsWindow.ImageUpdatedCallback;
@@ -62,10 +63,10 @@ public class ImageListWindow extends ImageListWindowLayout implements DownloadCa
/**
* Popup menu items
*/
- private final JMenuItem popupItemNewLecture = new JMenuItem("Neue Veranstaltung");
- private final JMenuItem popupItemEdit = new JMenuItem("Detailansicht");
- private final JMenuItem popupItemDelete = new JMenuItem("Löschen");
- private final JMenuItem popupItemDownload = new JMenuItem("Download");
+ private final JMenuItem popupItemNewLecture = new JMenuItem(I18n.WINDOW.getString("ImageList.MenuItem.newLecture.text"));
+ private final JMenuItem popupItemEdit = new JMenuItem(I18n.WINDOW.getString("ImageList.MenuItem.edit.text"));
+ private final JMenuItem popupItemDelete = new JMenuItem(I18n.WINDOW.getString("ImageList.MenuItem.delete.text"));
+ private final JMenuItem popupItemDownload = new JMenuItem(I18n.WINDOW.getString("ImageList.MenuItem.download.text"));
/**
* Constructor
@@ -251,7 +252,7 @@ public class ImageListWindow extends ImageListWindowLayout implements DownloadCa
if (image == null)
return false;
if (image.getLatestVersionId() == null) {
- Gui.showMessageBox(me, "Die gewählte VM besitzt keine gültige Image-Version",
+ Gui.showMessageBox(me, I18n.WINDOW.getString("ImageList.Message.error.hasLatestVersion"),
MessageType.ERROR, null, null);
return false;
}
@@ -276,7 +277,7 @@ public class ImageListWindow extends ImageListWindowLayout implements DownloadCa
popupItemDownload.setEnabled(download);
popupItemNewLecture.setEnabled(link);
popupItemDelete.setEnabled(delete);
- btnEditDetails.setEnabled(selCount == 1);
+ btnEditDetails.setEnabled(selCount == 1);
btnShowPublishedImages.setEnabled(true);
}
@@ -379,7 +380,7 @@ public class ImageListWindow extends ImageListWindowLayout implements DownloadCa
}
}
if (failedToDeleteAll) {
- Gui.showMessageBox("Folgende images konnten nicht gelöscht werden: " + builder.toString(),
+ Gui.showMessageBox(I18n.WINDOW.getString("ImageList.Message.info.deleteImages", builder.toString()),
MessageType.INFO, LOGGER, null);
}
ctlImageListViewer.refreshList(deletedAtLeastOne, 1000);
@@ -418,7 +419,11 @@ public class ImageListWindow extends ImageListWindowLayout implements DownloadCa
// we need to enable the "Show published images" button here, since we need to check
// Session.getSatApiVersion() which is not set when this class is instantiated
ctlImageListViewer.refreshList(false, 1);
- btnShowPublishedImages.setVisible(Session.isImagePublishSupported());
+ if(!Session.canListImages())
+ {
+ btnShowPublishedImages.setVisible(false);
+ } else {
+ btnShowPublishedImages.setVisible(Session.isImagePublishSupported());
+ }
}
-
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
index b02b5cf7..079329c7 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
@@ -31,6 +31,7 @@ import org.openslx.dozmod.Branding;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.control.table.ListTable.ListModel;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.gui.helper.UiFeedback;
@@ -113,15 +114,14 @@ public class ImagePublishedWindow extends ImagePublishedWindowLayout implements
transferToken = ThriftManager.getSatClient()
.requestImageReplication(Session.getSatelliteToken(), item.latestVersionId);
} catch (TException ex) {
- ThriftError.showMessage(me, LOGGER, ex, "Could not start download");
+ ThriftError.showMessage(me, LOGGER, ex,
+ I18n.WINDOW.getString("ImagePublished.Message.error.satDownload"));
return;
}
MainWindow.addPassiveTransfer(transferToken, item.imageName, false);
Gui.showMessageBox(ImagePublishedWindow.this,
- "Die Übertragung läuft direkt zwischen Satellitenserver und"
- + " dem " + Branding.getServiceName() + " Zentral-Server.\n"
- + "Wenn Sie die " + Branding.getApplicationName() + " schließen, wird der Transfer trotzdem"
- + "weiterlaufen.",
+ I18n.WINDOW.getString("ImagePublished.Message.info.satDownload", Branding.getServiceName(),
+ Branding.getApplicationName()),
MessageType.INFO, null, null);
}
});
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureChangeImage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureChangeImage.java
index a2654896..41532b6f 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureChangeImage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureChangeImage.java
@@ -19,6 +19,7 @@ import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.changemonitor.DialogChangeMonitor;
import org.openslx.dozmod.gui.changemonitor.GenericControlWindow;
import org.openslx.dozmod.gui.control.table.ImageTable;
+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.layout.LectureChangeImageLayout;
@@ -78,10 +79,12 @@ public class LectureChangeImage extends LectureChangeImageLayout implements UiFe
dispose();
} else {
if (!image.isValid) {
- Gui.showMessageBox(LectureChangeImage.this, "Ausgewählte VM ist ungültig!", MessageType.ERROR,
- LOGGER, null);
+ Gui.showMessageBox(LectureChangeImage.this,
+ I18n.WINDOW.getString("LectureChangeImage.Message.error.imageInvalid"),
+ MessageType.ERROR, LOGGER, null);
} else {
- Gui.showMessageBox(LectureChangeImage.this, "Keine Rechte zum Verlinken auf die ausgewählte VM.",
+ Gui.showMessageBox(LectureChangeImage.this,
+ I18n.WINDOW.getString("LectureChangeImage.Message.error.canNotLinkToVM"),
MessageType.ERROR, LOGGER, null);
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
index b0f9e5fc..dbbdec5e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureDetailsWindow.java
@@ -52,6 +52,7 @@ import org.openslx.dozmod.gui.changemonitor.DialogChangeMonitor.ValidationConstr
import org.openslx.dozmod.gui.configurator.NetrulesConfigurator.StateWrapper;
import org.openslx.dozmod.gui.configurator.StartupConfigurator.StartupSettings;
import org.openslx.dozmod.gui.helper.DateTimeHelper;
+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.UserListWindow.UserAddedCallback;
@@ -160,7 +161,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
public String checkStateValid(ImageVersionDetails userInput) {
if (userInput != null && userInput.isValid)
return null;
- return "Keine/Ungültige VM-Version ausgewählt";
+ return I18n.WINDOW.getString("LectureDetails.ComboBox.versions.error");
}
});
// Create constraint for date start/end
@@ -173,9 +174,10 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
Date start = DateTimeHelper.getDateFrom(dtpStartDate, spnStartTime);
Date end = DateTimeHelper.getDateFrom(dtpEndDate, spnEndTime);
if (!end.after(start))
- return "Enddatum darf nicht vor dem Startdatum liegen";
+ return I18n.WINDOW.getString("LectureDetails.Message.error.endAfterStart");
if (end.after(maxValidity))
- return "Enddatum liegt nach dem " + FormatHelper.shortDate(maxValidity);
+ return I18n.WINDOW.getString("LectureDetails.Message.error.endAfterMaxValidity",
+ FormatHelper.shortDate(maxValidity));
return null;
}
};
@@ -186,16 +188,16 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
changeMonitor.add(chkIsActive);
changeMonitor.add(chkCustomPermAdmin);
changeMonitor.add(chkCustomPermEdit);
- changeMonitor.add(txtTitle)
- .addConstraint(new TextNotEmptyConstraint("Veranstaltungsname darf nicht leer sein"));
- changeMonitor.add(txtDescription)
- .addConstraint(new TextNotEmptyConstraint("Beschreibung darf nicht leer sein"));
+ changeMonitor.add(txtTitle).addConstraint(new TextNotEmptyConstraint(
+ I18n.WINDOW.getString("LectureDetails.TextField.title.error")));
+ changeMonitor.add(txtDescription).addConstraint(new TextNotEmptyConstraint(
+ I18n.WINDOW.getString("LectureDetails.TextField.description.error")));
changeMonitor.add(dtpEndDate).addConstraint(dateRangeValidator);
changeMonitor.add(dtpStartDate).addConstraint(dateRangeValidator);
changeMonitor.add(spnEndTime).addConstraint(dateRangeValidator);
changeMonitor.add(spnStartTime).addConstraint(dateRangeValidator);
- changeMonitor.add(ctlNetrulesConfigurator)
- .addConstraint(new NotNullConstraint<StateWrapper>("Fehlerhafte Netzwerkregeln"));
+ changeMonitor.add(ctlNetrulesConfigurator).addConstraint(new NotNullConstraint<StateWrapper>(
+ I18n.WINDOW.getString("LectureDetails.NetRulesConfigurator.error")));
changeListenerPermissions = changeMonitor.add(ctlPermissionManager);
ctlLocationSelector.addToChangeMonitor(changeMonitor);
ctlRunscriptConfigurator.addToChangeMonitor(changeMonitor);
@@ -267,13 +269,11 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
@Override
public void userAdded(UserInfo user, UserListWindow window) {
window.dispose();
- if (Gui.showMessageBox(me,
- "Sind Sie sicher, dass sie die Besitzerrechte an "
- + "einen anderen Account übertragen wollen?",
+ if (Gui.showMessageBox(me, I18n.WINDOW.getString("LectureDetails.Message.yesNo.changeOwner"),
MessageType.QUESTION_YESNO, LOGGER, null))
setLectureOwner(user);
}
- }, "Besitzer festlegen", lecture.ownerId);
+ }, I18n.WINDOW.getString("LectureDetails.Button.changeOwner.caption"), lecture.ownerId);
}
});
@@ -497,7 +497,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
// now enable the tabs the user can see given its permissions
toggleEditable(true);
// and always switch to the "About" tab
- pnlTabs.setSelectedIndex(pnlTabs.indexOfTab("Übersicht"));
+ pnlTabs.setSelectedIndex(pnlTabs.indexOfTab(I18n.WINDOW_LAYOUT.getString("LectureDetails.Tab.info.title")));
setVisible(true);
changeMonitor.reset();
}
@@ -545,8 +545,9 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
return;
}
// success
- Gui.showMessageBox(me, "Besitzrechte übertragen an " + FormatHelper.userName(user), MessageType.INFO, null,
- null);
+ Gui.showMessageBox(me,
+ I18n.WINDOW.getString("LectureDetails.Message.info.setLectureOwner", FormatHelper.userName(user)),
+ MessageType.INFO, null, null);
toggleEditable(false);
String lectureId = lecture.getLectureId();
synchronized (me) {
@@ -561,7 +562,8 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
*/
private void performImageDownload() {
if (image == null) {
- Gui.showMessageBox(this, "VM ungültig.", MessageType.ERROR, null, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("LectureDetails.Message.error.imageInvalid"),
+ MessageType.ERROR, null, null);
return;
}
btnDownloadImage.setEnabled(false);
@@ -569,7 +571,8 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
for (ImageVersionDetails version : image.versions) {
if (version.versionId.equals(lecture.imageVersionId)) {
if (!version.isValid) {
- Gui.showMessageBox(this, "Ungültige VM-Version gewählt", MessageType.ERROR, null, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("LectureDetails.Message.error.imageVersionInvalid"),
+ MessageType.ERROR, null, null);
return;
}
versionSize = version.fileSize;
@@ -577,8 +580,8 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
}
}
if (versionSize == 0) {
- Gui.showMessageBox(this, "Fehler bei der Abfrage der Größe des VM-Abbildes.", MessageType.ERROR, null,
- null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("LectureDetails.Message.error.imageVersionFileSizeInvalid"),
+ MessageType.ERROR, null, null);
return;
}
ThriftActions.initDownload(JOptionPane.getFrameForComponent(this), lecture.imageVersionId, image.imageName,
@@ -658,7 +661,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
LOGGER.info("Successfully saved new metadata");
} catch (TException e) {
ThriftError.showMessage(JOptionPane.getFrameForComponent(this), LOGGER, e,
- "Fehler beim Speichern der Veranstaltung!");
+ I18n.WINDOW.getString("LectureDetails.Message.error.saveChangesInternal"));
return false;
}
@@ -684,7 +687,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
return true;
} catch (TException e) {
ThriftError.showMessage(JOptionPane.getFrameForComponent(this), LOGGER, e,
- "Fehler beim Übertragen der Berechtigungen!");
+ I18n.WINDOW.getString("LectureDetails.Message.error.saveCustomPermissions"));
}
return false;
}
@@ -704,7 +707,7 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
// analyse time stuff to see if its valid
if (end > start)
return true;
- String msg = "Start der Veranstaltung ist nach dem Enddatum!";
+ String msg = I18n.WINDOW.getString("LectureDetails.Message.error.isPeriodValid");
if (feedback) {
Gui.showMessageBox(me, msg, MessageType.ERROR, LOGGER, null);
}
@@ -790,8 +793,9 @@ public class LectureDetailsWindow extends LectureDetailsWindowLayout implements
* confirmation if so
*/
private void safeClose() {
- if (changeMonitor.isCurrentlyModified() && !Gui.showMessageBox(me,
- "Änderungen werden verworfen, wollen Sie wirklich schließen?", MessageType.QUESTION_YESNO, null, null))
+ if (changeMonitor.isCurrentlyModified()
+ && !Gui.showMessageBox(me, I18n.WINDOW.getString("LectureDetails.Message.yesNo.safeClose"),
+ MessageType.QUESTION_YESNO, null, null))
return;
synchronized (me) {
lecture = null;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
index 31ff7702..ff1a3635 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
@@ -35,6 +35,7 @@ import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.control.table.ListTable.ListModel;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.PopupMenu;
import org.openslx.dozmod.gui.helper.TextChangeListener;
@@ -65,32 +66,32 @@ public class LectureListWindow extends LectureListWindowLayout {
// Filter types as an enum
public enum FilterType {
- ALL("Alle anzeigen", null),
- OWN("Nur eigene/zugewiesene anzeigen", new RowFilter<ListModel<LectureSummary>, Integer>() {
+ ALL(I18n.WINDOW.getString("LectureList.FilterType.all"), null),
+ OWN(I18n.WINDOW.getString("LectureList.FilterType.own"), new RowFilter<ListModel<LectureSummary>, Integer>() {
public boolean include(Entry<? extends ListModel<LectureSummary>, ? extends Integer> entry) {
LectureSummary lecture = entry.getModel().getModelRow(entry.getIdentifier());
return lecture.userPermissions.admin || lecture.ownerId.equals(Session.getUserId());
}
}),
- ACTIVE("Nur aktive anzeigen", new RowFilter<ListModel<LectureSummary>, Integer>() {
+ ACTIVE(I18n.WINDOW.getString("LectureList.FilterType.active"), new RowFilter<ListModel<LectureSummary>, Integer>() {
public boolean include(Entry<? extends ListModel<LectureSummary>, ? extends Integer> entry) {
LectureSummary lecture = entry.getModel().getModelRow(entry.getIdentifier());
return lecture.isEnabled && lecture.endTime > Util.unixTime();
}
}),
- EDITABLE("Nur editierbare anzeigen", new RowFilter<ListModel<LectureSummary>, Integer>() {
+ EDITABLE(I18n.WINDOW.getString("LectureList.FilterType.editable"), new RowFilter<ListModel<LectureSummary>, Integer>() {
public boolean include(Entry<? extends ListModel<LectureSummary>, ? extends Integer> entry) {
LectureSummary lecture = entry.getModel().getModelRow(entry.getIdentifier());
return LecturePerms.canEdit(lecture);
}
}),
- EXPIRING("Bald auslaufende anzeigen", new RowFilter<ListModel<LectureSummary>, Integer>() {
+ EXPIRING(I18n.WINDOW.getString("LectureList.FilterType.expiring"), new RowFilter<ListModel<LectureSummary>, Integer>() {
public boolean include(Entry<? extends ListModel<LectureSummary>, ? extends Integer> entry) {
LectureSummary lecture = entry.getModel().getModelRow(entry.getIdentifier());
return Math.abs(lecture.endTime - Util.unixTime()) < 86400 * 7;
}
}),
- EXAMS("Prüfungsveranstaltungen anzeigen", new RowFilter<ListModel<LectureSummary>, Integer>() {
+ EXAMS(I18n.WINDOW.getString("LectureList.FilterType.exams"), new RowFilter<ListModel<LectureSummary>, Integer>() {
public boolean include(Entry<? extends ListModel<LectureSummary>, ? extends Integer> entry) {
LectureSummary lecture = entry.getModel().getModelRow(entry.getIdentifier());
return lecture.isExam;
@@ -119,6 +120,15 @@ public class LectureListWindow extends LectureListWindowLayout {
LectureSummary lecture = tblLectures.getModelRow(entry.getIdentifier());
if (searchFieldPattern.matcher(lecture.lectureName).find())
return true;
+ if (chkSearchInDescription.isSelected()) {
+ String description = lecture.description;
+ if (description != null) {
+ if (searchFieldPattern.matcher(description).find())
+ return true;
+ } else {
+ LOGGER.debug("Description is null: cannot be searched in description");
+ }
+ }
UserInfo user = UserCache.find(lecture.ownerId);
if (user == null)
return false;
@@ -135,11 +145,11 @@ public class LectureListWindow extends LectureListWindowLayout {
/**
* Popup menu items
*/
- private JMenuItem popupItemNew = new JMenuItem("Neu");
- private JMenuItem popupItemEdit = new JMenuItem("Detailansicht");
- private JMenuItem popupItemLinked = new JMenuItem("VM-Details anzeigen");
- private JMenuItem popupItemDownload = new JMenuItem("Verlinkte VM herunterladen");
- private JMenuItem popupItemDelete = new JMenuItem("Löschen");
+ private JMenuItem popupItemNew = new JMenuItem(I18n.WINDOW.getString("LectureList.MenuItem.new.text"));
+ private JMenuItem popupItemEdit = new JMenuItem(I18n.WINDOW.getString("LectureList.MenuItem.edit.text"));
+ private JMenuItem popupItemLinked = new JMenuItem(I18n.WINDOW.getString("LectureList.MenuItem.linked.text"));
+ private JMenuItem popupItemDownload = new JMenuItem(I18n.WINDOW.getString("LectureList.MenuItem.download.text"));
+ private JMenuItem popupItemDelete = new JMenuItem(I18n.WINDOW.getString("LectureList.MenuItem.delete.text"));
public LectureListWindow() {
super();
@@ -155,7 +165,7 @@ public class LectureListWindow extends LectureListWindowLayout {
searchFieldPattern = null;
} else {
try {
- searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE);
+ searchFieldPattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
txtSearch.setForeground(UIManager.getColor("TextField.foreground"));
} catch (PatternSyntaxException ex) {
txtSearch.setForeground(Color.RED);
@@ -173,6 +183,13 @@ public class LectureListWindow extends LectureListWindowLayout {
}
});
+ chkSearchInDescription.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ applyFilterOnTable();
+ }
+ });
+
btnNewLecture.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -212,8 +229,7 @@ public class LectureListWindow extends LectureListWindowLayout {
if (lecture == null)
return;
if (e.getSource().equals(popupItemNew)) {
- if (Gui.showMessageBox(me, "Um eine Veranstaltung zu erstellen, "
- + "müssen Sie eine VM auswählen. Zur VM-Auswahl wechseln?",
+ if (Gui.showMessageBox(me, I18n.WINDOW.getString("LectureList.Message.yesNo.switchView"),
MessageType.QUESTION_YESNO, LOGGER, null)) {
MainWindow.showPage(ImageListWindow.class);
}
@@ -263,7 +279,8 @@ public class LectureListWindow extends LectureListWindowLayout {
public void mouseClicked(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2) {
if (!Session.canListImages()) {
- Gui.showMessageBox("Ihnen fehlen die benötigten Berechtigungen.", MessageType.ERROR, LOGGER, null);
+ Gui.showMessageBox(I18n.WINDOW.getString("LectureList.Message.error.canNotListImages"),
+ MessageType.ERROR, LOGGER, null);
return;
}
openLectureDetails(tblLectures.getSelectedItem());
@@ -363,10 +380,14 @@ public class LectureListWindow extends LectureListWindowLayout {
btnEditLecture.setEnabled(Session.canListImages() && singleSelection);
btnDeleteLecture.setEnabled(admin || !singleSelection);
popupItemDelete.setEnabled(admin || !singleSelection);
- popupItemLinked.setEnabled(Session.canListImages() && singleSelection);
- popupItemDownload.setEnabled(Session.canListImages() && singleSelection);
- popupItemNew.setEnabled(Session.canListImages() && singleSelection);
+ popupItemDelete.setVisible(admin || !singleSelection);
+ popupItemLinked.setEnabled(Session.canListImages());
+ popupItemLinked.setVisible(Session.canListImages());
+ popupItemDownload.setEnabled(singleSelection);
+ popupItemNew.setEnabled(Session.canListImages());
+ popupItemNew.setVisible(Session.canListImages());
popupItemEdit.setEnabled(Session.canListImages() && singleSelection);
+ popupItemEdit.setVisible(Session.canListImages() && singleSelection);
}
/**
@@ -402,12 +423,13 @@ public class LectureListWindow extends LectureListWindowLayout {
for (LectureSummary lecture : fLectures.keySet()) {
builder.append("\n\n");
builder.append(lecture.lectureName + " \n" );
- builder.append("Begründung: " + fLectures.get(lecture).getLocalizedMessage());
+ builder.append(I18n.WINDOW.getString("LectureList.Message.error.deleteLecture",
+ fLectures.get(lecture).getLocalizedMessage()));
LOGGER.error("Couldn't delete lecture " + lecture.lectureName + ", reason:", fLectures.get(lecture) );
// TODO Should the exception be printed in the debugger or is this to much information?
}
- Gui.showMessageBox("Folgende Veranstaltungen konnten nicht gelöscht werden: "
- + builder.toString(), MessageType.INFO, LOGGER, null);
+ Gui.showMessageBox(I18n.WINDOW.getString("LectureList.Message.info.deleteLectures",
+ builder.toString()), MessageType.INFO, LOGGER, null);
}
}
});
@@ -472,6 +494,31 @@ public class LectureListWindow extends LectureListWindowLayout {
btnNewLecture.setEnabled(Session.canListImages());
updateAvailableOptions(null);
refreshList(false);
+
+ if (!Session.canListImages())
+ {
+ disableUnnecessaryButtonsForStudents();
+ }
+ }
+
+ /**
+ * This funtion disables all unnecessary buttons
+ * when Student is logged in.
+ */
+ public void disableUnnecessaryButtonsForStudents()
+ {
+ btnDeleteLecture.setVisible(false);
+ btnEditLecture.setVisible(false);
+ btnNewLecture.setVisible(false);
+ btnSwitchView.setVisible(false);
+
+ btnDeleteLecture.setEnabled(false);
+ btnEditLecture.setEnabled(false);
+ btnNewLecture.setEnabled(false);
+ btnSwitchView.setEnabled(false);
+
+ cboFilter.setVisible(false);
+ cboFilter.setEnabled(false);
}
public void filterByImageBaseId(final String imageBaseId) {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java
index bf818cf5..b8eb653d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java
@@ -9,6 +9,7 @@ import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.Gui.GuiCallable;
import org.openslx.dozmod.gui.control.JCheckBoxTree.CheckChangeEvent;
import org.openslx.dozmod.gui.control.JCheckBoxTree.CheckChangeEventListener;
+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.layout.LocationSelectionWindowLayout;
@@ -56,7 +57,7 @@ public class LocationSelectionWindow extends LocationSelectionWindowLayout imple
if (tempIntList != null
&& tempIntList.size() > Session.getSatelliteConfig().maxLocationsPerLecture) {
ctlLocationSelector.setSelectedLocationsAsIds(tempIntList);
- Gui.showMessageBox("Bitten reduzieren Sie die Anzahl gewählter Orte",
+ Gui.showMessageBox(I18n.WINDOW.getString("LocationSelection.Message.warning.saveChanges"),
MessageType.WARNING, null, null);
return;
}
@@ -73,7 +74,7 @@ public class LocationSelectionWindow extends LocationSelectionWindowLayout imple
if (tempIntList != null) {
if (tempIntList.size() > Session.getSatelliteConfig().maxLocationsPerLecture) {
// add error
- lblError.setText("Zu viele Orte ausgewählt!");
+ lblError.setText(I18n.WINDOW.getString("LocationSelection.Message.error.locationSelector"));
} else {
lblError.setText("");
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
index a6601ea7..94ee10e4 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
@@ -36,6 +36,7 @@ import org.openslx.dozmod.authentication.TestAccountAuthenticator;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.activity.UpdatePanel;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.gui.window.layout.LoginWindowLayout;
@@ -74,9 +75,6 @@ public class LoginWindow extends LoginWindowLayout {
// authentication method to use for login attempts
protected LoginType loginType = null;
- // text constants
- private final String NO_USERNAME = "Kein Benutzername angegeben!";
- private final String NO_PASSWORD = "Kein Passwort angegeben!";
private boolean forceCustomSatellite = false;
@@ -298,12 +296,12 @@ public class LoginWindow extends LoginWindowLayout {
private void doLogin() {
// sanity check on loginType.
if (loginType == null) {
- Gui.showMessageBox(this, "Bitte wählen Sie eine Authentifizierungsart.", MessageType.ERROR,
- LOGGER, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Login.Message.error.noLoginType"),
+ MessageType.ERROR, LOGGER, null);
return;
}
if (loginType == LoginType.ECP && cboOrganization.getSelectedIndex() == -1) {
- Gui.showMessageBox(this, "Bitte wählen Sie ihre Organisation als 'Identity Provider'.",
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Login.Message.error.noOrganization"),
MessageType.ERROR, LOGGER, null);
cboOrganization.requestFocusInWindow();
return;
@@ -313,11 +311,11 @@ public class LoginWindow extends LoginWindowLayout {
final String password = String.copyValueOf(txtPassword.getPassword());
// login clicked, lets first read the fields
if (username.isEmpty()) {
- Gui.showMessageBox(this, NO_USERNAME, MessageType.ERROR, LOGGER, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Login.Message.error.noUsername"), MessageType.ERROR, LOGGER, null);
return;
}
if (password.isEmpty()) {
- Gui.showMessageBox(this, NO_PASSWORD, MessageType.ERROR, LOGGER, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Login.Message.error.noPassword"), MessageType.ERROR, LOGGER, null);
return;
}
@@ -342,30 +340,32 @@ public class LoginWindow extends LoginWindowLayout {
});
return;
case IDENTITY_PROVIDER_ERROR:
- Gui.showMessageBox(me, "IdP Error", MessageType.ERROR, LOGGER, null);
+ Gui.showMessageBox(me, I18n.WINDOW.getString("Login.Message.error.authIdentityProvider"),
+ MessageType.ERROR, LOGGER, null);
break;
case SERVICE_PROVIDER_ERROR:
// here if we have t != null then we have not received a token
// if we have t, then the token is invalid.
- Gui.showMessageBox(me, "Invalid token from the service provider!", MessageType.ERROR,
- LOGGER, t);
+ Gui.showMessageBox(me, I18n.WINDOW.getString("Login.Message.error.authServiceProvider"),
+ MessageType.ERROR, LOGGER, t);
break;
case UNREGISTERED_ERROR:
LOGGER.error("User not registered!");
BwIdmLinkWindow.open((JFrame) SwingUtilities.getWindowAncestor(me));
break;
case INVALID_URL_ERROR:
- Gui.showMessageBox(me, "ECP Authenticator says: Invalid URL.", MessageType.ERROR, LOGGER,
- t);
+ Gui.showMessageBox(me, I18n.WINDOW.getString("Login.Message.error.authInvalidURL"),
+ MessageType.ERROR, LOGGER, t);
break;
case GENERIC_ERROR:
default:
if (t == null || !t.getClass().equals(RuntimeException.class)) {
- Gui.showMessageBox(me, "Internal error!", MessageType.ERROR, null, t);
+ Gui.showMessageBox(me, I18n.WINDOW.getString("Login.Message.error.authInternal"),
+ MessageType.ERROR, null, t);
} else {
- Gui.showMessageBox(me, "Der Masterserver hat den Loginversuch mit der"
- + " folgenden Nachricht abgewiesen:\n\n"
- + t.getMessage(), MessageType.ERROR, null, null);
+ Gui.showMessageBox(me,
+ I18n.WINDOW.getString("Login.Message.error.authMasterServer", t.getMessage()),
+ MessageType.ERROR, null, null);
}
break;
}
@@ -383,10 +383,12 @@ public class LoginWindow extends LoginWindowLayout {
authenticator = new TestAccountAuthenticator();
break;
case DIRECT_CONNECT:
- Gui.showMessageBox(this, "Not yet implemented", MessageType.ERROR, LOGGER, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Login.Message.error.loginTypeDirectConnect"),
+ MessageType.ERROR, LOGGER, null);
return;
default:
- Gui.showMessageBox(this, "No login type selected!", MessageType.ERROR, LOGGER, null);
+ Gui.showMessageBox(this, I18n.WINDOW.getString("Login.Message.error.loginTypeDefault"),
+ MessageType.ERROR, LOGGER, null);
return;
}
@@ -401,10 +403,11 @@ public class LoginWindow extends LoginWindowLayout {
authenticator.login(finalUsername, password, authenticatorCallback);
return;
} catch (TException e) {
- ThriftError.showMessage(LoginWindow.this, LOGGER, e, "Anmeldung fehlgeschlagen");
+ ThriftError.showMessage(LoginWindow.this, LOGGER, e,
+ I18n.WINDOW.getString("Login.Message.error.loginFailed"));
} catch (Exception e) {
- Gui.showMessageBox(LoginWindow.this, "Anmeldung fehlgeschlagen", MessageType.ERROR,
- LOGGER, e);
+ Gui.showMessageBox(LoginWindow.this, I18n.WINDOW.getString("Login.Message.error.loginFailed"),
+ MessageType.ERROR, LOGGER, e);
}
enableLogin(true);
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java
index ef805799..32a9cd9e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainMenuWindow.java
@@ -27,6 +27,7 @@ public class MainMenuWindow extends MainMenuWindowLayout {
MainWindow.showPage(LectureListWindow.class);
}
});
+
}
@Override
@@ -36,6 +37,12 @@ public class MainMenuWindow extends MainMenuWindowLayout {
@Override
public void requestShow() {
+ // here we need to check if the user is a student
+ // if so directly forward to lecturelist.
+ if(!Session.canListImages()) {
+ MainWindow.showPage(LectureListWindow.class);
+ }
+
btnShowVirtualMachines.setEnabled(Session.canListImages());
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java
index e3f68295..2674dc9a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java
@@ -17,6 +17,7 @@ import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.dozmod.Config;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.Gui.GuiCallable;
+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.layout.SatelliteListWindowLayout;
@@ -108,7 +109,8 @@ public class SatelliteListWindow extends SatelliteListWindowLayout implements Ui
}
dispose();
} else {
- Gui.showMessageBox(rootPane, "Kein Satellit ausgewählt", MessageType.ERROR, null, null);
+ Gui.showMessageBox(rootPane, I18n.WINDOW.getString("SatelliteList.Message.error.noSatellite"),
+ MessageType.ERROR, null, null);
}
}
});
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java
index 36bea427..cb207d34 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java
@@ -15,6 +15,7 @@ import java.util.TreeSet;
import org.apache.log4j.Logger;
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.TextChangeListener;
import org.openslx.dozmod.gui.helper.UiFeedback;
@@ -115,13 +116,13 @@ public class VirtConfigEditorWindow extends VirtConfigEditorWindowLayout impleme
if (!filteredSet.equals(unfilteredSet)) {
unfilteredSet.removeAll(filteredSet);
// not equals, means there was some invalid input
- String errorText = "Invalide Eingaben:\n";
+ String errorText = I18n.WINDOW.getString("VirtConfigEditor.Message.error.invalidInputTitle");
for (String s : unfilteredSet) {
errorText += s + "\n";
}
// TODO: Somehow this always triggers for vbox
errorText += System.lineSeparator()
- + "Wollen Sie trotzdem speichern? (Die invaliden Zeilen werden dabei automatisch gelöscht.)";
+ + I18n.WINDOW.getString("VirtConfigEditor.Message.error.invalidInputText");
if (!Gui.showMessageBox(errorText, MessageType.ERROR_RETRY, LOGGER, null))
return;
}
@@ -163,7 +164,7 @@ public class VirtConfigEditorWindow extends VirtConfigEditorWindowLayout impleme
private void safeClose() {
if (originalMachineDescription.equals(pnlEditor.getText()) || Gui.showMessageBox(me,
- "Ihre Änderungen, in diesem Fenster, werden verloren gehen, wollen Sie trotzdem abbrechen?",
+ I18n.WINDOW.getString("VirtConfigEditor.Message.yesNo.safeClose"),
MessageType.QUESTION_YESNO, null, null))
dispose();
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java
index 072d648e..b6584b8e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java
@@ -9,6 +9,7 @@ import java.nio.ByteBuffer;
import org.apache.log4j.Logger;
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.UiFeedback;
import org.openslx.dozmod.gui.window.layout.VirtDropDownConfigEditorWindowLayout;
@@ -187,8 +188,7 @@ public class VirtDropDownConfigEditorWindow extends VirtDropDownConfigEditorWind
cboMaxUsbSpeed.setSelectedItem(usbSpeed);
} catch (IllegalArgumentException e) {
// TODO improve user message
- Gui.showMessageBox("Sie haben beim letzten Konfigurieren \n"
- + "einen falschen Eintrag eingespeichert. \n" + "Die VM wird nicht starten!",
+ Gui.showMessageBox(I18n.WINDOW.getString("VirtDropDownConfigEditor.Message.warning.initializeComboBoxes"),
MessageType.WARNING, null, e);
}
}
@@ -220,7 +220,7 @@ public class VirtDropDownConfigEditorWindow extends VirtDropDownConfigEditorWind
private void safeClose() {
if (!hasChanged() || Gui.showMessageBox(me,
- "Wollen Sie wirklich abbrechen?\n" + "Ihre Änderungen werden verworfen.",
+ I18n.WINDOW.getString("VirtDropDownConfigEditor.Message.yesNo.safeClose"),
MessageType.QUESTION_YESNO, null, null)) {
dispose();
}
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..0dfe4c1e 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
@@ -4,32 +4,22 @@ import java.awt.BorderLayout;
import java.awt.Insets;
import java.awt.Window;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.DefaultBoundedRangeModel;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JSlider;
-import javax.swing.UIManager;
+import javax.swing.*;
import javax.swing.UIManager.LookAndFeelInfo;
import org.openslx.dozmod.Branding;
import org.openslx.dozmod.Config;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.control.ComboBox;
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.gui.helper.Language;
@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;
@@ -40,12 +30,14 @@ public class ConfigWindowLayout extends JDialog {
protected final JSlider sldConnections;
protected ButtonGroup btnGroupLookAndFeel = null;
+ protected final ComboBox<Language> cboLanguage;
+
protected final JButton btnSave;
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 +49,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 +71,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 +80,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 +101,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 +122,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);
@@ -153,13 +139,33 @@ public class ConfigWindowLayout extends JDialog {
sldConnections.setPaintLabels(true);
grid.add(sldConnections).expand(true, false).fill(true, false);
+ // Language
+ grid.add(new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.language.text"),
+ true, false))
+ .insets(headingInset)
+ .fill(true, false)
+ .expand(true, false);
+ grid.add(
+ new WordWrapLabel(I18n.WINDOW_LAYOUT.getString("Config.Label.languageInfo.text"),
+ false, true))
+ .fill(true, false)
+ .expand(true, false);
+ cboLanguage = new ComboBox<>(new ComboBox.ComboBoxRenderer<Language>() {
+ @Override
+ public String renderItem(Language item) {
+ return item.displayName;
+ }
+ });
+ cboLanguage.setModel(new DefaultComboBoxModel<>(Language.values()));
+ grid.add(cboLanguage).fill(true, false).expand(true, false);
+
// Finish
grid.finish(true);
// 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());
@@ -167,7 +173,7 @@ public class ConfigWindowLayout extends JDialog {
buttonPanel.add(btnSave);
getContentPane().add(buttonPanel, BorderLayout.PAGE_END);
- setPreferredSize(Gui.getScaledDimension(500, 650));
+ setPreferredSize(Gui.getScaledDimension(500, 700));
}
-}
+} \ No newline at end of file
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java
new file mode 100644
index 00000000..2e5432b8
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ContainerBindMountWindowLayout.java
@@ -0,0 +1,69 @@
+package org.openslx.dozmod.gui.window.layout;
+
+import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.control.QLabel;
+import org.openslx.dozmod.gui.helper.GridManager;
+
+import javax.swing.*;
+import java.awt.*;
+
+public class ContainerBindMountWindowLayout extends JDialog {
+
+ private static final String title = "Add Bind Mount";
+
+ protected final QLabel lblBmSource;
+ protected final JTextField txtBmSource;
+ protected final QLabel lblBmTarget;
+ protected final JTextField txtBmTarget;
+ protected final QLabel lblBmOptions;
+ protected final JTextField txtBmOptions;
+ protected final JButton btnSave;
+ protected final JButton btnCancel;
+
+ public ContainerBindMountWindowLayout(Window modalParent) {
+ super(modalParent, title,
+ modalParent != null ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
+
+ GridManager grid = new GridManager(this, 2, true, new Insets(2, 2, 2, 2));
+
+ lblBmSource = new QLabel("Source");
+ txtBmSource = new JTextField();
+
+ grid.add(lblBmSource);
+ grid.add(txtBmSource).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ lblBmTarget = new QLabel("Target");
+ txtBmTarget = new JTextField();
+ grid.add(lblBmTarget);
+ grid.add(txtBmTarget).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ lblBmOptions = new QLabel("Options");
+ txtBmOptions = new JTextField();
+ grid.add(lblBmOptions);
+ grid.add(txtBmOptions).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ JPanel buttonPane = new JPanel();
+ buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
+ buttonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+ buttonPane.add(Box.createHorizontalGlue());
+ btnCancel = new JButton("Cancel");
+ buttonPane.add(btnCancel);
+ buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
+ btnSave = new JButton("Save");
+ buttonPane.add(btnSave);
+ grid.add(buttonPane, 2).fill(true, false).expand(true, false);
+ grid.finish(false);
+
+ //setPreferredSize(Gui.getScaledDimension(650, 350));
+
+ setSize(350, 150);
+ setResizable(false);
+ //setMinimumSize(Gui.getScaledDimension(550, 650));
+ if (modalParent != null) {
+ Gui.centerShellOverShell(modalParent, this);
+ }
+ }
+}
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 31332cf4..af73d32f 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
@@ -1,13 +1,6 @@
package org.openslx.dozmod.gui.window.layout;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
-import java.awt.FlowLayout;
+import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Box;
@@ -22,6 +15,7 @@ import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.text.StyledEditorKit;
import javax.swing.text.html.HTMLEditorKit;
@@ -29,6 +23,7 @@ import javax.swing.text.html.HTMLEditorKit;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.bwlp.thrift.iface.ShareMode;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.configurator.ContainerBindMountConfigurator;
import org.openslx.dozmod.gui.configurator.ImagePermissionConfigurator;
import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
@@ -37,16 +32,29 @@ 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")
-public abstract class ImageDetailsWindowLayout extends JDialog {
+import javax.swing.*;
+import java.awt.*;
+
+@SuppressWarnings("serial") public abstract class ImageDetailsWindowLayout extends JDialog {
private static final int ICON_SIZE_Y = 24;
+ private final String TAB_OVERVIEW_TITEL = I18n.WINDOW_LAYOUT.getString("ImageDetails.Tab.overview.title");
+ private final String TAB_VERSIONS_TITEL = I18n.WINDOW_LAYOUT.getString("ImageDetails.Tab.versions.title");
+ private final String TAB_PERMISSIONS_TITEL = I18n.WINDOW_LAYOUT.getString("ImageDetails.Tab.permissions.title");
+
protected final JTextField txtTitle;
protected final JEditorPane txtDescription;
+ private final JPanel pnlTabContainer;
+ protected final JTextArea txtContainerRecipe;
+ protected final JTextField txtContainerRun;
+ protected final JTextField txtContainerImageName;
+ protected ContainerBindMountConfigurator bindMountConfigurator;
+
protected QLabel lblError;
protected final PersonLabel lblOwner;
protected final JButton btnChangeOwner;
@@ -91,9 +99,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);
@@ -161,7 +166,7 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
txtDescription.setEditorKit(kit);
txtDescription.setContentType("text/html");
- 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));
@@ -171,34 +176,33 @@ 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();
cboOperatingSystem = new ComboBox<OperatingSystem>(Comparators.operatingSystem,
new ComboBoxRenderer<OperatingSystem>() {
- @Override
- public String renderItem(OperatingSystem item) {
+ @Override public String renderItem(OperatingSystem item) {
if (item == null)
return null;
return item.getOsName();
@@ -206,7 +210,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();
@@ -215,46 +219,46 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
// share mode
cboShareMode = new ComboBox<ShareMode>(new ComboBoxRenderer<ShareMode>() {
- @Override
- public String renderItem(ShareMode item) {
+ @Override public String renderItem(ShareMode item) {
if (item == null)
return "null";
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);
@@ -263,11 +267,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();
@@ -299,12 +306,15 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
ctlImagePermissionConfigurator = new ImagePermissionConfigurator();
GridManager grdImagePermissionConfigurator = new GridManager(pnlTabPermissions, 1, false,
new Insets(8, 2, 8, 2));
- grdImagePermissionConfigurator.add(ctlImagePermissionConfigurator).fill(true, true).expand(true, true);
+ 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
@@ -312,10 +322,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);
@@ -328,9 +338,47 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
grdImagePermissionConfigurator.add(defaultPermissionPane).fill(true, false).expand(false, false);
grdImagePermissionConfigurator.finish(false);
- /*
- * *****************************************************************************
- * **
+
+
+
+ /* *******************************************************************************
+ *
+ * Container panel
+ *
+ ********************************************************************************/
+ pnlTabContainer = new JPanel();
+ txtContainerRecipe = new JTextArea();
+ JScrollPane scrollableTextArea = new JScrollPane(txtContainerRecipe);
+ scrollableTextArea.setMinimumSize(Gui.getScaledDimension(0, 200));
+ scrollableTextArea.setPreferredSize(Gui.getScaledDimension(0, 200));
+
+ JPanel pnlContainerMeta = new JPanel();
+ GridManager grdContainerMeta = new GridManager(pnlContainerMeta, 3);
+
+ grdContainerMeta.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.ImageName.text")));
+ txtContainerImageName = new JTextField();
+ txtContainerImageName.setDocument(txtTitle.getDocument());
+ grdContainerMeta.add(txtContainerImageName, 2).fill(true, false).expand(true, false);
+ grdContainerMeta.nextRow();
+
+ grdContainerMeta.add(new QLabel(I18n.WINDOW_LAYOUT.getString("ImageDetails.Label.ContainerRunOptions.text")));
+ txtContainerRun = new JTextField();
+ grdContainerMeta.add(txtContainerRun, 2).fill(true, false).expand(true, false);
+ grdContainerMeta.nextRow();
+
+ bindMountConfigurator = new ContainerBindMountConfigurator();
+ grdContainerMeta.add(bindMountConfigurator, 3).fill(true, true).expand(true, true);
+ grdContainerMeta.finish(true);
+
+ GridManager grdContainer = new GridManager(pnlTabContainer, 1, false, new Insets(8, 2, 8, 2));
+ grdContainer.add(scrollableTextArea, 1).fill(true, true).expand(true, true);
+ grdContainer.add(pnlContainerMeta, 1).fill(true, true).expand(true, true);
+ //grdContainer.add(Box.createVerticalGlue()).fill(true, true).expand(true,true);
+ grdContainer.finish(true);
+
+
+
+ /* *******************************************************************************
*
* Bottom panel for buttons
*
@@ -338,8 +386,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);
@@ -356,11 +404,17 @@ 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);
}
+
+ protected void showContainerTab() {
+ pnlTabs.addTab("Container", pnlTabContainer);
+ // TODO currently, do not allow to alter the version of a container image.
+ pnlTabs.remove(pnlTabs.indexOfTab(TAB_VERSIONS_TITEL));
+ }
}
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 7202fac1..61dbf613 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 113502d8..3a100edb 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
@@ -49,6 +49,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;
@@ -125,10 +126,10 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
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);
+ setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE );
setLayout(new BorderLayout());
((JPanel) getContentPane()).setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
@@ -144,41 +145,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);
@@ -188,7 +189,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();
@@ -240,7 +241,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
kit = new HTMLEditorKit();
txtDescription.setEditorKit(kit);
txtDescription.setContentType("text/html");
- 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));
@@ -253,14 +254,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();
@@ -268,17 +269,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>() {
@@ -289,16 +290,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();
@@ -312,7 +315,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();
@@ -325,12 +328,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();
@@ -343,14 +346,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);
@@ -364,25 +366,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)
@@ -398,9 +399,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);
@@ -459,32 +461,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..42fb8a2a 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
@@ -4,15 +4,7 @@ import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridBagLayout;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.UIManager;
+import javax.swing.*;
import javax.swing.border.TitledBorder;
import org.openslx.dozmod.gui.Gui;
@@ -21,6 +13,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 +21,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;
@@ -43,6 +28,7 @@ public abstract class LectureListWindowLayout extends CompositePage {
protected final JButton btnSwitchView;
protected final JComboBox<FilterType> cboFilter;
protected final QLabel lblVisibleLectureCount;
+ protected final JCheckBox chkSearchInDescription;
protected final JTextField txtSearch;
@@ -56,9 +42,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 +55,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>();
@@ -79,10 +66,15 @@ public abstract class LectureListWindowLayout extends CompositePage {
filterPanel.add(txtSearch);
filterPanel.add(cboFilter);
+ // search in description
+ chkSearchInDescription = new JCheckBox(
+ I18n.WINDOW_LAYOUT.getString("LectureList.CheckBox.searchInDescription.text"));
+ filterPanel.add(chkSearchInDescription);
+
// 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 +96,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);
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..cccabe00 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
@@ -1,73 +1,147 @@
package org.openslx.dozmod.gui.wizard;
-import java.awt.Window;
-
-import javax.swing.JOptionPane;
-
import org.apache.log4j.Logger;
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;
-import org.openslx.dozmod.gui.wizard.page.ImageCustomPermissionPage;
-import org.openslx.dozmod.gui.wizard.page.ImageMetaDataPage;
-import org.openslx.dozmod.gui.wizard.page.ImageUploadPage;
-import org.openslx.dozmod.gui.wizard.page.ImageUploadSummaryPage;
+import org.openslx.dozmod.gui.wizard.page.*;
+import org.openslx.dozmod.model.ContainerDefinition;
import org.openslx.dozmod.state.UploadWizardState;
-import org.openslx.dozmod.thrift.Session;
-import org.openslx.dozmod.thrift.ThriftActions;
-import org.openslx.dozmod.thrift.ThriftError;
+import org.openslx.dozmod.thrift.*;
import org.openslx.dozmod.thrift.UploadInitiator.GotUploadTokenCallback;
import org.openslx.thrifthelper.ThriftManager;
import org.openslx.util.QuickTimer;
import org.openslx.util.QuickTimer.Task;
+import org.openslx.util.vm.DockerMetaDataDummy;
-@SuppressWarnings("serial")
-public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotification {
+import javax.swing.*;
+import java.awt.*;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+@SuppressWarnings("serial") public class ImageCreationWizard extends Wizard
+ implements UiFeedback, QuitNotification {
private final static Logger LOGGER = Logger.getLogger(ImageCreationWizard.class);
private final UploadWizardState state = new UploadWizardState();
- protected ImageUploadPage imageUploadPage;
- protected ImageMetaDataPage imageMetaDataPage;
- protected ImageCustomPermissionPage imageCustomPermissionPage;
+
+ private ContainerDefinition containerDefinition = new ContainerDefinition();
+
+ private List<WizardPage> currentPages = new ArrayList<>();
+
private boolean baseWritten = false;
private boolean permissionsWritten = false;
/**
* Wizard for creating or editing an image
- *
- * @param editExistingImage whether to create new or edit existing image
+ *
+ * @param parent whether to create new or edit existing image
*/
public ImageCreationWizard(Window parent) {
super(parent);
state.defaultPermissions = Session.getSatelliteConfig().defaultImagePermissions;
- imageUploadPage = new ImageUploadPage(this, state, null);
- imageMetaDataPage = new ImageMetaDataPage(this, state);
- imageCustomPermissionPage = new ImageCustomPermissionPage(this, state);
- addPage(imageUploadPage);
- addPage(imageMetaDataPage);
- addPage(imageCustomPermissionPage);
+ addPage(new ImageTypePage(this));
+ }
+
+ /**
+ * Adding Pages to the Wizard to create a virtual machine
+ */
+ public void doVmCreation() {
+
+ cleanCurrent();
+ state.imageUploadPage = new ImageUploadPage(this, state, null);
+ currentPages.add(state.imageUploadPage);
+ currentPages.add(new ImageMetaDataPage(this, state, null));
+ currentPages.add(new ImageCustomPermissionPage(this, state));
+ addPages();
+
+ state.conversionPage = new ImageOvfConversionPage(this, state);
+ addOutOfOrderPage(state.conversionPage);
+ }
+
+ /**
+ * Adding Pages to the Wizard to define a docker image
+ */
+ public void doDockerCreation() {
+ cleanCurrent();
+
+ currentPages.add(new ContainerUploadPage(this, state, containerDefinition));
+ currentPages.add(new ImageMetaDataPage(this, state, containerDefinition));
+ currentPages.add(new ImageCustomPermissionPage(this, state));
+ addPages();
+ }
+
+ private void addPages() {
+ for (WizardPage i : currentPages) {
+ addPage(i);
+ }
+ }
+
+ private void cleanCurrent() {
+ if (!currentPages.isEmpty()) {
+ removePages(currentPages);
+ currentPages = new ArrayList<WizardPage>();
+ }
}
@Override
public String getWindowTitle() {
- return "Neue VM erzeugen";
+ return I18n.WIZARD.getString("ImageCreation.Wizard.title");
}
- @Override
- public boolean wantFinish() {
+ /**
+ * initUpload will be called after a user finish the creation of a new ContainerDefinition.
+ * It creates the UploadInitiator with the collected information.
+ */
+ private void initUpload() {
+
+ if (state.uuid == null) {
+ state.uuid = ThriftActions.createImage(JOptionPane.getFrameForComponent(this), state.name);
+ if (state.uuid == null) {
+ // return false;
+ LOGGER.error("initUpload Failed: Count not get uuid!");
+ return;
+ }
+ }
+
+ // Create upload initiator that will manage requesting a token, hashing the
+ // file, connecting for upload...
+ if (state.upload == null) {
+ try {
+ state.upload = new UploadInitiator(state.uuid, state.diskFile,
+ state.meta.getFilteredDefinition());
+ } catch (WrappedException e) {
+ ThriftError.showMessage(this, LOGGER, e.exception, e.displayMessage);
+ // return false;
+ } catch (IOException e) {
+ Gui.showMessageBox(this, I18n.WIZARD.getString("ImageCreation.Message.error.UploadInitializationFailure"), MessageType.ERROR, LOGGER,
+ e);
+ // return false;
+ }
+ }
+ // Start the hash check now
+ state.upload.startHashing();
+ }
+
+ @Override public boolean wantFinish() {
+
+ if (state.meta instanceof DockerMetaDataDummy)
+ initUpload();
// since we only started the upload and created a "blank" image entry
// we can here do all the sanity checks on the fields of UploadWizardState
// and react accordingly.
// 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 +151,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 +162,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;
@@ -98,16 +172,15 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
}
state.upload.startUpload(new GotUploadTokenCallback() {
- @Override
- public void fire() {
+ @Override public void fire() {
// push version data
try {
- ThriftActions.updateImageVersion(state.upload.getToken(), new ImageVersionWrite(
- state.isRestricted));
+ ThriftActions.updateImageVersion(state.upload.getToken(),
+ new ImageVersionWrite(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);
}
}
@@ -116,16 +189,15 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
return true;
}
- @Override
- public WizardPage performFinish() {
+ @Override public WizardPage performFinish() {
return new ImageUploadSummaryPage(this, state, true);
}
/**
* Checks the validity of the state
- *
+ *
* @return true if we have all the needed information in the state, false
- * otherwise
+ * otherwise
*/
private boolean isStateValid() {
// debug purposes
@@ -190,15 +262,34 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
}
@Override
+ protected final void doPrevious() {
+ if (outOfOrderPage != null) {
+ outOfOrderPage = null;
+ returnAfterOutOfOrderPage(state.imageUploadPage, state.conversionPage);
+ } else {
+ super.doPrevious();
+ }
+ }
+
+ @Override
+ public final void doNext() {
+ if (outOfOrderPage != null) {
+ outOfOrderPage = null;
+ returnAfterOutOfOrderPage(state.imageUploadPage, state.conversionPage);
+ } else {
+ super.doNext();
+ }
+ }
+
+ @Override
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() {
- @Override
- public void fire() {
+ @Override public void fire() {
if (state.upload != null) {
state.upload.cancelError();
}
@@ -214,18 +305,15 @@ public class ImageCreationWizard extends Wizard implements UiFeedback, QuitNotif
return confirmed;
}
- @Override
- public boolean wantConfirmQuit() {
+ @Override public boolean wantConfirmQuit() {
return state.uuid != null;
}
- @Override
- public void escapePressed() {
+ @Override public void escapePressed() {
doCancel();
}
- @Override
- public void onApplicationQuit() {
+ @Override public void onApplicationQuit() {
if (state != null && state.upload != null) {
state.upload.cancelError();
}
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..56624820 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,14 +7,18 @@ 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;
+import org.openslx.dozmod.gui.wizard.page.ImageOvfConversionPage;
+import org.openslx.dozmod.gui.wizard.page.ContainerUploadPage;
import org.openslx.dozmod.gui.wizard.page.ImageUploadPage;
import org.openslx.dozmod.gui.wizard.page.ImageUploadSummaryPage;
import org.openslx.dozmod.state.UploadWizardState;
import org.openslx.dozmod.thrift.ThriftActions;
import org.openslx.dozmod.thrift.UploadInitiator.GotUploadTokenCallback;
+import org.openslx.thrifthelper.TConst;
import org.openslx.util.QuickTimer;
import org.openslx.util.QuickTimer.Task;
@@ -29,8 +33,20 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific
public ImageUpdateWizard(final Window parent, final ImageDetailsRead image) {
super(parent);
- imageUploadPage = new ImageUploadPage(this, state, image);
- addPage(imageUploadPage);
+ // TODO allow user to update the plain dockerfile
+ switch (image.virtId){
+ case TConst.VIRT_DOCKER:
+ addPage(new ContainerUploadPage(this,state, image));
+ break;
+ case TConst.VIRT_QEMU:
+ case TConst.VIRT_VIRTUALBOX:
+ case TConst.VIRT_VMWARE:
+ imageUploadPage = new ImageUploadPage(this, state, image);
+ addPage(imageUploadPage);
+ state.conversionPage = new ImageOvfConversionPage(this, state);
+ addOutOfOrderPage(state.conversionPage);
+ break;
+ }
}
@Override
@@ -49,8 +65,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 +85,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 +110,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
@@ -105,4 +120,24 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific
}
}
+ @Override
+ protected final void doPrevious() {
+ if (outOfOrderPage != null) {
+ outOfOrderPage = null;
+ returnAfterOutOfOrderPage(imageUploadPage, state.conversionPage);
+ } else {
+ super.doPrevious();
+ }
+ }
+
+ @Override
+ public final void doNext() {
+ if (outOfOrderPage != null) {
+ outOfOrderPage = null;
+ returnAfterOutOfOrderPage(imageUploadPage, state.conversionPage);
+ } else {
+ super.doNext();
+ }
+ }
+
}
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..2907ebc4 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")
@@ -39,6 +40,8 @@ public abstract class Wizard extends JDialog {
private int currentPage = -1;
private boolean needsLayout = true;
private boolean isCancelled = false;
+ // Reference if an out of order page is shown.
+ protected WizardPage outOfOrderPage = null;
private final JButton btnPrev;
private final JButton btnNext;
@@ -76,10 +79,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)));
@@ -146,7 +149,7 @@ public abstract class Wizard extends JDialog {
super.show();
}
- private void showPage(int index) {
+ protected void showPage(int index) {
if (currentPage != -1) {
WizardPage old = getPage(currentPage);
old.onPageLeave();
@@ -161,6 +164,37 @@ public abstract class Wizard extends JDialog {
validate();
}
+ // Show an out of order page e.g. for converting an image
+ public void showOutOfOrderPage(WizardPage page) {
+ WizardPage old = getPage(currentPage);
+ outOfOrderPage = page;
+ old.onPageLeave();
+ old.setVisible(false);
+
+ page.onPageEnter();
+ page.setVisible(true);
+ updateHeader(page);
+ updateButtons(page);
+ validate();
+ }
+
+ // Show an out of order page e.g. for converting an image
+ /**
+ *
+ * @param NewPage to return to.
+ * @param OldPage that should be hidden.
+ */
+ public void returnAfterOutOfOrderPage(WizardPage newPage, WizardPage oldPage) {
+ oldPage.onPageLeave();
+ oldPage.setVisible(false);
+
+ newPage.onPageEnter();
+ newPage.setVisible(true);
+ updateHeader(newPage);
+ updateButtons(newPage);
+ validate();
+ }
+
void updateHeader(WizardPage page) {
if (!isPostFinish && (currentPage == -1 || getPage(currentPage) != page))
return;
@@ -172,7 +206,8 @@ public abstract class Wizard extends JDialog {
pageDesc = "";
titleLabel.setText(pageTitle);
messageLabel.setText(pageDesc);
- messageLabel.setIcon(ResourceLoader.getScaledIcon(page.getMessageIcon(), messageLabel.getHeight(), messageLabel));
+ messageLabel.setIcon(
+ ResourceLoader.getScaledIcon(page.getMessageIcon(), messageLabel.getHeight(), messageLabel));
messageLabel.setForeground(page.getMessageColor());
messageLabel.validate();
setTitle(getWindowTitle() + " - " + pageTitle);
@@ -188,6 +223,18 @@ public abstract class Wizard extends JDialog {
pages.add(page);
}
+ // For adding pages which are not in the normal linear flow
+ protected final void addOutOfOrderPage(WizardPage page) {
+ contentPanel.add(page);
+ page.setVisible(false);
+ }
+
+ protected final void removePages(List<WizardPage> currentPages) {
+ for (WizardPage i : currentPages) {
+ pages.remove(i);
+ }
+ }
+
protected void addSummaryPage(WizardPage page) {
postFinishPage = page;
}
@@ -207,6 +254,9 @@ public abstract class Wizard extends JDialog {
}
btnFinish.setEnabled(canFinish);
// State of next button
+ if (outOfOrderPage != null) {
+ btnNext.setEnabled(page.isComplete());
+ }
if (currentPage != -1 && getPage(currentPage) == page) {
btnNext.setEnabled(currentPage + 1 < pages.size() && page.isComplete());
btnPrev.setEnabled(currentPage > 0 && getPage(currentPage - 1).canComeBack);
@@ -232,7 +282,7 @@ public abstract class Wizard extends JDialog {
return isCancelled;
}
- public final void doNext() {
+ public void doNext() {
if (isPostFinish || !btnNext.isEnabled())
return;
if (currentPage + 1 < pages.size()) {
@@ -242,7 +292,11 @@ public abstract class Wizard extends JDialog {
}
}
- protected final void doPrevious() {
+ // protected void returnAfterOutOfOrderPage(int previousPage){
+ // showPage(previousPage);
+ // }
+
+ protected void doPrevious() {
if (isPostFinish || !btnPrev.isEnabled())
return;
if (currentPage > 0) {
@@ -259,6 +313,9 @@ public abstract class Wizard extends JDialog {
if (isPostFinish) {
postFinishPage.onPageLeave();
}
+ if (outOfOrderPage != null) {
+ outOfOrderPage.onPageLeave();
+ }
dispose();
}
}
@@ -286,7 +343,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/java/org/openslx/dozmod/gui/wizard/WizardPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/WizardPage.java
index fc1da67f..b8be827a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/WizardPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/WizardPage.java
@@ -100,7 +100,7 @@ public abstract class WizardPage extends JPanel {
* Setters from derived classes
*/
- protected void setPageComplete(boolean b) {
+ public void setPageComplete(boolean b) {
if (isComplete == b)
return;
isComplete = b;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java
new file mode 100644
index 00000000..7d873264
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java
@@ -0,0 +1,116 @@
+package org.openslx.dozmod.gui.wizard.layout;
+
+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.gui.wizard.Wizard;
+import org.openslx.dozmod.gui.wizard.WizardPage;
+import org.openslx.dozmod.model.ContainerBuildContextMethod;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+
+public class ContainerUploadPageLayout extends WizardPage {
+
+ protected final JTextField txtImageName;
+ protected final JButton btnBrowseForImage;
+ protected final JTextField txtImageFile;
+ protected final JCheckBox chkLicenseRestricted;
+ protected final QLabel lblImageName;
+ protected final JTextArea txtInfoText;
+
+ protected final JTextField txtContainerRun;
+ protected final QLabel lblContainerRun;
+
+ protected final JTabbedPane tpInput;
+ protected final JTextField txtGitRepo;
+
+ // TODO set proper Text labels
+
+ /**
+ * Page for uploading an imagefile
+ */
+ public ContainerUploadPageLayout(Wizard wizard) {
+
+ super(wizard, I18n.PAGE_LAYOUT.getString("ContainerUploadPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.description"));
+ GridManager grid = new GridManager(this, 3, false);
+
+ JPanel p1 = new JPanel();
+ p1.setVisible(true);
+ GridManager g1 = new GridManager(p1, 3, true, new Insets(5, 0, 5, 0));
+ QLabel imageFileCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.DockerFile.label"));
+ txtImageFile = new JTextField();
+ txtImageFile.setEditable(false);
+ btnBrowseForImage = new JButton(I18n.PAGE_LAYOUT.getString("ImageUpload.Button.browseForImage.text"));
+ btnBrowseForImage.setMnemonic(KeyEvent.VK_B);
+ g1.add(imageFileCaption);
+ g1.add(txtImageFile).fill(true, false).expand(true, false);
+ g1.add(btnBrowseForImage);
+ g1.finish(false);
+
+ JPanel p2 = new JPanel();
+ p2.setVisible(false);
+ GridManager g2 = new GridManager(p2, 2, true, new Insets(5, 0, 5, 0));
+ QLabel lblGitRepo = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.GitRepository.label"));
+ lblGitRepo.setToolTipText(I18n.PAGE_LAYOUT.getString(
+ "ContainerUploadPage.GitRepository.toolTipText"));
+ txtGitRepo = new JTextField();
+ txtGitRepo.setToolTipText(I18n.PAGE_LAYOUT.getString(
+ "ContainerUploadPage.GitRepository.toolTipText"));
+ g2.add(lblGitRepo);
+ g2.add(txtGitRepo).fill(true, false).expand(true, false);
+ g2.finish(false);
+
+ tpInput = new JTabbedPane();
+ tpInput.addTab("Dockerfile", p1);
+ tpInput.addTab("Git Repository", p2);
+ tpInput.setSelectedIndex(ContainerBuildContextMethod.FILE.ordinal());
+
+ grid.add(tpInput, 3).fill(true, false);
+
+ // Start as with Dockerfile as input!
+ tpInput.setSelectedIndex(0);
+
+ lblImageName = new QLabel(I18n.PAGE_LAYOUT.getString(
+ "ContainerUploadPage.ImageName.text"));
+ txtImageName = new JTextField();
+ grid.add(lblImageName);
+ grid.add(txtImageName, 2, 1).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ // -- Software license changed - shown only in UploadWizard --
+ chkLicenseRestricted = new JCheckBox(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.CheckBox.ContainsLicenseRestricted.text"));
+ chkLicenseRestricted.setVisible(false);
+ grid.skip();
+ grid.add(chkLicenseRestricted, 2, 1).fill(false, false).expand(true, false);
+ grid.nextRow();
+
+ lblContainerRun = new QLabel(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ContainerStartOptions.label"));
+ lblContainerRun.setToolTipText(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.ContainerStartOptions.tooltip"));
+ txtContainerRun = new JTextField();
+ grid.add(lblContainerRun);
+ grid.add(txtContainerRun, 2, 1).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ grid.add(Box.createVerticalGlue(), 3).expand(true, true);
+ txtInfoText = new JTextArea();
+ txtInfoText.setBorder(BorderFactory.createTitledBorder(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.Infobox.label")));
+ txtInfoText.setLineWrap(true);
+ txtInfoText.setWrapStyleWord(true);
+ txtInfoText.setEditable(false);
+ txtInfoText.setFocusable(false);
+ txtInfoText.setOpaque(false);
+ txtInfoText.setText(I18n.PAGE_LAYOUT.getString("ContainerUploadPage.Infobox.text"));
+
+ grid.add(txtInfoText, 3).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ grid.finish(true);
+ }
+
+ protected ContainerBuildContextMethod getBuildContextMethod() {
+ return ContainerBuildContextMethod.fromInt(tpInput.getSelectedIndex());
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageCustomPermissionPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageCustomPermissionPageLayout.java
index e833090b..c4e94f88 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageCustomPermissionPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageCustomPermissionPageLayout.java
@@ -10,6 +10,7 @@ import javax.swing.JPanel;
import org.openslx.dozmod.gui.configurator.ImagePermissionConfigurator;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -30,8 +31,8 @@ public class ImageCustomPermissionPageLayout extends WizardPage {
* @param wizard
*/
public ImageCustomPermissionPageLayout(Wizard wizard) {
- super(wizard, "Berechtigungen festlegen");
- setDescription("Legen Sie hier die gewünschten Berechtigungen fest.");
+ super(wizard, I18n.PAGE_LAYOUT.getString("ImageCustomPermission.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("ImageCustomPermission.WizardPage.description"));
GridManager grid = new GridManager(this, 1, false);
// custom permissions
@@ -40,25 +41,29 @@ public class ImageCustomPermissionPageLayout extends WizardPage {
grid.nextRow();
// -- default permissions --
- JLabel defaultPermLabel = new JLabel("Standardberechtigungen");
+ JLabel defaultPermLabel = new JLabel(
+ I18n.PAGE_LAYOUT.getString("ImageCustomPermission.Label.defaultPerm.text"));
defaultPermLabel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
defaultPermLabel.setFont(defaultPermLabel.getFont().deriveFont(Font.BOLD));
grid.add(defaultPermLabel);
- JLabel defaultDescriptionLabel = new JLabel("<html><body style ='width:100%'> "
- + "Legen Sie hier die Berechtigungen für alle anderen (nicht in der Liste "
- + "angezeigten) Benutzer fest.</body></html>");
+ JLabel defaultDescriptionLabel = new JLabel(
+ I18n.PAGE_LAYOUT.getString("ImageCustomPermission.Label.defaultDesc.text"));
defaultDescriptionLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
grid.add(defaultDescriptionLabel).fill(true, false).expand(true, false);
JPanel permissionsPanel = new JPanel();
permissionsPanel.setLayout(new BoxLayout(permissionsPanel, BoxLayout.LINE_AXIS));
- chkPermissionLink = new JCheckBox("Verlinken");
+ chkPermissionLink = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ImageCustomPermission.CheckBox.permissionLink.text"));
chkPermissionLink.setSelected(true);
- chkPermissionRead = new JCheckBox("Download");
+ chkPermissionRead = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ImageCustomPermission.CheckBox.permissionRead.text"));
chkPermissionRead.setSelected(true);
- chkPermissionEdit = new JCheckBox("Bearbeiten");
- chkPermissionAdmin = new JCheckBox("Admin");
+ chkPermissionEdit = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ImageCustomPermission.CheckBox.permissionEdit.text"));
+ chkPermissionAdmin = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ImageCustomPermission.CheckBox.permissionAdmin.text"));
permissionsPanel.add(chkPermissionLink);
permissionsPanel.add(chkPermissionRead);
permissionsPanel.add(chkPermissionEdit);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
index 34b38395..68b680c8 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
@@ -14,17 +14,21 @@ import javax.swing.text.html.HTMLEditorKit;
import java.awt.Dimension;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.configurator.ContainerBindMountConfigurator;
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.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
import org.openslx.thrifthelper.Comparators;
-@SuppressWarnings("serial")
-public abstract class ImageMetaDataPageLayout extends WizardPage {
+import javax.swing.*;
+@SuppressWarnings("serial") public abstract class ImageMetaDataPageLayout extends WizardPage {
+
+ protected final QLabel lblOperatingSystem;
protected final JComboBox<OperatingSystem> cboOperatingSystem;
protected final JEditorPane txtDescription;
protected final JTextArea startCommand;
@@ -43,18 +47,20 @@ public abstract class ImageMetaDataPageLayout extends WizardPage {
protected final HTMLEditorKit kit;
+ protected final ContainerBindMountConfigurator bindMountConfigurator;
+
/**
* wizard page for entering image data at creating or editing an image
- *
- * @param wizard
+ *
+ * @param wizard The Wizard-object, which this extended {@link WizardPage} belongs to.
*/
public ImageMetaDataPageLayout(Wizard wizard) {
- super(wizard, "Metadaten");
- setDescription("Geben Sie bitte einen aussagekräftigen Namen für die neue VM ein.");
+ super(wizard, I18n.PAGE_LAYOUT.getString("ImageMetaData.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("ImageMetaData.WizardPage.description"));
GridManager grid = new GridManager(this, 3, false);
- QLabel osCaption = new QLabel("Betriebssystem");
+ lblOperatingSystem = new QLabel(I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.OS.text"));
cboOperatingSystem = new ComboBox<>(Comparators.operatingSystem, new ComboBoxRenderer<OperatingSystem>() {
@Override
public String renderItem(OperatingSystem item) {
@@ -64,11 +70,11 @@ public abstract class ImageMetaDataPageLayout extends WizardPage {
}
});
cboOperatingSystem.setEditable(false);
- grid.add(osCaption);
+ grid.add(lblOperatingSystem);
grid.add(cboOperatingSystem, 2);
grid.nextRow();
- sCommandCaption = new QLabel("Startbefehl");
+ sCommandCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.startCommand.text"));
startCommand = new JTextArea(1, 50);
startCommand.setMinimumSize(Gui.getScaledDimension(0, 35));
startCommand.setLineWrap(true);
@@ -118,8 +124,9 @@ public abstract class ImageMetaDataPageLayout extends WizardPage {
grid.nextRow();
// description
- QLabel descriptionCaption = new QLabel("Beschreibung");
+ QLabel descriptionCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageMetaData.Label.description.text"));
txtDescription = new JEditorPane();
+ txtDescription.setMinimumSize(Gui.getScaledDimension(0, 70));
kit = new HTMLEditorKit();
txtDescription.setEditorKit(kit);
txtDescription.setContentType("text/html");
@@ -129,13 +136,20 @@ public abstract class ImageMetaDataPageLayout extends WizardPage {
grid.add(descPane, 2).fill(true, true).expand(true, true);
grid.nextRow();
- chkLicenseRestricted = new JCheckBox("VM enthält lizenzpflichtige Software");
+ chkLicenseRestricted = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ImageMetaData.CheckBox.licenseRestricted.text"));
chkLicenseRestricted.setSelected(true);
grid.add(chkLicenseRestricted, 3);
grid.nextRow();
+ bindMountConfigurator = new ContainerBindMountConfigurator();
+ bindMountConfigurator.setVisible(false); // only visible in container context
+
+ grid.add(bindMountConfigurator, 2).fill(true, true).expand(true, true);
+ grid.nextRow();
+
// -- end permissions group --
- chkIsTemplate = new JCheckBox("Vorlage erstellen");
+ chkIsTemplate = new JCheckBox(I18n.PAGE_LAYOUT.getString("ImageMetaData.CheckBox.isTemplate.text"));
grid.add(chkIsTemplate, 3);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageOvfConversionPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageOvfConversionPageLayout.java
new file mode 100644
index 00000000..7f42fd9d
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageOvfConversionPageLayout.java
@@ -0,0 +1,78 @@
+package org.openslx.dozmod.gui.wizard.layout;
+
+import java.awt.event.KeyEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.Box;
+import javax.swing.JButton;
+import javax.swing.JProgressBar;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+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.gui.wizard.Wizard;
+import org.openslx.dozmod.gui.wizard.WizardPage;
+
+@SuppressWarnings("serial")
+public abstract class ImageOvfConversionPageLayout extends WizardPage {
+
+ public final JButton btnStartConversion;
+ protected final JTextArea txtInfoText;
+ protected final JProgressBar conversionProgressBar;
+ protected final JButton btnBrowseForOvftool;
+ protected final JTextField ovfToolFile;
+
+ /**
+ * Page converting an ovf to a vmx image.
+ */
+ public ImageOvfConversionPageLayout(Wizard wizard) {
+ super(wizard, I18n.PAGE_LAYOUT.getString("ImageOvfConversion.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.WizardPage.description"));
+ GridManager grid = new GridManager(this, 3);
+
+ txtInfoText = new JTextArea();
+ txtInfoText.setBorder(BorderFactory.createTitledBorder("Hinweis"));
+ txtInfoText.setLineWrap(true);
+ txtInfoText.setWrapStyleWord(true);
+ txtInfoText.setEditable(false);
+ txtInfoText.setFocusable(false);
+ txtInfoText.setOpaque(false);
+ txtInfoText.setText(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.WizardPage.InformationBox.text"));
+ grid.add(txtInfoText, 3).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ // -- Browse for ovfTool --
+ QLabel imageFileCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Toolpath.text"));
+ ovfToolFile = new JTextField();
+ ovfToolFile.setEditable(false);
+ ovfToolFile.setText(I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Toolpath.defaultpath.text"));
+ btnBrowseForOvftool = new JButton(
+ I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Toolpath.BrowseButton.text"));
+ btnBrowseForOvftool.setMnemonic(KeyEvent.VK_B);
+ grid.add(imageFileCaption);
+ grid.add(ovfToolFile).fill(true, false).expand(true, false);
+ grid.add(btnBrowseForOvftool);
+ grid.nextRow();
+
+ grid.add(Box.createVerticalGlue(), 3).expand(true, true);
+ grid.nextRow();
+
+ btnStartConversion = new JButton(
+ I18n.PAGE_LAYOUT.getString("ImageOvfConversion.Button.StartConversion.text"));
+ btnStartConversion.setMnemonic(KeyEvent.VK_B);
+ grid.add(btnStartConversion, 1).fill(false, false).expand(false, false);
+ grid.add(Box.createVerticalGlue(), 2).expand(false, false);
+ grid.nextRow();
+
+ conversionProgressBar = new JProgressBar();
+ conversionProgressBar.setMinimum(0);
+ conversionProgressBar.setMaximum(100);
+ conversionProgressBar.setStringPainted(true);
+ grid.add(conversionProgressBar, 3).fill(true, false).expand(true, false);
+ grid.nextRow();
+
+ grid.finish(false);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageTypePageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageTypePageLayout.java
new file mode 100644
index 00000000..7dac1103
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageTypePageLayout.java
@@ -0,0 +1,52 @@
+package org.openslx.dozmod.gui.wizard.layout;
+
+import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.wizard.Wizard;
+import org.openslx.dozmod.gui.wizard.WizardPage;
+
+import javax.swing.*;
+
+public abstract class ImageTypePageLayout extends WizardPage {
+
+ protected final JTextArea txtInfoText;
+ protected final JButton btnNewVmImage;
+ protected final JButton btnNewDockerImage;
+
+ /**
+ * Page to choose between new VM-Image or Docker Image
+ */
+ public ImageTypePageLayout(Wizard wizard) {
+
+ super(wizard, "Wähle Image Type");
+ setDescription("Möchten Sie eine VM oder ein Docker Image definieren?");
+ GridManager grid = new GridManager(this, 4, false);
+
+ // Choose between new vm or new docker-image
+ txtInfoText = new JTextArea();
+ txtInfoText.setBorder(BorderFactory.createTitledBorder("Hinweis"));
+ txtInfoText.setLineWrap(true);
+ txtInfoText.setWrapStyleWord(true);
+ txtInfoText.setEditable(false);
+ txtInfoText.setFocusable(false);
+ txtInfoText.setOpaque(false);
+ txtInfoText.setText("Hier haben Sie die Möglichkeit ein neues Image als VM oder Container (Docker) "
+ + "zu definieren.\n\n"
+ + "Sie besitzen derzeit eine Entwicklungsstand der bwLehrpool Suite, in der sämtliche "
+ + "Funktionalitäten zur Erstellung und Verwaltung von Container Images in Entwicklung sind. "
+ + "Diese Funktionen können sich in späteren Versionen ändern und somit ihre erstellten Images "
+ + "inkompatibel machen.");
+ grid.add(txtInfoText, 4).fill(true, false).expand(true, false);
+ grid.nextRow();
+ grid.nextRow();
+
+ // -- New VM Pick--
+ btnNewVmImage = new JButton("New VM");
+ grid.add(btnNewVmImage, 2, 2).fill(true, true).expand(true, true);
+ // -- New Docker-Image Pick--
+ btnNewDockerImage = new JButton("new Docker-Image");
+ grid.add(btnNewDockerImage, 2, 2).fill(true, true).expand(true, true);
+
+ grid.finish(false);
+
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
index 6f0e0afc..ceb1ed58 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
@@ -11,6 +11,7 @@ import javax.swing.JTextField;
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.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -28,29 +29,30 @@ public abstract class ImageUploadPageLayout extends WizardPage {
* Page for uploading an imagefile
*/
public ImageUploadPageLayout(Wizard wizard) {
- super(wizard, "Neue VM anlegen");
- setDescription("Bitte wählen Sie eine Virtuelle Maschine zum Hochladen aus.");
+ super(wizard, I18n.PAGE_LAYOUT.getString("ImageUpload.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("ImageUpload.WizardPage.description"));
GridManager grid = new GridManager(this, 3, false);
// -- Browse for VM --
- QLabel imageFileCaption = new QLabel("Virtuelle Maschine");
+ QLabel imageFileCaption = new QLabel(I18n.PAGE_LAYOUT.getString("ImageUpload.Label.imageFile.text"));
txtImageFile = new JTextField();
txtImageFile.setEditable(false);
- btnBrowseForImage = new JButton("Durchsuchen");
+ btnBrowseForImage = new JButton(I18n.PAGE_LAYOUT.getString("ImageUpload.Button.browseForImage.text"));
btnBrowseForImage.setMnemonic(KeyEvent.VK_B);
grid.add(imageFileCaption);
grid.add(txtImageFile).fill(true, false).expand(true, false);
grid.add(btnBrowseForImage);
grid.nextRow();
- lblImageName = new QLabel("Name");
+ lblImageName = new QLabel(I18n.PAGE_LAYOUT.getString("ImageUpload.Label.imageName.text"));
txtImageName = new JTextField();
grid.add(lblImageName);
grid.add(txtImageName, 2, 1).fill(true, false).expand(true, false);
grid.nextRow();
// -- Software license changed - shown only in UploadWizard --
- chkLicenseRestricted = new JCheckBox("enthält lizenzpflichtige Software");
+ chkLicenseRestricted = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("ImageUpload.CheckBox.licenseRestricted.text"));
chkLicenseRestricted.setVisible(false);
grid.skip();
grid.add(chkLicenseRestricted, 2, 1).fill(false, false).expand(true, false);
@@ -59,18 +61,14 @@ public abstract class ImageUploadPageLayout extends WizardPage {
grid.add(Box.createVerticalGlue(), 3).expand(true, true);
txtInfoText = new JTextArea();
- txtInfoText.setBorder(BorderFactory.createTitledBorder("Hinweis"));
+ txtInfoText.setBorder(BorderFactory.createTitledBorder(
+ I18n.PAGE_LAYOUT.getString("ImageUpload.TextArea.info.title")));
txtInfoText.setLineWrap(true);
txtInfoText.setWrapStyleWord(true);
txtInfoText.setEditable(false);
txtInfoText.setFocusable(false);
txtInfoText.setOpaque(false);
- txtInfoText.setText("Haben Sie noch keine eigene Virtuelle Maschine erstellt,"
- + " können Sie sich in der Übersicht eine Virtuelle Maschine als Vorlage herunterladen,"
- + " diese an Ihre Bedürfnisse anpassen und anschließend über diesen Assistenten hochladen."
- + "\n\nWenn Sie die VM einer bestehenden Veranstaltung aktualisieren möchten,"
- + " öffnen Sie die Detailansicht der bestehenden VM und wählen Sie 'Neue VM-Version hochladen'."
- + " Dadurch bleiben bestehende Berechtigungen, sowie Verknüpfungen zu Veranstaltungen erhalten.");
+ txtInfoText.setText(I18n.PAGE_LAYOUT.getString("ImageUpload.TextArea.info.text"));
grid.add(txtInfoText, 3).fill(true, false).expand(true, false);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java
index c53fd907..1781a1d9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java
@@ -6,6 +6,7 @@ import javax.swing.JLabel;
import org.openslx.dozmod.gui.control.BlockProgressBar;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -17,8 +18,8 @@ public class ImageUploadSummaryPageLayout extends WizardPage {
protected final JLabel lblHelpText;
public ImageUploadSummaryPageLayout(Wizard wizard) {
- super(wizard, "Fertig!");
- setDescription("Assistent abgeschlossen");
+ super(wizard, I18n.PAGE_LAYOUT.getString("ImageUploadSummary.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("ImageUploadSummary.WizardPage.description"));
GridManager grid = new GridManager(this, 1);
ctlUploadProgressBar = new BlockProgressBar(null);
@@ -36,7 +37,7 @@ public class ImageUploadSummaryPageLayout extends WizardPage {
grid.add(Box.createVerticalGlue()).expand(true, true);
grid.nextRow();
- chkCreateLecture = new JCheckBox("Veranstaltung zu dieser VM erstellen");
+ chkCreateLecture = new JCheckBox(I18n.PAGE_LAYOUT.getString("ImageUploadSummary.CheckBox.createLecture.text"));
chkCreateLecture.setVisible(false);
grid.add(chkCreateLecture);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
index 07a4887f..771dc60e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
@@ -19,6 +19,7 @@ import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.QDatePickerImpl;
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.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -53,12 +54,12 @@ public abstract class LectureCreationPageLayout extends WizardPage {
*/
public LectureCreationPageLayout(Wizard wizard, String title) {
super(wizard, title);
- setDescription("Geben Sie bitte einen aussagekräftigen Namen für die neue Veranstaltung ein.");
+ setDescription(I18n.PAGE_LAYOUT.getString("LectureCreation.WizardPage.description"));
GridManager grid = new GridManager(this, 3);
// lecture name
txtName = new JTextField();
- grid.add(new QLabel("Veranstaltungsname"));
+ grid.add(new QLabel(I18n.PAGE_LAYOUT.getString("LectureCreation.Label.name.text")));
grid.add(txtName, 2).fill(true, false).expand(true, false);
grid.nextRow();
@@ -109,26 +110,26 @@ public abstract class LectureCreationPageLayout extends WizardPage {
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
txtDescription.setMinimumSize(Gui.getScaledDimension(0, 60));
descPane.setMinimumSize(txtDescription.getMinimumSize());
- grid.add(new QLabel("Beschreibung"));
+ grid.add(new QLabel(I18n.PAGE_LAYOUT.getString("LectureCreation.Label.description.text")));
grid.add(descPane, 2).fill(true, false).expand(true, false);
grid.nextRow();
// Start date/time
dtpStartDate = new QDatePickerImpl();
spnStartTime = makeTimeSpinner(0, 0);
- grid.add(new QLabel("Startdatum"));
+ grid.add(new QLabel(I18n.PAGE_LAYOUT.getString("LectureCreation.Label.startTime.text")));
grid.add(dtpStartDate).fill(true, false).expand(true, false);
grid.add(spnStartTime);
grid.nextRow();
dtpEndDate = new QDatePickerImpl();
spnEndTime = makeTimeSpinner(23, 59);
- grid.add(new QLabel("Enddatum"));
+ grid.add(new QLabel(I18n.PAGE_LAYOUT.getString("LectureCreation.Label.endTime.text")));
grid.add(dtpEndDate).fill(true, false).expand(true, false);
grid.add(spnEndTime);
grid.nextRow();
- grid.add(new QLabel("Dauer der Veranstaltung: "));
+ grid.add(new QLabel(I18n.PAGE_LAYOUT.getString("LectureCreation.Label.period.text")));
lblCalcPeriod = new QLabel();
grid.add(lblCalcPeriod, 2);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCustomPermissionPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCustomPermissionPageLayout.java
index 64afc4df..0615fb0b 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCustomPermissionPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCustomPermissionPageLayout.java
@@ -10,6 +10,7 @@ import javax.swing.JPanel;
import org.openslx.dozmod.gui.configurator.LecturePermissionConfigurator;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -26,8 +27,8 @@ public abstract class LectureCustomPermissionPageLayout extends WizardPage {
* Page for setting custom permissions of a lecture
*/
public LectureCustomPermissionPageLayout(Wizard wizard) {
- super(wizard, "Berechtigungen festlegen");
- setDescription("Legen Sie hier die gewünschten Berechtigungen fest.");
+ super(wizard, I18n.PAGE_LAYOUT.getString("LectureCustomPermission.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("LectureCustomPermission.WizardPage.description"));
GridManager grid = new GridManager(this, 1, false);
lectureCustomPermissionManager = new LecturePermissionConfigurator();
@@ -35,21 +36,23 @@ public abstract class LectureCustomPermissionPageLayout extends WizardPage {
grid.nextRow();
// -- default permissions --
- JLabel defaultPermLabel = new JLabel("Standardberechtigungen");
+ JLabel defaultPermLabel = new JLabel(
+ I18n.PAGE_LAYOUT.getString("LectureCustomPermission.Label.defaultPerm.text"));
defaultPermLabel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
defaultPermLabel.setFont(defaultPermLabel.getFont().deriveFont(Font.BOLD));
grid.add(defaultPermLabel);
- JLabel defaultDescriptionLabel = new JLabel("<html><body style ='width:100%'> "
- + "Legen Sie hier die Berechtigungen für alle anderen (nicht in der Liste "
- + "angezeigten) Benutzer fest.</body></html>");
+ JLabel defaultDescriptionLabel = new JLabel(
+ I18n.PAGE_LAYOUT.getString("LectureCustomPermission.Label.defaultDesc.text"));
defaultDescriptionLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
grid.add(defaultDescriptionLabel).fill(true, false).expand(true, false);
JPanel permissionsPanel = new JPanel();
permissionsPanel.setLayout(new BoxLayout(permissionsPanel, BoxLayout.LINE_AXIS));
- chkPermissionEdit = new JCheckBox("Bearbeiten");
- chkPermissionAdmin = new JCheckBox("Admin");
+ chkPermissionEdit = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("LectureCustomPermission.CheckBox.permissionEdit.text"));
+ chkPermissionAdmin = new JCheckBox(
+ I18n.PAGE_LAYOUT.getString("LectureCustomPermission.CheckBox.permissionAdmin.text"));
permissionsPanel.add(chkPermissionEdit);
permissionsPanel.add(chkPermissionAdmin);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureImageListPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureImageListPageLayout.java
index 7461df1e..ef7baf36 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureImageListPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureImageListPageLayout.java
@@ -3,6 +3,7 @@ package org.openslx.dozmod.gui.wizard.layout;
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;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -15,8 +16,8 @@ public abstract class LectureImageListPageLayout extends WizardPage {
* Page for setting custom permissions of a lecture
*/
public LectureImageListPageLayout(Wizard wizard) {
- super(wizard, "VM verknüpfen");
- setDescription("Wählen Sie eine VM für diese Veranstaltung aus");
+ super(wizard, I18n.PAGE_LAYOUT.getString("LectureImageList.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("LectureImageList.WizardPage.description"));
GridManager grid = new GridManager(this, 1, false);
ctlImageList = new ImageListViewer(FilterType.USABLE);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureLocationSelectionPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureLocationSelectionPageLayout.java
index 929b55b8..bd86e86c 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureLocationSelectionPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureLocationSelectionPageLayout.java
@@ -3,6 +3,7 @@ package org.openslx.dozmod.gui.wizard.layout;
import org.apache.log4j.Logger;
import org.openslx.dozmod.gui.control.LocationSelector;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -14,8 +15,8 @@ public class LectureLocationSelectionPageLayout extends WizardPage {
protected final LocationSelector ctlLocationSelector;
public LectureLocationSelectionPageLayout(Wizard wizard) {
- super(wizard, "Raumauswahl");
- setDescription("Bitte wählen Sie die Räume für diese Veranstaltung aus");
+ super(wizard, I18n.PAGE_LAYOUT.getString("LectureLocationSelection.WizardPage.title"));
+ setDescription(I18n.PAGE_LAYOUT.getString("LectureLocationSelection.WizardPage.description"));
ctlLocationSelector = new LocationSelector();
GridManager grid = new GridManager(this, 1);
grid.add(ctlLocationSelector).fill(true, true).expand(true, true);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureOptionsPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureOptionsPageLayout.java
index 86c68e44..28c04d81 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureOptionsPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureOptionsPageLayout.java
@@ -5,13 +5,14 @@ import javax.swing.JCheckBox;
import javax.swing.JLabel;
import org.openslx.dozmod.gui.helper.GridManager;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@SuppressWarnings("serial")
public abstract class LectureOptionsPageLayout extends WizardPage {
- protected static String title = "Zusätzliche Optionen";
+ protected static String title = I18n.PAGE_LAYOUT.getString("LectureOptions.WizardPage.title");
protected final JCheckBox chkUsbEnabled;
protected final JCheckBox chkInternetEnabled;
@@ -24,23 +25,23 @@ public abstract class LectureOptionsPageLayout extends WizardPage {
*/
public LectureOptionsPageLayout(Wizard wizard) {
super(wizard, title);
- setDescription("Bitte wählen Sie aus folgenden Optionen aus:");
+ setDescription(I18n.PAGE_LAYOUT.getString("LectureOptions.WizardPage.description"));
GridManager grid = new GridManager(this, 2);
// first column for labels hopefully clearing up some of the mess...
// first category for general options
- JLabel lblGeneral = new JLabel("Allgemeines");
+ JLabel lblGeneral = new JLabel(I18n.PAGE_LAYOUT.getString("LectureOptions.Label.general.text"));
grid.add(lblGeneral);
- chkAutoUpdate = new JCheckBox("Immer auf aktuellste VM-Version updaten", true);
+ chkAutoUpdate = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.autoUpdate.text"), true);
grid.add(chkAutoUpdate);
grid.nextRow();
- chkIsActive = new JCheckBox("Veranstaltung ist aktiv", true);
+ chkIsActive = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.isActive.text"), true);
grid.skip();
grid.add(chkIsActive);
grid.nextRow();
- chkIsExam = new JCheckBox("Veranstaltung ist eine Prüfung", false);
+ chkIsExam = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.isExam.text"), false);
grid.skip();
grid.add(chkIsExam);
grid.nextRow();
@@ -48,15 +49,16 @@ public abstract class LectureOptionsPageLayout extends WizardPage {
grid.add(Box.createVerticalStrut(10), 2);
grid.nextRow();
// second category for restrictions options
- JLabel lblRestriction = new JLabel("Beschränkungen");
+ JLabel lblRestriction = new JLabel(I18n.PAGE_LAYOUT.getString("LectureOptions.Label.restrictions.text"));
grid.add(lblRestriction);
- chkInternetEnabled = new JCheckBox("Netzwerk-/Internetzugriff zulassen", true);
+ chkInternetEnabled = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.internetEnabled.text"),
+ true);
// TODO: Hint at exception editor in lecture details window, or include here...
grid.add(chkInternetEnabled).fill(true, false).expand(true, false);
grid.nextRow();
- chkUsbEnabled = new JCheckBox("Speichermedien zulassen", true);
+ chkUsbEnabled = new JCheckBox(I18n.PAGE_LAYOUT.getString("LectureOptions.CheckBox.USBEnabled.text"), true);
grid.skip();
grid.add(chkUsbEnabled);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureRestrictionPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureRestrictionPageLayout.java
index 85c508ae..02e9d7b4 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureRestrictionPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureRestrictionPageLayout.java
@@ -1,5 +1,6 @@
package org.openslx.dozmod.gui.wizard.layout;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -7,7 +8,7 @@ import org.openslx.dozmod.gui.wizard.WizardPage;
public class LectureRestrictionPageLayout extends WizardPage {
public LectureRestrictionPageLayout(Wizard wizard) {
- super(wizard, "Beschränkungen");
+ super(wizard, I18n.PAGE_LAYOUT.getString("LectureRestriction.WizardPage.title"));
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java
new file mode 100644
index 00000000..f784d844
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ContainerUploadPage.java
@@ -0,0 +1,260 @@
+package org.openslx.dozmod.gui.wizard.page;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.log4j.Logger;
+import org.openslx.bwlp.thrift.iface.ImageDetailsRead;
+import org.openslx.dozmod.Config;
+import org.openslx.dozmod.gui.helper.I18n;
+import org.openslx.dozmod.gui.helper.QFileChooser;
+import org.openslx.dozmod.gui.helper.TextChangeListener;
+import org.openslx.dozmod.gui.wizard.Wizard;
+import org.openslx.dozmod.gui.wizard.layout.ContainerUploadPageLayout;
+import org.openslx.dozmod.model.ContainerBuildContextMethod;
+import org.openslx.dozmod.model.ContainerDefinition;
+import org.openslx.dozmod.model.ContainerMeta;
+import org.openslx.dozmod.state.UploadWizardState;
+import org.openslx.dozmod.thrift.cache.MetaDataCache;
+import org.openslx.util.vm.DockerMetaDataDummy;
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.filechooser.FileFilter;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class ContainerUploadPage extends ContainerUploadPageLayout {
+
+ // TODO: Add a Instruction for the new Container-Feature in bwLehrpool.
+ // TODO: Add link to instructions for Docker-Intetragtion at https://www.bwlehrpool.de/doku.php
+
+ private final Logger LOGGER = Logger.getLogger(ContainerUploadPage.class);
+
+ /**
+ * Page for uploading an imagefile
+ *
+ * @param wizard
+ */
+ private final UploadWizardState state;
+ private final ImageDetailsRead existingImage;
+ private final ContainerDefinition containerDefinition;
+
+ public ContainerUploadPage(Wizard wizard, final UploadWizardState state,
+ ContainerDefinition containerDefinition) {
+ super(wizard);
+ this.containerDefinition = containerDefinition;
+ this.state = state;
+
+ canComeBack = false;
+ existingImage = null;
+
+ // HACK set dummy os
+ state.selectedOs = MetaDataCache.getOsById(18);
+
+ init();
+ }
+
+ // TODO this constructor is currently used in case if user wants do upload a new version.
+ // This makes no currently no sens in context of docker container and this is used.
+ public ContainerUploadPage(Wizard wizard, UploadWizardState uploadWizardState,
+ ImageDetailsRead imageDetailsRead) {
+ super(wizard);
+
+ state = uploadWizardState;
+ existingImage = imageDetailsRead;
+
+ // TODO fix this!
+ containerDefinition = null;
+
+ lblImageName.setEnabled(existingImage == null);
+ txtImageName.setEnabled(existingImage == null);
+ txtInfoText.setVisible(existingImage == null);
+
+ state.name = imageDetailsRead.imageName;
+ state.defaultPermissions = imageDetailsRead.getDefaultPermissions();
+ state.description = imageDetailsRead.getDescription();
+ state.detectedOs = MetaDataCache.getOsById(imageDetailsRead.getOsId());
+ state.selectedOs = MetaDataCache.getOsById(imageDetailsRead.getOsId());
+ state.tags = imageDetailsRead.getTags();
+ state.defaultPermissions = imageDetailsRead.getUserPermissions();
+
+ state.uuid = imageDetailsRead.getImageBaseId();
+ init();
+ }
+
+ private void init() {
+ this.txtImageFile.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ browseFile();
+ }
+ });
+ this.btnBrowseForImage.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ browseFile();
+ }
+ });
+
+ txtImageName.getDocument().addDocumentListener(new TextChangeListener() {
+ @Override public void changed() {
+ reactOnUserInput();
+ }
+ });
+ txtContainerRun.getDocument().addDocumentListener(new TextChangeListener() {
+ @Override public void changed() {
+ reactOnUserInput();
+ }
+ });
+
+ tpInput.addChangeListener(new ChangeListener() {
+ @Override public void stateChanged(ChangeEvent e) {
+ reactOnUserInput();
+ }
+ });
+
+ txtGitRepo.getDocument().addDocumentListener(new TextChangeListener() {
+ @Override public void changed() {
+ reactOnUserInput();
+ }
+ });
+
+ btnBrowseForImage.requestFocus();
+ }
+
+ private void browseFile() {
+
+ QFileChooser fc = new QFileChooser(Config.getUploadPath(), false);
+ fc.setAcceptAllFileFilterUsed(false);
+ fc.addChoosableFileFilter(new DockerfileFilter());
+
+ int action = fc.showOpenDialog(getDialog());
+ File file = fc.getSelectedFile();
+
+ if (action != JFileChooser.APPROVE_OPTION || file == null)
+ return;
+
+ txtImageFile.setText(file.getAbsolutePath());
+
+ if (existingImage == null)
+ txtImageName.setText(file.getParentFile().getName());
+ else
+ txtImageName.setText(existingImage.getImageName());
+
+ state.descriptionFile = file;
+ // TESTING: Upload also a prematurely created image (tar)
+ String imageName = file.getParentFile().getName();
+ File imageTarFile = new File(file.getParentFile(), imageName.concat(".tar"));
+ if (imageTarFile.exists()) {
+ LOGGER.info("Upload also an created Image");
+ state.diskFile = imageTarFile;
+ } else {
+ state.diskFile = getDummyFile();
+ }
+
+ Config.setUploadPath(file.getParent());
+ reactOnUserInput();
+ }
+
+ private File getDummyFile() {
+ String configDir = Config.getPath();
+ File zeroFile = new File(configDir, "ZERO-FILE");
+ // create a temp file with dummy content,
+ // because vmchooser relies on an existing image after choosing a lecture.
+ // TODO change behavior in vmchooser to allow start lectures without images.
+ try {
+ if (!zeroFile.exists()) {
+ zeroFile.createNewFile();
+ FileUtils.writeStringToFile(zeroFile, "ZERO\n", "UTF-8");
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ LOGGER.error("Could not create a dummy file.", e);
+ }
+ LOGGER.info("Use dummy file");
+ return zeroFile;
+ }
+
+ private void reactOnUserInput() {
+ boolean completed = checkUserInput();
+ if (completed)
+ setDescription(I18n.PAGE.getString("ContainerUploadPage.Description.ContainerDefFinished"));
+ setPageComplete(completed);
+ }
+
+ private boolean checkUserInput() {
+ ContainerBuildContextMethod method = getBuildContextMethod();
+
+ switch (method) {
+ case FILE:
+ if (txtImageFile.getText() == null || txtImageFile.getText().isEmpty()) {
+ setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoReceipt"));
+ return false;
+ }
+ break;
+ case GIT_REPOSITORY:
+ if (txtGitRepo.getText() == null || txtGitRepo.getText().isEmpty()) {
+ setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoGitRepository"));
+ return false;
+ }
+ break;
+ }
+
+ if (txtImageName.getText() == null || txtImageName.getText().isEmpty()) {
+ setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoProperName"));
+ return false;
+ }
+
+ if (txtContainerRun.getText() == null || txtContainerRun.getText().isEmpty()) {
+ setWarningMessage(I18n.PAGE.getString("ContainerUploadPage.Warning.NoRunOptions"));
+ return false;
+ }
+ return true;
+ }
+
+ private DockerMetaDataDummy createVmMeta() {
+
+ ContainerMeta containerMeta = containerDefinition.getContainerMeta();
+ containerMeta.setBuildContextMethod(getBuildContextMethod().ordinal());
+ containerMeta.setImageName(txtImageName.getText());
+ containerMeta.setRunOptions(txtContainerRun.getText());
+ switch (containerDefinition.getBuildContextMethod()) {
+ case FILE:
+ containerDefinition.setContainerRecipe(state.descriptionFile);
+ break;
+ case GIT_REPOSITORY:
+ containerMeta.setBuildContextUrl(txtGitRepo.getText());
+ state.diskFile = getDummyFile();
+ state.descriptionFile = getDummyFile();
+ break;
+ }
+ return containerDefinition.createVmMeta();
+ }
+
+ @Override protected boolean wantNextOrFinish() {
+ state.name = existingImage != null ? existingImage.getImageName() : txtImageName.getText();
+ state.meta = createVmMeta();
+
+ return true;
+ }
+
+ private static class DockerfileFilter extends FileFilter {
+
+ @Override public boolean accept(File f) {
+
+ Pattern p = Pattern.compile("[Dd]ockerfile");
+ Matcher m = p.matcher(f.getName());
+
+ boolean accept = false;
+ if ((f.isFile() && m.matches()) || f.isDirectory())
+ accept = true;
+ return accept;
+ }
+
+ @Override public String getDescription() {
+ return "Dockerfile";
+ }
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
index 33ff5cd5..68beb655 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java
@@ -22,30 +22,40 @@ import org.apache.log4j.Logger;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.bwlp.thrift.iface.ShareMode;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.ImageMetaDataPageLayout;
+import org.openslx.dozmod.model.ContainerDefinition;
import org.openslx.dozmod.state.UploadWizardState;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.thrifthelper.Comparators;
import org.openslx.util.QuickTimer;
import org.openslx.util.QuickTimer.Task;
+import org.openslx.util.vm.DockerMetaDataDummy;
import org.openslx.util.vm.QemuMetaData;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.util.Collections;
+import java.util.List;
+
/**
* Page for setting the details of an image.
*/
-@SuppressWarnings("serial")
-public class ImageMetaDataPage extends ImageMetaDataPageLayout {
+@SuppressWarnings("serial") public class ImageMetaDataPage extends ImageMetaDataPageLayout {
private final static Logger LOGGER = Logger.getLogger(ImageMetaDataPage.class);
private UploadWizardState state;
+ private final ContainerDefinition containerDefinition;
- public ImageMetaDataPage(Wizard wizard, UploadWizardState uploadWizardState) {
+ public ImageMetaDataPage(Wizard wizard, UploadWizardState uploadWizardState,
+ ContainerDefinition containerDefinition) {
super(wizard);
this.state = uploadWizardState;
+ this.containerDefinition = containerDefinition;
setPageComplete(false);
// HACK set fixed uploadWizardState to test functions
uploadWizardState.shareMode = ShareMode.LOCAL;
@@ -54,14 +64,12 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
QuickTimer.scheduleOnce(new Task() {
List<OperatingSystem> osList = null;
- @Override
- public void fire() {
+ @Override public void fire() {
osList = MetaDataCache.getOperatingSystems();
// now send the organizations back to the LoginWindow
// through populateIdpCombo()
Gui.asyncExec(new Runnable() {
- @Override
- public void run() {
+ @Override public void run() {
fillOsCombo(osList);
}
});
@@ -69,8 +77,7 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
});
cboOperatingSystem.addItemListener(new ItemListener() {
- @Override
- public void itemStateChanged(ItemEvent e) {
+ @Override public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
reactToUserInput();
}
@@ -78,8 +85,7 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
});
txtDescription.getDocument().addDocumentListener(new TextChangeListener() {
- @Override
- public void changed() {
+ @Override public void changed() {
reactToUserInput();
}
});
@@ -140,7 +146,7 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
} else {
txtDescription.setContentType("text/html");
txtDescription.setText(tmp);
- btnWysiwyg.setText("Html");
+ btnWysiwyg.setText("HTML");
btnBold.setEnabled(true);
btnUnderline.setEnabled(true);
@@ -192,11 +198,15 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
reactToUserInput();
}
- @Override
- protected boolean wantNextOrFinish() {
+ @Override protected boolean wantNextOrFinish() {
state.selectedOs = (OperatingSystem) cboOperatingSystem.getSelectedItem();
state.isTemplate = chkIsTemplate.isSelected();
state.isRestricted = chkLicenseRestricted.isSelected();
+
+ if (state.meta instanceof DockerMetaDataDummy) {
+ containerDefinition.getContainerMeta().setBindMountConfig(bindMountConfigurator.getData());
+ state.meta = containerDefinition.createVmMeta();
+ }
return state.selectedOs != null && state.description != null;
}
@@ -217,7 +227,7 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
private void reactToUserInput() {
if (cboOperatingSystem.getSelectedIndex() == -1) {
// OS empty, description input present
- setWarningMessage("Wählen Sie das Betriebssystem aus.");
+ setWarningMessage(I18n.PAGE.getString("ImageMetaData.WizardPage.warningMessage.noOS"));
setPageComplete(false);
return;
}
@@ -227,15 +237,28 @@ public class ImageMetaDataPage extends ImageMetaDataPageLayout {
startCommandPane.setVisible(true);
}
+ if (state.meta instanceof DockerMetaDataDummy) {
+ bindMountConfigurator.setVisible(true);
+
+ // TODO we need Information about a OS in Container? Currently use "Other (32 Bit)" as default
+ lblOperatingSystem.setVisible(false);
+ cboOperatingSystem.setVisible(false);
+
+ // TODO do we need to check license restrictions in container?
+ chkLicenseRestricted.setVisible(false);
+ // TODO currently no Container Template!
+ chkIsTemplate.setVisible(false);
+ }
+
// evaluate description field
state.description = txtDescription.getText();
if (state.description == null || state.description.isEmpty()) {
// OS set, no description
- setWarningMessage("Fügen Sie eine Beschreibung hinzu.");
+ setWarningMessage(I18n.PAGE.getString("ImageMetaData.WizardPage.warningMessage.noDescription"));
setPageComplete(false);
return;
}
- setDescription("Klicken Sie auf 'Weiter' um Berechtigungen festzulegen oder 'Fertigstellen'");
+ setDescription(I18n.PAGE.getString("ImageMetaData.WizardPage.description"));
setPageComplete(true);
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageOvfConversionPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageOvfConversionPage.java
new file mode 100644
index 00000000..774d6a6e
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageOvfConversionPage.java
@@ -0,0 +1,231 @@
+package org.openslx.dozmod.gui.wizard.page;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.nio.file.Files;
+
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.log4j.Logger;
+import org.openslx.dozmod.Config;
+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.QFileChooser;
+import org.openslx.dozmod.gui.wizard.Wizard;
+import org.openslx.dozmod.gui.wizard.layout.ImageOvfConversionPageLayout;
+import org.openslx.dozmod.state.UploadWizardState;
+import org.openslx.dozmod.util.ConversionTaskWorker;
+
+/**
+ * Page for converting an ovf image into an vmx image. Creates a directory for
+ * the new vmx image, starts the conversion SwingWorker and shows the progress.
+ * Replaces the image description file in state after conversion.
+ */
+@SuppressWarnings("serial")
+public class ImageOvfConversionPage extends ImageOvfConversionPageLayout {
+ private final static Logger LOGGER = Logger.getLogger(ImageOvfConversionPage.class);
+
+ private UploadWizardState state;
+ private ImageOvfConversionPage page;
+ private File vmxFile;
+ private ConversionTaskWorker worker;
+ private String startConversionButtonString = I18n.PAGE
+ .getString("ImageOvfConversion.StartConversionButton.text");
+ public boolean conversionStarted = false;
+ public boolean conversionSuccessful = false;
+ private String ovfToolPath = "ovftool";
+
+ public ImageOvfConversionPage(Wizard wizard, UploadWizardState uploadWizardState) {
+ super(wizard);
+ setPageComplete(false);
+ this.canComeBack = false;
+ this.state = uploadWizardState;
+ page = this;
+ String os = System.getProperty("os.name");
+ // Linux install should have put the ovftool into the path variable.
+ // Try to set it for windows and macos.
+ if (os.toLowerCase().contains("windows")) {
+ ovfToolPath = System.getenv("ProgramFiles(X86)")
+ + "\\VMware\\VMware Workstation\\OVFTool\\ovftool.exe";
+ if (!(new File(ovfToolPath).exists())) {
+ ovfToolPath = System.getenv("ProgramFiles(X86)")
+ + "\\VMware\\VMware Player\\OVFTool\\ovftool.exe";
+ }
+ } else if (os.toLowerCase().contains("mac")) {
+ ovfToolPath = "/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool";
+ }
+
+ txtInfoText.setVisible(true);
+
+ // Start the conversion
+ btnStartConversion.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if (worker == null) {
+ try {
+ updateConversionProgressbar(0);
+ btnStartConversion.setText(
+ I18n.PAGE.getString("ImageOvfConversion.AbortConversionButton.text"));
+ convertOvfToVmx(state.descriptionFile);
+ } catch (Exception error) {
+ btnStartConversion.setEnabled(false);
+ Gui.showMessageBox(page,
+ I18n.PAGE.getString("ImageOvfConversion.ErrorMessage.ConversionFailed"),
+ MessageType.ERROR, LOGGER, error);
+ }
+ } else {
+ page.cancelConversionWorker();
+
+ }
+ }
+ });
+ // Browse for *.vmx
+ btnBrowseForOvftool.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ browseForOvftoolPath();
+ }
+
+ });
+ }
+
+ // Check wether the file contains the keyword. Stops after the first few lines.
+ private boolean fileContainsKeyword(File file, String keyword) {
+ try (Reader reader = new FileReader(file); BufferedReader buffered = new BufferedReader(reader)) {
+ String line;
+ int lineCount = 0;
+ while ((line = buffered.readLine()) != null && lineCount < 50) {
+ if (line.toLowerCase().contains(keyword)) {
+ LOGGER.debug("Detected OVF/OVA created with Virtual Box");
+ return true;
+ }
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+
+ public void browseForOvftoolPath() {
+ QFileChooser fc = new QFileChooser(Config.getUploadPath(), false);
+ int action = fc.showOpenDialog(getDialog());
+ File file = fc.getSelectedFile();
+
+ if (action != JFileChooser.APPROVE_OPTION || file == null) {
+ return;
+ }
+ page.ovfToolPath = file.getAbsolutePath();
+ btnStartConversion.setEnabled(true);
+ ovfToolFile.setText(page.ovfToolPath);
+ }
+
+ public void cancelConversionWorker() {
+ if (worker != null) {
+ worker.cancel(true);
+ btnStartConversion.setText(startConversionButtonString);
+ worker = null;
+ }
+ }
+
+ // Check if the directory we want to create for the converted virtual machine
+ // exists and create it
+ private void convertOvfToVmx(File file) throws IOException {
+ File directoryFile = new File(file.getParent() + "/converted_vm");
+ LOGGER.debug("Directory for converted VM:" + directoryFile.getAbsolutePath());
+ // Cancel if user clicks cancel
+ if (directoryFile.exists() && !askDeleteDirAndContinue(directoryFile)) {
+ btnStartConversion.setText(startConversionButtonString);
+ return;
+ }
+ conversionStarted = true;
+ Files.createDirectories(directoryFile.toPath());
+ vmxFile = new File(
+ directoryFile.getPath() + "/" + FilenameUtils.removeExtension((file.getName())) + ".vmx");
+ worker = new ConversionTaskWorker(file, vmxFile, page, ovfToolPath);
+ worker.execute();
+ state.convertedDescriptionFile = vmxFile;
+ }
+
+ private boolean askDeleteDirAndContinue(File directoryFile) throws IOException {
+ if (directoryFile.exists()) {
+ int dialogButton = JOptionPane.YES_NO_OPTION;
+ int dialogResult;
+ if (!conversionStarted) {
+ dialogResult = JOptionPane.showConfirmDialog(this,
+ I18n.PAGE.getString("ImageOvfConversion.Dialog.DirectoryExists"),
+ I18n.PAGE.getString("ImageOvfConversion.Dialog.DirectoryExists.title"), dialogButton);
+ } else {
+ dialogResult = JOptionPane.showConfirmDialog(this,
+ I18n.PAGE.getString("ImageOvfConversion.Dialog.RemoveTmpDirectory"),
+ I18n.PAGE.getString("ImageOvfConversion.Dialog.RemoveTmpDirectory.title"),
+ dialogButton);
+ }
+ if (dialogResult == 0) {
+ FileUtils.deleteDirectory(directoryFile);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ // Nothing to delete. Should be OK to continue
+ return true;
+ }
+
+ public void updateConversionProgressbar(int percent) {
+ conversionProgressBar.setValue(percent);
+ }
+
+ public void updateConversionProgressbarText(String text) {
+ conversionProgressBar.setString(text);
+ }
+
+ @Override
+ protected boolean wantNextOrFinish() {
+ return false;
+ }
+
+ @Override
+ protected void onPageEnter() {
+ if (!fileContainsKeyword(state.descriptionFile, "vmware")) {
+ Gui.showMessageBox(this,
+ I18n.PAGE.getString("ImageOvfConversion.MessageBox.notAVmwareOrVboxImage"),
+ MessageType.WARNING, LOGGER, null);
+ } else if (fileContainsKeyword(state.descriptionFile, "vbox")) {
+ Gui.showMessageBox(this, I18n.PAGE.getString("ImageOvfConversion.MessageBox.VboxDetected"),
+ MessageType.INFO, LOGGER, null);
+ }
+ updateConversionProgressbar(0);
+ updateConversionProgressbarText("");
+ conversionStarted = false;
+ conversionSuccessful = false;
+ btnStartConversion.setText(startConversionButtonString);
+ }
+
+ @Override
+ protected void onPageLeave() {
+ // Make sure the worker is stopped when leaving the page.
+ if (wizard.isCancelled() || (conversionStarted && !conversionSuccessful)) {
+ page.cancelConversionWorker();
+ if (state.convertedDescriptionFile != null) {
+ try {
+ askDeleteDirAndContinue(state.convertedDescriptionFile.getParentFile());
+ } catch (IOException e) {
+ LOGGER.debug(e);
+ }
+ }
+ state.convertedDescriptionFile = null;
+ conversionStarted = false;
+ }
+ super.onPageLeave();
+ }
+
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageTypePage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageTypePage.java
new file mode 100644
index 00000000..219f3391
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageTypePage.java
@@ -0,0 +1,35 @@
+package org.openslx.dozmod.gui.wizard.page;
+
+import org.openslx.dozmod.gui.wizard.ImageCreationWizard;
+import org.openslx.dozmod.gui.wizard.layout.ImageTypePageLayout;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+public class ImageTypePage extends ImageTypePageLayout {
+
+ public ImageTypePage(final ImageCreationWizard wizard) {
+ super(wizard);
+
+ btnNewVmImage.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ wizard.doVmCreation();
+ setPageComplete(true);
+ wizard.doNext();
+ }
+ });
+
+ btnNewDockerImage.addActionListener(new ActionListener() {
+ @Override public void actionPerformed(ActionEvent e) {
+ wizard.doDockerCreation();
+ setPageComplete(true);
+ wizard.doNext();
+ }
+ });
+ }
+
+ @Override protected void onPageEnter() {
+ // set onPageEnter to disable Next and Finish button
+ setPageComplete(false);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
index d0431b2e..19ce1429 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
@@ -13,12 +13,14 @@ import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;
+import org.apache.commons.io.FilenameUtils;
import org.apache.log4j.Logger;
import org.openslx.bwlp.thrift.iface.ImageDetailsRead;
import org.openslx.bwlp.thrift.iface.Virtualizer;
import org.openslx.dozmod.Branding;
import org.openslx.dozmod.Config;
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.QFileChooser;
import org.openslx.dozmod.gui.wizard.Wizard;
@@ -56,6 +58,11 @@ public class ImageUploadPage extends ImageUploadPageLayout {
private final FileNameExtensionFilter vboxFilter = new FileNameExtensionFilter(
"VirtualBox Virtual Machine", "vbox");
+ private final FileNameExtensionFilter ovfFilter = new FileNameExtensionFilter(
+ "OVF Virtual Machine Format", "ovf");
+ private final FileNameExtensionFilter ovaFilter = new FileNameExtensionFilter(
+ "OVA Virtual Machine Format", "ova");
+
public ImageUploadPage(Wizard wizard, UploadWizardState uploadWizardState,
final ImageDetailsRead existingImage) {
super(wizard);
@@ -89,9 +96,9 @@ public class ImageUploadPage extends ImageUploadPageLayout {
// initialize allSupportedFilter depending on whether multiple hypervisors
// are supported or not
if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) {
- allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx", "vbox");
+ allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx", "ovf", "vbox", "ova");
} else {
- allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx");
+ allSupportedFilter = new FileNameExtensionFilter("All Supported", "vmx", "ovf", "ova");
}
btnBrowseForImage.requestFocus();
}
@@ -100,6 +107,8 @@ public class ImageUploadPage extends ImageUploadPageLayout {
QFileChooser fc = new QFileChooser(Config.getUploadPath(), false);
fc.setAcceptAllFileFilterUsed(false);
fc.addChoosableFileFilter(vmxFilter);
+ fc.addChoosableFileFilter(ovfFilter);
+ fc.addChoosableFileFilter(ovaFilter);
if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) {
fc.addChoosableFileFilter(vboxFilter);
}
@@ -122,22 +131,46 @@ public class ImageUploadPage extends ImageUploadPageLayout {
vmSelected(file.getAbsoluteFile());
}
+ private void askForConversion(File file) {
+ int dialogButton = JOptionPane.YES_NO_OPTION;
+ int dialogResult = JOptionPane.showConfirmDialog(this,
+ I18n.PAGE.getString("ImageUpload.WizardPage.dialog.OvfOvaDetected"),
+ I18n.PAGE.getString("ImageUpload.WizardPage.dialog.title"), dialogButton);
+ if (dialogResult == 0) {
+ // txtImageFile.setText(file.getAbsolutePath());
+ // txtImageName.setText(state.meta.getDisplayName());
+ state.descriptionFile = file;
+ setErrorMessage(null);
+ setDescription("Bitte starten Sie die Konvertierung.");
+ wizard.showOutOfOrderPage(state.conversionPage);
+ } else {
+ setPageComplete(false);
+ }
+ }
+
private void vmSelected(File file) {
Config.setUploadPath(file.getParent());
txtImageFile.setText("");
txtImageName.setText("");
+ // ask to convert OVA and OVF files
+ String fileExtension = FilenameUtils.getExtension(file.getAbsolutePath());
+ if (fileExtension.equalsIgnoreCase("ova") || fileExtension.equalsIgnoreCase("ovf")) {
+ askForConversion(file);
+ return;
+ }
try {
// gets the metadata object of the selected VM depending on its type
state.meta = VmMetaData.getInstance(MetaDataCache.getOperatingSystems(), file);
} catch (IOException e) {
- Gui.showMessageBox(this, "Konnte " + file.getPath() + " nicht lesen", MessageType.ERROR, LOGGER,
- e);
+ Gui.showMessageBox(this,
+ I18n.PAGE.getString("ImageUpload.Message.error.couldNotGetMetadata", file.getPath()),
+ MessageType.ERROR, LOGGER, e);
setPageComplete(false);
return;
}
if (state.meta == null || state.meta.getDisplayName() == null) {
- setErrorMessage("Ungültige Konfigurationsdatei ausgewählt!");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.invalidConfigFile"));
setPageComplete(false);
return;
}
@@ -145,8 +178,8 @@ public class ImageUploadPage extends ImageUploadPageLayout {
final String fileformat = state.meta.getVirtualizer().virtName;
// bail if multiple hypervisors are not supported
if (!(state.meta instanceof VmwareMetaData) && !Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) {
- setErrorMessage("Der Hypervisor der gewählten VM (" + fileformat
- + ") wird vom aktuellen Satellitenserver nicht unterstützt.");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.hypervisorNotSupported",
+ fileformat));
setPageComplete(false);
return;
}
@@ -156,20 +189,21 @@ public class ImageUploadPage extends ImageUploadPageLayout {
String existingImageVirtualizerName = "<error>";
if (existingImageVirtualizer != null)
existingImageVirtualizerName = existingImageVirtualizer.virtName;
- setErrorMessage("Neue Versionen müssen vom Typ " + existingImageVirtualizerName + " sein.");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.VMTypeChanged",
+ existingImageVirtualizerName));
setPageComplete(false);
return;
}
List<HardDisk> hdds = state.meta.getHdds();
if (hdds.size() == 0 || hdds.get(0).diskImage == null) {
- setErrorMessage("Die gewählte " + fileformat + "-Datei enthält keine virtuelle Festplatte!");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.noHDD", fileformat));
setPageComplete(false);
return;
}
if (hdds.size() > 1) {
setErrorMessage(
- "Die gewählte " + fileformat + "-Datei enthält mehr als eine virtuelle Festplatte!");
+ I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.moreThanOneHDD", fileformat));
setPageComplete(false);
return;
// Allow to continue!?
@@ -186,15 +220,19 @@ public class ImageUploadPage extends ImageUploadPageLayout {
try {
diskImage = new DiskImage(vmDiskFileInfo);
} catch (FileNotFoundException e) {
- setErrorMessage("'" + vmDiskFileInfo.getName() + "' kann nicht gefunden werden!");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.diskImageNotFound",
+ vmDiskFileInfo.getName()));
setPageComplete(false);
return;
} catch (IOException e) {
- setErrorMessage("'" + vmDiskFileInfo.getName() + "' kann nicht gelesen werden!");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.diskImageNotReadable",
+ vmDiskFileInfo.getName()));
setPageComplete(false);
return;
} catch (UnknownImageFormatException e) {
- setErrorMessage("'" + vmDiskFileInfo.getName() + "' hat unbekanntes Dateiformat!");
+ setErrorMessage(
+ I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.diskImageHasUnknownFormat",
+ vmDiskFileInfo.getName()));
LOGGER.debug("Selected disk file has unknown format.", e);
setPageComplete(false);
return;
@@ -202,19 +240,18 @@ public class ImageUploadPage extends ImageUploadPageLayout {
// Warn user about snapshot
if (diskImage.isSnapshot || state.meta.isMachineSnapshot()) {
- Gui.showMessageBox("Von der ausgewählten VM wurde ein Snapshot erstellt. In diesem Zustand kann\n"
- + "die VM leider nicht ins " + Branding.getServiceName() + "-System geladen werden. Bitte konsolidieren Sie zunächst\n"
- + "den Snapshot und versuchen Sie es erneut.", MessageType.WARNING, null, null);
- setErrorMessage("Die gewählte VM befindet sich im Snapshot-Zustand.");
+ Gui.showMessageBox(I18n.PAGE.getString("ImageUpload.Message.warning.diskImageSnapshot",
+ Branding.getServiceName()), MessageType.WARNING, null, null);
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.diskImageSnapshot"));
setPageComplete(false);
return;
}
if (!diskImage.isStandalone) {
- Gui.showMessageBox("Die zu dieser VM gehörige Virtuelle Festplatte ist im Format '"
- + diskImage.subFormat + "'.\n"
- + "Dieses Format wird von " + Branding.getApplicationName() + " nicht unterstützt. Bitte konvertieren Sie die VM\n"
- + "in das Format 'monolithicSparse'.", MessageType.WARNING, null, null);
- setErrorMessage("Die VMDK Datei der VM hat ein inkompatibles Format");
+ Gui.showMessageBox(
+ I18n.PAGE.getString("ImageUpload.Message.warning.diskImageStandalone",
+ diskImage.subFormat, Branding.getApplicationName()),
+ MessageType.WARNING, null, null);
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.diskImageStandalone"));
setPageComplete(false);
return;
}
@@ -235,7 +272,7 @@ public class ImageUploadPage extends ImageUploadPageLayout {
txtImageFile.setText(file.getAbsolutePath());
// let the user know the upload is ready
setErrorMessage(null);
- setDescription("Sie können jetzt den Upload starten.");
+ setDescription(I18n.PAGE.getString("ImageUpload.WizardPage.description"));
setPageComplete(true);
}
@@ -244,12 +281,7 @@ public class ImageUploadPage extends ImageUploadPageLayout {
File file = new File(lockFile);
if (!file.exists())
continue;
- return !Gui.showMessageBox(this,
- "Die gewählte VM scheint noch in Verwendung zu sein. Bitte fahren Sie die VM\n"
- + "vor dem Hochladen herunter und schließen Sie den VMware Player, ansonsten\n"
- + "kann die VM nach dem Hochladen beschädigt sein.\n\n"
- + "Möchten Sie diese Warnung ignorieren und trotzdem fortfahren?\n"
- + "(Sie sollten sich sicher sein, was sie tun, wenn Sie hier 'Ja' wählen)",
+ return !Gui.showMessageBox(this, I18n.PAGE.getString("ImageUpload.Message.yesNo.cancelLockFile"),
MessageType.QUESTION_YESNO, null, null);
}
return false;
@@ -259,21 +291,22 @@ public class ImageUploadPage extends ImageUploadPageLayout {
* This function starts the image creation process. It is triggered by the
* "Next" button.
*
- * Depending on the state, it will first try to get a UUID for the new image
- * by calling createImage() of the thrift API. If a UUID is received, it
- * will request an upload with requestImageVersionUpload(). If granted, it
- * will finally start a thread for the UploadTask.
+ * Depending on the state, it will first try to get a UUID for the new image by
+ * calling createImage() of the thrift API. If a UUID is received, it will
+ * request an upload with requestImageVersionUpload(). If granted, it will
+ * finally start a thread for the UploadTask.
*
- * Then a callback to the Gui is executed where we can process the upload
- * state and give the user feedback about it.
+ * Then a callback to the Gui is executed where we can process the upload state
+ * and give the user feedback about it.
*
*/
@Override
protected boolean wantNextOrFinish() {
+
// Check for vmware player lock files - warn user if found, might corrupt upload
if (askCancelLockFile(state.descriptionFile.getAbsolutePath() + ".lck",
state.diskFile.getAbsolutePath() + ".lck")) {
- setErrorMessage("Die gewählte VM wird noch verwendet");
+ setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.cancelLockFile"));
return false;
}
@@ -305,8 +338,9 @@ public class ImageUploadPage extends ImageUploadPageLayout {
ThriftError.showMessage(this, LOGGER, e.exception, e.displayMessage);
return false;
} catch (IOException e) {
- Gui.showMessageBox(this, "Upload-Initialisierung fehlgeschlagen", MessageType.ERROR, LOGGER,
- e);
+ Gui.showMessageBox(this,
+ I18n.PAGE.getString("ImageUpload.Message.error.uploadInitiatorFailed"),
+ MessageType.ERROR, LOGGER, e);
return false;
}
}
@@ -315,4 +349,13 @@ public class ImageUploadPage extends ImageUploadPageLayout {
return true;
}
+
+ @Override
+ protected void onPageEnter() {
+ super.onPageEnter();
+ // When entering from the conversion page the user probably wants to upload the
+ // new vmx file
+ if (state.convertedDescriptionFile != null)
+ vmSelected(state.convertedDescriptionFile);
+ }
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java
index 9b564979..73b158c0 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java
@@ -11,6 +11,7 @@ import org.openslx.dozmod.filetransfer.TransferEvent;
import org.openslx.dozmod.filetransfer.TransferEventListener;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.LectureWizard;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.ImageUploadSummaryPageLayout;
@@ -73,35 +74,28 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout {
private void updateInfoText(final UploadInitState initState) {
String text;
if (state.upload.getUploadTask() != null && state.upload.getUploadTask().isComplete()) {
- text = "Die Virtuelle Maschine wurde erfolgreich auf den Server hochgeladen.";
+ text = I18n.PAGE.getString("ImageUploadSummary.UploadInitState.completed");
} else if (initState == null) {
return;
} else {
switch (initState) {
case REQUESTING:
- text = "Der Upload-Vorgang wird mit dem Server ausgehandelt...";
+ text = I18n.PAGE.getString("ImageUploadSummary.UploadInitState.requesting");
break;
case WAITING_FOR_SLOT:
- text = "Der Server ist zur Zeit überlastet, da zu viele Uploads gleichzeitig laufen."
- + " Es wird gewartet, bis der Server wieder Kapazitäten frei hat."
- + " Bitte schließen Sie dieses Fenster nicht.";
+ text = I18n.PAGE.getString("ImageUploadSummary.UploadInitState.waitingForSlot");
break;
case UPLOAD_STARTING:
- text = "Die Verbindung zur Übertragung der VM wird aufgebaut...";
+ text = I18n.PAGE.getString("ImageUploadSummary.UploadInitState.uploadStarting");
break;
case UPLOAD_STARTED:
- text = "Der Upload Ihrer Virtuellen Maschine wurde gestartet."
- + " Wenn Sie möchten, können Sie diesen Assistenten schließen,"
- + " und die Anwendung weiterverwenden."
- + " Die Übertragung läuft dabei im Hintergrund weiter.";
+ text = I18n.PAGE.getString("ImageUploadSummary.UploadInitState.uploadStarted");
break;
case ERROR:
- text = "Die Initialisierung des Uploads auf den Server ist fehlgeschlagen."
- + " Sie können versuchen, den Vorgang erneut zu starten."
- + " Falls das Problem weiterhin besteht,"
- + " kontaktieren Sie den " + Branding.getServiceName() + "-Support Ihrer Einrichtung.";
+ text = I18n.PAGE.getString("ImageUploadSummary.UploadInitState.error", Branding.getServiceName());
if (state.upload.getErrorMessage() != null) {
- text += "<br><br>Weitere Informationen:<br>" + state.upload.getErrorMessage();
+ text += I18n.PAGE.getString("ImageUploadSummary.UploadInitState.errorMoreInfo",
+ state.upload.getErrorMessage());
}
break;
default:
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java
index a3bf0a71..71e6fe6d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureCreationPage.java
@@ -18,6 +18,7 @@ import javax.swing.text.html.HTMLDocument;
import org.apache.log4j.Logger;
import org.openslx.dozmod.gui.helper.DateTimeHelper;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.LectureCreationPageLayout;
@@ -40,7 +41,8 @@ public class LectureCreationPage extends LectureCreationPageLayout {
* Page for creating lectures
*/
public LectureCreationPage(Wizard wizard, LectureWizardState state) {
- super(wizard, state.image != null ? state.image.imageName : "Neu");
+ super(wizard, state.image != null ? state.image.imageName
+ : I18n.PAGE.getString("LectureCreation.WizardPage.title"));
this.state = state;
// listener for the text fields
@@ -194,23 +196,23 @@ public class LectureCreationPage extends LectureCreationPageLayout {
Date start = DateTimeHelper.getDateFrom(dtpStartDate, spnStartTime);
Date end = DateTimeHelper.getDateFrom(dtpEndDate, spnEndTime);
if (end.before(start)) {
- lblCalcPeriod.setText("Endzeitpunkt ist vor Startzeitpunkt!");
+ lblCalcPeriod.setText(I18n.PAGE.getString("LectureCreation.Label.endBeforeStart.text"));
} else {
int numberOfDays = DateTimeHelper.calculatePeriodInDays(start, end);
- lblCalcPeriod.setText(numberOfDays + "Tag(e)");
+ lblCalcPeriod.setText(I18n.PAGE.getString("LectureCreation.Label.calcPeriod.text", numberOfDays));
lblCalcPeriod.setForeground(numberOfDays < 7 ? Color.RED : null);
}
}
private boolean isPageValid() {
if (txtName.getText().isEmpty()) {
- setWarningMessage("Geben Sie einen Veranstaltungsnamen ein.");
+ setWarningMessage(I18n.PAGE.getString("LectureCreation.WizardPage.warningMessage.noName"));
return false;
} else {
state.name = txtName.getText();
}
if (txtDescription.getText().isEmpty()) {
- setWarningMessage("Fügen Sie eine Beschreibung hinzu.");
+ setWarningMessage(I18n.PAGE.getString("LectureCreation.WizardPage.warningMessage.noDesc"));
return false;
} else {
state.description = txtDescription.getText();
@@ -220,17 +222,18 @@ public class LectureCreationPage extends LectureCreationPageLayout {
final Date end = DateTimeHelper.getDateFrom(dtpEndDate, spnEndTime);
if (start.after(end)) {
- setWarningMessage("Startzeit ist nach Endzeit!");
+ setWarningMessage(I18n.PAGE.getString("LectureCreation.WizardPage.warningMessage.startAfterEnd"));
return false;
} else if (now.after(end)) {
- setWarningMessage("Endzeit liegt in die Vergangenheit!");
+ setWarningMessage(I18n.PAGE.getString("LectureCreation.WizardPage.warningMessage.nowAfterEnd"));
return false;
} else {
int validityPeriod = Session.getSatelliteConfig().getMaxLectureValidityDays();
Date validityPeriodEnd = DateTimeHelper.addDaysTo(start, validityPeriod); // all good, save them both
if (end.after(validityPeriodEnd)) {
- setWarningMessage("Endzeit liegt nach dem spätest möglichen Datum: "
- + FormatHelper.shortDate(validityPeriodEnd.getTime() / 1000L));
+ setWarningMessage(
+ I18n.PAGE.getString("LectureCreation.WizardPage.warningMessage.endAfterLatestPossibleDate",
+ FormatHelper.shortDate(validityPeriodEnd.getTime() / 1000L)));
return false;
} else {
state.start = start;
@@ -238,9 +241,9 @@ public class LectureCreationPage extends LectureCreationPageLayout {
}
}
String nextText;
- nextText = state.image == null ? ", um eine Virtuelle Maschine auszuwählen"
- : " für Berechtigungen oder 'Fertigstellen'.";
- setDescription("Klicken Sie auf 'Weiter' " + nextText);
+ nextText = state.image == null ? I18n.PAGE.getString("LectureCreation.WizardPage.description.0")
+ : I18n.PAGE.getString("LectureCreation.WizardPage.description.1");
+ setDescription(nextText);
return true;
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java
index f19ab593..01f179c2 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java
@@ -10,6 +10,7 @@ import javax.swing.event.ListSelectionListener;
import org.apache.log4j.Logger;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.dozmod.gui.control.table.ImageTable;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.LectureImageListPageLayout;
import org.openslx.dozmod.permissions.ImagePerms;
@@ -91,13 +92,13 @@ public class LectureImageListPage extends LectureImageListPageLayout {
if (selected != null && selected.isValid && ImagePerms.canLink(selected)) {
state.image = selected;
state.imageVersionId = selected.getLatestVersionId();
- setDescription("Klicken Sie auf 'Weiter'");
+ setDescription(I18n.PAGE.getString("LectureImageList.WizardPage.description"));
return true;
}
if (selected != null && ImagePerms.canLink(selected)) {
- setErrorMessage("Unzureichende Berechtigungen um auf diese VM zu verlinken.");
+ setErrorMessage(I18n.PAGE.getString("LectureImageList.WizardPage.errorMessage.noPerms"));
} else {
- setErrorMessage("Ungültige VM ausgewählt");
+ setErrorMessage(I18n.PAGE.getString("LectureImageList.WizardPage.errorMessage.invalidVM"));
}
return false;
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java
index 7adf10d3..bcad47f8 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java
@@ -3,6 +3,7 @@ package org.openslx.dozmod.gui.wizard.page;
import java.util.List;
import org.apache.log4j.Logger;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.LectureLocationSelectionPageLayout;
import org.openslx.dozmod.state.LectureWizardState;
@@ -30,7 +31,7 @@ public class LectureLocationSelectionPage extends LectureLocationSelectionPageLa
List<Integer> locations = ctlLocationSelector.getSelectedLocationsAsIds();
boolean locationExclusive = ctlLocationSelector.getOnlyInSelection();
if (locations != null && locations.size() > Session.getSatelliteConfig().maxLocationsPerLecture) {
- setErrorMessage("Zu viele Räume/Orte ausgewählt");
+ setErrorMessage(I18n.PAGE.getString("LectureLocationSelection.WizardPage.errorMessage.tooManyLocations"));
ctlLocationSelector.setSelectedLocationsAsIds(locations);
return false;
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureOptionsPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureOptionsPage.java
index a9d5bcef..45ca1d88 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureOptionsPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureOptionsPage.java
@@ -3,6 +3,7 @@ package org.openslx.dozmod.gui.wizard.page;
import java.util.List;
import org.openslx.bwlp.thrift.iface.NetRule;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.layout.LectureOptionsPageLayout;
import org.openslx.dozmod.state.LectureWizardState;
@@ -49,7 +50,7 @@ public class LectureOptionsPage extends LectureOptionsPageLayout {
state.netRules = currentNetrules;
state.runScriptText = currentRunscript;
- setDescription("Klicken Sie auf 'Weiter' für Berechtigungen oder 'Fertigstellen'.");
+ setDescription(I18n.PAGE.getString("LectureOptions.WizardPage.description"));
return true;
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBindMount.java b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBindMount.java
new file mode 100644
index 00000000..84449bad
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBindMount.java
@@ -0,0 +1,62 @@
+package org.openslx.dozmod.model;
+
+import java.util.Objects;
+
+/**
+ * This class implements a model for a bind mount entry in the docker context
+ * (eg. docker run ... --mount type=bind,source=source,target=target,options ... ). A list of objects of this class is stored in
+ * {@link ContainerMeta}.
+ */
+public class ContainerBindMount {
+
+ private String source;
+ private String target;
+ private String options;
+
+ public ContainerBindMount() {
+ }
+
+ public ContainerBindMount(String source, String target, String options) {
+ this.source = source;
+ this.target = target;
+ this.options = options;
+ }
+
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ public String getTarget() {
+ return target;
+ }
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ public String getOptions() {
+ return options;
+ }
+
+ public void setOptions(String options) {
+ this.options = options;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ContainerBindMount that = (ContainerBindMount) o;
+ return Objects.equals(source, that.source) && Objects.equals(target, that.target) && Objects.equals(
+ options, that.options);
+ }
+
+ @Override public int hashCode() {
+ return Objects.hash(source, target, options);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBuildContextMethod.java b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBuildContextMethod.java
new file mode 100644
index 00000000..6ed42ba8
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerBuildContextMethod.java
@@ -0,0 +1,10 @@
+package org.openslx.dozmod.model;
+
+public enum ContainerBuildContextMethod {
+
+ FILE, GIT_REPOSITORY;
+
+ public static ContainerBuildContextMethod fromInt(int index) {
+ return values()[index];
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java
new file mode 100644
index 00000000..f41b4b47
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java
@@ -0,0 +1,216 @@
+package org.openslx.dozmod.model;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.stream.JsonReader;
+import org.apache.log4j.Logger;
+import org.kamranzafar.jtar.TarEntry;
+import org.kamranzafar.jtar.TarInputStream;
+import org.kamranzafar.jtar.TarOutputStream;
+import org.openslx.dozmod.thrift.cache.MetaDataCache;
+import org.openslx.dozmod.util.TarArchiveUtil;
+import org.openslx.util.vm.DockerMetaDataDummy;
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.Objects;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+public class ContainerDefinition {
+
+ private static final Logger LOGGER = Logger.getLogger(ContainerDefinition.class);
+
+ private static final String CONTAINER_FILE = "dockerfile";
+ private static final String CONTAINER_META_FILE = "container_meta.json";
+
+ /**
+ * The file to construct a real container image, could be an dockerfile or a singularity recipe.
+ */
+ public String containerRecipe = "";
+
+ /**
+ * Further container information, see {@link ContainerMeta}.
+ */
+ public ContainerMeta containerMeta;
+
+ public ContainerDefinition() {
+ containerMeta = new ContainerMeta();
+ }
+
+ /**
+ * Copy Constructor
+ *
+ * @param containerDef {@link ContainerDefinition} from which to make a deep copy.
+ */
+ public ContainerDefinition(ContainerDefinition containerDef) {
+ containerRecipe = String.valueOf(containerDef.getContainerRecipe());
+ containerMeta = new ContainerMeta(containerDef.getContainerMeta());
+ }
+
+ public String getContainerRecipe() {
+ return containerRecipe;
+ }
+
+ public void setContainerRecipe(String containerRecipe) {
+ this.containerRecipe = containerRecipe;
+ }
+
+ public void setContainerRecipe(File containerRecipeFile) {
+ this.containerRecipe = readContainerRecipe(containerRecipeFile);
+ }
+
+ public void setContainerRecipe(byte[] rawContainerRecipe) {
+ this.containerRecipe = new String(rawContainerRecipe, StandardCharsets.UTF_8);
+ }
+
+ public void setContainerMeta(byte[] containerMeta) {
+ Gson gson = new GsonBuilder().create();
+ this.containerMeta = gson.fromJson(new JsonReader(
+ new InputStreamReader(new ByteArrayInputStream(containerMeta), StandardCharsets.UTF_8)),
+ ContainerMeta.class);
+ }
+
+ public ContainerMeta getContainerMeta() {
+ return containerMeta;
+ }
+
+ public DockerMetaDataDummy createVmMeta() {
+
+ byte[] rawContainerRecipe = toByteBuffer().array();
+ return new DockerMetaDataDummy(MetaDataCache.getOperatingSystems(), rawContainerRecipe,
+ rawContainerRecipe.length);
+ }
+
+ /**
+ * Utility function to create a {@link ContainerDefinition} object for a byte array downloaded from the server.
+ *
+ * @param rawTarData Downloaded tar.gz file from the server as a byte array.
+ * @return New object of ContainerDefinition.
+ */
+ public static ContainerDefinition fromByteArray(byte[] rawTarData) {
+
+ ContainerDefinition containerDef = new ContainerDefinition();
+
+ try {
+ TarInputStream tis = new TarInputStream(
+ new GZIPInputStream(new BufferedInputStream(new ByteArrayInputStream(rawTarData))));
+
+ TarEntry entry;
+
+ while ((entry = tis.getNextEntry()) != null) {
+ byte[] rawData = new byte[1024];
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ int count;
+
+ // read everything from the TarInputStream for the current Entry
+ while ((count = tis.read(rawData)) != -1) {
+ output.write(rawData, 0, count);
+ }
+
+ if (entry.getName().equals(CONTAINER_FILE))
+ containerDef.setContainerRecipe(output.toByteArray());
+ if (entry.getName().equals(CONTAINER_META_FILE))
+ containerDef.setContainerMeta(output.toByteArray());
+ }
+
+ } catch (IOException e) {
+ LOGGER.error("Could not create a ContainerDefinition Object for rawTarData", e);
+ }
+
+ return containerDef;
+ }
+
+ /**
+ * Serializes the ContainerMeta and Container Description (e.g. dockerfile) into an tar.gz archive.
+ *
+ * @return A ByteBuffer object of the container definition. Can be uploaded so satellite server.
+ */
+ public ByteBuffer toByteBuffer() {
+
+ ByteBuffer containerDef = null;
+
+ try {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ TarOutputStream output = new TarOutputStream(new GZIPOutputStream(baos));
+
+ Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ TarArchiveUtil.tarPutFile(output, CONTAINER_META_FILE, gson.toJson(containerMeta));
+ TarArchiveUtil.tarPutFile(output, CONTAINER_FILE, containerRecipe);
+ output.close();
+
+ containerDef = ByteBuffer.wrap(baos.toByteArray());
+
+ } catch (IOException e) {
+ LOGGER.warn("Could not create a tar file", e);
+ }
+
+ return containerDef;
+ }
+
+ private String readContainerRecipe(File file) {
+ String recipe = null;
+ try {
+
+ BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
+ ByteArrayOutputStream rawFile = new ByteArrayOutputStream();
+ int count;
+ byte[] data = new byte[1024];
+ while ((count = bis.read(data)) != -1) {
+ rawFile.write(data,0,count);
+ }
+
+ String rawRecipe = new String(rawFile.toByteArray(), StandardCharsets.UTF_8);
+
+ // replace windows by unix EOL
+ recipe = rawRecipe.replaceAll("\\r\\n", "\n");
+
+ } catch (IOException e) {
+ LOGGER.error("Could not read Container Recipe", e);
+ }
+ return recipe;
+ }
+
+ /**
+ * Saves containerRecipe and containerMeta at the provided location.
+ *
+ * @param destDir destination directory for containerRecipe and containerMeta.
+ */
+ public void saveLocal(File destDir) {
+
+ writeFile(destDir, containerRecipe, CONTAINER_FILE);
+ Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ writeFile(destDir, gson.toJson(containerMeta), CONTAINER_META_FILE);
+ }
+
+ private void writeFile(File destDir, String fileContent, String filename) {
+ File output = new File(destDir, filename);
+ try {
+ FileWriter fw = new FileWriter(output);
+ fw.write(fileContent);
+ fw.flush();
+ fw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ LOGGER.error("Could not write File", e);
+ }
+ }
+
+ public ContainerBuildContextMethod getBuildContextMethod() {
+ return ContainerBuildContextMethod.fromInt(containerMeta.getBuildContextMethod());
+ }
+
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ContainerDefinition that = (ContainerDefinition) o;
+ return containerRecipe.equals(that.containerRecipe) && containerMeta.equals(that.containerMeta);
+ }
+
+ @Override public int hashCode() {
+ return Objects.hash(containerRecipe, containerMeta);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerMeta.java b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerMeta.java
new file mode 100644
index 00000000..32818acf
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerMeta.java
@@ -0,0 +1,92 @@
+package org.openslx.dozmod.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * ContainerMeta is used to store container specific information.
+ * An object of this class will be serialized with gson to a json file.
+ */
+public class ContainerMeta {
+
+ private int build_context_method;
+ private String build_context_url;
+ private String image_name;
+ private String run_options;
+ private List<ContainerBindMount> bind_mount_config = new ArrayList<>();
+
+ public ContainerMeta() {
+
+ build_context_method = ContainerBuildContextMethod.FILE.ordinal();
+ build_context_url = "";
+ image_name = "";
+ run_options = "";
+ bind_mount_config = new ArrayList<>();
+ }
+
+ public ContainerMeta(ContainerMeta containerMeta) {
+ build_context_method = containerMeta.build_context_method;
+ build_context_url = containerMeta.build_context_url;
+ image_name = containerMeta.image_name;
+ run_options = containerMeta.run_options;
+ for (ContainerBindMount bm : containerMeta.bind_mount_config)
+ bind_mount_config.add(new ContainerBindMount(bm.getSource(), bm.getTarget(), bm.getOptions()));
+
+ }
+
+ public int getBuildContextMethod() {
+ return build_context_method;
+ }
+
+ public void setBuildContextMethod(int buildContextMethod) {
+ this.build_context_method = buildContextMethod;
+ }
+
+ public String getBuildContextUrl() {
+ return build_context_url;
+ }
+
+ public void setBuildContextUrl(String buildContextUrl) {
+ this.build_context_url = buildContextUrl;
+ }
+
+ public String getRunOptions() {
+ return run_options;
+ }
+
+ public void setRunOptions(String run_options) {
+ this.run_options = run_options;
+ }
+
+ public String getImageName() {
+ return image_name;
+ }
+
+ public void setImageName(String image_name) {
+ this.image_name = image_name;
+ }
+
+ public List<ContainerBindMount> getBindMountConfig() {
+ return bind_mount_config;
+ }
+
+ public void setBindMountConfig(List<ContainerBindMount> bindMountConfig) {
+ this.bind_mount_config = bindMountConfig;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ContainerMeta that = (ContainerMeta) o;
+ return Objects.equals(build_context_url, that.build_context_url) && Objects.equals(image_name,
+ that.image_name) && Objects.equals(run_options, that.run_options) && Objects.equals(
+ bind_mount_config, that.bind_mount_config);
+ }
+
+ @Override public int hashCode() {
+ return Objects.hash(build_context_url, image_name, run_options);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/state/UploadWizardState.java b/dozentenmodul/src/main/java/org/openslx/dozmod/state/UploadWizardState.java
index 46810096..beea1a74 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/state/UploadWizardState.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/state/UploadWizardState.java
@@ -7,6 +7,7 @@ import java.util.Map;
import org.openslx.bwlp.thrift.iface.ImagePermissions;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.bwlp.thrift.iface.ShareMode;
+import org.openslx.dozmod.gui.wizard.WizardPage;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.UploadInitiator;
import org.openslx.util.vm.VmMetaData;
@@ -35,6 +36,9 @@ public class UploadWizardState {
public boolean isRestricted = true;
// flags an image as a template
public boolean isTemplate = false;
+ // flag if we the description file is in the ovf format that needs conversion
+ public File convertedDescriptionFile;
+
/**
* list of strings for tags
*/
@@ -42,7 +46,7 @@ public class UploadWizardState {
// -- Objects returned by thrift calls --
// UUID given returned by the satellite after creating the image
public String uuid = null;
-
+
public UploadInitiator upload = null;
/**
@@ -50,4 +54,9 @@ public class UploadWizardState {
*/
public VmMetaData meta = null;
+ // To be able to call the conversion Page from within the ImageUploadPage
+ // TODO find cleaner approach, this probably shouldn't be in here..
+ public WizardPage conversionPage;
+ public WizardPage imageUploadPage;
+
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/GuiErrorCallback.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/GuiErrorCallback.java
index 4267ea31..07146ead 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/GuiErrorCallback.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/GuiErrorCallback.java
@@ -10,6 +10,7 @@ import org.openslx.bwlp.thrift.iface.TAuthorizationException;
import org.openslx.dozmod.Config;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.Gui.GuiCallable;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.thrifthelper.ThriftManager.ErrorCallback;
@@ -44,9 +45,9 @@ public class GuiErrorCallback implements ErrorCallback {
return Gui.syncExec(new GuiCallable<Boolean>() {
@Override
public Boolean run() {
- if (Gui.showMessageBox(parent, "Ungültiges Sitzungstoken oder fehlerhafte Authentifizierung am " + serverString + "!" +
- //"\n" + errMsg + "\n" +
- "\nBitte starten Sie das Programm neu. Jetzt beenden?", MessageType.ERROR_RETRY, LOGGER, t)) {
+ if (Gui.showMessageBox(parent,
+ I18n.THRIFT.getString("GuiErrorCallback.Message.error.notAuthenticatedOrInvalidToken",
+ serverString), MessageType.ERROR_RETRY, LOGGER, t)) {
// user confirmed exit
Config.saveCurrentSession("", "", "");
Gui.exit(0);
@@ -64,11 +65,11 @@ public class GuiErrorCallback implements ErrorCallback {
public Boolean run() {
String errMsg = null;
if (tex != null) {
- errMsg = " (Fehler " + tex.getType() + ")";
+ errMsg = I18n.THRIFT.getString("GuiErrorCallback.thriftError.String.errMsg", tex.getType());
}
- return Gui.showMessageBox(parent, "Die Kommunikation mit " + serverString + " ist"
- + " gestört. Der Aufruf der Funktion " + method + " ist fehlgeschlagen" + errMsg
- + ".\n\n" + "Möchten Sie den Aufruf wiederholen?", MessageType.ERROR_RETRY, LOGGER, t);
+ return Gui.showMessageBox(parent,
+ I18n.THRIFT.getString("GuiErrorCallback.Message.error.transportException",
+ serverString, method, errMsg), MessageType.ERROR_RETRY, LOGGER, t);
}
});
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ImageLocalDetailsActions.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ImageLocalDetailsActions.java
index 11feba74..0bf1bfcb 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ImageLocalDetailsActions.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ImageLocalDetailsActions.java
@@ -15,6 +15,7 @@ import org.openslx.bwlp.thrift.iface.TInvocationException;
import org.openslx.bwlp.thrift.iface.TNotFoundException;
import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.thrift.ThriftActions.DeleteCallback;
import org.openslx.dozmod.thrift.ThriftActions.ImageMetaCallback;
import org.openslx.thrifthelper.ThriftManager;
@@ -74,7 +75,8 @@ public class ImageLocalDetailsActions implements ImageDetailsActions {
try {
ThriftActions.writeImagePermissions(imageBaseId, customPermissions);
} catch (TException e) {
- ThriftError.showMessage(parent, LOGGER, e, "Could not write permissions");
+ ThriftError.showMessage(parent, LOGGER, e,
+ I18n.THRIFT.getString("ImageLocalDetailsActions.Message.error.writeImagePermissionsFailed"));
}
}
});
@@ -105,7 +107,8 @@ public class ImageLocalDetailsActions implements ImageDetailsActions {
ThriftManager.getSatClient().setImageVersionVirtConfig(Session.getSatelliteToken(), imageVersionId, machineDescription);
success = true;
} catch (TException e) {
- ThriftError.showMessage(parent, LOGGER, e, "Fehler beim Speichern der VM-Konfiguration!");
+ ThriftError.showMessage(parent, LOGGER, e,
+ I18n.THRIFT.getString("ImageLocalDetailsActions.Message.error.setVirtualizerConfigFailed"));
}
Gui.asyncExec(new Runnable() {
@Override
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/Session.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/Session.java
index aa43601e..46771d46 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/Session.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/Session.java
@@ -7,6 +7,7 @@ import org.apache.log4j.Logger;
import org.apache.thrift.TException;
import org.openslx.bwlp.thrift.iface.ImagePermissions;
import org.openslx.bwlp.thrift.iface.LecturePermissions;
+import org.openslx.bwlp.thrift.iface.Role;
import org.openslx.bwlp.thrift.iface.SatelliteConfig;
import org.openslx.bwlp.thrift.iface.WhoamiInfo;
import org.openslx.sat.thrift.version.Feature;
@@ -82,7 +83,7 @@ public class Session {
return null;
return data.user.userId;
}
-
+
/**
* @return the organization id
*/
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java
index 66f9efe9..96c4d1f6 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java
@@ -16,25 +16,8 @@ import javax.swing.JFileChooser;
import org.apache.log4j.Logger;
import org.apache.thrift.TException;
import org.apache.thrift.transport.TTransportException;
-import org.openslx.bwlp.thrift.iface.ImageBaseWrite;
-import org.openslx.bwlp.thrift.iface.ImageDetailsRead;
-import org.openslx.bwlp.thrift.iface.ImagePermissions;
-import org.openslx.bwlp.thrift.iface.ImagePublishData;
-import org.openslx.bwlp.thrift.iface.ImageVersionDetails;
-import org.openslx.bwlp.thrift.iface.ImageVersionWrite;
-import org.openslx.bwlp.thrift.iface.LecturePermissions;
-import org.openslx.bwlp.thrift.iface.LectureRead;
-import org.openslx.bwlp.thrift.iface.LectureSummary;
-import org.openslx.bwlp.thrift.iface.LectureWrite;
-import org.openslx.bwlp.thrift.iface.Satellite;
+import org.openslx.bwlp.thrift.iface.*;
import org.openslx.bwlp.thrift.iface.SatelliteServer.Client;
-import org.openslx.bwlp.thrift.iface.TAuthorizationException;
-import org.openslx.bwlp.thrift.iface.TInvocationException;
-import org.openslx.bwlp.thrift.iface.TNotFoundException;
-import org.openslx.bwlp.thrift.iface.TransferInformation;
-import org.openslx.bwlp.thrift.iface.TransferState;
-import org.openslx.bwlp.thrift.iface.UserInfo;
-import org.openslx.bwlp.thrift.iface.WhoamiInfo;
import org.openslx.dozmod.App;
import org.openslx.dozmod.Branding;
import org.openslx.dozmod.Config;
@@ -46,6 +29,7 @@ import org.openslx.dozmod.filetransfer.TransferEventListener;
import org.openslx.dozmod.gui.GraphicalCertHandler;
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.QFileChooser;
import org.openslx.dozmod.gui.window.SatelliteListWindow;
@@ -54,6 +38,7 @@ import org.openslx.dozmod.thrift.cache.LectureCache;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.dozmod.thrift.cache.UserCache;
import org.openslx.dozmod.util.FormatHelper;
+import org.openslx.dozmod.util.ImageWrapper;
import org.openslx.dozmod.util.VmWrapper;
import org.openslx.dozmod.util.VmWrapper.MetaDataMissingException;
import org.openslx.sat.thrift.version.Version;
@@ -95,9 +80,8 @@ public class ThriftActions {
long remoteVersion = -1;
if (interactive && !forceCustomSatellite && (data.satellites == null || data.satellites.isEmpty())) {
- Gui.asyncMessageBox("Login erfolgreich, aber es wurde kein Satellitenserver gefunden.\n"
- + " Bitte geben Sie die Adresse Ihres Servers manuell an.", MessageType.ERROR, LOGGER,
- null);
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.error.satellitesNullOrEmpty"),
+ MessageType.ERROR, LOGGER, null);
}
do {
@@ -147,10 +131,8 @@ public class ThriftActions {
}
}
if (sat.addressList == null || sat.addressList.isEmpty()) {
- Gui.asyncMessageBox(
- "Login erfolgreich, aber für den ausgewählten Satellitenserver ist\n"
- + "keine Adresse hinterlegt. Kann nicht verbinden.", MessageType.ERROR,
- LOGGER, null);
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.error.addressListNullOrEmpty"),
+ MessageType.ERROR, LOGGER, null);
continue;
}
address = sat.addressList.get(0);
@@ -176,9 +158,7 @@ public class ThriftActions {
if (client == null || remoteVersion == -1) {
if (interactive) {
- Gui.asyncMessageBox(
- "Authentifizierung erfolgreich, die Verbindung zum Satellitenserver ist jedoch nicht möglich.\n\n"
- + "Möglicherweise ist der Server nicht verfügbar, oder die Netzwerkverbindung gestört.",
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.error.couldNotGetNewClient"),
MessageType.ERROR, null, null);
if (data.satellites.size() == 1) {
return false;
@@ -190,10 +170,8 @@ public class ThriftActions {
if (remoteVersion < Version.MIN_VERSION || remoteVersion > Version.VERSION) {
if (interactive) {
- Gui.asyncMessageBox("Das von Ihnen verwendete Dozentenmodul ist nicht mit dem"
- + " gewählten Satellitenserver kompatibel.\n" + "Ihre Version: "
- + Version.VERSION + "\n" + "Satelliten-Version: " + remoteVersion,
- MessageType.ERROR, LOGGER, null);
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.error.versionNotCompatible",
+ Version.VERSION, remoteVersion), MessageType.ERROR, LOGGER, null);
continue;
}
return false;
@@ -205,21 +183,19 @@ public class ThriftActions {
} catch (TAuthorizationException e) {
if (interactive) {
ThriftError.showMessage(window, LOGGER, e,
- "Authentifizierung erfolgreich, der Satellitenserver verweigert jedoch die Verbindung.\n"
- + "Versuchen Sie, sich erneut anzumelden.\n");
+ I18n.THRIFT.getString("ThriftActions.Message.error.authorizationException"));
}
return false;
} catch (TException e) {
if (interactive) {
ThriftError.showMessage(window, LOGGER, e,
- "Authentifizierung erfolgreich, bei der Kommunikation mit"
- + " dem Satellitenserver trat jedoch ein interner Fehler auf.");
+ I18n.THRIFT.getString("ThriftActions.Message.error.sessionInternalError"));
continue;
}
return false;
} catch (Exception e) {
if (interactive) {
- Gui.asyncMessageBox("Unbekannter Fehler beim Verbinden mit dem Satellitenserver.",
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.error.sessionUnknownError"),
MessageType.ERROR, LOGGER, e);
continue;
}
@@ -268,10 +244,11 @@ public class ThriftActions {
try {
uuid = ThriftManager.getSatClient().createImage(Session.getSatelliteToken(), name);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Erstellen der VM fehlgeschlagen");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.createImageFailed"));
} catch (Exception e) {
- Gui.showMessageBox(frame, "Unbekannter Fehler beim Erstellen der VM", MessageType.ERROR, LOGGER,
- e);
+ Gui.showMessageBox(frame, I18n.THRIFT.getString("ThriftActions.Message.error.createImageUnknownError"),
+ MessageType.ERROR, LOGGER, e);
}
return uuid;
}
@@ -371,7 +348,7 @@ public class ThriftActions {
final String virtualizerId, final int osId, final long imageSize, final DownloadCallback callback) {
// TODO: Return value? Callback?
QFileChooser fc = new QFileChooser(Config.getDownloadPath(), true);
- fc.setDialogTitle("Bitte wählen Sie einen Speicherort");
+ fc.setDialogTitle(I18n.THRIFT.getString("ThriftActions.FileChooser.fc.dialogTitle"));
int action = fc.showSaveDialog(frame);
File selected = fc.getSelectedFile();
if (action != JFileChooser.APPROVE_OPTION || selected == null) {
@@ -385,9 +362,8 @@ public class ThriftActions {
null) + ".part");
if (destDir.exists()) {
- boolean ret = Gui.showMessageBox(frame, "Verzeichnis '" + destDir.getAbsolutePath()
- + "' existiert bereits, wollen Sie die VM darin überschreiben?",
- MessageType.QUESTION_YESNO, LOGGER, null);
+ boolean ret = Gui.showMessageBox(frame, I18n.THRIFT.getString("ThriftActions.Message.yesNo.destDirExists",
+ destDir.getAbsolutePath()), MessageType.QUESTION_YESNO, LOGGER, null);
if (!ret) {
// user aborted
if (callback != null)
@@ -396,8 +372,8 @@ public class ThriftActions {
}
// delete it
if (!tmpDiskFile.delete() && tmpDiskFile.exists()) {
- Gui.showMessageBox(frame, "Datei konnte nicht überschrieben werden!", MessageType.ERROR,
- LOGGER, null);
+ Gui.showMessageBox(frame, I18n.THRIFT.getString("ThriftActions.Message.error.couldNotDeleteDiskFile"),
+ MessageType.ERROR, LOGGER, null);
if (callback != null)
callback.downloadInitialized(false);
return;
@@ -408,10 +384,9 @@ public class ThriftActions {
// Check the free space on disk
if (destDir.getUsableSpace() < imageSize + SIZE_CHECK_EXTRA_DL) {
- Gui.showMessageBox(frame, "Nicht genügend Speicherplatz im ausgewählten Verzeichnis verfügbar.\n"
- + "Brauche: " + FormatHelper.bytes(imageSize + SIZE_CHECK_EXTRA_DL, false) + "\n"
- + "Habe: " + FormatHelper.bytes(destDir.getUsableSpace(), false), MessageType.ERROR,
- LOGGER, null);
+ Gui.showMessageBox(frame, I18n.THRIFT.getString("ThriftActions.Message.error.destDirHasNotEnoughFreeSpace",
+ FormatHelper.bytes(imageSize + SIZE_CHECK_EXTRA_DL, false),
+ FormatHelper.bytes(destDir.getUsableSpace(), false)), MessageType.ERROR, LOGGER, null);
if (callback != null)
callback.downloadInitialized(false);
return;
@@ -447,7 +422,8 @@ public class ThriftActions {
}
if (transInf == null) {
// both download request failed, show user feedback
- ThriftError.showMessage(frame, LOGGER, transEx, "Die Download-Anfrage ist gescheitert");
+ ThriftError.showMessage(frame, LOGGER, transEx,
+ I18n.THRIFT.getString("ThriftActions.Message.error.downloadRequestFailed"));
if (callback != null)
callback.downloadInitialized(false);
return;
@@ -459,8 +435,7 @@ public class ThriftActions {
dlTask = new DownloadTask(fTransHost, transInf.getPlainPort(),
transInf.getToken(), tmpDiskFile, imageSize, null);
} catch (FileNotFoundException e) {
- Gui.asyncMessageBox(
- "Konnte Download nicht vorbereiten: Der gewählte Zielort ist nicht beschreibbar",
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.error.destinationNotWritable"),
MessageType.ERROR, LOGGER, e);
if (callback != null)
callback.downloadInitialized(false);
@@ -473,6 +448,8 @@ public class ThriftActions {
public void update(TransferEvent event) {
if (event.state != TransferState.FINISHED)
return;
+ ImageWrapper.unpack(virtualizerId, tmpDiskFile, imageName, destDir, osId,
+ fTransInf.getMachineDescription());
DiskImage diskImage = null;
String ext = virtualizerId;
try {
@@ -485,15 +462,10 @@ public class ThriftActions {
ext = diskImage.format.extension;
}
if (diskImage.isCompressed) {
- String msg = "<html>Die heruntergeladene VM '" + imageName + "' ist ein komprimiertes "
- + "Abbild.<br>Sie müssen das Abbild dekomprimieren, bevor Sie es verändern "
- + "können.<br> Die VM wird lokal voraussichtlich nicht startfähig sein!"
- + "<br><br>Bitte lesen Sie die Hinweise unter "
- + "<a href=\"" + Branding.getServiceFAQWebsite() + "\">"
- + "VMDK Disk Types</a>";
-
- Gui.asyncMessageBox(msg, MessageType.WARNING, null,
- null);
+ Gui.asyncMessageBox(
+ I18n.THRIFT.getString("ThriftActions.Message.warning.diskImageCompressed",
+ imageName, Branding.getServiceFAQWebsite()),
+ MessageType.WARNING, null, null);
}
}
File destImage = new File(destDir.getAbsolutePath(), VmWrapper.generateFilename(
@@ -506,9 +478,7 @@ public class ThriftActions {
VmWrapper.wrapVm(destImage, imageName, fTransInf.getMachineDescription(),
virtualizerId, osId, diskImage);
} catch (MetaDataMissingException | IOException e) {
- Gui.asyncMessageBox(
- "Zur heruntergeladenen VM konnte keine vmx-Datei angelegt werden."
- + "\nSie können versuchen, das Abbild manuell in den VMWare-Player zu importieren.",
+ Gui.asyncMessageBox(I18n.THRIFT.getString("ThriftActions.Message.warning.couldNotWrapVM"),
MessageType.WARNING, LOGGER, e);
}
}
@@ -577,7 +547,8 @@ public class ThriftActions {
try {
details = ThriftManager.getSatClient().getImageDetails(Session.getSatelliteToken(), imageBaseId);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Lesen der Metadaten");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.getImageDetailsFailed"));
}
return details;
}
@@ -669,7 +640,8 @@ public class ThriftActions {
permissionMap = ThriftManager.getSatClient().getImagePermissions(Session.getSatelliteToken(),
imageBaseId);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Lesen der Metadaten");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.getImagePermissionsFailed"));
}
return permissionMap;
}
@@ -687,7 +659,8 @@ public class ThriftActions {
ThriftManager.getSatClient().setImageOwner(Session.getSatelliteToken(), lectureId,
newOwner.getUserId());
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Übertragen der Besitzrechte");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.setImageOwnerFailed"));
return false;
}
return true;
@@ -747,12 +720,12 @@ public class ThriftActions {
} catch (TException e) {
ThriftError.showMessage(frame, LOGGER, e,
- "Fehler beim Holen der Versionen/Veranstaltung zu folgender VM: " + imageBaseId);
+ I18n.THRIFT.getString("ThriftActions.Message.error.couldNotGetImageBase", imageBaseId));
return;
}
String questionText;
if (versionToBeDeleted != null && !versionToBeDeleted.isEmpty()) {
- questionText = "Die VM \"" + details.getImageName() + "\" hat folgende gültige Versionen:\n";
+ questionText = I18n.THRIFT.getString("ThriftActions.deleteImageBase.String.questionText.0", details.getImageName());
for (ImageVersionDetails version : versionToBeDeleted) {
questionText += version.getVersionId() + "\n";
}
@@ -761,19 +734,20 @@ public class ThriftActions {
questionText = "";
}
if (lecturesToBeDeleted != null && !lecturesToBeDeleted.isEmpty()) {
- questionText += "Folgende Veranstaltungen sind mit dieser VM verknüpft: \n";
+ questionText += I18n.THRIFT.getString("ThriftActions.deleteImageBase.String.questionText.1");
for (LectureSummary lecture : lecturesToBeDeleted) {
questionText += lecture.getLectureName() + "\n";
}
questionText += "\n";
}
- questionText += "Wollen Sie wirklich mit dem Löschen fortfahren?";
+ questionText += I18n.THRIFT.getString("ThriftActions.deleteImageBase.String.questionText.2");
if (!userConfirmed(frame, questionText))
return;
try {
ThriftManager.getSatClient().deleteImageBase(Session.getSatelliteToken(), imageBaseId);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Konnte VM-Daten nicht löschen!");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.couldNotDeleteImageBase"));
}
}
@@ -801,7 +775,8 @@ public class ThriftActions {
// fetch lectures
lectureList = ThriftManager.getSatClient().getLectureList(Session.getSatelliteToken(), 100);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Holen der Liste der Veranstaltungen");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.couldNotGetImageVersion"));
if (callback != null)
callback.isDeleted(success);
return;
@@ -814,17 +789,17 @@ public class ThriftActions {
for (LectureSummary lecture : lectureList) {
if (versionId.equals(lecture.getImageVersionId())) {
if (!matches)
- questionText = "Diese Version ist zu folgende Veranstaltungen verknüpft:\n";
+ questionText = I18n.THRIFT.getString("ThriftActions.deleteImageVersion.String.questionText.0");
matches = true;
questionText += lecture.getLectureName() + "\n";
}
}
if (matches)
- questionText += "\nWollen Sie diese Version samt Veranstaltungen löschen?\n";
+ questionText += I18n.THRIFT.getString("ThriftActions.deleteImageVersion.String.questionText.1");
}
if (!matches)
- questionText = "Wollen Sie die VM-Image-Version vom "
- + FormatHelper.shortDate(version.createTime) + " Uhr wirklich löschen?";
+ questionText = I18n.THRIFT.getString("ThriftActions.deleteImageVersion.String.questionText.2",
+ FormatHelper.shortDate(version.createTime));
if (!userConfirmed(frame, questionText))
return;
@@ -833,7 +808,8 @@ public class ThriftActions {
LOGGER.info("Deleted version '" + versionId + "'.");
success = true;
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Löschen der Version");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.couldNotDeleteImageVersion"));
if (callback != null)
callback.isDeleted(success);
return;
@@ -868,7 +844,8 @@ public class ThriftActions {
// push to sat
uuid = ThriftManager.getSatClient().createLecture(Session.getSatelliteToken(), meta);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Failed to create lecture");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.createLectureFailed"));
}
return uuid;
}
@@ -887,7 +864,8 @@ public class ThriftActions {
ThriftManager.getSatClient().writeLecturePermissions(Session.getSatelliteToken(), lectureId,
permissions);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Failed to write lecture permissions");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.writeLecturePermissionsFailed"));
return false;
}
return true;
@@ -952,7 +930,8 @@ public class ThriftActions {
try {
lecture = ThriftManager.getSatClient().getLectureDetails(Session.getSatelliteToken(), lectureId);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Konnte Veranstaltungdaten nicht abrufen");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.getLectureDetailsFailed"));
}
return lecture;
}
@@ -970,7 +949,8 @@ public class ThriftActions {
try {
ThriftManager.getSatClient().updateLecture(Session.getSatelliteToken(), lectureId, lectureWrite);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Updaten der Veranstaltung");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.updateLectureFailed"));
return false;
}
return true;
@@ -994,7 +974,8 @@ public class ThriftActions {
permissions = ThriftManager.getSatClient().getLecturePermissions(Session.getSatelliteToken(),
lectureId);
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Konnte Veranstaltungdaten nicht abrufen");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.getLecturePermissionsFailed"));
}
return permissions;
@@ -1013,7 +994,8 @@ public class ThriftActions {
ThriftManager.getSatClient().setLectureOwner(Session.getSatelliteToken(), lectureId,
newOwner.getUserId());
} catch (TException e) {
- ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Übertragen der Besitzrechte");
+ ThriftError.showMessage(frame, LOGGER, e,
+ I18n.THRIFT.getString("ThriftActions.Message.error.setLectureOwnerFailed"));
return false;
}
return true;
@@ -1043,8 +1025,9 @@ public class ThriftActions {
final DeleteLectureCallback callback) {
if (lectures == null)
return;
- String messageText = lectures.size() == 1 ? "Wollen Sie diese Veranstaltung wirklich löschen?"
- : "Wollen Sie die " + lectures.size() + " Veranstaltungen wirklich löschen?";
+ String messageText = lectures.size() == 1
+ ? I18n.THRIFT.getString("ThriftActions.deleteLecture.String.messageText.0")
+ : I18n.THRIFT.getString("ThriftActions.deleteLecture.String.messageText.1", lectures.size());
if (!userConfirmed(frame, messageText))
return;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftError.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftError.java
index 773b941f..dd69d55c 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftError.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftError.java
@@ -14,25 +14,29 @@ import org.openslx.bwlp.thrift.iface.TInvocationException;
import org.openslx.bwlp.thrift.iface.TNotFoundException;
import org.openslx.bwlp.thrift.iface.TTransferRejectedException;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
public class ThriftError {
public static void showMessage(final Component parent, Logger logger, TException ex, String messageText) {
if (ex instanceof TNotFoundException) {
- messageText += "\n\nNicht gefunden";
+ messageText += I18n.THRIFT.getString("ThriftError.Message.error.notFoundException");
} else if (ex instanceof TAuthorizationException) {
String reason = getString(((TAuthorizationException) ex).getNumber());
- messageText += "\n\nZugriff verweigert: " + reason + "\n" + ex.getMessage();
+ messageText += I18n.THRIFT.getString("ThriftError.Message.error.authorizationException",
+ reason, ex.getMessage());
} else if (ex instanceof TInvocationException) {
- messageText += "\n\nDer Funktionsaufruf konnte nicht durchgeführt werden: "
- + getString(((TInvocationException) ex).getNumber()) + "\n" + ex.getMessage();
+ messageText += I18n.THRIFT.getString("ThriftError.Message.error.invocationException",
+ getString(((TInvocationException) ex).getNumber()), ex.getMessage());
} else if (ex instanceof TInvalidDateParam) {
- messageText += "\n\nEin angegebenes Datum ist ungültig:\n" + ex.getMessage();
+ messageText += I18n.THRIFT.getString("ThriftError.Message.error.invalidDateParam", ex.getMessage());
} else if (ex instanceof TTransferRejectedException) {
- messageText += "\n\nDie Transferanfrage wurde vom Server abgelehnt:\n" + ex.getMessage();
+ messageText += I18n.THRIFT.getString("ThriftError.Message.error.transferRejectedException",
+ ex.getMessage());
} else {
- messageText += "\n\nUnerwartete Ausnahme " + ex.getClass().getSimpleName() + " ist aufgetreten.";
+ messageText += I18n.THRIFT.getString("ThriftError.Message.error.unexpectedException",
+ ex.getClass().getSimpleName());
}
if (logger != null) {
logger.warn("A thrift call raised an exception", ex);
@@ -52,55 +56,55 @@ public class ThriftError {
private static String getString(InvocationError error) {
if (error == null)
- return "Interner serverseitiger Fehler";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.null");
switch (error) {
case INTERNAL_SERVER_ERROR:
- return "Interner serverseitiger Fehler";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.internalServerError");
case INVALID_DATA:
- return "Ein Parameter hat einen ungültigen Wert";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.invalidData");
case INVALID_SHARE_MODE:
- return "Ungültiger Share-Mode";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.invalidShareMode");
case MISSING_DATA:
- return "Ein Parameter fehlt (null?)";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.missingData");
case UNKNOWN_IMAGE:
- return "Unbekannte VM/Image";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.unknownImage");
case UNKNOWN_LECTURE:
- return "Unbekannte Veranstaltung";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.unknownLecture");
case UNKNOWN_USER:
- return "Unbekannter Benutzer";
+ return I18n.THRIFT.getString("ThriftError.InvocationError.unknownUser");
default:
- return "Unbekannter Fehlercode: " + error.toString();
+ return I18n.THRIFT.getString("ThriftError.InvocationError.default", error.toString());
}
}
public static String getString(AuthorizationError error) {
if (error == null)
- return "(AuthorizationError=null)";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.null");
switch (error) {
case ACCOUNT_SUSPENDED:
- return "Das Benutzerkonto ist gesperrt";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.accountSuspended");
case BANNED_NETWORK:
- return "Das Netzwerk, aus dem Sie operieren, ist gesperrt";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.bannedNetwork");
case CHALLENGE_FAILED:
- return "Challenge fehlgeschlagen";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.challengeFailed");
case GENERIC_ERROR:
- return "Generischer Fehler";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.genericError");
case INVALID_CREDENTIALS:
- return "Ungültige Zugangsdaten\nStellen Sie sicher, dass Benutzername und Passwort korrekt sind";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.invalidCredentials");
case INVALID_KEY:
- return "Ungültiger Schlüssel";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.invalidKey");
case INVALID_ORGANIZATION:
- return "Ungültige oder unbekannte Organisation";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.invalidOrganization");
case INVALID_TOKEN:
- return "Ungültiges Sitzungstoken";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.invalidToken");
case NOT_AUTHENTICATED:
- return "Nicht authentifiziert";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.notAuthenticated");
case NO_PERMISSION:
- return "Keine ausreichenden Berechtigungen";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.noPermission");
case ORGANIZATION_SUSPENDED:
- return "Ihre zugehörige Organisation ist gesperrt";
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.organizationSuspended");
default:
- return "Unbekannter Fehlercode: " + error.toString();
+ return I18n.THRIFT.getString("ThriftError.AuthorizationError.default", error.toString());
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ConversionTaskWorker.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ConversionTaskWorker.java
new file mode 100644
index 00000000..a4e1be54
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ConversionTaskWorker.java
@@ -0,0 +1,107 @@
+package org.openslx.dozmod.util;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import javax.swing.SwingWorker;
+
+import org.apache.log4j.Logger;
+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.wizard.page.ImageOvfConversionPage;
+
+public class ConversionTaskWorker extends SwingWorker<Boolean, String> {
+ private final static Logger LOGGER = Logger.getLogger(ConversionTaskWorker.class);
+
+ private File srcFile;
+ private File destFile;
+ private ImageOvfConversionPage page;
+ private Process process = null;
+ private String conversionCancelledText = I18n.HELPER.getString("OVFConversion.info.aborted.text");
+ private String ovfToolPath = "ovftool";
+
+ /**
+ * Converts a given ovf and associated vmdk into an vmx and associated vmdk file
+ * via the VMware OVF Tool Ovf images created with virtualBox are not supported.
+ *
+ * @param srcFile: Ovf source file
+ * @param destFile: Desired destination file
+ * @param page: Page that creates and starts the worker
+ * @param ovfToolPath: Path to the OVF Tool on the system
+ */
+ public ConversionTaskWorker(File srcFile, File destFile, ImageOvfConversionPage page,
+ String ovfToolPath) {
+ this.srcFile = srcFile;
+ this.destFile = destFile;
+ this.page = page;
+ if (ovfToolPath != null) {
+ this.ovfToolPath = ovfToolPath;
+ }
+ }
+
+ @Override
+ protected Boolean doInBackground() throws Exception {
+ process = new ProcessBuilder(ovfToolPath, srcFile.getAbsolutePath(), destFile.getAbsolutePath())
+ .start();
+ InputStream is = process.getInputStream();
+ InputStreamReader isr = new InputStreamReader(is);
+ BufferedReader br = new BufferedReader(isr);
+ String line;
+ LOGGER.info("Running OVFTool");
+ while ((line = br.readLine()) != null) {
+ LOGGER.debug(line);
+ publish(line);
+ }
+ return true;
+ }
+
+ @Override
+ protected void process(List<String> chunks) {
+ // Don't update the gui progress bar and text if cancelled as this thread my run
+ // longer and override our cancelled notifications.
+ if (isCancelled())
+ return;
+ String progressText = chunks.get(chunks.size() - 1);
+ page.updateConversionProgressbarText(progressText);
+ progressText = progressText.replaceAll("[^\\d]", "");
+ try {
+ int progressInt = Integer.parseInt(progressText);
+ if (progressInt < 100)
+ page.updateConversionProgressbar(progressInt);
+ } catch (NumberFormatException e) {
+ // We are only interested in integers for the progressbar
+ // should therefore be OK to discard the exceptions here.
+ }
+ }
+
+ @Override
+ protected void done() {
+ try {
+ get();
+ page.setPageComplete(true);
+ page.conversionSuccessful = true;
+ page.updateConversionProgressbar(100);
+ } catch (InterruptedException e) {
+ LOGGER.debug("Conversion execution interrupted", e);
+ process.destroy();
+ page.updateConversionProgressbarText(conversionCancelledText);
+ } catch (CancellationException e) {
+ LOGGER.debug("Conversion execution Cancelled", e);
+ process.destroy();
+ page.updateConversionProgressbarText(conversionCancelledText);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ Gui.showMessageBox(page, I18n.HELPER.getString("OVFConversion.error.text"), MessageType.ERROR,
+ LOGGER, e);
+ page.btnStartConversion.setEnabled(false);
+ page.btnStartConversion
+ .setText(I18n.PAGE.getString("ImageOvfConversion.StartConversionButton.text"));
+ }
+ super.done();
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ImageWrapper.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ImageWrapper.java
new file mode 100644
index 00000000..c86ddfa9
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ImageWrapper.java
@@ -0,0 +1,93 @@
+package org.openslx.dozmod.util;
+
+import org.apache.log4j.Logger;
+
+import org.openslx.dozmod.Branding;
+import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.MessageType;
+import org.openslx.dozmod.model.ContainerDefinition;
+import org.openslx.thrifthelper.TConst;
+import org.openslx.util.vm.DiskImage;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+
+public class ImageWrapper {
+
+ private static final Logger LOGGER = Logger.getLogger(ImageWrapper.class);
+
+ /**
+ * @param virtualizerId string constant defined in @link org.openslx.thrifthelper.TConst
+ * @param tmpDiskFile dont no!
+ * @param imageName The name of that image in the list.
+ * @param destDir Destination directory on the local host.
+ * @param osId Operating system identifier of the selected image.
+ * @param virtualizerConfig raw byte array of virtualizerconfig in imageversion table. Only the Image knows
+ * how to use it.
+ */
+ public static void unpack(String virtualizerId, File tmpDiskFile, String imageName, File destDir,
+ int osId, byte[] virtualizerConfig) {
+
+ // after the whole image is downloaded and persisted as a .part file,
+ // this will be executed to unpack it.
+ // TODO Move into new Class (implements TransferEventListener)
+
+ DiskImage diskImage = null;
+ String ext = virtualizerId;
+
+ // unwrap each image individually
+ // TODO In future maybe this is a check to distinguish between VM-Image and Container Image
+ if (virtualizerId.equals(TConst.VIRT_DOCKER)) {
+
+ ContainerDefinition conDef = ContainerDefinition.fromByteArray(virtualizerConfig);
+ conDef.saveLocal(destDir);
+
+ try {
+ // delete image file, unused in container Context.
+ Files.delete(tmpDiskFile.toPath());
+
+ } catch (IOException e) {
+ Gui.asyncMessageBox("Konnte temporäre Download Datei nicht löschen", MessageType.WARNING, LOGGER,
+ e);
+ }
+
+ } else {
+ try {
+ diskImage = new DiskImage(tmpDiskFile);
+ } catch (IOException | DiskImage.UnknownImageFormatException e) {
+ LOGGER.warn("Could not open downloaded image for analyze step", e);
+ }
+
+ if (diskImage != null) {
+ if (diskImage.format != null) {
+ ext = diskImage.format.extension;
+ }
+ if (diskImage.isCompressed) {
+ String msg = "<html>Die heruntergeladene VM '" + imageName + "' ist ein komprimiertes "
+ + "Abbild.<br>Sie müssen das Abbild dekomprimieren, bevor Sie es verändern "
+ + "können.<br> Die VM wird lokal voraussichtlich nicht startfähig sein!"
+ + "<br><br>Bitte lesen Sie die Hinweise unter " + "<a href=\""
+ + Branding.getServiceFAQWebsite() + "\">" + "VMDK Disk Types</a>";
+
+ Gui.asyncMessageBox(msg, MessageType.WARNING, null, null);
+ }
+ }
+ File destImage = new File(destDir.getAbsolutePath(), VmWrapper.generateFilename(imageName, ext));
+
+ destImage.delete();
+
+ if (!tmpDiskFile.renameTo(destImage)) {
+ destImage = tmpDiskFile; // Must be Windows...
+ }
+ try {
+ VmWrapper.wrapVm(destImage, imageName, virtualizerConfig, virtualizerId, osId, diskImage);
+
+ } catch (VmWrapper.MetaDataMissingException | IOException e) {
+ Gui.asyncMessageBox("Zur heruntergeladenen VM konnte keine vmx-Datei angelegt werden."
+ + "\nSie können versuchen, das Abbild manuell in den VMWare-Player zu importieren.",
+ MessageType.WARNING, LOGGER, e);
+ }
+ }
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java
index d03bafb0..fee5e7c2 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java
@@ -20,6 +20,7 @@ import javax.swing.ImageIcon;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
+import org.openslx.dozmod.Config;
/**
* Helper class for loading resources.
@@ -52,7 +53,12 @@ public class ResourceLoader
LOGGER.error( "Resource not found: " + path );
} else {
try {
- return new ImageIcon( url, description );
+ ImageIcon icon = new ImageIcon(url);
+ float scalingFactor = Config.getFontScaling() / (float)100;
+ return new ImageIcon(
+ icon.getImage().getScaledInstance(Math.round(icon.getIconWidth() * scalingFactor),
+ Math.round(icon.getIconHeight() * scalingFactor), java.awt.Image.SCALE_SMOOTH),
+ description);
} catch ( Exception e ) {
LOGGER.error( "Resource not loadable: " + path );
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/TarArchiveUtil.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/TarArchiveUtil.java
new file mode 100644
index 00000000..c1a282b6
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/TarArchiveUtil.java
@@ -0,0 +1,30 @@
+package org.openslx.dozmod.util;
+
+import org.kamranzafar.jtar.TarEntry;
+import org.kamranzafar.jtar.TarHeader;
+import org.kamranzafar.jtar.TarOutputStream;
+import org.openslx.util.Util;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+public class TarArchiveUtil {
+
+
+
+ public static void tarPutFile(TarOutputStream output, String fileName, String data) throws IOException
+ {
+ if (data == null)
+ return;
+ tarPutFile(output, fileName, data.getBytes(StandardCharsets.UTF_8));
+ }
+
+ public static void tarPutFile(TarOutputStream output, String fileName, byte[] data) throws IOException
+ {
+ if (data == null)
+ return;
+ output.putNextEntry(new TarEntry(
+ TarHeader.createHeader(fileName, data.length, Util.unixTime(), false, 0644)));
+ output.write(data);
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmMetaDataDummy.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmMetaDataDummy.java
new file mode 100644
index 00000000..bd5d4323
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmMetaDataDummy.java
@@ -0,0 +1,121 @@
+package org.openslx.dozmod.util;
+
+import org.openslx.bwlp.thrift.iface.Virtualizer;
+import org.openslx.thrifthelper.TConst;
+import org.openslx.util.vm.VmMetaData;
+
+import java.io.File;
+import java.util.List;
+
+public class VmMetaDataDummy extends VmMetaData {
+ // TODO Define DOCKER CONSTANT
+ private final Virtualizer virtualizer = new Virtualizer( TConst.VIRT_VMWARE, "DOCKER" );
+
+ public VmMetaDataDummy(List osList) {
+ super(osList);
+ }
+
+ @Override public byte[] getFilteredDefinitionArray() {
+ return new byte[0];
+ }
+
+ @Override public void applySettingsForLocalEdit() {
+
+ }
+
+ @Override public boolean addHddTemplate(File diskImage, String hddMode, String redoDir) {
+ return false;
+ }
+
+ @Override public boolean addHddTemplate(String diskImagePath, String hddMode, String redoDir) {
+ return false;
+ }
+
+ @Override public boolean addDefaultNat() {
+ return false;
+ }
+
+ @Override public void setOs(String vendorOsId) {
+
+ }
+
+ @Override public boolean addDisplayName(String name) {
+ return false;
+ }
+
+ @Override public boolean addRam(int mem) {
+ return false;
+ }
+
+ @Override public void addFloppy(int index, String image, boolean readOnly) {
+
+ }
+
+ @Override public boolean addCdrom(String image) {
+ return false;
+ }
+
+ @Override public boolean addCpuCoreCount(int nrOfCores) {
+ return false;
+ }
+
+ @Override public void setSoundCard(SoundCardType type) {
+
+ }
+
+ @Override public SoundCardType getSoundCard() {
+ return SoundCardType.NONE;
+ }
+
+ @Override public void setDDAcceleration(DDAcceleration type) {
+
+ }
+
+ @Override public DDAcceleration getDDAcceleration() {
+ return DDAcceleration.OFF;
+ }
+
+ @Override public void setHWVersion(HWVersion type) {
+
+ }
+
+ @Override public HWVersion getHWVersion() {
+ return HWVersion.DEFAULT;
+ }
+
+ @Override public void setEthernetDevType(int cardIndex, EthernetDevType type) {
+
+ }
+
+ @Override public EthernetDevType getEthernetDevType(int cardIndex) {
+ return EthernetDevType.NONE;
+ }
+
+ @Override public void setMaxUsbSpeed(UsbSpeed speed) {
+
+ }
+
+ @Override public UsbSpeed getMaxUsbSpeed() {
+ return UsbSpeed.NONE;
+ }
+
+ @Override public byte[] getDefinitionArray() {
+ return new byte[0];
+ }
+
+ @Override public boolean addEthernet(EtherType type) {
+ return false;
+ }
+
+ @Override public Virtualizer getVirtualizer() {
+ return virtualizer;
+ }
+
+ @Override public boolean tweakForNonPersistent() {
+ return false;
+ }
+
+ @Override public void registerVirtualHW() {
+
+ }
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmWrapper.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmWrapper.java
index 38a61282..58093471 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmWrapper.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/VmWrapper.java
@@ -103,8 +103,9 @@ public class VmWrapper {
if (vmMeta instanceof VmwareMetaData) {
fileType = ".vmx";
// Copy BIOS with both floppies enabled
- try (FileOutputStream output = new FileOutputStream(new File(diskFile.getAbsoluteFile()
- .getParentFile(), "nvram")); InputStream input = ResourceLoader.getStream("/data/nvram")) {
+ try {
+ FileOutputStream output = new FileOutputStream(new File(diskFile.getAbsoluteFile().getParentFile(), "nvram"));
+ InputStream input = ResourceLoader.getStream("/data/nvram");
IOUtils.copy(input, output);
} catch (Exception e) {
Gui.asyncMessageBox("Konnte das BIOS für die VM nicht kopieren", MessageType.ERROR, LOGGER, e);
diff --git a/dozentenmodul/src/main/properties/i18n/activity.properties b/dozentenmodul/src/main/properties/i18n/activity.properties
new file mode 100644
index 00000000..2d0b0e5c
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/activity.properties
@@ -0,0 +1,27 @@
+# DownloadPanel
+DownloadPanel.Button.openFolder.text=Open folder
+DownloadPanel.Message.yesNo.cancelTransfer=Do you really want to cancel this transfer?
+
+# PassiveUploadPanel
+PassiveUploadPanel.TransferPanel.fileName=<Transfer between master server and satellite server>
+PassiveUploadPanel.Button.close.text=Hide
+
+# TransferPanel
+TransferPanel.TransferState.initialize=Initialize
+TransferPanel.Button.close.text.0=Cancel
+TransferPanel.TransferState.error=Error
+TransferPanel.TransferState.finished=Completed
+TransferPanel.TransferState.idle=Inactive
+TransferPanel.TransferState.working=Transfer in progress
+TransferPanel.Button.close.text.1=Close
+
+# UpdatePanel
+UpdatePanel.Label.info.text=New version available: {0}
+UpdatePanel.Button.link.text=Open in browser
+UpdatePanel.Button.details.text=Changelog
+UpdatePanel.Button.close.text=Close
+
+# UploadPanel
+UploadPanel.CheckBox.serverSideCopy.text=ServerSide Copy
+UploadPanel.Message.yesNo.cancelTransfer=Do you really want to cancel this transfer?
+UploadPanel.Message.error.setUploadOptions=Unexpected error while setting the transfer options \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/activity_de_DE.properties b/dozentenmodul/src/main/properties/i18n/activity_de_DE.properties
new file mode 100644
index 00000000..739bf806
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/activity_de_DE.properties
@@ -0,0 +1,27 @@
+# DownloadPanel
+DownloadPanel.Button.openFolder.text=Ordner öffnen
+DownloadPanel.Message.yesNo.cancelTransfer=Wollen Sie diesen Transfer wirklich abbrechen?
+
+# PassiveUploadPanel
+PassiveUploadPanel.TransferPanel.fileName=<Transfer zwischen Masterserver und Satellitenserver>
+PassiveUploadPanel.Button.close.text=Ausblenden
+
+# TransferPanel
+TransferPanel.TransferState.initialize=Initialisiere
+TransferPanel.Button.close.text.0=Abbrechen
+TransferPanel.TransferState.error=Fehler
+TransferPanel.TransferState.finished=Beendet
+TransferPanel.TransferState.idle=Inaktiv
+TransferPanel.TransferState.working=Übertragung läuft
+TransferPanel.Button.close.text.1=Schließen
+
+# UpdatePanel
+UpdatePanel.Label.info.text=Neue Version verfügbar: {0}
+UpdatePanel.Button.link.text=Im Browser öffnen
+UpdatePanel.Button.details.text=Changelog
+UpdatePanel.Button.close.text=Schließen
+
+# UploadPanel
+UploadPanel.CheckBox.serverSideCopy.text=ServerSide Copy
+UploadPanel.Message.yesNo.cancelTransfer=Wollen Sie diesen Transfer wirklich abbrechen?
+UploadPanel.Message.error.setUploadOptions=Unerwarteter Fehler beim Setzen der Transferoptionen \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/activity_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/activity_tr_TR.properties
new file mode 100644
index 00000000..6bd6495d
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/activity_tr_TR.properties
@@ -0,0 +1,27 @@
+# DownloadPanel
+DownloadPanel.Button.openFolder.text=Klasörü aç
+DownloadPanel.Message.yesNo.cancelTransfer=Bu transferi iptal etmek istediğinizden emin misiniz?
+
+# PassiveUploadPanel
+PassiveUploadPanel.TransferPanel.fileName=<Master ve satelit sunucuları arasında transfer>
+PassiveUploadPanel.Button.close.text=Gizle
+
+# TransferPanel
+TransferPanel.TransferState.initialize=Başlatılıyor
+TransferPanel.Button.close.text.0=İptal
+TransferPanel.TransferState.error=Hata
+TransferPanel.TransferState.finished=Tamamlandı
+TransferPanel.TransferState.idle=Aktif değil
+TransferPanel.TransferState.working=Transfer devam ediyor
+TransferPanel.Button.close.text.1=Kapat
+
+# UpdatePanel
+UpdatePanel.Label.info.text=Yeni sürüm mevcut: {0}
+UpdatePanel.Button.link.text=Tarayıcıda aç
+UpdatePanel.Button.details.text=Değişiklik kaydı
+UpdatePanel.Button.close.text=Kapat
+
+# UploadPanel
+UploadPanel.CheckBox.serverSideCopy.text=Sunucu taraflı kopyalama
+UploadPanel.Message.yesNo.cancelTransfer=Bu transferi iptal etmek istediğinizden emin misiniz?
+UploadPanel.Message.error.setUploadOptions=Transfer seçenekleri ayarlanırken hata oluştu \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/app.properties b/dozentenmodul/src/main/properties/i18n/app.properties
new file mode 100644
index 00000000..125a330e
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/app.properties
@@ -0,0 +1,6 @@
+# App
+App.Message.error.loadingConfigurationFailed=Error loading configuration
+App.Message.yesNo.SSLNotAvailable=SSL not available. Do you still want to connect without encryption?
+App.Message.warning.uncaughtException=Uncaught exception in thread {0}\n\n\
+ The application may run unstable.\n\
+ To be on the safe side, you should restart it. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/app_de_DE.properties b/dozentenmodul/src/main/properties/i18n/app_de_DE.properties
new file mode 100644
index 00000000..2719ff64
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/app_de_DE.properties
@@ -0,0 +1,6 @@
+# App
+App.Message.error.loadingConfigurationFailed=Fehler beim Laden der Konfiguration
+App.Message.yesNo.SSLNotAvailable=SSL nicht verfügbar. Wollen Sie sich trotzdem unverschlüsselt verbinden?
+App.Message.warning.uncaughtException=Ungefangene Ausnahme im Thread {0}\n\n\
+ Die Anwendung könnte instabil laufen.\n\
+ Zur Sicherheit sollten Sie sie neustarten. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/app_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/app_tr_TR.properties
new file mode 100644
index 00000000..aee0fdb0
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/app_tr_TR.properties
@@ -0,0 +1,6 @@
+# App
+App.Message.error.loadingConfigurationFailed=Yapılandırma yüklenirken hata oluştu
+App.Message.yesNo.SSLNotAvailable=SSL mevcut değil. Şifreleme olmadan yine de bağlanmak istiyor musunuz?
+App.Message.warning.uncaughtException=İş parçacığında yakalanmamış hata {0}\n\n\
+ Uygulama kararsız çalışabilir.\n\
+ Sorun yaşamamak için uygulamayı yeniden başlatın. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/configurator.properties b/dozentenmodul/src/main/properties/i18n/configurator.properties
new file mode 100644
index 00000000..f96b2558
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/configurator.properties
@@ -0,0 +1,131 @@
+# ImagePermissionConfigurator
+ImagePermission.Button.addUser.text=Add user
+ImagePermission.Button.removeUser.text=Remove user
+ImagePermission.Button.addUser.caption=Add
+
+# LdapFilterConfigurator
+LdapFilter.Button.add.text.0=Change
+LdapFilter.Message.error.noAttribute=No attribute given
+LdapFilter.Message.error.entryAlreadyExists=Entry already exists
+
+# LdapFilterConfiguratorLayout
+LdapFilter.Label.info.text=Enter LDAP filters here, that restrict the visibility \
+ of the lecture depending on the logged-in user. A lecture \
+ is visible as soon as one of the given filters applies. Additional room restrictions \
+ still apply.
+LdapFilter.Button.delete.text=Delete
+LdapFilter.TitledBorder.newShare.title=Define own filters
+LdapFilter.Label.attribute.text=Attribute
+LdapFilter.Label.value.text=Value
+LdapFilter.Button.add.text.1=Add
+
+# LecturePermissionConfigurator
+LecturePermission.Button.addUser.text=Add user
+LecturePermission.Button.removeUser.text=Remove user
+LecturePermission.Button.addUser.caption=Add
+
+# NetRulesConfigurator
+NetRules.Message.error.noPredefinedRules=Wah wah wah! Null preset list
+NetRules.Dialog.dialog.title=Selection
+NetRules.Label.predefinedRules.text=Predefined rules:
+NetRules.Button.cancel.text=Cancel
+NetRules.Button.ok.text=Save
+NetRules.Message.error.tooManyFields=Line {0}: too many fields.\n
+NetRules.Message.error.tooFewFields=Line {0}: too few fields.\n
+NetRules.Message.error.invalidNetDirection=Line {0}: Invalid direction. Please use ''IN'' or ''OUT''.\n
+NetRules.Message.error.invalidPort=Line {0}: Invalid port. Valid range is 0-65535.\n
+NetRules.Message.error.checkResWithLineNo=Line {0}: {1}\n
+NetRules.Message.error.evaluatingNetRules=Error while evaluating the given network rules.\n\n{0}\
+ \nPlease enter the rules line by line in the following format\n\
+ <host> <port> <IN|OUT>\n
+NetRules.Message.error.hostnameTooLong=Hostname too long.
+NetRules.Message.error.invalidNetmask=Invalid netmask.
+NetRules.Message.error.IPv6BeginOrEndWithColon=IPv6 address must not begin or end with a colon.
+NetRules.Message.error.IPv6MoreThanOneCompressedPart=IPv6 address must not contain more than one \
+ compressed part.
+NetRules.Message.error.IPv6GreaterThan128Bits=IPv6 netmask cannot be greater than 128 Bits.
+NetRules.Message.error.IPv6TooManyHextets=IPv6 address contains too many hextets.
+NetRules.Message.error.IPv6InvalidHextet=IPv6 address contains invalid hextet.
+NetRules.Message.error.IPv6NonHexadecimalCharacters=IPv6 address contains non-hexadecimal characters.
+NetRules.Message.error.incorrectIPv6AddressOrNetmask=Incorrect IPv6 address/netmask.
+NetRules.Message.error.IPv4GreaterThan32Bits=IPv4 netmask cannot be greater then 32 Bits.
+NetRules.Message.error.domainLabelLongerThan63Characters=Domain label {0} longer than 63 characters.
+NetRules.Message.error.incorrectIPv4AddressOrNetmask=Incorrect IPv4 address/netmask.
+
+# NetRulesConfiguratorLayout
+NetRules.TitledBorder.title=Network rules
+NetRules.Label.description.text=If you have disabled internet access, \
+ you can define exceptions here (Whitelist). \
+ Please define your rules in the following format\n<host> <port> <in|out>.\n\
+ You can specify port 0, which corresponds to all TCP and UDP ports \
+ of a host.
+NetRules.Label.add.text=If you enable internet access, \
+ this list has the opposite effect (Blacklist).
+NetRules.Button.checkRules.text=Check rules
+NetRules.Button.showPresets.text=Predefined rules...
+
+# NetShareConfigurator
+NetShare.Button.add.text.0=Change
+NetShare.Label.error.noPath=No path given!
+NetShare.Label.error.noAuth=No authentication type given!
+NetShare.Label.error.noUsername=No username given!
+NetShare.Label.error.incorrectInput=Incorrect input
+NetShare.Label.error.noMountPoint=No mount point given!
+NetShare.Message.yesNo.password=The entered password will be stored in plain text \
+ and will be visible in the VM for all users.\n\
+ Please do not use any security critical passwords here!\
+ \n\nDo you want to add this network drive anyway?
+NetShare.Label.error.changeFailed=Change failed!
+NetShare.Label.error.alreadyExists=Already exists!
+NetShare.Button.add.text.1=Add
+
+# NetShareConfiguratorLayout
+NetShare.Label.description.text=<html>Here you can specify network drives \
+ that are to be included automatically when the lecture starts. \
+ The placeholder <em>%loginuser%</em> will be replaced in the path by the login name of the user.</html>
+NetShare.TitledBorder.newShare.title=Define own network drive
+NetShare.Label.sharePath.text=Path
+NetShare.CheckBox.isPrinter.text=Printer
+NetShare.Label.shareMountPoint.text=Mount point
+NetShare.Label.shareName.text=Display name
+NetShare.Label.shareAuth.text=Authentication
+NetShare.Label.username.text=Username
+NetShare.Label.password.text=Password
+NetShare.CheckBox.showPassword.text=Show password
+NetShare.Button.delete.text=Delete
+
+# StartupConfigurator
+Startup.Message.error.noScripts=Wah wah wah! Null scripts
+Startup.Dialog.title=Selection
+Startup.Label.predefinedScripts.text=Predefined scripts:
+Startup.Label.greyedOutElements.text=Greyed out elements are not compatible with the \
+ operating system belonging to the lecture.
+Startup.Button.cancel.text=Cancel
+Startup.Button.ok.text=Save
+
+# StartupConfiguratorLayout
+Startup.Label.audio.text=Audio
+Startup.Label.description.text=A script entered here is executed automatically \
+ after the start of the VM.
+Startup.Label.scriptType.text=Filename extension:
+Startup.Label.visibility.text=Visibility:
+Startup.Button.predefinedScripts.text=Predefined scripts...
+
+# RunscriptType
+Startup.ScriptType.shell=Shell script
+Startup.ScriptType.batch=Windows batch
+
+# RunscriptVisibility
+Startup.ScriptVisibility.normal=Normal
+Startup.ScriptVisibility.minimized=Minimized
+Startup.ScriptVisibility.hidden=Hidden
+
+# SoundState
+Startup.SoundState.default=Default of the pool
+Startup.SoundState.muted=Mute
+Startup.SoundState.unmuted=Unmute
+
+# ContainerBindMountConfigurator
+ContainerBindMount.BindMount.text=Bind Mount Configuration
+ContainerBindMount.Button.AddBindMount.text=Add Bind Mount
+ContainerBindMount.Button.DeleteBindMount.text=Remove Bind Mount \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/configurator_de_DE.properties b/dozentenmodul/src/main/properties/i18n/configurator_de_DE.properties
new file mode 100644
index 00000000..1a39a3e3
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/configurator_de_DE.properties
@@ -0,0 +1,131 @@
+# ImagePermissionConfigurator
+ImagePermission.Button.addUser.text=Benutzer hinzufügen
+ImagePermission.Button.removeUser.text=Benutzer entfernen
+ImagePermission.Button.addUser.caption=Hinzufügen
+
+# LdapFilterConfigurator
+LdapFilter.Button.add.text.0=Ändern
+LdapFilter.Message.error.noAttribute=Kein Attribut angegeben
+LdapFilter.Message.error.entryAlreadyExists=Eintrag bereits vorhanden
+
+# LdapFilterConfiguratorLayout
+LdapFilter.Label.info.text=Geben Sie hier LDAP Filter ein, die die Sichtbarkeit \
+ der Veranstaltung abhängig vom angemeldeten Benutzer einschränken. Eine Veranstaltung \
+ ist sichtbar, sobald einer der angegebenen Filter zutrifft. Zusätzliche Raumbeschränkungen \
+ greifen weiterhin.
+LdapFilter.Button.delete.text=Entfernen
+LdapFilter.TitledBorder.newShare.title=Eigene Filter definieren
+LdapFilter.Label.attribute.text=Attribut
+LdapFilter.Label.value.text=Wert
+LdapFilter.Button.add.text.1=Hinzufügen
+
+# LecturePermissionConfigurator
+LecturePermission.Button.addUser.text=Benutzer hinzufügen
+LecturePermission.Button.removeUser.text=Benutzer entfernen
+LecturePermission.Button.addUser.caption=Hinzufügen
+
+# NetRulesConfigurator
+NetRules.Message.error.noPredefinedRules=Wah wah wah! Null preset list
+NetRules.Dialog.dialog.title=Auswahl
+NetRules.Label.predefinedRules.text=Vordefinierte Regelsets:
+NetRules.Button.cancel.text=Abbrechen
+NetRules.Button.ok.text=Speichern
+NetRules.Message.error.tooManyFields=Zeile {0}: Zu viele Felder.\n
+NetRules.Message.error.tooFewFields=Zeile {0}: Zu wenig Felder.\n
+NetRules.Message.error.invalidNetDirection=Zeile {0}: Ungültige Richtung. Bitte nutzen Sie ''IN'' bzw. ''OUT''.\n
+NetRules.Message.error.invalidPort=Zeile {0}: Ungültiger Port. Gültiger Bereich ist 0-65535.\n
+NetRules.Message.error.checkResWithLineNo=Zeile {0}: {1}\n
+NetRules.Message.error.evaluatingNetRules=Fehler beim Auswerten der angegebenen Netzwerkregeln.\n\n{0}\
+ \nBitte geben Sie die Regeln zeilenweise im Format\n\
+ <host> <port> <IN|OUT>\nan.
+NetRules.Message.error.hostnameTooLong=Hostname ist zu lang.
+NetRules.Message.error.invalidNetmask=Ungültige Netzmaske.
+NetRules.Message.error.IPv6BeginOrEndWithColon=IPv6-Adresse darf nicht mit einem Doppelpunkt beginnen oder enden.
+NetRules.Message.error.IPv6MoreThanOneCompressedPart=IPv6-Adresse darf nicht mehr als einen komprimierten Teil \
+ enthalten.
+NetRules.Message.error.IPv6GreaterThan128Bits=IPv6 Netzmaske kann nicht größer als 128 Bits sein.
+NetRules.Message.error.IPv6TooManyHextets=IPv6-Adresse enthält zu viele Hextets.
+NetRules.Message.error.IPv6InvalidHextet=IPv6-Adresse enthält ungültiges Hextet.
+NetRules.Message.error.IPv6NonHexadecimalCharacters=IPv6-Adresse enthält nicht-hexadezimale Zeichen.
+NetRules.Message.error.incorrectIPv6AddressOrNetmask=Fehlerhafte IPv6-Adresse/Netzmaske.
+NetRules.Message.error.IPv4GreaterThan32Bits=IPv4 Netzmaske kann nicht größer als 32 Bits sein.
+NetRules.Message.error.domainLabelLongerThan63Characters=Domain-Ebene {0} länger als 63 Zeichen.
+NetRules.Message.error.incorrectIPv4AddressOrNetmask=Fehlerhafte IPv4-Adresse/Netzmaske.
+
+# NetRulesConfiguratorLayout
+NetRules.TitledBorder.title=Netzwerkregeln
+NetRules.Label.description.text=Wenn Sie den Internetzugriff deaktiviert haben, \
+ können Sie hier Ausnahmen definieren (Whitelist). \
+ Bitte definieren Sie Ihre Regeln im Format\n<host> <port> <in|out>.\n\
+ Sie können Port 0 angeben, was sämtlichen TCP und UDP Ports \
+ eines Hosts entspricht.
+NetRules.Label.add.text=Wenn Sie Internetzugriff aktivieren, \
+ hat diese Liste den gegenteiligen Effekt (Blacklist).
+NetRules.Button.checkRules.text=Regeln überprüfen
+NetRules.Button.showPresets.text=Vordefinierte Regelsets...
+
+# NetShareConfigurator
+NetShare.Button.add.text.0=Ändern
+NetShare.Label.error.noPath=Kein Pfad angegeben!
+NetShare.Label.error.noAuth=Kein Authentifizierungstyp angegeben!
+NetShare.Label.error.noUsername=Kein Nutzername angegeben!
+NetShare.Label.error.incorrectInput=Fehlerhafte Eingabe
+NetShare.Label.error.noMountPoint=Kein Laufwerk angegeben!
+NetShare.Message.yesNo.password=Das eingegebene Passwort wird im Klartext gespeichert \
+ und ist in der VM für jeden Nutzer sichtbar.\n\
+ Verwenden Sie auf keinen Fall sicherheitskritische Passwörter!\
+ \n\nMöchten Sie diesen Netzlaufwerk trotzdem hinzufügen?
+NetShare.Label.error.changeFailed=Änderung fehlgeschlagen!
+NetShare.Label.error.alreadyExists=Existiert bereits!
+NetShare.Button.add.text.1=Hinzufügen
+
+# NetShareConfiguratorLayout
+NetShare.Label.description.text=<html>Hier können Sie Netzlaufwerke angeben, \
+ die automatisch beim Start der Veranstaltung eingebunden werden sollen. \
+ Der Platzhalter <em>%loginuser%</em> wird im Pfad durch den Loginnamen des Nutzers ersetzt.</html>
+NetShare.TitledBorder.newShare.title=Eigenes Netzlaufwerk definieren
+NetShare.Label.sharePath.text=Pfad
+NetShare.CheckBox.isPrinter.text=Drucker
+NetShare.Label.shareMountPoint.text=Laufwerk
+NetShare.Label.shareName.text=Anzeigename
+NetShare.Label.shareAuth.text=Authentifizierung
+NetShare.Label.username.text=Benutzername
+NetShare.Label.password.text=Passwort
+NetShare.CheckBox.showPassword.text=Passwort anzeigen
+NetShare.Button.delete.text=Entfernen
+
+# StartupConfigurator
+Startup.Message.error.noScripts=Wah wah wah! Null scripts
+Startup.Dialog.title=Auswahl
+Startup.Label.predefinedScripts.text=Vordefinierte Startskripte:
+Startup.Label.greyedOutElements.text=Ausgegraute Elemente sind mit dem zur \
+ Veranstaltung gehörenden Betriebssystem nicht kompatibel.
+Startup.Button.cancel.text=Abbrechen
+Startup.Button.ok.text=Speichern
+
+# StartupConfiguratorLayout
+Startup.Label.audio.text=Audio
+Startup.Label.description.text=Ein hier eingetragenes Skript wird nach dem Start \
+ der VM automatisch ausgeführt.
+Startup.Label.scriptType.text=Dateinamenserweiterung:
+Startup.Label.visibility.text=Sichtbarkeit:
+Startup.Button.predefinedScripts.text=Vordefinierte Skripte...
+
+# RunscriptType
+Startup.ScriptType.shell=Shellskript
+Startup.ScriptType.batch=Windows-Batch
+
+# RunscriptVisibility
+Startup.ScriptVisibility.normal=Normal
+Startup.ScriptVisibility.minimized=Minimiert
+Startup.ScriptVisibility.hidden=Versteckt
+
+# SoundState
+Startup.SoundState.default=Vorgabe des Pools
+Startup.SoundState.muted=Stummschalten
+Startup.SoundState.unmuted=Aktivieren
+
+# ContainerBindMountConfigurator
+ContainerBindMount.BindMount.text=Bind Mount Configuration
+ContainerBindMount.Button.AddBindMount.text=Bind Mount hinzufügen
+ContainerBindMount.Button.DeleteBindMount.text=Bind Mount entfernen \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/configurator_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/configurator_tr_TR.properties
new file mode 100644
index 00000000..d245d61b
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/configurator_tr_TR.properties
@@ -0,0 +1,131 @@
+# ImagePermissionConfigurator
+ImagePermission.Button.addUser.text=Kullanıcı ekle
+ImagePermission.Button.removeUser.text=Kullanıcıyı kaldır
+ImagePermission.Button.addUser.caption=Ekle
+
+# LdapFilterConfigurator
+LdapFilter.Button.add.text.0=Değiştir
+LdapFilter.Message.error.noAttribute=Hiçbir nitelik girilmedi
+LdapFilter.Message.error.entryAlreadyExists=Giriş zaten var
+
+# LdapFilterConfiguratorLayout
+LdapFilter.Label.info.text=Oturum açmış kullanıcıya bağlı olarak etkinliğin görünürlüğünü kısıtlayan \
+ LDAP filtrelerini burada tanımlayabilirsiniz. Bir etkinlik \
+ tanımlanmış filtrelerden biri uygulanır uygulanmaz görünür olur. İlave oda kısıtlamaları \
+ geçerliliğini korur.
+LdapFilter.Button.delete.text=Kaldır
+LdapFilter.TitledBorder.newShare.title=Kendi filtrelerinizi tanımlayın
+LdapFilter.Label.attribute.text=Nitelik
+LdapFilter.Label.value.text=Değer
+LdapFilter.Button.add.text.1=Ekle
+
+# LecturePermissionConfigurator
+LecturePermission.Button.addUser.text=Kullanıcı ekle
+LecturePermission.Button.removeUser.text=Kullanıcıyı kaldır
+LecturePermission.Button.addUser.caption=Ekle
+
+# NetRulesConfigurator
+NetRules.Message.error.noPredefinedRules=Wah wah wah! Null preset list
+NetRules.Dialog.dialog.title=Seçim
+NetRules.Label.predefinedRules.text=Tanımlı kurallar:
+NetRules.Button.cancel.text=İptal
+NetRules.Button.ok.text=Kaydet
+NetRules.Message.error.tooManyFields=Satır {0}: Çok fazla alan.\n
+NetRules.Message.error.tooFewFields=Satır {0}: Çok az alan.\n
+NetRules.Message.error.invalidNetDirection=Satır {0}: Geçersiz yön. Lütfen ''IN'' veya ''OUT'' kullanın.\n
+NetRules.Message.error.invalidPort=Satır {0}: Geçersiz port. Geçerli aralık 0-65535.\n
+NetRules.Message.error.checkResWithLineNo=Satır {0}: {1}\n
+NetRules.Message.error.evaluatingNetRules=Tanımlanan ağ kuralları değerlendirilirken hata oluştu.\n\n{0}\
+ \nLütfen kuralları aşağıdaki formatta ve satır satır girin\n\
+ <host> <port> <IN|OUT>\n
+NetRules.Message.error.hostnameTooLong=Sunucu adı çok uzun.
+NetRules.Message.error.invalidNetmask=Geçersiz ağ maskesi.
+NetRules.Message.error.IPv6BeginOrEndWithColon=IPv6 adresi iki nokta üst üste ile başlayamaz veya bitemez.
+NetRules.Message.error.IPv6MoreThanOneCompressedPart=IPv6 adresi birden fazla sıkıştırılmış parça \
+ içeremez.
+NetRules.Message.error.IPv6GreaterThan128Bits=IPv6 ağ maskesi 128 Bit''ten büyük olamaz.
+NetRules.Message.error.IPv6TooManyHextets=IPv6 adresi çok fazla hekstet içeriyor.
+NetRules.Message.error.IPv6InvalidHextet=IPv6 adresi geçersiz hekstet içeriyor.
+NetRules.Message.error.IPv6NonHexadecimalCharacters=IPv6 adresi heksadesimal olmayan karakterler içeriyor.
+NetRules.Message.error.incorrectIPv6AddressOrNetmask=Hatalı IPv6 adresi/ağ maskesi.
+NetRules.Message.error.IPv4GreaterThan32Bits=IPv4 ağ maskesi 32 Bit''ten büyük olamaz.
+NetRules.Message.error.domainLabelLongerThan63Characters={0} alan adı 63 karakterden uzun.
+NetRules.Message.error.incorrectIPv4AddressOrNetmask=Hatalı IPv4 adresi/ağ maskesi.
+
+# NetRulesConfiguratorLayout
+NetRules.TitledBorder.title=Ağ kuralları
+NetRules.Label.description.text=Eğer internet erişimini devre dışı bıraktıysanız, \
+ burada istisnalar tanımlayabilirsiniz (Whitelist). \
+ Lütfen kurallarınızı aşağıdaki biçimde tanımlayın\n<host> <port> <in|out>.\n\
+ Bir ana bilgisayarın tüm TCP ve UDP bağlantı noktalarına karşılık gelen 0 numaralı \
+ bağlantı noktasını belirtebilirsiniz.
+NetRules.Label.add.text=İnternet erişimini etkinleştirirseniz, \
+ bu liste tam tersi bir etkiye sahip olur (Blacklist).
+NetRules.Button.checkRules.text=Kuralları kontrol et
+NetRules.Button.showPresets.text=Tanımlı kurallar...
+
+# NetShareConfigurator
+NetShare.Button.add.text.0=Değiştir
+NetShare.Label.error.noPath=Yol belirtilmedi!
+NetShare.Label.error.noAuth=Kimlik doğrulama türü belirtilmedi!
+NetShare.Label.error.noUsername=Kullanıcı adı belirtilmedi!
+NetShare.Label.error.incorrectInput=Yanlış giriş
+NetShare.Label.error.noMountPoint=Sürücü belirtilmedi!
+NetShare.Message.yesNo.password=Girilen şifre düz metin olarak kaydedilir \
+ ve sanal makinede her kullanıcı için görünür olur.\n\
+ Lütfen burada güvenlik açısından kritik parolalar kullanmayın!\
+ \n\nYine de bu ağ sürücüsünü eklemek istiyor musunuz?
+NetShare.Label.error.changeFailed=Değiştirme işlemi başarısız!
+NetShare.Label.error.alreadyExists=Zaten var!
+NetShare.Button.add.text.1=Ekle
+
+# NetShareConfiguratorLayout
+NetShare.Label.description.text=<html>Burada, etkinlik başladığında otomatik olarak \
+ entegre edilmesi gereken ağ sürücülerini tanımlayabilirsiniz. \
+ <em>%loginuser%</em> yer tutucusu, kullanıcının oturum açma adıyla değiştirilir.</html>
+NetShare.TitledBorder.newShare.title=Kendi ağ sürücünüzü tanımlayın
+NetShare.Label.sharePath.text=Yol
+NetShare.CheckBox.isPrinter.text=Yazıcı
+NetShare.Label.shareMountPoint.text=Bağlantı noktası
+NetShare.Label.shareName.text=Görünür isim
+NetShare.Label.shareAuth.text=Kimlik doğrulama
+NetShare.Label.username.text=Kullanıcı adı
+NetShare.Label.password.text=Parola
+NetShare.CheckBox.showPassword.text=Parolayı göster
+NetShare.Button.delete.text=Kaldır
+
+# StartupConfigurator
+Startup.Message.error.noScripts=Wah wah wah! Null scripts
+Startup.Dialog.title=Seçim
+Startup.Label.predefinedScripts.text=Tanımlı başlangıç komutları:
+Startup.Label.greyedOutElements.text=Gri renkteki öğeler, \
+ etkinliğe ait işletim sistemiyle uyumlu değildir.
+Startup.Button.cancel.text=İptal
+Startup.Button.ok.text=Kaydet
+
+# StartupConfiguratorLayout
+Startup.Label.audio.text=Ses
+Startup.Label.description.text=Burada girilen bir komut, \
+ sanal makine başlatıldıktan sonra otomatik olarak çalıştırılır.
+Startup.Label.scriptType.text=Dosya adı uzantısı:
+Startup.Label.visibility.text=Görünürlük:
+Startup.Button.predefinedScripts.text=Tanımlı komutlar...
+
+# RunscriptType
+Startup.ScriptType.shell=Shell script
+Startup.ScriptType.batch=Windows batch
+
+# RunscriptVisibility
+Startup.ScriptVisibility.normal=Normal
+Startup.ScriptVisibility.minimized=Minimize edilmiş
+Startup.ScriptVisibility.hidden=Gizli
+
+# SoundState
+Startup.SoundState.default=Varsayılan
+Startup.SoundState.muted=Sessiz
+Startup.SoundState.unmuted=Etkin
+
+# ContainerBindMountConfigurator
+ContainerBindMount.BindMount.text=Bind Mount Konfigürasyonu
+ContainerBindMount.Button.AddBindMount.text=Bind Mount ekle
+ContainerBindMount.Button.DeleteBindMount.text=Bind Mount kaldır \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/control.properties b/dozentenmodul/src/main/properties/i18n/control.properties
new file mode 100644
index 00000000..ea6d8c22
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/control.properties
@@ -0,0 +1,82 @@
+# ImagePermissionTable
+ImagePermissionTable.ListTableColumn.user.colName=User
+ImagePermissionTable.ListTableColumn.link.colName=Link
+ImagePermissionTable.ListTableColumn.download.colName=Download
+ImagePermissionTable.ListTableColumn.edit.colName=Edit
+ImagePermissionTable.ListTableColumn.admin.colName=Admin
+
+# ImagePublishedTable
+ImagePublishedTable.ListTableColumn.name.colName=Name
+ImagePublishedTable.ListTableColumn.OS.colName=OS
+ImagePublishedTable.ListTableColumn.owner.colName=Owner
+ImagePublishedTable.ListTableColumn.uploader.colName=Uploaded by
+ImagePublishedTable.ListTableColumn.organization.colName=Organization
+
+# ImageTable
+ImageTable.ListTableColumn.template.colName=Template
+ImageTable.ListTableColumn.usable.colName=Usable
+ImageTable.ListTableColumn.size.colName=Size
+ImageTable.ListTableColumn.lastChange.colName=Last change
+ImageTable.ListTableColumn.expiring.colName=Expiring
+ImageTable.ListTableColumn.owner.colName=Owner
+ImageTable.ListTableColumn.OS.colName=OS
+ImageTable.ListTableColumn.name.colName=Name
+ImageTable.ListTableColumn.hypervisor.colName=
+ImageTable.ListTableColumn.versionCount.colName=Version count
+ImageTable.ListTableColumn.totalSize.colName=Total size
+
+# ImageVersionTable
+ImageVersionTable.ListTableColumn.created.colName=Creation date
+ImageVersionTable.ListTableColumn.expiring.colName=Expiry date
+ImageVersionTable.ListTableColumn.uploader.colName=Created by
+ImageVersionTable.ListTableColumn.valid.colName=Usable
+ImageVersionTable.ListTableColumn.size.colName=Size
+ImageVersionTable.ListTableColumn.ID.colName=Internal ID
+
+# LectureLdapFilterTable
+LectureLdapFilterTable.ListTableColumn.title.colName=Name
+LectureLdapFilterTable.ListTableColumn.attribute.colName=Attribute
+LectureLdapFilterTable.ListTableColumn.value.colName=Value
+
+# LecturePermissionTable
+LecturePermissionTable.ListTableColumn.user.colName=User
+LecturePermissionTable.ListTableColumn.edit.colName=Edit
+LecturePermissionTable.ListTableColumn.admin.colName=Admin
+
+# LectureTable
+LectureTable.ListTableColumn.name.colName=Name
+LectureTable.ListTableColumn.owner.colName=Owner
+LectureTable.ListTableColumn.startTime.colName=Start date
+LectureTable.ListTableColumn.endTime.colName=Expiry date
+LectureTable.ListTableColumn.enabled.colName=Activated
+LectureTable.ListTableColumn.valid.colName=VM valid
+
+# NetShareTable
+NetShareTable.ListTableColumn.name.colName=Name
+NetShareTable.ListTableColumn.mount.colName=Target
+NetShareTable.ListTableColumn.path.colName=Path
+NetShareTable.ListTableColumn.auth.colName=Authentication
+NetShareTable.ListTableColumn.user.colName=Username
+NetShareTable.ListTableColumn.password.colName=Password
+
+# UserTable
+UserTable.ListTableColumn.name.colName=Name
+UserTable.ListTableColumn.mail.colName=Mail
+
+# ImageListViewer
+ImageListViewer.FilterType.all=Show all
+ImageListViewer.FilterType.own=Show own/assigned ones only
+ImageListViewer.FilterType.usable=Show usable/linkable only
+ImageListViewer.FilterType.editable=Show editable only
+ImageListViewer.FilterType.templates=Show templates only
+ImageListViewer.TitledBorder.filterPanel.title=Search
+ImageListViewer.Label.imageCount.text=Visible:
+ImageListViewer.CheckBox.searchInDescription.text=Search in Description
+
+# PersonLabel
+PersonLabel.Label.toolTipText=Click to send a mail to this person
+
+# LocationSelector
+LocationSelector.RadioButton.limitToLocations.text=Show lecture exclusively in the selected rooms
+LocationSelector.RadioButton.prioritizeInLocations.text=Show lecture with higher priority in the \
+ selected rooms \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/control_de_DE.properties b/dozentenmodul/src/main/properties/i18n/control_de_DE.properties
new file mode 100644
index 00000000..8c228018
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/control_de_DE.properties
@@ -0,0 +1,82 @@
+# ImagePermissionTable
+ImagePermissionTable.ListTableColumn.user.colName=Benutzer
+ImagePermissionTable.ListTableColumn.link.colName=Verlinken
+ImagePermissionTable.ListTableColumn.download.colName=Download
+ImagePermissionTable.ListTableColumn.edit.colName=Bearbeiten
+ImagePermissionTable.ListTableColumn.admin.colName=Admin
+
+# ImagePublishedTable
+ImagePublishedTable.ListTableColumn.name.colName=Name
+ImagePublishedTable.ListTableColumn.OS.colName=OS
+ImagePublishedTable.ListTableColumn.owner.colName=Besitzer
+ImagePublishedTable.ListTableColumn.uploader.colName=Hochgeladen von
+ImagePublishedTable.ListTableColumn.organization.colName=Organisation
+
+# ImageTable
+ImageTable.ListTableColumn.template.colName=Vorlage
+ImageTable.ListTableColumn.usable.colName=Verwendbar
+ImageTable.ListTableColumn.size.colName=Größe
+ImageTable.ListTableColumn.lastChange.colName=Geändert
+ImageTable.ListTableColumn.expiring.colName=Ablaufdatum
+ImageTable.ListTableColumn.owner.colName=Besitzer
+ImageTable.ListTableColumn.OS.colName=OS
+ImageTable.ListTableColumn.name.colName=Name
+ImageTable.ListTableColumn.hypervisor.colName=
+ImageTable.ListTableColumn.versionCount.colName=Versionen
+ImageTable.ListTableColumn.totalSize.colName=Gesamtgröße
+
+# ImageVersionTable
+ImageVersionTable.ListTableColumn.created.colName=Erstellungszeitpunkt
+ImageVersionTable.ListTableColumn.expiring.colName=Ablaufszeitpunkt
+ImageVersionTable.ListTableColumn.uploader.colName=Ersteller
+ImageVersionTable.ListTableColumn.valid.colName=Verwendbar
+ImageVersionTable.ListTableColumn.size.colName=Größe
+ImageVersionTable.ListTableColumn.ID.colName=Interne ID
+
+# LectureLdapFilterTable
+LectureLdapFilterTable.ListTableColumn.title.colName=Name
+LectureLdapFilterTable.ListTableColumn.attribute.colName=Attribut
+LectureLdapFilterTable.ListTableColumn.value.colName=Wert
+
+# LecturePermissionTable
+LecturePermissionTable.ListTableColumn.user.colName=Benutzer
+LecturePermissionTable.ListTableColumn.edit.colName=Bearbeiten
+LecturePermissionTable.ListTableColumn.admin.colName=Admin
+
+# LectureTable
+LectureTable.ListTableColumn.name.colName=Name
+LectureTable.ListTableColumn.owner.colName=Besitzer
+LectureTable.ListTableColumn.startTime.colName=Startdatum
+LectureTable.ListTableColumn.endTime.colName=Ablaufdatum
+LectureTable.ListTableColumn.enabled.colName=Aktiviert
+LectureTable.ListTableColumn.valid.colName=VM gültig
+
+# NetShareTable
+NetShareTable.ListTableColumn.name.colName=Name
+NetShareTable.ListTableColumn.mount.colName=Ziel
+NetShareTable.ListTableColumn.path.colName=Pfad
+NetShareTable.ListTableColumn.auth.colName=Authentifizierung
+NetShareTable.ListTableColumn.user.colName=Username
+NetShareTable.ListTableColumn.password.colName=Passwort
+
+# UserTable
+UserTable.ListTableColumn.name.colName=Name
+UserTable.ListTableColumn.mail.colName=Mail
+
+# ImageListViewer
+ImageListViewer.FilterType.all=Alle anzeigen
+ImageListViewer.FilterType.own=Nur eigene/zugewiesene anzeigen
+ImageListViewer.FilterType.usable=Nur verwendbare/linkbare anzeigen
+ImageListViewer.FilterType.editable=Nur editierbare anzeigen
+ImageListViewer.FilterType.templates=Nur Vorlagen zeigen
+ImageListViewer.TitledBorder.filterPanel.title=Suchen
+ImageListViewer.Label.imageCount.text=Sichtbar:
+ImageListViewer.CheckBox.searchInDescription.text=Suche in Beschreibung
+
+# PersonLabel
+PersonLabel.Label.toolTipText=Klicken, um eine Mail an diese Person zu senden
+
+# LocationSelector
+LocationSelector.RadioButton.limitToLocations.text=Veranstaltung ausschließlich in den ausgewählten Räumen anzeigen
+LocationSelector.RadioButton.prioritizeInLocations.text=Veranstaltung mit höherer Priorität in den \
+ ausgewählten Räumen anzeigen \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/control_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/control_tr_TR.properties
new file mode 100644
index 00000000..3dc4d689
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/control_tr_TR.properties
@@ -0,0 +1,82 @@
+# ImagePermissionTable
+ImagePermissionTable.ListTableColumn.user.colName=Kullanıcı
+ImagePermissionTable.ListTableColumn.link.colName=Bağlantı ekleme
+ImagePermissionTable.ListTableColumn.download.colName=İndirme
+ImagePermissionTable.ListTableColumn.edit.colName=Düzenleme
+ImagePermissionTable.ListTableColumn.admin.colName=Yönetim
+
+# ImagePublishedTable
+ImagePublishedTable.ListTableColumn.name.colName=İsim
+ImagePublishedTable.ListTableColumn.OS.colName=İşletim sistemi
+ImagePublishedTable.ListTableColumn.owner.colName=Sahibi
+ImagePublishedTable.ListTableColumn.uploader.colName=Yükleyen
+ImagePublishedTable.ListTableColumn.organization.colName=Organizasyon
+
+# ImageTable
+ImageTable.ListTableColumn.template.colName=Şablon
+ImageTable.ListTableColumn.usable.colName=Kullanılabilir
+ImageTable.ListTableColumn.size.colName=Boyut
+ImageTable.ListTableColumn.lastChange.colName=Son değişiklik
+ImageTable.ListTableColumn.expiring.colName=Geçerlilik tarihi
+ImageTable.ListTableColumn.owner.colName=Sahibi
+ImageTable.ListTableColumn.OS.colName=İşletim sistemi
+ImageTable.ListTableColumn.name.colName=İsim
+ImageTable.ListTableColumn.hypervisor.colName=
+ImageTable.ListTableColumn.versionCount.colName=Sürüm sayısı
+ImageTable.ListTableColumn.totalSize.colName=Toplam boyut
+
+# ImageVersionTable
+ImageVersionTable.ListTableColumn.created.colName=Oluşturulma tarihi
+ImageVersionTable.ListTableColumn.expiring.colName=Geçerlilik tarihi
+ImageVersionTable.ListTableColumn.uploader.colName=Oluşturan
+ImageVersionTable.ListTableColumn.valid.colName=Kullanılabilir
+ImageVersionTable.ListTableColumn.size.colName=Boyut
+ImageVersionTable.ListTableColumn.ID.colName=Dahili ID
+
+# LectureLdapFilterTable
+LectureLdapFilterTable.ListTableColumn.title.colName=İsim
+LectureLdapFilterTable.ListTableColumn.attribute.colName=Nitelik
+LectureLdapFilterTable.ListTableColumn.value.colName=Değer
+
+# LecturePermissionTable
+LecturePermissionTable.ListTableColumn.user.colName=Kullanıcı
+LecturePermissionTable.ListTableColumn.edit.colName=Düzenleme
+LecturePermissionTable.ListTableColumn.admin.colName=Yönetim
+
+# LectureTable
+LectureTable.ListTableColumn.name.colName=İsim
+LectureTable.ListTableColumn.owner.colName=Sahibi
+LectureTable.ListTableColumn.startTime.colName=Başlangıç tarihi
+LectureTable.ListTableColumn.endTime.colName=Bitiş tarihi
+LectureTable.ListTableColumn.enabled.colName=Aktif
+LectureTable.ListTableColumn.valid.colName=VM geçerli
+
+# NetShareTable
+NetShareTable.ListTableColumn.name.colName=İsim
+NetShareTable.ListTableColumn.mount.colName=Hedef
+NetShareTable.ListTableColumn.path.colName=Yol
+NetShareTable.ListTableColumn.auth.colName=Doğrulama
+NetShareTable.ListTableColumn.user.colName=Kullanıcı adı
+NetShareTable.ListTableColumn.password.colName=Şifre
+
+# UserTable
+UserTable.ListTableColumn.name.colName=İsim
+UserTable.ListTableColumn.mail.colName=E-posta
+
+# ImageListViewer
+ImageListViewer.FilterType.all=Tümünü göster
+ImageListViewer.FilterType.own=Yalnızca kendimin/bana atanmış olanları göster
+ImageListViewer.FilterType.usable=Yalnızca kullanılabilir/bağlantı eklenebilir olanları göster
+ImageListViewer.FilterType.editable=Yalnızca düzenlenebilir olanları göster
+ImageListViewer.FilterType.templates=Yalnızca şablonları göster
+ImageListViewer.TitledBorder.filterPanel.title=Arama
+ImageListViewer.Label.imageCount.text=Görüntülenen:
+ImageListViewer.CheckBox.searchInDescription.text=Açıklamada ara
+
+# PersonLabel
+PersonLabel.Label.toolTipText=Bu kişiye e-posta göndermek için tıklayın
+
+# LocationSelector
+LocationSelector.RadioButton.limitToLocations.text=Etkinliği yalnızca seçili odalarda göster
+LocationSelector.RadioButton.prioritizeInLocations.text=Etkinliği yüksek öncelikle \
+ seçili odalarda göster \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/gui.properties b/dozentenmodul/src/main/properties/i18n/gui.properties
new file mode 100644
index 00000000..633cda75
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/gui.properties
@@ -0,0 +1,40 @@
+# GraphicalCertHandler
+GraphicalCertHandler.Message.warning.noCertificate=The satellite has no certificate. \
+ Encrypted connection not possible.\n\nDo you still want to continue?
+GraphicalCertHandler.Message.yesNo.fingerprintChanged=!!! ALARM !!!! ALARM !!!\n\nThe fingerprint of {0} \
+ has changed.\nExpected: {1}\nFound: {2}\n\n\
+ Do you still want to connect to this satellite?
+GraphicalCertHandler.Message.error.couldNotGetSSLContext=Could not get TLSv1.2 SSL context
+GraphicalCertHandler.Message.error.couldNotInitializeSSLContext=Could not initialize TLSv1.2 SSL context
+
+# MainWindow
+MainWindow.GuiErrorCallback.master.serverString=the {0} master server
+MainWindow.GuiErrorCallback.satellite.serverString=the satellite server
+MainWindow.Message.warning.couldNotSaveConfig=Could not save program settings
+MainWindow.Message.yesNo.applicationQuit=Do you really want to exit the program?
+MainWindow.Menu.session.s=Session
+MainWindow.MenuItem.config.text=Settings
+MainWindow.MenuItem.logDir.text=Open log directory
+MainWindow.MenuItem.logout.text=Logout and exit
+MainWindow.MenuItem.exit.text=Exit
+MainWindow.Menu.view.s=View
+MainWindow.MenuItem.home.text=Home
+MainWindow.MenuItem.images.text=Virtual machines
+MainWindow.MenuItem.lectures.text=Lectures
+MainWindow.Menu.about.s=About
+MainWindow.MenuItem.disclaimer.text=Disclaimer
+MainWindow.MenuItem.privacyNotice.text=Privacy notice
+MainWindow.MenuItem.virtualizer.text=Virtualizer
+MainWindow.MenuItem.updateCheck.text=Software update
+MainWindow.Message.warning.incorrectTime=ATTENTION: The time on your computer differs \
+ from the time on the satellite server.\n\
+ Please make sure that the clock of your computer is set correctly.\n\
+ If your system time is set correctly, the time on the\n\
+ satellite server may not be set correctly.\n\
+ In this case - depending on the difference - unexpected problems\n\
+ with the start and end times of lectures may occur. Contact the responsible administrator\n\
+ in this case so that the time on the satellite server\n\
+ can be corrected.\n\n\
+ Your computer: {0}\n\
+ Satellite server: {1}
+MainWindow.Label.pleaseWait.text=Please wait, looking for proxy configuration... \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/gui_de_DE.properties b/dozentenmodul/src/main/properties/i18n/gui_de_DE.properties
new file mode 100644
index 00000000..9041b221
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/gui_de_DE.properties
@@ -0,0 +1,40 @@
+# GraphicalCertHandler
+GraphicalCertHandler.Message.warning.noCertificate=Der Satellit besitzt kein Zertifikat. \
+ Verschlüsselte Verbindung nicht möglich.\n\nMöchten Sie trotzdem fortfahren?
+GraphicalCertHandler.Message.yesNo.fingerprintChanged=!!! ALARM !!!! ALARM !!!\n\nDer Fingerabdruck von {0} \
+ hat sich verändert.\nErwartet: {1}\nVorgefunden: {2}\n\n\
+ Möchten Sie trotzdem zu diesem Satelliten verbinden?
+GraphicalCertHandler.Message.error.couldNotGetSSLContext=SSL-Kontext TLSv1.2 konnte nicht geladen werden
+GraphicalCertHandler.Message.error.couldNotInitializeSSLContext=SSL-Kontext TLSv1.2 konnte nicht initialisiert werden
+
+# MainWindow
+MainWindow.GuiErrorCallback.master.serverString=dem {0}-Zentralserver
+MainWindow.GuiErrorCallback.satellite.serverString=dem Satellitenserver
+MainWindow.Message.warning.couldNotSaveConfig=Konnte Programmeinstellungen nicht speichern
+MainWindow.Message.yesNo.applicationQuit=Möchten Sie das Programm wirklich beenden?
+MainWindow.Menu.session.s=Sitzung
+MainWindow.MenuItem.config.text=Einstellungen
+MainWindow.MenuItem.logDir.text=Logverzeichnis öffnen
+MainWindow.MenuItem.logout.text=Abmelden und beenden
+MainWindow.MenuItem.exit.text=Beenden
+MainWindow.Menu.view.s=Ansicht
+MainWindow.MenuItem.home.text=Startseite
+MainWindow.MenuItem.images.text=Virtuelle Maschinen
+MainWindow.MenuItem.lectures.text=Veranstaltungen
+MainWindow.Menu.about.s=Über
+MainWindow.MenuItem.disclaimer.text=Nutzungsvereinbarung
+MainWindow.MenuItem.privacyNotice.text=Datenschutzerklärung
+MainWindow.MenuItem.virtualizer.text=Virtualisierer
+MainWindow.MenuItem.updateCheck.text=Software-Aktualisierung
+MainWindow.Message.warning.incorrectTime=ACHTUNG: Die Uhrzeit Ihres Computers weicht von der Uhrzeit \
+ auf dem Satellitenserver ab.\n\
+ Bitte stellen Sie sicher, dass die Uhr Ihres Computers richtig gestellt ist.\n\
+ Falls Ihre Systemzeit korrekt gesetzt ist, ist möglicherweise die Uhrzeit auf\n\
+ dem Satellitenserver nicht korrekt eingestellt.\n\
+ In diesem Fall kann es - je nach Abweichung - zu unerwarteten Problemen mit den\n\
+ Start- und Endzeiten von Veranstaltungen kommen. Kontaktieren Sie in diesem\n\
+ Fall den zuständigen Administrator, damit die Uhrzeit auf dem Satellitenserver\n\
+ korrigiert werden kann.\n\n\
+ Ihr Computer: {0}\n\
+ Satellitenserver: {1}
+MainWindow.Label.pleaseWait.text=Bitte warten, suche Proxy-Konfiguration... \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/gui_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/gui_tr_TR.properties
new file mode 100644
index 00000000..ac1d3cb4
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/gui_tr_TR.properties
@@ -0,0 +1,40 @@
+# GraphicalCertHandler
+GraphicalCertHandler.Message.warning.noCertificate=Satelit sunucusunun sertifikası yok. \
+ Şifreli bağlantı mümkün değil.\n\nYine de devam etmek istiyor musunuz?
+GraphicalCertHandler.Message.yesNo.fingerprintChanged=!!! ALARM !!!! ALARM !!!\n\n{0} adresinin parmak izi \
+ değişti.\nBeklenen: {1}\nBulunan: {2}\n\n\
+ Bu satelit sunucusuna yine de bağlanmak istiyor musunuz?
+GraphicalCertHandler.Message.error.couldNotGetSSLContext=TLSv1.2 SSL içeriği alınamadı
+GraphicalCertHandler.Message.error.couldNotInitializeSSLContext=TLSv1.2 SSL içeriği başlatılamadı
+
+# MainWindow
+MainWindow.GuiErrorCallback.master.serverString={0} master sunucusu
+MainWindow.GuiErrorCallback.satellite.serverString=satelit sunucusu
+MainWindow.Message.warning.couldNotSaveConfig=Program ayarları kaydedilemedi
+MainWindow.Message.yesNo.applicationQuit=Programı sonlandırmak istediğinizden emin misiniz?
+MainWindow.Menu.session.s=Oturum
+MainWindow.MenuItem.config.text=Ayarlar
+MainWindow.MenuItem.logDir.text=Günlük dizinini aç
+MainWindow.MenuItem.logout.text=Oturumu kapat ve sonlandır
+MainWindow.MenuItem.exit.text=Sonlandır
+MainWindow.Menu.view.s=Görünüm
+MainWindow.MenuItem.home.text=Anasayfa
+MainWindow.MenuItem.images.text=Sanal makineler
+MainWindow.MenuItem.lectures.text=Etkinlikler
+MainWindow.Menu.about.s=Hakkında
+MainWindow.MenuItem.disclaimer.text=Kullanıcı sözleşmesi
+MainWindow.MenuItem.privacyNotice.text=Gizlilik politikası
+MainWindow.MenuItem.virtualizer.text=Sanallaştırıcı
+MainWindow.MenuItem.updateCheck.text=Yazılım güncellemesi
+MainWindow.Message.warning.incorrectTime=DİKKAT: Bilgisayar saatiniz satelit sunucusu \
+ saati ile eşleşmiyor.\n\
+ Lütfen bilgisayarınızın saatinin doğru ayarlandığından emin olun.\n\
+ Eğer sistem saatiniz doğru ayarlandıysa, satelit sunucusundaki saat\n\
+ doğru ayarlanmamış olabilir.\n\
+ Bu durumda, - sapmaya bağlı olarak - derslerin başlangıç ve bitiş zamanlarında\n\
+ beklenmedik sorunlar ortaya çıkabilir. Bu durumda,\n\
+ satelit sunucusundaki saatin düzeltilebilmesi için\n\
+ sorumlu yöneticiye başvurun.\n\n\
+ Bilgisayarınız: {0}\n\
+ Satelit sunucusu: {1}
+MainWindow.Label.pleaseWait.text=Lütfen bekleyin, proxy yapılandırması aranıyor... \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/helper.properties b/dozentenmodul/src/main/properties/i18n/helper.properties
new file mode 100644
index 00000000..c3aa34be
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/helper.properties
@@ -0,0 +1,23 @@
+# ExpiryDateChooser
+ExpiryDateChooser.Label.newDate.text=New expiry date:
+ExpiryDateChooser.Label.daysToExtend.text=Enter by how many days this version(s) should be extended:
+ExpiryDateChooser.ConfirmDialog.ret.title=Extend expiry date
+
+# MessageType
+MessageType.debug=Debug
+MessageType.info=Info
+MessageType.warning=Warning
+MessageType.warningRetry=Error
+MessageType.error=Error
+MessageType.errorRetry=Error
+MessageType.questionYesNo=Question
+
+# Language
+Language.german=Deutsch
+Language.english=English
+Language.turkish=Türkçe
+
+# Conversion worker
+OVFConversion.info.aborted.text=Conversion aborted!
+OVFConversion.error.text=An error has occured during conversion.\n\
+ Please make sure that the path to the OVF Tool is correct. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/helper_de_DE.properties b/dozentenmodul/src/main/properties/i18n/helper_de_DE.properties
new file mode 100644
index 00000000..a2daebce
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/helper_de_DE.properties
@@ -0,0 +1,23 @@
+# ExpiryDateChooser
+ExpiryDateChooser.Label.newDate.text=Neues Ablaufdatum:
+ExpiryDateChooser.Label.daysToExtend.text=Geben Sie ein, um wie viele Tage diese Version(en) verlängert werden soll(en):
+ExpiryDateChooser.ConfirmDialog.ret.title=Ablaufdatum verlängern
+
+# MessageType
+MessageType.debug=Debug
+MessageType.info=Hinweis
+MessageType.warning=Warnung
+MessageType.warningRetry=Fehler
+MessageType.error=Fehler
+MessageType.errorRetry=Fehler
+MessageType.questionYesNo=Frage
+
+# Language
+Language.german=Deutsch
+Language.english=English
+Language.turkish=Türkçe
+
+# Conversion worker
+OVFConversion.info.aborted.text=Konvertierung abgebrochen!
+OVFConversion.error.text=Beim konvertieren ist ein Fehler aufgetreten.\n\
+ Bitte vergewissern Sie sich, dass das OVF Tool korrekt ausgewählt wurde. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/helper_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/helper_tr_TR.properties
new file mode 100644
index 00000000..25de2ada
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/helper_tr_TR.properties
@@ -0,0 +1,23 @@
+# ExpiryDateChooser
+ExpiryDateChooser.Label.newDate.text=Yeni geçerlilik tarihi:
+ExpiryDateChooser.Label.daysToExtend.text=Bu sürümün/sürümlerin kaç gün uzatılması gerektiğini girin:
+ExpiryDateChooser.ConfirmDialog.ret.title=Geçerlilik tarihi uzatma
+
+# MessageType
+MessageType.debug=Hata ayıklama
+MessageType.info=Bilgi
+MessageType.warning=Uyarı
+MessageType.warningRetry=Hata
+MessageType.error=Hata
+MessageType.errorRetry=Hata
+MessageType.questionYesNo=Soru
+
+# Language
+Language.german=Deutsch
+Language.english=English
+Language.turkish=Türkçe
+
+# Conversion worker
+OVFConversion.info.aborted.text=Dönüştürme iptal edildi!
+OVFConversion.error.text=Dönüştürme sırasında bir hata oluştu.\n\
+ Lütfen OVF Tool dizin yolunun doğru olduğundan emin olun. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/page.properties b/dozentenmodul/src/main/properties/i18n/page.properties
new file mode 100644
index 00000000..205480cc
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/page.properties
@@ -0,0 +1,107 @@
+# ImageMetaDataPage
+ImageMetaData.WizardPage.warningMessage.noOS=Select the operating system.
+ImageMetaData.WizardPage.warningMessage.noDescription=Add a description.
+ImageMetaData.WizardPage.description=Click on ''Next'' to set permissions \
+ or ''Finish''.
+
+# ImageUploadPage
+ImageUpload.Message.error.couldNotGetMetadata=Could not read {0}
+ImageUpload.WizardPage.errorMessage.invalidConfigFile=Invalid configuration file selected!
+ImageUpload.WizardPage.errorMessage.hypervisorNotSupported=The hypervisor of the selected VM {0} is not \
+ supported by the current satellite server.
+ImageUpload.WizardPage.errorMessage.VMTypeChanged=New versions must be of type {0}.
+ImageUpload.WizardPage.errorMessage.noHDD=The selected {0} file contains no virtual hard disk!
+ImageUpload.WizardPage.errorMessage.moreThanOneHDD=The selected {0} file contains more than \
+ one virtual disk!
+ImageUpload.WizardPage.errorMessage.diskImageNotFound=''{0}'' cannot be found!
+ImageUpload.WizardPage.errorMessage.diskImageNotReadable=''{0}'' cannot be read!
+ImageUpload.WizardPage.errorMessage.diskImageHasUnknownFormat=''{0}'' has unknown file format!
+ImageUpload.WizardPage.errorMessage.diskImageSnapshot=The selected VM is in snapshot state.
+ImageUpload.Message.warning.diskImageSnapshot=A snapshot was taken of the selected VM. \
+ In this state\n the VM unfortunately cannot be loaded into the {0} system. Please consolidate\n\
+ the snapshot first and try again.
+ImageUpload.WizardPage.errorMessage.diskImageStandalone=The VMDK file of the VM has an incompatible format
+ImageUpload.Message.warning.diskImageStandalone=The virtual hard disk associated with this VM is in the format ''{0}''.\
+ \nThis format is not supported by {1}. Please convert the VM\n\
+ into the format ''monolithicSparse''.
+ImageUpload.WizardPage.description=You can now start the upload.
+ImageUpload.Message.yesNo.cancelLockFile=The selected VM seems to be still in use. Please shut down the VM\n\
+ before uploading and close the VMware Player, otherwise\n\
+ the VM may be damaged after uploading.\n\n\
+ Do you want to ignore this warning and continue anyway?\n\
+ (You should be sure what you are doing if you choose ''Yes'' here.)
+ImageUpload.WizardPage.errorMessage.cancelLockFile=The selected VM is still in use
+ImageUpload.Message.error.uploadInitiatorFailed=Upload initialization failed
+ImageUpload.WizardPage.dialog.OvfOvaDetected=The selected virtual machine is in the OVA/OVF format.\n\
+ If the virtual machine has been created with VMware it can be converted\n\
+ into a vmx virtual machine using the OVF Tool from VMware.\n\
+ Do you want to convert the virtual machine?\n\
+ (The original virtual machine will not be modified.)
+ImageUpload.WizardPage.dialog.title=Convert virtual machine?
+
+# ImageOvfConversionPage
+ImageOvfConversion.MessageBox.notAVmwareOrVboxImage=The selected file does not appear to be a virtual machine\n\
+ that has been created with VMware or VirtualBox.
+ImageOvfConversion.MessageBox.VboxDetected=The selected virtual machine appears to have been created with VirtualBox.\n\
+The conversion of VirtualBox virtual machine images in the OVA or OVF format is currently not supported.\n\
+You can still try to start the conversion but it may fail due to the conversion tool developed by VMware being used.\n\
+VirtualBox also supports converting OVA and OVF images by importing them into its library. The resulting image is\n\
+also compatible with the BWLehrpool Suite.
+
+ImageOvfConversion.StartConversionButton.text=Start conversion
+ImageOvfConversion.AbortConversionButton.text=Abort conversion
+ImageOvfConversion.ErrorMessage.ConversionFailed=Conversion failed:
+ImageOvfConversion.Dialog.DirectoryExists.title=Overwrite directory?
+ImageOvfConversion.Dialog.DirectoryExists=The directory being used for the converted virtual machine image already exists.\n\
+This is probably due to an earlier conversion of a virtual machine and is usually safe to delete.\n\
+Should the directory be deleted including all contained files?
+ImageOvfConversion.Dialog.RemoveTmpDirectory=A directory has been created for the aborted conversion.\n\
+Should it be deleted including all contained files?
+ImageOvfConversion.Dialog.RemoveTmpDirectory.title=Delete temporary directory?
+
+# ContainerUploadPage
+ContainerUploadPage.Description.ContainerDefFinished=Container definition finished
+ContainerUploadPage.Warning.NoReceipt=No Container Recipe provided!
+ContainerUploadPage.Warning.NoGitRepository=No Git Repository provided!
+ContainerUploadPage.Warning.NoProperName=Set proper Image Name
+ContainerUploadPage.Warning.NoRunOptions=Set container run options
+
+# ImageUploadSummaryPage
+ImageUploadSummary.UploadInitState.requesting=The upload process is negotiated with the server...
+ImageUploadSummary.UploadInitState.waitingForSlot=The server is currently overloaded, because too many uploads are \
+ running at the same time. It waits until the server has free capacity again. \
+ Please do not close this window.
+ImageUploadSummary.UploadInitState.uploadStarting=The connection to transfer the VM is established...
+ImageUploadSummary.UploadInitState.uploadStarted=The upload of your virtual machine has started. \
+ If you wish, you can close this wizard and continue using the application. \
+ The transfer continues in the background.
+ImageUploadSummary.UploadInitState.error=The initialization of the upload to the server has failed. \
+ You can try to start the process again. If the problem still persists, \
+ contact the {0} support of your institution.
+ImageUploadSummary.UploadInitState.errorMoreInfo=<br><br>Further information:<br>{0}
+ImageUploadSummary.UploadInitState.completed=The virtual machine was successfully uploaded to the server.
+
+# LectureCreationPage
+LectureCreation.WizardPage.title=New
+LectureCreation.Label.endBeforeStart.text=End time is before start time!
+LectureCreation.Label.calcPeriod.text={0} day(s)
+LectureCreation.WizardPage.warningMessage.noName=Enter a lecture name.
+LectureCreation.WizardPage.warningMessage.noDesc=Add a description.
+LectureCreation.WizardPage.warningMessage.startAfterEnd=Start time is after end time!
+LectureCreation.WizardPage.warningMessage.nowAfterEnd=End time is in the past!
+LectureCreation.WizardPage.warningMessage.endAfterLatestPossibleDate=End time is after the latest possible date: {0}
+LectureCreation.WizardPage.description.0=Click on ''Next'' to select a virtual machine.
+LectureCreation.WizardPage.description.1=Click on ''Next'' to set permissions \
+ or ''Finish''.
+
+# LectureImageListPage
+LectureImageList.WizardPage.description=Click on ''Next''
+LectureImageList.WizardPage.errorMessage.noPerms=Insufficient permissions to link to this VM.
+LectureImageList.WizardPage.errorMessage.invalidVM=Invalid VM selected
+
+# LectureLocationSelectionPage
+LectureLocationSelection.WizardPage.errorMessage.tooManyLocations=Too many rooms/locations selected
+
+# LectureOptionsPage
+LectureOptions.WizardPage.description=Click on ''Next'' to set permissions \
+ or ''Finish''. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/page_de_DE.properties b/dozentenmodul/src/main/properties/i18n/page_de_DE.properties
new file mode 100644
index 00000000..5d6e7ce1
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/page_de_DE.properties
@@ -0,0 +1,103 @@
+# ImageMetaDataPage
+ImageMetaData.WizardPage.warningMessage.noOS=Wählen Sie das Betriebssystem aus.
+ImageMetaData.WizardPage.warningMessage.noDescription=Fügen Sie eine Beschreibung hinzu.
+ImageMetaData.WizardPage.description=Klicken Sie auf ''Weiter'', um Berechtigungen festzulegen \
+ oder ''Fertigstellen''.
+
+# ImageUploadPage
+ImageUpload.Message.error.couldNotGetMetadata=Konnte {0} nicht lesen
+ImageUpload.WizardPage.errorMessage.invalidConfigFile=Ungültige Konfigurationsdatei ausgewählt!
+ImageUpload.WizardPage.errorMessage.hypervisorNotSupported=Der Hypervisor der gewählten VM {0} wird vom \
+ aktuellen Satellitenserver nicht unterstützt.
+ImageUpload.WizardPage.errorMessage.VMTypeChanged=Neue Versionen müssen vom Typ {0} sein.
+ImageUpload.WizardPage.errorMessage.noHDD=Die gewählte {0}-Datei enthält keine virtuelle Festplatte!
+ImageUpload.WizardPage.errorMessage.moreThanOneHDD=Die gewählte {0}-Datei enthält mehr als \
+ eine virtuelle Festplatte!
+ImageUpload.WizardPage.errorMessage.diskImageNotFound=''{0}'' kann nicht gefunden werden!
+ImageUpload.WizardPage.errorMessage.diskImageNotReadable=''{0}'' kann nicht gelesen werden!
+ImageUpload.WizardPage.errorMessage.diskImageHasUnknownFormat=''{0}'' hat unbekanntes Dateiformat!
+ImageUpload.WizardPage.errorMessage.diskImageSnapshot=Die gewählte VM befindet sich im Snapshot-Zustand.
+ImageUpload.Message.warning.diskImageSnapshot=Von der ausgewählten VM wurde ein Snapshot erstellt. \
+ In diesem Zustand kann\n die VM leider nicht ins {0}-System geladen werden. Bitte konsolidieren Sie zunächst\n\
+ den Snapshot und versuchen Sie es erneut.
+ImageUpload.WizardPage.errorMessage.diskImageStandalone=Die VMDK Datei der VM hat ein inkompatibles Format
+ImageUpload.Message.warning.diskImageStandalone=Die zu dieser VM gehörige Virtuelle Festplatte ist im Format ''{0}''.\n\
+ Dieses Format wird von {1} nicht unterstützt. Bitte konvertieren Sie die VM\n\
+ in das Format ''monolithicSparse''.
+ImageUpload.WizardPage.description=Sie können jetzt den Upload starten.
+ImageUpload.Message.yesNo.cancelLockFile=Die gewählte VM scheint noch in Verwendung zu sein. Bitte fahren Sie die VM\n\
+ vor dem Hochladen herunter und schließen Sie den VMware Player, ansonsten\n\
+ kann die VM nach dem Hochladen beschädigt sein.\n\n\
+ Möchten Sie diese Warnung ignorieren und trotzdem fortfahren?\n\
+ (Sie sollten sich sicher sein, was sie tun, wenn Sie hier ''Ja'' wählen.)
+ImageUpload.WizardPage.errorMessage.cancelLockFile=Die gewählte VM wird noch verwendet
+ImageUpload.Message.error.uploadInitiatorFailed=Upload-Initialisierung fehlgeschlagen
+ImageUpload.WizardPage.dialog.OvfOvaDetected=Sie haben ein Image im ovf Format ausgewählt. \n\
+ Wenn dieses mit dem Programm VMware exportiert wurde sollte es mithilfe\n\
+ des OVF Tool von VMware in ein kompatibles vmx Image umgewandelt werden können. \n\
+ Möchten sie das Image konvertieren? (Das original Image bleibt unverändert.)
+ImageUpload.WizardPage.dialog.title=Image konvertieren?
+
+# ImageOvfConversionPage
+ImageOvfConversion.MessageBox.notAVmwareOrVboxImage=Die ausgewählte Datei scheint kein mit VMware oder VirtualBox erstelltes Image zu sein.
+ImageOvfConversion.MessageBox.VboxDetected=Sie haben ein mit VirtualBox erstelltes Image ausgewählt.\n\
+ Die Umwandlung von mit VirtualBox erstellten OVA\
+ und OVF images wird momentan noch nicht unterstützt.\n\
+ Sie können dennoch versuchen die Konvertierung zu starten, es können aber Fehler auftreten,\n\
+ da das Konvertierungsprogramm von VMWare verwendet wird.
+ImageOvfConversion.StartConversionButton.text=Konvertierung starten
+ImageOvfConversion.AbortConversionButton.text=Konvertierung abbrechen
+ImageOvfConversion.ErrorMessage.ConversionFailed=Konvertierung fehlgeschlagen:
+ImageOvfConversion.Dialog.DirectoryExists.title=Verzeichnis Überschreiben?
+ImageOvfConversion.Dialog.DirectoryExists=Das Verzeichnis, in welcher das konvertierte Image gespeichert werden soll existiert bereits. \n\
+ Soll dieses ersetzt und die darin enthaltenen Dateien gelöscht werden?
+ImageOvfConversion.Dialog.RemoveTmpDirectory=Für die abgebrochene Konvertierung wurde ein Verzeichnis erstellt.\n\
+ Soll dieses und dessen Inhalt wieder entfernt werden?
+ImageOvfConversion.Dialog.RemoveTmpDirectory.title=Temporäres Verzeichnis löschen?
+
+# ContainerUploadPage
+ContainerUploadPage.Description.ContainerDefFinished=Container Definition vollständig
+ContainerUploadPage.Warning.NoReceipt=Keine Containeranweisungen angegeben!
+ContainerUploadPage.Warning.NoGitRepository=Kein Git Repository angegeben!
+ContainerUploadPage.Warning.NoProperName=Bitte Imagenamen setzen
+ContainerUploadPage.Warning.NoRunOptions=Bitte Container Start Optionen setzen
+
+# ImageUploadSummaryPage
+ImageUploadSummary.UploadInitState.requesting=Der Upload-Vorgang wird mit dem Server ausgehandelt...
+ImageUploadSummary.UploadInitState.waitingForSlot=Der Server ist zur Zeit überlastet, da zu viele Uploads gleichzeitig \
+ laufen. Es wird gewartet, bis der Server wieder Kapazitäten frei hat. \
+ Bitte schließen Sie dieses Fenster nicht.
+ImageUploadSummary.UploadInitState.uploadStarting=Die Verbindung zur Übertragung der VM wird aufgebaut...
+ImageUploadSummary.UploadInitState.uploadStarted=Der Upload Ihrer Virtuellen Maschine wurde gestartet. \
+ Wenn Sie möchten, können Sie diesen Assistenten schließen und die Anwendung weiterverwenden. \
+ Die Übertragung läuft dabei im Hintergrund weiter.
+ImageUploadSummary.UploadInitState.error=Die Initialisierung des Uploads auf den Server ist fehlgeschlagen. \
+ Sie können versuchen, den Vorgang erneut zu starten. Falls das Problem weiterhin besteht, \
+ kontaktieren Sie den {0}-Support Ihrer Einrichtung.
+ImageUploadSummary.UploadInitState.errorMoreInfo=<br><br>Weitere Informationen:<br>{0}
+ImageUploadSummary.UploadInitState.completed=Die Virtuelle Maschine wurde erfolgreich auf den Server hochgeladen.
+
+# LectureCreationPage
+LectureCreation.WizardPage.title=Neu
+LectureCreation.Label.endBeforeStart.text=Endzeitpunkt ist vor Startzeitpunkt!
+LectureCreation.Label.calcPeriod.text={0} Tag(e)
+LectureCreation.WizardPage.warningMessage.noName=Geben Sie einen Veranstaltungsnamen ein.
+LectureCreation.WizardPage.warningMessage.noDesc=Fügen Sie eine Beschreibung hinzu.
+LectureCreation.WizardPage.warningMessage.startAfterEnd=Startzeit ist nach Endzeit!
+LectureCreation.WizardPage.warningMessage.nowAfterEnd=Endzeit liegt in die Vergangenheit!
+LectureCreation.WizardPage.warningMessage.endAfterLatestPossibleDate=Endzeit liegt nach dem spätest möglichen Datum: {0}
+LectureCreation.WizardPage.description.0=Klicken Sie auf ''Weiter'', um eine Virtuelle Maschine auszuwählen.
+LectureCreation.WizardPage.description.1=Klicken Sie auf ''Weiter'', um Berechtigungen festzulegen \
+ oder ''Fertigstellen''.
+
+# LectureImageListPage
+LectureImageList.WizardPage.description=Klicken Sie auf ''Weiter''
+LectureImageList.WizardPage.errorMessage.noPerms=Unzureichende Berechtigungen, um auf diese VM zu verlinken.
+LectureImageList.WizardPage.errorMessage.invalidVM=Ungültige VM ausgewählt
+
+# LectureLocationSelectionPage
+LectureLocationSelection.WizardPage.errorMessage.tooManyLocations=Zu viele Räume/Orte ausgewählt
+
+# LectureOptionsPage
+LectureOptions.WizardPage.description=Klicken Sie auf ''Weiter'', um Berechtigungen festzulegen \
+ oder ''Fertigstellen''. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/page_layout.properties b/dozentenmodul/src/main/properties/i18n/page_layout.properties
new file mode 100644
index 00000000..ab5f74bd
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/page_layout.properties
@@ -0,0 +1,105 @@
+# ImageCustomPermissionPageLayout
+ImageCustomPermission.WizardPage.title=Set permissions
+ImageCustomPermission.WizardPage.description=Define the desired permissions here.
+ImageCustomPermission.Label.defaultPerm.text=Default permissions
+ImageCustomPermission.Label.defaultDesc.text=<html><body style='width:100%'> \
+ Set the permissions for all other users (not shown \
+ in the list) here.</body></html>
+ImageCustomPermission.CheckBox.permissionLink.text=Link
+ImageCustomPermission.CheckBox.permissionRead.text=Download
+ImageCustomPermission.CheckBox.permissionEdit.text=Edit
+ImageCustomPermission.CheckBox.permissionAdmin.text=Admin
+
+# ImageMetaDataPageLayout
+ImageMetaData.WizardPage.title=Metadata
+ImageMetaData.WizardPage.description=Please enter a meaningful name for the new VM.
+ImageMetaData.Label.OS.text=Operating system
+ImageMetaData.Label.startCommand.text=Start command
+ImageMetaData.Label.description.text=Description
+ImageMetaData.CheckBox.licenseRestricted.text=VM contains software requiring a license
+ImageMetaData.CheckBox.isTemplate.text=Create template
+
+# ImageUploadPageLayout
+ImageUpload.WizardPage.title=Create new VM
+ImageUpload.WizardPage.description=Please select a virtual machine to upload.
+ImageUpload.Label.imageFile.text=Virtual Machine
+ImageUpload.Button.browseForImage.text=Browse
+ImageUpload.Label.imageName.text=Name
+ImageUpload.CheckBox.licenseRestricted.text=contains software requiring a license
+ImageUpload.TextArea.info.title=Note
+ImageUpload.TextArea.info.text=If you have not created your own virtual machine yet, \
+ you can download a virtual machine as a template in the overview, \
+ customize it to your needs and then upload it using this wizard.\
+ \n\nIf you want to update the VM of an existing lecture, \
+ open the detail view of the existing VM and select ''Upload new VM version''. \
+ This ensures that existing permissions and links to lectures are retained.
+
+# ImageOvfConversionPageLayout
+ImageOvfConversion.WizardPage.title=Convert OVF and OVA images
+ImageOvfConversion.WizardPage.description=Convert OVF and OVA format to VMX format.
+ImageOvfConversion.WizardPage.InformationBox.text=By pressing the start conversion button the BWLehrpool Suite will try to\n\
+start the OVF Tool from VMware to convert the virtual machine into the VMX format.\n\
+Depending on the performance of your computer and the size of the virtual machine\n\
+this process may take some time.
+ImageOvfConversion.Toolpath.text=OVF Tool path
+ImageOvfConversion.Toolpath.defaultpath.text=Default path
+ImageOvfConversion.Toolpath.BrowseButton.text=Select executable
+ImageOvfConversion.Button.StartConversion.text=Start conversion
+
+# ContainerUploadPageLayout
+ContainerUploadPage.title=Define a new Container Image
+ContainerUploadPage.description=Please provide an Input for a Docker Image
+ContainerUploadPage.DockerFile.label=Docker File
+ContainerUploadPage.GitRepository.label=Git Repository
+ContainerUploadPage.GitRepository.toolTipText=Set clone address of Git Repository [git@ | http://] [.git]. Currently no Checks!
+ContainerUploadPage.ImageName.text=Name
+ContainerUploadPage.CheckBox.ContainsLicenseRestricted.text=Contains license restricted software
+ContainerUploadPage.ContainerStartOptions.label=Container Start Options
+ContainerUploadPage.ContainerStartOptions.tooltip=Please provide the Container Run Options (Port, Name, Env,...)
+ContainerUploadPage.Infobox.label=Information
+ContainerUploadPage.Infobox.text=Please provide all the information needed to define a container image.
+
+# ImageUploadSummaryPageLayout
+ImageUploadSummary.WizardPage.title=Done!
+ImageUploadSummary.WizardPage.description=Wizard completed
+ImageUploadSummary.CheckBox.createLecture.text=Create a lecture for this VM
+
+# LectureCreationPageLayout
+LectureCreation.WizardPage.description=Please enter a meaningful name for the new lecture.
+LectureCreation.Label.name.text=Lecture name
+LectureCreation.Label.description.text=Description
+LectureCreation.Label.startTime.text=Start date
+LectureCreation.Label.endTime.text=End date
+LectureCreation.Label.period.text=Duration of the lecture:
+
+# LectureCustomPermissionPageLayout
+LectureCustomPermission.WizardPage.title=Set permissions
+LectureCustomPermission.WizardPage.description=Define the desired permissions here.
+LectureCustomPermission.Label.defaultPerm.text=Default permissions
+LectureCustomPermission.Label.defaultDesc.text=<html><body style='width:100%'> \
+ Set the permissions for all other users (not shown \
+ in the list) here.</body></html>
+LectureCustomPermission.CheckBox.permissionEdit.text=Edit
+LectureCustomPermission.CheckBox.permissionAdmin.text=Admin
+
+# LectureImageListPageLayout
+LectureImageList.WizardPage.title=Link VM
+LectureImageList.WizardPage.description=Select a VM for this lecture
+
+# LectureLocationSelection
+LectureLocationSelection.WizardPage.title=Room selection
+LectureLocationSelection.WizardPage.description=Please select the rooms for this lecture
+
+# LectureOptionsPageLayout
+LectureOptions.WizardPage.title=Additional options
+LectureOptions.WizardPage.description=Please choose from the following options:
+LectureOptions.Label.general.text=General
+LectureOptions.CheckBox.autoUpdate.text=Always update to the latest VM version
+LectureOptions.CheckBox.isActive.text=Lecture is active
+LectureOptions.CheckBox.isExam.text=Lecture is an exam
+LectureOptions.Label.restrictions.text=Restrictions
+LectureOptions.CheckBox.internetEnabled.text=Allow network/internet access
+LectureOptions.CheckBox.USBEnabled.text=Allow storage media
+
+# LectureRestrictionPageLayout
+LectureRestriction.WizardPage.title=Restrictions \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/page_layout_de_DE.properties b/dozentenmodul/src/main/properties/i18n/page_layout_de_DE.properties
new file mode 100644
index 00000000..170436b8
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/page_layout_de_DE.properties
@@ -0,0 +1,104 @@
+# ImageCustomPermissionPageLayout
+ImageCustomPermission.WizardPage.title=Berechtigungen festlegen
+ImageCustomPermission.WizardPage.description=Legen Sie hier die gewünschten Berechtigungen fest.
+ImageCustomPermission.Label.defaultPerm.text=Standardberechtigungen
+ImageCustomPermission.Label.defaultDesc.text=<html><body style='width:100%'> \
+ Legen Sie hier die Berechtigungen für alle anderen (nicht in der Liste \
+ angezeigten) Benutzer fest.</body></html>
+ImageCustomPermission.CheckBox.permissionLink.text=Verlinken
+ImageCustomPermission.CheckBox.permissionRead.text=Download
+ImageCustomPermission.CheckBox.permissionEdit.text=Bearbeiten
+ImageCustomPermission.CheckBox.permissionAdmin.text=Admin
+
+# ImageMetaDataPageLayout
+ImageMetaData.WizardPage.title=Metadaten
+ImageMetaData.WizardPage.description=Geben Sie bitte einen aussagekräftigen Namen für die neue VM ein.
+ImageMetaData.Label.OS.text=Betriebssystem
+ImageMetaData.Label.startCommand.text=Startbefehl
+ImageMetaData.Label.description.text=Beschreibung
+ImageMetaData.CheckBox.licenseRestricted.text=VM enthält lizenzpflichtige Software
+ImageMetaData.CheckBox.isTemplate.text=Vorlage erstellen
+
+# ImageUploadPageLayout
+ImageUpload.WizardPage.title=Neue VM anlegen
+ImageUpload.WizardPage.description=Bitte wählen Sie eine Virtuelle Maschine zum Hochladen aus.
+ImageUpload.Label.imageFile.text=Virtuelle Maschine
+ImageUpload.Button.browseForImage.text=Durchsuchen
+ImageUpload.Label.imageName.text=Name
+ImageUpload.CheckBox.licenseRestricted.text=enthält lizenzpflichtige Software
+ImageUpload.TextArea.info.title=Hinweis
+ImageUpload.TextArea.info.text=Haben Sie noch keine eigene Virtuelle Maschine erstellt, \
+ können Sie sich in der Übersicht eine Virtuelle Maschine als Vorlage herunterladen, \
+ diese an Ihre Bedürfnisse anpassen und anschließend über diesen Assistenten hochladen.\
+ \n\nWenn Sie die VM einer bestehenden Veranstaltung aktualisieren möchten, \
+ öffnen Sie die Detailansicht der bestehenden VM und wählen Sie ''Neue VM-Version hochladen''. \
+ Dadurch bleiben bestehende Berechtigungen sowie Verknüpfungen zu Veranstaltungen erhalten.
+
+# ImageOvfConversionPageLayout
+ImageOvfConversion.WizardPage.title=OVF und OVA konvertieren
+ImageOvfConversion.WizardPage.description=OVF und OVA zu VMX konvertieren.
+ImageOvfConversion.WizardPage.InformationBox.text=Mit dem Betätigen des konvertieren Buttons wird das OVF Tool von VMware gestarted.\n\
+ Je nach Geschwindigkeit Ihres Computers \
+ und der Größe der Virtuellen Maschine kann die Konvertierung einige Zeit in Anspruch nehmen.
+ImageOvfConversion.Toolpath.text=OVF Tool Pfad
+ImageOvfConversion.Toolpath.defaultpath.text=Standardpfad
+ImageOvfConversion.Toolpath.BrowseButton.text=Durchsuchen
+ImageOvfConversion.Button.StartConversion.text=Konvertierung starten
+
+# ContainerUploadPageLayout
+ContainerUploadPage.title=Neues Container Image definieren
+ContainerUploadPage.description=Bitte geben Sie Daten für das Docker Image an
+ContainerUploadPage.DockerFile.label=Docker File
+ContainerUploadPage.GitRepository.label=Git Repository
+ContainerUploadPage.GitRepository.toolTipText=Clone Addresse des Git Repositories setzen. [git@ | http://] [.git]. Momentan noch keine Checks!
+ContainerUploadPage.ImageName.text=Name
+ContainerUploadPage.CheckBox.ContainsLicenseRestricted.text=Enthält lizenzpflichtige Software
+ContainerUploadPage.ContainerStartOptions.label=Container Start Optionen
+ContainerUploadPage.ContainerStartOptions.tooltip=Bitte die Container Start Optionen angeben (Port, Name, Env,...)
+ContainerUploadPage.Infobox.label=Hinweis
+ContainerUploadPage.Infobox.text=In dieser Maske sind alle Infromationen zur Definition eines Container Images anzugeben.
+
+# ImageUploadSummaryPageLayout
+ImageUploadSummary.WizardPage.title=Fertig!
+ImageUploadSummary.WizardPage.description=Assistent abgeschlossen
+ImageUploadSummary.CheckBox.createLecture.text=Veranstaltung zu dieser VM erstellen
+
+# LectureCreationPageLayout
+LectureCreation.WizardPage.description=Geben Sie bitte einen aussagekräftigen Namen für die neue Veranstaltung ein.
+LectureCreation.Label.name.text=Veranstaltungsname
+LectureCreation.Label.description.text=Beschreibung
+LectureCreation.Label.startTime.text=Startdatum
+LectureCreation.Label.endTime.text=Enddatum
+LectureCreation.Label.period.text=Dauer der Veranstaltung:
+
+# LectureCustomPermissionPageLayout
+LectureCustomPermission.WizardPage.title=Berechtigungen festlegen
+LectureCustomPermission.WizardPage.description=Legen Sie hier die gewünschten Berechtigungen fest.
+LectureCustomPermission.Label.defaultPerm.text=Standardberechtigungen
+LectureCustomPermission.Label.defaultDesc.text=<html><body style='width:100%'> \
+ Legen Sie hier die Berechtigungen für alle anderen (nicht in der Liste \
+ angezeigten) Benutzer fest.</body></html>
+LectureCustomPermission.CheckBox.permissionEdit.text=Bearbeiten
+LectureCustomPermission.CheckBox.permissionAdmin.text=Admin
+
+# LectureImageListPageLayout
+LectureImageList.WizardPage.title=VM verknüpfen
+LectureImageList.WizardPage.description=Wählen Sie eine VM für diese Veranstaltung aus
+
+# LectureLocationSelection
+LectureLocationSelection.WizardPage.title=Raumauswahl
+LectureLocationSelection.WizardPage.description=Bitte wählen Sie die Räume für diese Veranstaltung aus
+
+# LectureOptionsPageLayout
+LectureOptions.WizardPage.title=Zusätzliche Optionen
+LectureOptions.WizardPage.description=Bitte wählen Sie aus folgenden Optionen aus:
+LectureOptions.Label.general.text=Allgemeines
+LectureOptions.CheckBox.autoUpdate.text=Immer auf aktuellste VM-Version updaten
+LectureOptions.CheckBox.isActive.text=Veranstaltung ist aktiv
+LectureOptions.CheckBox.isExam.text=Veranstaltung ist eine Prüfung
+LectureOptions.Label.restrictions.text=Beschränkungen
+LectureOptions.CheckBox.internetEnabled.text=Netzwerk-/Internetzugriff zulassen
+LectureOptions.CheckBox.USBEnabled.text=Speichermedien zulassen
+
+# LectureRestrictionPageLayout
+LectureRestriction.WizardPage.title=Beschränkungen \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/page_layout_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/page_layout_tr_TR.properties
new file mode 100644
index 00000000..9c2daf0f
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/page_layout_tr_TR.properties
@@ -0,0 +1,105 @@
+# ImageCustomPermissionPageLayout
+ImageCustomPermission.WizardPage.title=Erişim izinlerini ayarlama
+ImageCustomPermission.WizardPage.description=İstediğiniz erişim izinlerini burada tanımlayın.
+ImageCustomPermission.Label.defaultPerm.text=Varsayılan erişim izinleri
+ImageCustomPermission.Label.defaultDesc.text=<html><body style='width:100%'> \
+ Diğer tüm kullanıcılar için (listede \
+ olmayan) erişim izinlerini burada ayarlayın.</body></html>
+ImageCustomPermission.CheckBox.permissionLink.text=Bağlantı ekleme
+ImageCustomPermission.CheckBox.permissionRead.text=İndirme
+ImageCustomPermission.CheckBox.permissionEdit.text=Düzenleme
+ImageCustomPermission.CheckBox.permissionAdmin.text=Yönetim
+
+# ImageMetaDataPageLayout
+ImageMetaData.WizardPage.title=Meta veriler
+ImageMetaData.WizardPage.description=Lütfen yeni sanal makine için anlamlı bir isim girin.
+ImageMetaData.Label.OS.text=İşletim sistemi
+ImageMetaData.Label.startCommand.text=Başlangıç komutu
+ImageMetaData.Label.description.text=Açıklama
+ImageMetaData.CheckBox.licenseRestricted.text=Sanal makine lisans gerektiren yazılım içeriyor
+ImageMetaData.CheckBox.isTemplate.text=Şablon oluştur
+
+# ImageUploadPageLayout
+ImageUpload.WizardPage.title=Yeni sanal makine oluştur
+ImageUpload.WizardPage.description=Lütfen yüklenecek bir sanal makine seçin.
+ImageUpload.Label.imageFile.text=Sanal makine
+ImageUpload.Button.browseForImage.text=Gözat
+ImageUpload.Label.imageName.text=İsim
+ImageUpload.CheckBox.licenseRestricted.text=lisans gerektiren yazılım içeriyor
+ImageUpload.TextArea.info.title=Not
+ImageUpload.TextArea.info.text=Henüz kendi sanal makinenizi oluşturmadıysanız, \
+ genel görünümden herhangi bir sanal makineyi şablon olarak indirebilir, \
+ kendi ihtiyaçlarınıza göre uyarlayabilir ve ardından bu sihirbazı kullanarak yükleyebilirsiniz.\
+ \n\nEğer mevcut bir etkinliğin sanal makinesini güncellemek istiyorsanız, \
+ sanal makinenin detay görünümünü açın ve ''Yeni sanal makine sürümü yükle'' seçeneğini seçin. \
+ Böylelikle hem mevcut erişim izinleri hem de bağlantılar korunmuş olur.
+
+# ImageOvfConversionPageLayout
+ImageOvfConversion.WizardPage.title=OVF ve OVA görüntülerini dönüştür
+ImageOvfConversion.WizardPage.description=OVF ve OVA formatını VMX formatına dönüştürün.
+ImageOvfConversion.WizardPage.InformationBox.text=Dönüştürmeyi başlat butonuna basıldığında, bwLehrpool-Suite\n\
+ sanal makineyi VMX formatına dönüştürmek için VMware OVF Tool''u başlatmaya çalışacaktır.\n\
+ Bu işlem bilgisayarınızın performansına ve sanal makinenin boyutuna bağlı olarak\n\
+ biraz zaman alabilir.
+ImageOvfConversion.Toolpath.text=OVF Tool dizin yolu
+ImageOvfConversion.Toolpath.defaultpath.text=Varsayılan yol
+ImageOvfConversion.Toolpath.BrowseButton.text=Yürütülebilir dosyayı seçin
+ImageOvfConversion.Button.StartConversion.text=Dönüştürmeyi başlat
+
+# ContainerUploadPageLayout
+ContainerUploadPage.title=Yeni container görüntüsü tanımlama
+ContainerUploadPage.description=Lütfen Docker görüntüsü için gerekli bilgileri girin
+ContainerUploadPage.DockerFile.label=Dockerfile
+ContainerUploadPage.GitRepository.label=Git deposu
+ContainerUploadPage.GitRepository.toolTipText=Git deposunun klon adresini belirtin. [git@ | http://] [.git]. Check işlemleri şimdilik desteklenmemektedir!
+ContainerUploadPage.ImageName.text=Görüntü adı
+ContainerUploadPage.CheckBox.ContainsLicenseRestricted.text=Lisans gerektiren yazılım içeriyor
+ContainerUploadPage.ContainerStartOptions.label=Container başlatma seçenekleri
+ContainerUploadPage.ContainerStartOptions.tooltip=Lütfen container başlatma seçeneklerini girin (Port, Name, Env,...)
+ContainerUploadPage.Infobox.label=Uyarı
+ContainerUploadPage.Infobox.text=Bir Docker görüntüsü tanımlamak için gereken tüm bilgilerin sağlanması gerekmektedir.
+
+# ImageUploadSummaryPageLayout
+ImageUploadSummary.WizardPage.title=Tamamlandı!
+ImageUploadSummary.WizardPage.description=Yükleme sihirbazı tamamlandı
+ImageUploadSummary.CheckBox.createLecture.text=Bu sanal makine için bir etkinlik oluştur
+
+# LectureCreationPageLayout
+LectureCreation.WizardPage.description=Lütfen yeni etkinlik için anlamlı bir isim girin.
+LectureCreation.Label.name.text=Etkinlik adı
+LectureCreation.Label.description.text=Açıklama
+LectureCreation.Label.startTime.text=Başlangıç tarihi
+LectureCreation.Label.endTime.text=Bitiş tarihi
+LectureCreation.Label.period.text=Etkinlik süresi:
+
+# LectureCustomPermissionPageLayout
+LectureCustomPermission.WizardPage.title=Erişim izinlerini ayarlama
+LectureCustomPermission.WizardPage.description=İstediğiniz erişim izinlerini burada tanımlayın.
+LectureCustomPermission.Label.defaultPerm.text=Varsayılan erişim izinleri
+LectureCustomPermission.Label.defaultDesc.text=<html><body style='width:100%'> \
+ Diğer tüm kullanıcılar için (listede \
+ olmayan) erişim izinlerini burada ayarlayın.</body></html>
+LectureCustomPermission.CheckBox.permissionEdit.text=Düzenleme
+LectureCustomPermission.CheckBox.permissionAdmin.text=Yönetim
+
+# LectureImageListPageLayout
+LectureImageList.WizardPage.title=Sanal makine bağlantısı ekle
+LectureImageList.WizardPage.description=Bu etkinlik için bir sanal makine seçin
+
+# LectureLocationSelection
+LectureLocationSelection.WizardPage.title=Oda seçimi
+LectureLocationSelection.WizardPage.description=Lütfen bu etkinlik için oda seçin
+
+# LectureOptionsPageLayout
+LectureOptions.WizardPage.title=İlave seçenekler
+LectureOptions.WizardPage.description=Lütfen aşağıdaki seçeneklerden seçiminizi yapın:
+LectureOptions.Label.general.text=Genel
+LectureOptions.CheckBox.autoUpdate.text=Her zaman en son sanal makine sürümüne güncelle
+LectureOptions.CheckBox.isActive.text=Etkinlik aktif
+LectureOptions.CheckBox.isExam.text=Etkinlik bir sınav
+LectureOptions.Label.restrictions.text=Kısıtlamalar
+LectureOptions.CheckBox.internetEnabled.text=Ağ/internet erişimine izin ver
+LectureOptions.CheckBox.USBEnabled.text=Depolama ortamına izin ver
+
+# LectureRestrictionPageLayout
+LectureRestriction.WizardPage.title=Kısıtlamalar \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/page_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/page_tr_TR.properties
new file mode 100644
index 00000000..ad6b3ad0
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/page_tr_TR.properties
@@ -0,0 +1,107 @@
+# ImageMetaDataPage
+ImageMetaData.WizardPage.warningMessage.noOS=İşletim sistemini seçin.
+ImageMetaData.WizardPage.warningMessage.noDescription=Bir açıklama ekleyin.
+ImageMetaData.WizardPage.description=Erişim izinlerini ayarlamak için ''İleri'', \
+ işlemi sonlandırmak için ''Bitir'' butonuna tıklayın.
+
+# ImageUploadPage
+ImageUpload.Message.error.couldNotGetMetadata={0} okunamadı
+ImageUpload.WizardPage.errorMessage.invalidConfigFile=Geçersiz yapılandırma dosyası seçildi!
+ImageUpload.WizardPage.errorMessage.hypervisorNotSupported=Seçilen {0} sanal makinesinin hipervizörü mevcut \
+ satelit sunucusu tarafından desteklenmiyor.
+ImageUpload.WizardPage.errorMessage.VMTypeChanged=Yeni sürümler {0} türünde olmalıdır.
+ImageUpload.WizardPage.errorMessage.noHDD=Seçilen {0} dosyası hiçbir sanal sabit disk içermiyor!
+ImageUpload.WizardPage.errorMessage.moreThanOneHDD=Seçilen {0} dosyası birden fazla \
+ sanal sabit disk içeriyor!
+ImageUpload.WizardPage.errorMessage.diskImageNotFound=''{0}'' bulunamıyor!
+ImageUpload.WizardPage.errorMessage.diskImageNotReadable=''{0}'' okunamıyor!
+ImageUpload.WizardPage.errorMessage.diskImageHasUnknownFormat=''{0}'' bilinmeyen dosya formatına sahip!
+ImageUpload.WizardPage.errorMessage.diskImageSnapshot=Seçilen sanal makine snapshot durumunda.
+ImageUpload.Message.warning.diskImageSnapshot=Seçilen sanal makinenin snapshot''ı alındı. \
+ Bu durumda\n sanal makine maalesef {0} sistemine yüklenemez. Lütfen önce snapshot birleştirme\n\
+ işlemini gerçekleştirin ve sonra tekrar deneyin.
+ImageUpload.WizardPage.errorMessage.diskImageStandalone=Sanal makinenin VMDK dosyası uyumsuz bir formata sahip
+ImageUpload.Message.warning.diskImageStandalone=Bu sanal makineye ait sanal sabit disk ''{0}'' formatında.\n\
+ Bu format {1} tarafından desteklenmiyor. Lütfen sanal makineyi\n\
+ ''monolithicSparse'' formatına dönüştürün.
+ImageUpload.WizardPage.description=Şimdi yüklemeyi başlatabilirsiniz.
+ImageUpload.Message.yesNo.cancelLockFile=Seçilen sanal makine hâlâ kullanımda gibi görünüyor. Lütfen\n\
+ yüklemeden önce sanal makineyi ve VMware Player''ı kapatın, aksi hâlde\n\
+ sanal makine yüklendikten sonra hasar görebilir.\n\n\
+ Bu uyarıyı yok sayıp yine de devam etmek istiyor musunuz?\n\
+ (Eğer burada ''Evet''i seçerseniz ne yaptığınızdan emin olmalısınız.)
+ImageUpload.WizardPage.errorMessage.cancelLockFile=Seçilen sanal makine hâlâ kullanımda
+ImageUpload.Message.error.uploadInitiatorFailed=Yükleme işlemi başlatılamadı
+ImageUpload.WizardPage.dialog.OvfOvaDetected=Seçilen sanal makine OVA/OVF formatındadır.\n\
+ Eğer sanal makine VMware ile oluşturulmuşsa,\n\
+ VMware OVF Tool kullanılarak VMX formatına dönüştürülebilir.\n\
+ Sanal makineyi dönüştürmek istiyor musunuz?\n\
+ (Orijinal sanal makine değiştirilmeyecektir.)
+ImageUpload.WizardPage.dialog.title=Sanal makine dönüştürülsün mü?
+
+# ImageOvfConversionPage
+ImageOvfConversion.MessageBox.notAVmwareOrVboxImage=Seçilen dosya VMware veya VirtualBox ile oluşturulmuş bir\n\
+ sanal makine olarak görünmüyor.
+ImageOvfConversion.MessageBox.VboxDetected=Seçilen sanal makine VirtualBox ile oluşturulmuş olarak görünüyor.\n\
+ VirtualBox sanal makine görüntülerinin OVA veya OVF formatına dönüştürülme işlemi şimdilik desteklenmemektedir.\n\
+ Yine de dönüştürmeyi başlatmayı deneyebilirsiniz, ancak işlem VMware dönüştürme aracı nedeniyle başarısız olabilir.\n\
+ Ayrıca VirtualBox OVA ve OVF formatındaki görüntüleri kendi kitaplığına aktararak dönüştürmeyi desteklemektedir.\n\
+ Bu şekilde oluşturulmuş olan görüntüler bwLehrpool-Suite ile de uyumludur.
+
+ImageOvfConversion.StartConversionButton.text=Dönüştürmeyi başlat
+ImageOvfConversion.AbortConversionButton.text=Dönüştürmeyi iptal et
+ImageOvfConversion.ErrorMessage.ConversionFailed=Dönüştürme başarısız oldu:
+ImageOvfConversion.Dialog.DirectoryExists.title=Klasörün üzerine yazılsın mı?
+ImageOvfConversion.Dialog.DirectoryExists=Dönüştürülen sanal makine görüntüsünün kaydedileceği klasör zaten var.\n\
+ Bunun nedeni muhtemelen daha önceki bir dönüştürme işlemi olabilir ve silinmesinde genellikle bir sakınca yoktur.\n\
+ Klasör, içerdiği tüm dosyalar da dahil olmak üzere silinsin mi?
+ImageOvfConversion.Dialog.RemoveTmpDirectory=İptal edilen dönüştürme işlemi için geçici bir klasör oluşturuldu.\n\
+ Klasör, içerdiği tüm dosyalar da dahil olmak üzere silinsin mi?
+ImageOvfConversion.Dialog.RemoveTmpDirectory.title=Geçici klasör silinsin mi?
+
+# ContainerUploadPage
+ContainerUploadPage.Description.ContainerDefFinished=Container tanımlaması tamamlandı
+ContainerUploadPage.Warning.NoReceipt=Container talimatları girilmedi!
+ContainerUploadPage.Warning.NoGitRepository=Git deposu belirtilmedi!
+ContainerUploadPage.Warning.NoProperName=Görüntü adını girin
+ContainerUploadPage.Warning.NoRunOptions=Container başlatma seçeneklerini girin
+
+# ImageUploadSummaryPage
+ImageUploadSummary.UploadInitState.requesting=Yükleme işlemi için sunucu bağlantısı denetleniyor...
+ImageUploadSummary.UploadInitState.waitingForSlot=Aynı anda çok fazla yükleme işlemi gerçekleştiği için \
+ sunucu şu anda aşırı yüklenmiş durumda. Mevcut yükleme işlemlerinin tamamlanması ve boş slot açılması bekleniyor. \
+ Lütfen bu pencereyi kapatmayın.
+ImageUploadSummary.UploadInitState.uploadStarting=Sanal makinenin aktarımı için bağlantı kuruluyor...
+ImageUploadSummary.UploadInitState.uploadStarted=Sanal makinenizin yükleme işlemi başladı. \
+ Dilerseniz bu pencereyi kapatabilir ve uygulamayı kullanmaya devam edebilirsiniz. \
+ Yükleme işlemi arka planda devam edecektir.
+ImageUploadSummary.UploadInitState.error=Sanal makine yükleme işlemi başlatılamadı. \
+ İşlemi yeniden başlatmayı deneyebilirsiniz. Sorunun hâlâ devam etmesi durumunda \
+ kurumunuzun {0} desteğine başvurun.
+ImageUploadSummary.UploadInitState.errorMoreInfo=<br><br>Daha fazla bilgi:<br>{0}
+ImageUploadSummary.UploadInitState.completed=Sanal makine sunucuya başarılı bir şekilde yüklendi.
+
+# LectureCreationPage
+LectureCreation.WizardPage.title=Yeni
+LectureCreation.Label.endBeforeStart.text=Bitiş tarihi başlangıç tarihinden önce!
+LectureCreation.Label.calcPeriod.text={0} gün
+LectureCreation.WizardPage.warningMessage.noName=Bir etkinlik adı girin.
+LectureCreation.WizardPage.warningMessage.noDesc=Bir açıklama ekleyin.
+LectureCreation.WizardPage.warningMessage.startAfterEnd=Başlangıç tarihi bitiş tarihinden sonra!
+LectureCreation.WizardPage.warningMessage.nowAfterEnd=Bitiş tarihi geçmişte!
+LectureCreation.WizardPage.warningMessage.endAfterLatestPossibleDate=Bitiş tarihi mümkün olan en son tarihten sonra: {0}
+LectureCreation.WizardPage.description.0=Sanal makine seçmek için ''İleri'' butonuna tıklayın.
+LectureCreation.WizardPage.description.1=Erişim izinlerini ayarlamak için ''İleri'', \
+ işlemi sonlandırmak için ''Bitir'' butonuna tıklayın.
+
+# LectureImageListPage
+LectureImageList.WizardPage.description=''İleri'' butonuna tıklayın
+LectureImageList.WizardPage.errorMessage.noPerms=Bu sanal makineye bağlantı eklemek için yeterli erişim izni yok.
+LectureImageList.WizardPage.errorMessage.invalidVM=Geçersiz sanal makine seçildi
+
+# LectureLocationSelectionPage
+LectureLocationSelection.WizardPage.errorMessage.tooManyLocations=Çok fazla oda/yer seçildi
+
+# LectureOptionsPage
+LectureOptions.WizardPage.description=Erişim izinlerini ayarlamak için ''İleri'', \
+ işlemi sonlandırmak için ''Bitir'' butonuna tıklayın. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/thrift.properties b/dozentenmodul/src/main/properties/i18n/thrift.properties
new file mode 100644
index 00000000..9770aef0
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/thrift.properties
@@ -0,0 +1,96 @@
+# GuiErrorCallback
+GuiErrorCallback.Message.error.notAuthenticatedOrInvalidToken=Invalid session token or failed \
+ authentication on {0}!\nPlease restart the program. Exit now?
+GuiErrorCallback.thriftError.String.errMsg=(Error {0})
+GuiErrorCallback.Message.error.transportException=The communication with {0} is interrupted. \
+ Calling the function {1} is failed {2}.\n\n\
+ Do you want to retry the call?
+
+# ImageLocalDetailsActions
+ImageLocalDetailsActions.Message.error.writeImagePermissionsFailed=Could not write permissions
+ImageLocalDetailsActions.Message.error.setVirtualizerConfigFailed=Error while saving the VM configuration!
+
+# ThriftActions
+ThriftActions.Message.error.satellitesNullOrEmpty=Login successful, but no satellite server was found.\n\
+ Please enter the address of your server manually.
+ThriftActions.Message.error.addressListNullOrEmpty=Login successful, but no address is stored for the\n\
+ selected satellite server. Unable to connect.
+ThriftActions.Message.error.couldNotGetNewClient=Authentication successful, but connection to the satellite server \
+ is not possible.\n\nThe server may not be available or the network connection may be down.
+ThriftActions.Message.error.versionNotCompatible=The lecturer module you are using is not \
+ compatible with the selected satellite server.\nYour version: {0}\nSatellite version: {1}
+ThriftActions.Message.error.authorizationException=Authentication successful, but the satellite server \
+ refuses the connection.\nTry to login again.\n
+ThriftActions.Message.error.sessionInternalError=Authentication successful, but an internal error \
+ occurred during communication with the satellite server.
+ThriftActions.Message.error.sessionUnknownError=Unknown error while connecting to the satellite server.
+ThriftActions.Message.error.createImageFailed=Failed to create the VM
+ThriftActions.Message.error.createImageUnknownError=Unknown error while creating the VM
+ThriftActions.FileChooser.fc.dialogTitle=Please choose a storage location
+ThriftActions.Message.yesNo.destDirExists=Directory ''{0}'' already exists, do you want to overwrite the VM in it?
+ThriftActions.Message.error.couldNotDeleteDiskFile=File could not be overwritten!
+ThriftActions.Message.error.destDirHasNotEnoughFreeSpace=Not enough space available in the selected \
+ directory.\nNeeded: {0}\nHave: {1}
+ThriftActions.Message.error.downloadRequestFailed=The download request failed
+ThriftActions.Message.error.destinationNotWritable=Could not prepare download: The selected destination \
+ is not writable
+ThriftActions.Message.warning.diskImageCompressed=<html>The downloaded VM ''{0}'' is a compressed \
+ image.<br>You must decompress the image before you can modify it.<br>The VM will \
+ probably not be able to start locally!<br><br>Please read the notes under <a href="{1}">VMDK Disk Types</a>
+ThriftActions.Message.warning.couldNotWrapVM=No vmx file could be created for the downloaded VM.\n\
+ You can try to manually import the image into the VMWare-Player.
+ThriftActions.Message.error.getImageDetailsFailed=Error while reading the metadata
+ThriftActions.Message.error.getImagePermissionsFailed=Error while reading the metadata
+ThriftActions.Message.error.setImageOwnerFailed=Error during transfer of ownership
+ThriftActions.Message.error.couldNotGetImageBase=Error while fetching the versions/lecture for \
+ the following VM: {0}
+ThriftActions.deleteImageBase.String.questionText.0=The VM "{0}" has following valid versions:\n
+ThriftActions.deleteImageBase.String.questionText.1=The following lectures are linked to this VM: \n
+ThriftActions.deleteImageBase.String.questionText.2=Do you really want to continue with the delete operation?
+ThriftActions.Message.error.couldNotDeleteImageBase=Could not delete VM data!
+ThriftActions.Message.error.couldNotGetImageVersion=Error while fetching the list of lectures
+ThriftActions.deleteImageVersion.String.questionText.0=This version is linked to the following lectures:\n
+ThriftActions.deleteImageVersion.String.questionText.1=\nDo you want to delete this version including \
+ lectures?\n
+ThriftActions.deleteImageVersion.String.questionText.2=Do you really want to delete the VM image version \
+ from {0}?
+ThriftActions.Message.error.couldNotDeleteImageVersion=Error while deleting the version
+ThriftActions.Message.error.createLectureFailed=Failed to create lecture
+ThriftActions.Message.error.writeLecturePermissionsFailed=Failed to write lecture permissions
+ThriftActions.Message.error.getLectureDetailsFailed=Could not retrieve lecture data
+ThriftActions.Message.error.updateLectureFailed=Error while updating the lecture
+ThriftActions.Message.error.getLecturePermissionsFailed=Could not retrieve lecture data
+ThriftActions.Message.error.setLectureOwnerFailed=Error during transfer of ownership
+ThriftActions.deleteLecture.String.messageText.0=Do you really want to delete this lecture?
+ThriftActions.deleteLecture.String.messageText.1=Do you really want to delete the {0} lectures?
+
+# ThriftError
+ThriftError.Message.error.notFoundException=\n\nNot found
+ThriftError.Message.error.authorizationException=\n\nAccess denied: {0}\n{1}
+ThriftError.Message.error.invocationException=\n\nThe function call could not be executed: {0}\n{1}
+ThriftError.Message.error.invalidDateParam=\n\nA given date is invalid:\n{0}
+ThriftError.Message.error.transferRejectedException=\n\nThe transfer request was rejected by the server:\n{0}
+ThriftError.Message.error.unexpectedException=\n\nUnexpected exception {0} has occurred.
+ThriftError.InvocationError.null=Internal server side error
+ThriftError.InvocationError.internalServerError=Internal server side error
+ThriftError.InvocationError.invalidData=A parameter has an invalid value
+ThriftError.InvocationError.invalidShareMode=Invalid share mode
+ThriftError.InvocationError.missingData=One parameter is missing (null?)
+ThriftError.InvocationError.unknownImage=Unknown VM/Image
+ThriftError.InvocationError.unknownLecture=Unknown lecture
+ThriftError.InvocationError.unknownUser=Unknown user
+ThriftError.InvocationError.default=Unknown error code: {0}
+ThriftError.AuthorizationError.null=(AuthorizationError=null)
+ThriftError.AuthorizationError.accountSuspended=The user account is suspended
+ThriftError.AuthorizationError.bannedNetwork=The network you are operating on is blocked
+ThriftError.AuthorizationError.challengeFailed=Challenge failed
+ThriftError.AuthorizationError.genericError=Generic error
+ThriftError.AuthorizationError.invalidCredentials=Invalid credentials\nMake sure that username and \
+ password are correct
+ThriftError.AuthorizationError.invalidKey=Invalid key
+ThriftError.AuthorizationError.invalidOrganization=Invalid or unknown organization
+ThriftError.AuthorizationError.invalidToken=Invalid session token
+ThriftError.AuthorizationError.notAuthenticated=Not authenticated
+ThriftError.AuthorizationError.noPermission=Not sufficient permissions
+ThriftError.AuthorizationError.organizationSuspended=Your associated organization is suspended
+ThriftError.AuthorizationError.default=Unknown error code: {0} \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/thrift_de_DE.properties b/dozentenmodul/src/main/properties/i18n/thrift_de_DE.properties
new file mode 100644
index 00000000..340c7be0
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/thrift_de_DE.properties
@@ -0,0 +1,96 @@
+# GuiErrorCallback
+GuiErrorCallback.Message.error.notAuthenticatedOrInvalidToken=Ungültiges Sitzungstoken oder fehlerhafte \
+ Authentifizierung am {0}!\nBitte starten Sie das Programm neu. Jetzt beenden?
+GuiErrorCallback.thriftError.String.errMsg=(Fehler {0})
+GuiErrorCallback.Message.error.transportException=Die Kommunikation mit {0} ist gestört. \
+ Der Aufruf der Funktion {1} ist fehlgeschlagen {2}.\n\n\
+ Möchten Sie den Aufruf wiederholen?
+
+# ImageLocalDetailsActions
+ImageLocalDetailsActions.Message.error.writeImagePermissionsFailed=Konnte Berechtigungen nicht schreiben
+ImageLocalDetailsActions.Message.error.setVirtualizerConfigFailed=Fehler beim Speichern der VM-Konfiguration!
+
+# ThriftActions
+ThriftActions.Message.error.satellitesNullOrEmpty=Login erfolgreich, aber es wurde kein Satellitenserver gefunden.\n\
+ Bitte geben Sie die Adresse Ihres Servers manuell an.
+ThriftActions.Message.error.addressListNullOrEmpty=Login erfolgreich, aber für den ausgewählten Satellitenserver ist\n\
+ keine Adresse hinterlegt. Kann nicht verbinden.
+ThriftActions.Message.error.couldNotGetNewClient=Authentifizierung erfolgreich, die Verbindung zum Satellitenserver \
+ ist jedoch nicht möglich.\n\nMöglicherweise ist der Server nicht verfügbar, oder die Netzwerkverbindung gestört.
+ThriftActions.Message.error.versionNotCompatible=Das von Ihnen verwendete Dozentenmodul ist nicht mit dem \
+ gewählten Satellitenserver kompatibel.\nIhre Version: {0}\nSatelliten-Version: {1}
+ThriftActions.Message.error.authorizationException=Authentifizierung erfolgreich, der Satellitenserver \
+ verweigert jedoch die Verbindung.\nVersuchen Sie, sich erneut anzumelden.\n
+ThriftActions.Message.error.sessionInternalError=Authentifizierung erfolgreich, bei der Kommunikation mit \
+ dem Satellitenserver trat jedoch ein interner Fehler auf.
+ThriftActions.Message.error.sessionUnknownError=Unbekannter Fehler beim Verbinden mit dem Satellitenserver.
+ThriftActions.Message.error.createImageFailed=Erstellen der VM fehlgeschlagen
+ThriftActions.Message.error.createImageUnknownError=Unbekannter Fehler beim Erstellen der VM
+ThriftActions.FileChooser.fc.dialogTitle=Bitte wählen Sie einen Speicherort
+ThriftActions.Message.yesNo.destDirExists=Verzeichnis ''{0}'' existiert bereits, wollen Sie die VM darin überschreiben?
+ThriftActions.Message.error.couldNotDeleteDiskFile=Datei konnte nicht überschrieben werden!
+ThriftActions.Message.error.destDirHasNotEnoughFreeSpace=Nicht genügend Speicherplatz im ausgewählten Verzeichnis \
+ verfügbar.\nBrauche: {0}\nHabe: {1}
+ThriftActions.Message.error.downloadRequestFailed=Die Download-Anfrage ist gescheitert
+ThriftActions.Message.error.destinationNotWritable=Konnte Download nicht vorbereiten: Der gewählte Zielort \
+ ist nicht beschreibbar
+ThriftActions.Message.warning.diskImageCompressed=<html>Die heruntergeladene VM ''{0}'' ist ein komprimiertes \
+ Abbild.<br>Sie müssen das Abbild dekomprimieren, bevor Sie es verändern können.<br>Die VM wird lokal \
+ voraussichtlich nicht startfähig sein!<br><br>Bitte lesen Sie die Hinweise unter <a href="{1}">VMDK Disk Types</a>
+ThriftActions.Message.warning.couldNotWrapVM=Zur heruntergeladenen VM konnte keine vmx-Datei angelegt werden.\n\
+ Sie können versuchen, das Abbild manuell in den VMWare-Player zu importieren.
+ThriftActions.Message.error.getImageDetailsFailed=Fehler beim Lesen der Metadaten
+ThriftActions.Message.error.getImagePermissionsFailed=Fehler beim Lesen der Metadaten
+ThriftActions.Message.error.setImageOwnerFailed=Fehler beim Übertragen der Besitzrechte
+ThriftActions.Message.error.couldNotGetImageBase=Fehler beim Holen der Versionen/Veranstaltung zu \
+ folgender VM: {0}
+ThriftActions.deleteImageBase.String.questionText.0=Die VM "{0}" hat folgende gültige Versionen:\n
+ThriftActions.deleteImageBase.String.questionText.1=Folgende Veranstaltungen sind mit dieser VM verknüpft: \n
+ThriftActions.deleteImageBase.String.questionText.2=Wollen Sie wirklich mit dem Löschen fortfahren?
+ThriftActions.Message.error.couldNotDeleteImageBase=Konnte VM-Daten nicht löschen!
+ThriftActions.Message.error.couldNotGetImageVersion=Fehler beim Holen der Liste der Veranstaltungen
+ThriftActions.deleteImageVersion.String.questionText.0=Diese Version ist zu folgende Veranstaltungen verknüpft:\n
+ThriftActions.deleteImageVersion.String.questionText.1=\nWollen Sie diese Version samt Veranstaltungen \
+ löschen?\n
+ThriftActions.deleteImageVersion.String.questionText.2=Wollen Sie die VM-Image-Version vom {0} Uhr \
+ wirklich löschen?
+ThriftActions.Message.error.couldNotDeleteImageVersion=Fehler beim Löschen der Version
+ThriftActions.Message.error.createLectureFailed=Fehler beim Erstellen der Veranstaltung
+ThriftActions.Message.error.writeLecturePermissionsFailed=Fehler beim Schreiben der Veranstaltungsberechtigungen
+ThriftActions.Message.error.getLectureDetailsFailed=Konnte Veranstaltungdaten nicht abrufen
+ThriftActions.Message.error.updateLectureFailed=Fehler beim Updaten der Veranstaltung
+ThriftActions.Message.error.getLecturePermissionsFailed=Konnte Veranstaltungdaten nicht abrufen
+ThriftActions.Message.error.setLectureOwnerFailed=Fehler beim Übertragen der Besitzrechte
+ThriftActions.deleteLecture.String.messageText.0=Wollen Sie diese Veranstaltung wirklich löschen?
+ThriftActions.deleteLecture.String.messageText.1=Wollen Sie die {0} Veranstaltungen wirklich löschen?
+
+# ThriftError
+ThriftError.Message.error.notFoundException=\n\nNicht gefunden
+ThriftError.Message.error.authorizationException=\n\nZugriff verweigert: {0}\n{1}
+ThriftError.Message.error.invocationException=\n\nDer Funktionsaufruf konnte nicht durchgeführt werden: {0}\n{1}
+ThriftError.Message.error.invalidDateParam=\n\nEin angegebenes Datum ist ungültig:\n{0}
+ThriftError.Message.error.transferRejectedException=\n\nDie Transferanfrage wurde vom Server abgelehnt:\n{0}
+ThriftError.Message.error.unexpectedException=\n\nUnerwartete Ausnahme {0} ist aufgetreten.
+ThriftError.InvocationError.null=Interner serverseitiger Fehler
+ThriftError.InvocationError.internalServerError=Interner serverseitiger Fehler
+ThriftError.InvocationError.invalidData=Ein Parameter hat einen ungültigen Wert
+ThriftError.InvocationError.invalidShareMode=Ungültiger Share-Mode
+ThriftError.InvocationError.missingData=Ein Parameter fehlt (null?)
+ThriftError.InvocationError.unknownImage=Unbekannte VM/Image
+ThriftError.InvocationError.unknownLecture=Unbekannte Veranstaltung
+ThriftError.InvocationError.unknownUser=Unbekannter Benutzer
+ThriftError.InvocationError.default=Unbekannter Fehlercode: {0}
+ThriftError.AuthorizationError.null=(AuthorizationError=null)
+ThriftError.AuthorizationError.accountSuspended=Das Benutzerkonto ist gesperrt
+ThriftError.AuthorizationError.bannedNetwork=Das Netzwerk, aus dem Sie operieren, ist gesperrt
+ThriftError.AuthorizationError.challengeFailed=Challenge fehlgeschlagen
+ThriftError.AuthorizationError.genericError=Generischer Fehler
+ThriftError.AuthorizationError.invalidCredentials=Ungültige Zugangsdaten\nStellen Sie sicher, dass Benutzername \
+ und Passwort korrekt sind
+ThriftError.AuthorizationError.invalidKey=Ungültiger Schlüssel
+ThriftError.AuthorizationError.invalidOrganization=Ungültige oder unbekannte Organisation
+ThriftError.AuthorizationError.invalidToken=Ungültiges Sitzungstoken
+ThriftError.AuthorizationError.notAuthenticated=Nicht authentifiziert
+ThriftError.AuthorizationError.noPermission=Keine ausreichenden Berechtigungen
+ThriftError.AuthorizationError.organizationSuspended=Ihre zugehörige Organisation ist gesperrt
+ThriftError.AuthorizationError.default=Unbekannter Fehlercode: {0} \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/thrift_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/thrift_tr_TR.properties
new file mode 100644
index 00000000..76e244c6
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/thrift_tr_TR.properties
@@ -0,0 +1,96 @@
+# GuiErrorCallback
+GuiErrorCallback.Message.error.notAuthenticatedOrInvalidToken={0} üzerinde geçersiz oturum belirteci veya \
+ başarısız kimlik doğrulaması!\nLütfen programı yeniden başlatın. Şimdi sonlandır?
+GuiErrorCallback.thriftError.String.errMsg=(Hata {0})
+GuiErrorCallback.Message.error.transportException={0} ile iletişim kesildi. \
+ {1} işlevinin çağrılması başarısız oldu {2}.\n\n\
+ İşlemi tekrar denemek istiyor musunuz?
+
+# ImageLocalDetailsActionss
+ImageLocalDetailsActions.Message.error.writeImagePermissionsFailed=Erişim izinleri yazılamadı
+ImageLocalDetailsActions.Message.error.setVirtualizerConfigFailed=Sanal makine yapılandırması kaydedilirken hata oluştu!
+
+# ThriftActions
+ThriftActions.Message.error.satellitesNullOrEmpty=Giriş başarılı, ancak hiçbir satelit sunucusu bulunamadı.\n\
+ Lütfen sunucunuzun adresini manuel olarak girin.
+ThriftActions.Message.error.addressListNullOrEmpty=Giriş başarılı, ancak seçilen satelit sunucusu için\n\
+ kayıtlı hiçbir adres bulunamadı. Bağlantı kurulamıyor.
+ThriftActions.Message.error.couldNotGetNewClient=Kimlik doğrulama başarılı, ancak satelit sunucusuyla \
+ bağlantı kurulamıyor.\n\nSunucu kullanılabilir durumda olmayabilir veya ağ bağlantısı hatalı olabilir.
+ThriftActions.Message.error.versionNotCompatible=Kullandığınız öğretim modülü, \
+ seçilen satelit sunucusuyla uyumlu değil.\nSizin sürümünüz: {0}\nSatelit sunucusu sürümü: {1}
+ThriftActions.Message.error.authorizationException=Kimlik doğrulama başarılı, ancak satelit sunucusu \
+ bağlantıyı reddediyor.\nTekrar giriş yapmayı deneyin.\n
+ThriftActions.Message.error.sessionInternalError=Kimlik doğrulama başarılı, ancak satelit sunucusuyla \
+ iletişim kurulurken dahili bir hata oluştu.
+ThriftActions.Message.error.sessionUnknownError=Satelit sunucusuna bağlanırken bilinmeyen bir hata oluştu.
+ThriftActions.Message.error.createImageFailed=Sanal makine oluşturulamadı
+ThriftActions.Message.error.createImageUnknownError=Sanal makine oluşturulurken bilinmeyen bir hata oluştu
+ThriftActions.FileChooser.fc.dialogTitle=Lütfen bir depolama yeri seçin
+ThriftActions.Message.yesNo.destDirExists=''{0}'' dizini zaten var, üzerine yazmak istiyor musunuz?
+ThriftActions.Message.error.couldNotDeleteDiskFile=Dosyanın üzerine yazılamadı!
+ThriftActions.Message.error.destDirHasNotEnoughFreeSpace=Seçilen dizinde yeterli boş alan \
+ yok.\nGerekli boş alan: {0}\nMevcut boş alan: {1}
+ThriftActions.Message.error.downloadRequestFailed=İndirme isteği başarısız oldu
+ThriftActions.Message.error.destinationNotWritable=İndirme hazırlanamadı: Seçilen hedef \
+ yazılabilir değil
+ThriftActions.Message.warning.diskImageCompressed=<html>İndirilen sanal makine ''{0}'' sıkıştırılmış \
+ bir imaj dosyası.<br>İmaj dosyasını değiştirebilmek için önce açmanız gerekir.<br>Sanal makine muhtemelen \
+ lokal olarak başlatılamayacak!<br><br>Lütfen <a href="{1}">VMDK Disk Tipleri</a> altındaki notları okuyun.
+ThriftActions.Message.warning.couldNotWrapVM=İndirilen sanal makine için hiçbir vmx dosyası oluşturulamadı.\n\
+ İmajı manuel olarak VMWare-Player''a aktarmayı deneyebilirsiniz.
+ThriftActions.Message.error.getImageDetailsFailed=Meta veriler okunurken hata oluştu
+ThriftActions.Message.error.getImagePermissionsFailed=Meta veriler okunurken hata oluştu
+ThriftActions.Message.error.setImageOwnerFailed=Sahiplik aktarımı sırasında hata oluştu
+ThriftActions.Message.error.couldNotGetImageBase=Aşağıdaki sanal makine için sürümler/etkinlikler alınırken \
+ hata oluştu: {0}
+ThriftActions.deleteImageBase.String.questionText.0="{0}" sanal makinesi için mevcut olan geçerli sürümler:\n
+ThriftActions.deleteImageBase.String.questionText.1=Bu sanal makineyle bağlantılı olan etkinlikler: \n
+ThriftActions.deleteImageBase.String.questionText.2=Silme işlemini gerçekleştirmek istediğinizden emin misiniz?
+ThriftActions.Message.error.couldNotDeleteImageBase=Sanal makine verileri silinemedi!
+ThriftActions.Message.error.couldNotGetImageVersion=Etkinlikler listesi alınırken hata oluştu
+ThriftActions.deleteImageVersion.String.questionText.0=Bu sürümün bağlantılı olduğu etkinlikler:\n
+ThriftActions.deleteImageVersion.String.questionText.1=\nEtkinlikler de dahil olmak üzere bu sürümü silmek \
+ istiyor musunuz?\n
+ThriftActions.deleteImageVersion.String.questionText.2={0} tarihinde oluşturulmuş sanal makine imaj sürümünü \
+ gerçekten silmek istiyor musunuz?
+ThriftActions.Message.error.couldNotDeleteImageVersion=Sürüm silinirken hata oluştu
+ThriftActions.Message.error.createLectureFailed=Etkinlik oluşturulurken hata oluştu
+ThriftActions.Message.error.writeLecturePermissionsFailed=Etkinlik erişim izinleri yazılırken hata oluştu
+ThriftActions.Message.error.getLectureDetailsFailed=Etkinlik verileri alınamadı
+ThriftActions.Message.error.updateLectureFailed=Etkinlik güncellenirken hata oluştu
+ThriftActions.Message.error.getLecturePermissionsFailed=Etkinlik verileri alınamadı
+ThriftActions.Message.error.setLectureOwnerFailed=Sahiplik aktarımı sırasında hata oluştu
+ThriftActions.deleteLecture.String.messageText.0=Bu etkinliği silmek istediğinizden emin misiniz?
+ThriftActions.deleteLecture.String.messageText.1={0} etkinliği silmek istediğinizden emin misiniz?
+
+# ThriftError
+ThriftError.Message.error.notFoundException=\n\nBulunamadı
+ThriftError.Message.error.authorizationException=\n\nErişim reddedildi: {0}\n{1}
+ThriftError.Message.error.invocationException=\n\nİşlev çağrısı gerçekleştirilemedi: {0}\n{1}
+ThriftError.Message.error.invalidDateParam=\n\nGirilen tarihlerden bir tanesi geçersiz:\n{0}
+ThriftError.Message.error.transferRejectedException=\n\nTransfer isteği sunucu tarafından reddedildi:\n{0}
+ThriftError.Message.error.unexpectedException=\n\nBeklenmeyen {0} istisnası oluştu.
+ThriftError.InvocationError.null=Dahili sunucu tarafı hatası
+ThriftError.InvocationError.internalServerError=Dahili sunucu tarafı hatası
+ThriftError.InvocationError.invalidData=Bir parametrenin değeri geçersiz
+ThriftError.InvocationError.invalidShareMode=Geçersiz paylaşım modu
+ThriftError.InvocationError.missingData=Bir parametre eksik (boş?)
+ThriftError.InvocationError.unknownImage=Bilinmeyen sanal makine/imaj
+ThriftError.InvocationError.unknownLecture=Bilinmeyen etkinlik
+ThriftError.InvocationError.unknownUser=Bilinmeyen kullanıcı
+ThriftError.InvocationError.default=Bilinmeyen hata kodu: {0}
+ThriftError.AuthorizationError.null=(AuthorizationError=null)
+ThriftError.AuthorizationError.accountSuspended=Kullanıcı hesabı engellendi
+ThriftError.AuthorizationError.bannedNetwork=Kullandığınız ağ engellendi
+ThriftError.AuthorizationError.challengeFailed=Challenge başarısız oldu
+ThriftError.AuthorizationError.genericError=Genel hata
+ThriftError.AuthorizationError.invalidCredentials=Geçersiz giriş bilgileri\nKullanıcı adınızın ve şifrenizin \
+ doğru olduğundan emin olun
+ThriftError.AuthorizationError.invalidKey=Geçersiz anahtar
+ThriftError.AuthorizationError.invalidOrganization=Geçersiz veya bilinmeyen kuruluş
+ThriftError.AuthorizationError.invalidToken=Geçersiz oturum belirteci
+ThriftError.AuthorizationError.notAuthenticated=Kimlik doğrulanmadı
+ThriftError.AuthorizationError.noPermission=Yeterli erişim izni yok
+ThriftError.AuthorizationError.organizationSuspended=İlişkili kuruluşunuz engellendi
+ThriftError.AuthorizationError.default=Bilinmeyen hata kodu: {0} \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/window.properties b/dozentenmodul/src/main/properties/i18n/window.properties
new file mode 100644
index 00000000..924e37fd
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/window.properties
@@ -0,0 +1,147 @@
+# BwIdmLinkWindow
+BwIdmLink.Dialog.title=Registration required
+BwIdmLink.Label.info.title=Note
+BwIdmLink.Label.info.text=<html><body style='width:100%'>\
+ You are not registered at {0}. \
+ Please go to the specified page to register and try again.\
+ </body></html>
+BwIdmLink.Button.link.text=Open page in browser
+BwIdmLink.Button.ok.text=Close
+
+# ConfigWindow
+Config.Label.yourAddress.text=Your address is {0}
+Config.Message.error.couldNotGetUserConfFromSat=Could not get the user specific configuration \
+ from the satellite
+Config.Message.error.couldNotSaveUserConfOnSat=Could not save the user specific configuration \
+ on the satellite
+Config.Message.info.restartNeededToApplyChanges=The changes only become effective after a program \
+ restart.
+
+# GenericNoticeWindow
+GenericNotice.Button.continue.text=Close
+GenericNotice.Message.yesNo.closeWindow=If you do not accept this legal notice, \
+ you cannot use the software! \
+ Are you sure you want to cancel?
+
+# ImageDetailsWindow
+ImageDetails.MenuItem.newLecture.text=New lecture
+ImageDetails.MenuItem.download.text=Download
+ImageDetails.MenuItem.vmConfig.text=VM Configuration
+ImageDetails.MenuItem.delete.text=Delete
+ImageDetails.MenuItem.extendExpirationDate.text=Extend expiry date
+ImageDetails.Message.yesNo.changeOwner=Are you sure you want to transfer \
+ the owner rights to another user?
+ImageDetails.Button.changeOwner.caption=Set owner
+ImageDetails.TextField.title.error=Name must not be empty
+ImageDetails.TextField.description.error=Description must not be empty
+ImageDetails.ComboBox.OS.error=Invalid operating system selected!
+ImageDetails.ComboBox.shareMode.error=Invalid operating system selected!
+ImageDetails.Message.error.couldNotRetrieveVMConfig=Could not retrieve VM configuration.
+ImageDetails.Message.info.setImageOwner=Transfer ownership rights to {0}
+ImageDetails.Message.error.publishNonVMWareImage={0} is currently not released for public exchange.
+ImageDetails.Message.yesNo.currentlyModified=You have unsaved changes, do you want to save them first?
+ImageDetails.Message.yesNo.confirmOrAbort=Do you really want to publish this VM nationwide?
+ImageDetails.Message.error.uploadFailed=Upload of the VM to the master server failed. \
+ Please check whether you agreed to the nationwide VM exchange when registering.\n \
+ You can check this here:\n \
+ {0} \n\n
+ImageDetails.Message.info.passiveTransfer=The transfer runs directly between the satellite server and \
+ the {0} central server.\n If you close the {1}, the transfer will continue anyway.
+ImageDetails.Message.error.saveChangesInternal=Could not submit updated metadata to the server
+ImageDetails.Message.error.saveCustomPermissions=Could not submit changed permissions to the server
+ImageDetails.Message.error.performImageDownload=Selected version is invalid
+ImageDetails.Message.error.extendVersionExpiry=Could not extend expiry date of version {0}.
+ImageDetails.Message.info.extendVersionExpiry=Successfully extended images: {0}
+ImageDetails.Message.yesNo.safeClose=Changes will be discarded, do you really want to close?
+ImageDetails.Constraint.NoEmptyDockerfile.text=Empty Dockerfile not allowed!
+ImageDetails.Constraint.NoEmptyName.text=Empty Name not allowed!
+ImageDetails.Constraint.NoEmptyRunOptions.text=No Container Run Options provided!
+
+# ImageListWindow
+ImageList.MenuItem.newLecture.text=New lecture
+ImageList.MenuItem.edit.text=Detail view
+ImageList.MenuItem.delete.text=Delete
+ImageList.MenuItem.download.text=Download
+ImageList.Message.error.hasLatestVersion=The selected VM has no valid image version
+ImageList.Message.info.deleteImages=The following images could not be deleted: {0}
+
+# ImagePublishedWindow
+ImagePublished.Message.error.satDownload=Could not start download
+ImagePublished.Message.info.satDownload=The transfer runs directly between the satellite server and \
+ the {0} central server.\n If you close the {1}, the transfer will continue anyway.
+
+# LectureChangeImage
+LectureChangeImage.Message.error.imageInvalid=Selected VM is invalid!
+LectureChangeImage.Message.error.canNotLinkToVM=No permissions to link to the selected VM.
+
+# LectureDetailsWindow
+LectureDetails.ComboBox.versions.error=No/invalid VM version selected
+LectureDetails.Message.error.endAfterStart=End date must not be before the start date
+LectureDetails.Message.error.endAfterMaxValidity=End date is after the {0}
+LectureDetails.TextField.title.error=Lecture name must not be empty
+LectureDetails.TextField.description.error=Description must not be empty
+LectureDetails.NetRulesConfigurator.error=Incorrect network rules
+LectureDetails.Message.yesNo.changeOwner=Are you sure you want to transfer \
+ the owner rights to another user?
+LectureDetails.Button.changeOwner.caption=Set owner
+LectureDetails.Message.info.setLectureOwner=Transfer ownership rights to {0}
+LectureDetails.Message.error.imageInvalid=VM invalid.
+LectureDetails.Message.error.imageVersionInvalid=Invalid VM version selected
+LectureDetails.Message.error.imageVersionFileSizeInvalid=Error while querying the size of the VM image.
+LectureDetails.Message.error.saveChangesInternal=Error while saving the lecture!
+LectureDetails.Message.error.saveCustomPermissions=Error while transferring of permissions!
+LectureDetails.Message.error.isPeriodValid=Start of the lecture is after the end date!
+LectureDetails.Message.yesNo.safeClose=Changes will be discarded, do you really want to close?
+
+# LectureListWindow
+LectureList.FilterType.all=Show all
+LectureList.FilterType.own=Show own/assigned ones only
+LectureList.FilterType.active=Show active only
+LectureList.FilterType.editable=Show editable only
+LectureList.FilterType.expiring=Show soon expiring
+LectureList.FilterType.exams=Show exams
+LectureList.MenuItem.new.text=New
+LectureList.MenuItem.edit.text=Detail view
+LectureList.MenuItem.linked.text=Show VM Details
+LectureList.MenuItem.download.text=Download linked VM
+LectureList.MenuItem.delete.text=Delete
+LectureList.Message.yesNo.switchView=To create a lecture, \
+ you have to select a VM. Switch to VM selection?
+LectureList.Message.error.canNotListImages=You do not have the required permissions.
+LectureList.Message.error.deleteLecture=Reason: {0}
+LectureList.Message.info.deleteLectures=The following lectures could not be deleted: {0}
+
+# LocationSelectionWindow
+LocationSelection.Message.warning.saveChanges=Please reduce the number of selected locations
+LocationSelection.Message.error.locationSelector=Too many places selected!
+
+# LoginWindow
+Login.Message.error.noLoginType=Please select an authentication type.
+Login.Message.error.noOrganization=Please select your organization as ''Identity Provider''.
+Login.Message.error.noUsername=No username given!
+Login.Message.error.noPassword=No password given!
+Login.Message.error.authIdentityProvider=IdP Error
+Login.Message.error.authServiceProvider=Invalid token from the service provider!
+Login.Message.error.authInvalidURL=Invalid URL.
+Login.Message.error.authInternal=Internal error!
+Login.Message.error.authMasterServer=The master server has rejected the login attempt \
+ with the following message:\n\n{0}
+Login.Message.error.loginTypeDirectConnect=Not yet implemented
+Login.Message.error.loginTypeDefault=No login type selected!
+Login.Message.error.loginFailed=Login failed
+
+# SatelliteListWindow
+SatelliteList.Message.error.noSatellite=No satellite selected
+
+# VirtConfigEditorWindow
+VirtConfigEditor.Message.error.invalidInputTitle=Invalid inputs:\n
+VirtConfigEditor.Message.error.invalidInputText=Do you still want to save? (The invalid lines will be \
+ deleted automatically.)
+VirtConfigEditor.Message.yesNo.safeClose=Your changes in this window will be lost, \
+ do you still want to cancel?
+
+# VirtDropDownConfigEditorWindow
+VirtDropDownConfigEditor.Message.warning.initializeComboBoxes=You saved an incorrect entry \n\
+ during the last configuration. \nThe VM will not start!
+VirtDropDownConfigEditor.Message.yesNo.safeClose=Do you really want to cancel?\n\
+ Your changes will be discarded. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/window_de_DE.properties b/dozentenmodul/src/main/properties/i18n/window_de_DE.properties
new file mode 100644
index 00000000..181c140e
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/window_de_DE.properties
@@ -0,0 +1,147 @@
+# BwIdmLinkWindow
+BwIdmLink.Dialog.title=Registrierung erforderlich
+BwIdmLink.Label.info.title=Hinweis
+BwIdmLink.Label.info.text=<html><body style='width:100%'>\
+ Sie sind nicht bei {0} registriert. \
+ Bitte rufen Sie die angegebene Seite auf, um sich zu registrieren und versuchen Sie es erneut.\
+ </body></html>
+BwIdmLink.Button.link.text=Seite im Browser öffnen
+BwIdmLink.Button.ok.text=Schließen
+
+# ConfigWindow
+Config.Label.yourAddress.text=Ihre Adresse ist {0}
+Config.Message.error.couldNotGetUserConfFromSat=Konnte die benutzerspezifische Konfiguration nicht \
+ vom Satelliten holen
+Config.Message.error.couldNotSaveUserConfOnSat=Konnte die benutzerspezifische Konfiguration nicht \
+ auf dem Satelliten speichern
+Config.Message.info.restartNeededToApplyChanges=Die Änderungen werden erst nach einem Programmneustart \
+ wirksam.
+
+# GenericNoticeWindow
+GenericNotice.Button.continue.text=Schließen
+GenericNotice.Message.yesNo.closeWindow=Wenn Sie diesen rechtlichen Hinweis nicht akzeptieren, \
+ können Sie die Software nicht verwenden! \
+ Sind Sie sicher, dass Sie abbrechen wollen?
+
+# ImageDetailsWindow
+ImageDetails.MenuItem.newLecture.text=Neue Veranstaltung
+ImageDetails.MenuItem.download.text=Download
+ImageDetails.MenuItem.vmConfig.text=VM-Konfiguration
+ImageDetails.MenuItem.delete.text=Löschen
+ImageDetails.MenuItem.extendExpirationDate.text=Ablaufzeitpunkt verlängern
+ImageDetails.Message.yesNo.changeOwner=Sind Sie sicher, dass Sie die Besitzerrechte an \
+ einen anderen Benutzer übertragen wollen?
+ImageDetails.Button.changeOwner.caption=Besitzer festlegen
+ImageDetails.TextField.title.error=Name darf nicht leer sein
+ImageDetails.TextField.description.error=Beschreibung darf nicht leer sein
+ImageDetails.ComboBox.OS.error=Ungültiges Betriebssystem ausgewählt!
+ImageDetails.ComboBox.shareMode.error=Ungültiges Betriebssystem ausgewählt!
+ImageDetails.Message.error.couldNotRetrieveVMConfig=Konnte VM-Konfiguration nicht abrufen.
+ImageDetails.Message.info.setImageOwner=Besitzrechte übertragen an {0}
+ImageDetails.Message.error.publishNonVMWareImage={0} ist derzeit nicht für den öffentlichen Austausch freigegeben.
+ImageDetails.Message.yesNo.currentlyModified=Sie haben ungespeicherte Änderungen, wollen Sie diese erst speichern?
+ImageDetails.Message.yesNo.confirmOrAbort=Wollen Sie diese VM wirklich landesweit veröffentlichen?
+ImageDetails.Message.error.uploadFailed=Upload der VM auf den Masterserver fehlgeschlagen. \
+ Prüfen Sie, ob Sie bei der Registrierung dem landesweiten VM-Austausch zugestimmt haben.\n \
+ Sie können dies hier überprüfen:\n \
+ {0} \n\n
+ImageDetails.Message.info.passiveTransfer=Die Übertragung läuft direkt zwischen Satellitenserver und \
+ dem {0} Zentral-Server.\n Wenn Sie die {1} schließen, wird der Transfer trotzdem weiterlaufen.
+ImageDetails.Message.error.saveChangesInternal=Konnte aktualisierte Metadaten nicht an den Server übermitteln
+ImageDetails.Message.error.saveCustomPermissions=Konnte geänderte Berechtigungen nicht an den Server übermitteln
+ImageDetails.Message.error.performImageDownload=Ausgewählte Version ist ungültig
+ImageDetails.Message.error.extendVersionExpiry=Konnte Ablaufdatum der Version {0} nicht verlängern.
+ImageDetails.Message.info.extendVersionExpiry=Erfolgreich verlängerte Abbilder: {0}
+ImageDetails.Message.yesNo.safeClose=Änderungen werden verworfen, wollen Sie wirklich schließen?
+ImageDetails.Constraint.NoEmptyDockerfile.text=Es muss ein Dockerfile angegeben werden!
+ImageDetails.Constraint.NoEmptyName.text=Es muss ein Name angegeben werden!
+ImageDetails.Constraint.NoEmptyRunOptions.text=Keine Container Start Optionen angegeben!
+
+# ImageListWindow
+ImageList.MenuItem.newLecture.text=Neue Veranstaltung
+ImageList.MenuItem.edit.text=Detailansicht
+ImageList.MenuItem.delete.text=Löschen
+ImageList.MenuItem.download.text=Download
+ImageList.Message.error.hasLatestVersion=Die gewählte VM besitzt keine gültige Image-Version
+ImageList.Message.info.deleteImages=Folgende images konnten nicht gelöscht werden: {0}
+
+# ImagePublishedWindow
+ImagePublished.Message.error.satDownload=Konnte den Download nicht starten
+ImagePublished.Message.info.satDownload=Die Übertragung läuft direkt zwischen Satellitenserver und \
+ dem {0} Zentral-Server.\n Wenn Sie die {1} schließen, wird der Transfer trotzdem weiterlaufen.
+
+# LectureChangeImage
+LectureChangeImage.Message.error.imageInvalid=Ausgewählte VM ist ungültig!
+LectureChangeImage.Message.error.canNotLinkToVM=Keine Rechte zum Verlinken auf die ausgewählte VM.
+
+# LectureDetailsWindow
+LectureDetails.ComboBox.versions.error=Keine/Ungültige VM-Version ausgewählt
+LectureDetails.Message.error.endAfterStart=Enddatum darf nicht vor dem Startdatum liegen
+LectureDetails.Message.error.endAfterMaxValidity=Enddatum liegt nach dem {0}
+LectureDetails.TextField.title.error=Veranstaltungsname darf nicht leer sein
+LectureDetails.TextField.description.error=Beschreibung darf nicht leer sein
+LectureDetails.NetRulesConfigurator.error=Fehlerhafte Netzwerkregeln
+LectureDetails.Message.yesNo.changeOwner=Sind Sie sicher, dass Sie die Besitzerrechte an \
+ einen anderen Account übertragen wollen?
+LectureDetails.Button.changeOwner.caption=Besitzer festlegen
+LectureDetails.Message.info.setLectureOwner=Besitzrechte übertragen an {0}
+LectureDetails.Message.error.imageInvalid=VM ungültig.
+LectureDetails.Message.error.imageVersionInvalid=Ungültige VM-Version gewählt
+LectureDetails.Message.error.imageVersionFileSizeInvalid=Fehler bei der Abfrage der Größe des VM-Abbildes.
+LectureDetails.Message.error.saveChangesInternal=Fehler beim Speichern der Veranstaltung!
+LectureDetails.Message.error.saveCustomPermissions=Fehler beim Übertragen der Berechtigungen!
+LectureDetails.Message.error.isPeriodValid=Start der Veranstaltung ist nach dem Enddatum!
+LectureDetails.Message.yesNo.safeClose=Änderungen werden verworfen, wollen Sie wirklich schließen?
+
+# LectureListWindow
+LectureList.FilterType.all=Alle anzeigen
+LectureList.FilterType.own=Nur eigene/zugewiesene anzeigen
+LectureList.FilterType.active=Nur aktive anzeigen
+LectureList.FilterType.editable=Nur editierbare anzeigen
+LectureList.FilterType.expiring=Bald auslaufende anzeigen
+LectureList.FilterType.exams=Prüfungsveranstaltungen anzeigen
+LectureList.MenuItem.new.text=Neu
+LectureList.MenuItem.edit.text=Detailansicht
+LectureList.MenuItem.linked.text=VM-Details anzeigen
+LectureList.MenuItem.download.text=Verlinkte VM herunterladen
+LectureList.MenuItem.delete.text=Löschen
+LectureList.Message.yesNo.switchView=Um eine Veranstaltung zu erstellen, \
+ müssen Sie eine VM auswählen. Zur VM-Auswahl wechseln?
+LectureList.Message.error.canNotListImages=Ihnen fehlen die benötigten Berechtigungen.
+LectureList.Message.error.deleteLecture=Begründung: {0}
+LectureList.Message.info.deleteLectures=Folgende Veranstaltungen konnten nicht gelöscht werden: {0}
+
+# LocationSelectionWindow
+LocationSelection.Message.warning.saveChanges=Bitten reduzieren Sie die Anzahl gewählter Orte
+LocationSelection.Message.error.locationSelector=Zu viele Orte ausgewählt!
+
+# LoginWindow
+Login.Message.error.noLoginType=Bitte wählen Sie eine Authentifizierungsart.
+Login.Message.error.noOrganization=Bitte wählen Sie Ihre Organisation als ''Identity Provider''.
+Login.Message.error.noUsername=Kein Benutzername angegeben!
+Login.Message.error.noPassword=Kein Passwort angegeben!
+Login.Message.error.authIdentityProvider=IdP-Fehler
+Login.Message.error.authServiceProvider=Ungültiges Token vom Service-Provider!
+Login.Message.error.authInvalidURL=Ungültige URL.
+Login.Message.error.authInternal=Interner Fehler!
+Login.Message.error.authMasterServer=Der Masterserver hat den Loginversuch mit der \
+ folgenden Nachricht abgewiesen:\n\n{0}
+Login.Message.error.loginTypeDirectConnect=Noch nicht implementiert
+Login.Message.error.loginTypeDefault=Keine Authentifizierungsart ausgewählt!
+Login.Message.error.loginFailed=Anmeldung fehlgeschlagen
+
+# SatelliteListWindow
+SatelliteList.Message.error.noSatellite=Kein Satellit ausgewählt
+
+# VirtConfigEditorWindow
+VirtConfigEditor.Message.error.invalidInputTitle=Invalide Eingaben:\n
+VirtConfigEditor.Message.error.invalidInputText=Wollen Sie trotzdem speichern? (Die invaliden Zeilen werden \
+ dabei automatisch gelöscht.)
+VirtConfigEditor.Message.yesNo.safeClose=Ihre Änderungen, in diesem Fenster, werden verloren gehen, \
+ wollen Sie trotzdem abbrechen?
+
+# VirtDropDownConfigEditorWindow
+VirtDropDownConfigEditor.Message.warning.initializeComboBoxes=Sie haben beim letzten Konfigurieren \n\
+ einen falschen Eintrag eingespeichert. \nDie VM wird nicht starten!
+VirtDropDownConfigEditor.Message.yesNo.safeClose=Wollen Sie wirklich abbrechen?\n\
+ Ihre Änderungen werden verworfen. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/window_layout.properties b/dozentenmodul/src/main/properties/i18n/window_layout.properties
new file mode 100644
index 00000000..2d3db37b
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/window_layout.properties
@@ -0,0 +1,245 @@
+# CheckUpdateWindowLayout
+CheckUpdate.Dialog.title=Version
+CheckUpdate.TitledBorder.infoPanel.title=Update
+CheckUpdate.Label.localVersion.text=Your version
+CheckUpdate.Label.remoteVersion.text=Current version
+CheckUpdate.TitledBorder.changelogPanel.title=Changelog
+CheckUpdate.Button.link.text=To the download portal
+CheckUpdate.Button.close.text=Close
+
+# ConfigWindowLayout
+Config.Dialog.title={0} - Configuration
+Config.Label.mailNotifications.text=E-mail notifications
+Config.CheckBox.sendMeMail.text=Get informed about VM and lecture changes via e-mail
+Config.Label.sendMeMail.text=This option requires the server to be configured to send mail.
+Config.Label.proxyConfig.text=Proxy server
+Config.RadioButton.proxyNone.text=Do not use a proxy
+Config.RadioButton.proxyAuto.text=Automatically search for proxy
+Config.Label.fontConfig.text=Font size (%)
+Config.Label.fontConfigInfo.text=This function is experimental. Display errors may occur.
+Config.Label.lookAndFeel.text=LookAndFeel
+Config.Label.lookAndFeelInfo.text=Here you can change the display of the interface \
+ between different ''LookAndFeels''.
+Config.Label.concurrentConnections.text=Connections per transfer
+Config.Label.concurrentConnectionsInfo.text=Normally, best results are achieved \
+ if the setting is left at 1. If the transfer speed \
+ does not overload your network connection, try the next higher \
+ value. Too high values can have a negative effect on the \
+ transfer speed and put a higher load on the satellite server.
+Config.Label.language.text=Language
+Config.Label.languageInfo.text=Here you can switch between the languages.
+Config.Button.close.text=Close
+Config.Button.save.text=Save
+
+# GenericNoticeWindowLayout
+GenericNotice.TitledBorder.noticePanel.title=Note
+GenericNotice.Label.noticePanel.text=Please read and confirm the following legal notice:
+GenericNotice.CheckBox.agree.text=Yes, I accept the agreement. \
+ Do not display notification again.
+GenericNotice.Button.continue.text=Continue
+
+# ImageDetailsWindowLayout
+ImageDetails.Label.description.text=Description
+ImageDetails.Button.changeOwner.text=Change
+ImageDetails.Label.owner.text=Owner
+ImageDetails.Label.createTime.text=Created on
+ImageDetails.Label.updater.text=Changed by
+ImageDetails.Label.updateTime.text=Changed on
+ImageDetails.Label.OS.text=Operating system
+ImageDetails.Label.shareMode.text=Share mode
+ImageDetails.CheckBox.isTemplate.text=Template
+ImageDetails.Label.version.text=Version-ID
+ImageDetails.Label.ID.text=VM-ID
+ImageDetails.Label.virtualizer.text=Virtualizer
+ImageDetails.Label.linkedLectureCount.text=Lectures
+ImageDetails.Button.showLinkingLectures.text=Show
+ImageDetails.Button.updateImage.text=Upload new VM version
+ImageDetails.Button.updateImage.description=New VM version
+ImageDetails.Button.uploadToMaster.text=Publish nationwide
+ImageDetails.Button.uploadToMaster.description=Publish VM
+ImageDetails.TitledBorder.defaultPermissionPane.title=Other users
+ImageDetails.Label.defaultPerms.text=<html><body style='width:100%'>\
+ Here you can set permissions for users not specified in the list:</body></html>
+ImageDetails.CheckBox.permAdmin.text=Admin
+ImageDetails.CheckBox.permDownload.text=Download
+ImageDetails.CheckBox.permEdit.text=Edit
+ImageDetails.CheckBox.permLink.text=Link
+ImageDetails.Button.saveChanges.text=Save
+ImageDetails.Button.close.text=Close
+ImageDetails.Tab.overview.title=Overview
+ImageDetails.Tab.versions.title=VM-Versions
+ImageDetails.Tab.permissions.title=Permissions
+ImageDetails.Label.ImageName.text=Image Name
+ImageDetails.Label.ContainerRunOptions.text=Container Run Options
+
+# ImageListWindowLayout
+ImageList.Label.title.text=Overview virtual machines
+ImageList.Label.info.text=Here you can upload, download, edit and delete virtual machines.
+ImageList.Button.newVM.text=New VM
+ImageList.Button.newVM.description=New VM
+ImageList.Button.newLecture.text=New lecture
+ImageList.Button.newLecture.description=New lecture
+ImageList.Button.edit.text=Edit
+ImageList.Button.edit.description=Edit VM
+ImageList.Button.download.text=Download
+ImageList.Button.download.description=Download VM
+ImageList.Button.delete.text=Delete
+ImageList.Button.delete.description=Delete VM
+ImageList.Button.switchView.text=Show lectures
+ImageList.Button.switchView.description=Switch
+ImageList.Button.showPublishedImages.text=Public VMs
+ImageList.Button.showPublishedImages.description=Published VMs
+
+# ImagePublishedWindowLayout
+ImagePublished.Dialog.title=Public VMs
+ImagePublished.Label.filterPanel.text=Search:
+ImagePublished.Button.download.text=Download
+ImagePublished.Button.download.description=Download
+ImagePublished.Button.satDownload.text=Download to satellite
+ImagePublished.Button.satDownload.description=Download to satellite
+ImagePublished.Button.close.text=Close
+
+# LectureChangeImageLayout
+LectureChangeImage.Dialog.title=Select VM to link
+LectureChangeImage.Button.ok.text=Apply
+LectureChangeImage.Button.close.text=Cancel
+
+# LectureDetailsWindowLayout
+LectureDetails.Dialog.title=Lecture details
+LectureDetails.Label.owner.text=Owner
+LectureDetails.Label.createTime.text=Created on
+LectureDetails.Label.updater.text=Changed by
+LectureDetails.Label.updateTime.text=Changed on
+LectureDetails.Label.imageName.text=Linked VM
+LectureDetails.Label.startTime.text=Start date
+LectureDetails.Label.endTime.text=End date
+LectureDetails.Label.useCount.text=Views
+LectureDetails.Label.title.text=Name
+LectureDetails.Label.description.text=Description
+LectureDetails.Label.ID.text=ID
+LectureDetails.Button.changeOwner.text=Change
+LectureDetails.Button.linkImage.text=Change
+LectureDetails.CheckBox.autoUpdate.text=Always use latest version
+LectureDetails.ComboBox.versionInvalid.text= [invalid]
+LectureDetails.Button.downloadImage.text=Download
+LectureDetails.Button.downloadImage.toolTipText=Download currently used version
+LectureDetails.Label.version.text=VM-Version
+LectureDetails.CheckBox.isActive.text=Lecture active
+LectureDetails.CheckBox.hasInternetAccess.text=Allow network/internet access
+LectureDetails.Label.hasInternetAccess.text=Specify here whether the lecture should have access \
+ to the internet. You can include or exclude certain addresses and services in the list.
+LectureDetails.CheckBox.hasUSBAccess.text=Allow external storage media
+LectureDetails.Label.hasUSBAccess.text=Specify here whether the lecture should allow access \
+ to storage media (CD, USB, ...)
+LectureDetails.CheckBox.isExam.text=Exam mode
+LectureDetails.Label.isExam.text=Mark this lecture as e-exam.\n\
+ The lecture will only be visible if {0} is set to exam mode. \
+ Contact your local {1} administrator for this.
+LectureDetails.TitledBorder.defaultPermissionPane.title=Other users
+LectureDetails.CheckBox.permEdit.text=Edit
+LectureDetails.CheckBox.permAdmin.text=Admin
+LectureDetails.Tab.info.title=Overview
+LectureDetails.Tab.general.title=General
+LectureDetails.Tab.restrictions.title=Restrictions
+LectureDetails.Tab.netRules.title=Firewall
+LectureDetails.Tab.locations.title=Room selection
+LectureDetails.Tab.runScript.title=VM-Start
+LectureDetails.Tab.permissions.title=Permissions
+LectureDetails.Tab.netShare.title=Network drives
+LectureDetails.Tab.ldapFilter.title=LDAP-Filters
+LectureDetails.Button.close.text=Close
+LectureDetails.Button.saveChanges.text=Save
+
+# LectureListWindowLayout
+LectureList.Label.title.text=Overview lectures
+LectureList.Label.info.text=Here you can create, edit and delete lectures.
+LectureList.TitledBorder.filterPanel.title=Search
+LectureList.Label.visibleLectureCount.text=Visible:
+LectureList.Button.newLecture.text=New Lecture
+LectureList.Button.newLecture.description=New Lecture
+LectureList.Button.editLecture.text=Edit
+LectureList.Button.editLecture.description=Edit Lecture
+LectureList.Button.deleteLecture.text=Delete
+LectureList.Button.deleteLecture.description=Delete Lecture
+LectureList.Button.switchView.text=Show VMs
+LectureList.Button.switchView.description=Switch
+LectureList.CheckBox.searchInDescription.text=Search in Description
+
+# LocationSelectionWindowLayout
+LocationSelection.Label.info.text=Here you can select the rooms \
+ in which this lecture should be visible.
+LocationSelection.Button.close.text=Cancel
+LocationSelection.Button.saveChanges.text=Apply
+
+# LoginWindowLayout
+Login.Dialog.title={0} - Login
+Login.RadioButton.loginType.text.0=Authentication via {0}
+Login.RadioButton.loginType.text.1=Test access with fixed user
+Login.RadioButton.loginType.text.2=Direct access to the satellite
+Login.Button.settings.text=Settings
+Login.Button.logDir.text=Log directory
+Login.Button.login.text=Login
+Login.CheckBox.saveUsername.text=Remember username
+Login.Button.openRegistration.text=Register
+Login.TitledBorder.loginFormPanel.title=Login data
+Login.Label.organization.text=Identity Provider
+Login.Label.username.text=Username
+Login.Label.password.text=Password
+Login.TitledBorder.loginTypePanel.title=Login type
+Login.TitledBorder.advancedPanel.title=Advanced
+Login.ComboBox.organization.emptyText=Loading...
+
+# MainMenuWindowLayout
+MainMenu.TitledBorder.title={0} Main Menu
+MainMenu.Label.vmLogo.description=VM-Overview
+MainMenu.Label.vmInfo.text=<html><b>Overview virtual machines</b><br>\
+ Switch to the overview of the available virtual machines.<br>Here you can:<br><br>\
+ 1) Create lectures based on a virtual machine<br>\
+ 2) Upload new virtual machines<br>\
+ 3) Download virtual machines<br>\
+ 4) Edit and delete virtual machines</html>
+MainMenu.Label.lecturesLogo.description=Lectures
+MainMenu.Label.lecturesInfo.text=<html><b>Overview lectures</b><br>\
+ Switch to the overview of available lectures.<br>Here you can:<br><br>\
+ 1) Edit or delete lectures<br>\
+ 2) Download virtual machines related to lectures<br>&nbsp;</html>
+MainMenu.Button.showVMs.text=To the VMs
+MainMenu.Button.showLectures.text=To the lectures
+
+# SatelliteListWindowLayout
+SatelliteList.Dialog.title=Select satellite server
+SatelliteList.Label.satList.text=Default server
+SatelliteList.Label.customAddress.text=Enter server address manually
+SatelliteList.Button.cancel.text=Cancel
+SatelliteList.Button.continue.text=Next
+
+# UserListWindowLayout
+UserList.Dialog.title=User list
+UserList.Label.filterPanel.text=Search:
+UserList.Button.cancel.text=Close
+
+# VirtConfigEditorWindowLayout
+VirtConfigEditor.Dialog.title=VM-Configuration Editor
+VirtConfigEditor.TitledBorder.pnlWarning.title=WARNING
+VirtConfigEditor.Label.pnlWarning.text=<html>Changes to the VM configuration can cause malfunctions.\
+ <br>Use at own risk!</html>
+VirtConfigEditor.Button.cancel.text=Cancel
+VirtConfigEditor.Button.save.text=Save
+
+# VirtDropDownConfigEditorWindowLayout
+VirtDropDownConfigEditor.Dialog.title=VM-Configuration Editor
+VirtDropDownConfigEditor.TitledBorder.pnlWarning.title=WARNING
+VirtDropDownConfigEditor.Label.pnlWarning.text=Here you can modify some settings regarding \
+ the virtual hardware used. Please note \
+ that changes may require new drivers to be \
+ available in the VM. In this case, after downloading a VM, \
+ it is necessary to make the change locally, \
+ install the necessary drivers, and re-upload the VM.
+VirtDropDownConfigEditor.Label.sound.text=Sound card
+VirtDropDownConfigEditor.Label.3DAcceleration.text=3D-Acceleration
+VirtDropDownConfigEditor.Label.HWVersion.text=VMWare HW-Version
+VirtDropDownConfigEditor.Label.E0VirtDev.text=Network interface card
+VirtDropDownConfigEditor.Label.maxUSBSpeed.text=USB
+VirtDropDownConfigEditor.Button.more.text=Expert mode
+VirtDropDownConfigEditor.Button.cancel.text=Cancel
+VirtDropDownConfigEditor.Button.save.text=Save \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/window_layout_de_DE.properties b/dozentenmodul/src/main/properties/i18n/window_layout_de_DE.properties
new file mode 100644
index 00000000..7ce847c5
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/window_layout_de_DE.properties
@@ -0,0 +1,245 @@
+# CheckUpdateWindowLayout
+CheckUpdate.Dialog.title=Version
+CheckUpdate.TitledBorder.infoPanel.title=Update
+CheckUpdate.Label.localVersion.text=Ihre Version
+CheckUpdate.Label.remoteVersion.text=Aktuelle Version
+CheckUpdate.TitledBorder.changelogPanel.title=Changelog
+CheckUpdate.Button.link.text=Zum Download-Portal
+CheckUpdate.Button.close.text=Schließen
+
+# ConfigWindowLayout
+Config.Dialog.title={0} - Konfiguration
+Config.Label.mailNotifications.text=E-Mail-Benachrichtigungen
+Config.CheckBox.sendMeMail.text=Über VM- und Veranstaltungsänderungen per E-Mail informiert werden
+Config.Label.sendMeMail.text=Für diese Option muss der Server für den Mailversand konfiguriert sein.
+Config.Label.proxyConfig.text=Proxyserver
+Config.RadioButton.proxyNone.text=Keinen Proxy verwenden
+Config.RadioButton.proxyAuto.text=Automatisch nach Proxy suchen
+Config.Label.fontConfig.text=Schriftgröße (%)
+Config.Label.fontConfigInfo.text=Diese Funktion ist experimentell. Es kann zu Anzeigefehlern kommen.
+Config.Label.lookAndFeel.text=LookAndFeel
+Config.Label.lookAndFeelInfo.text=Hier können Sie die Darstellung der Oberfläche zwischen unterschiedlichen \
+ ''LookAndFeels'' umstellen.
+Config.Label.concurrentConnections.text=Verbindungen pro Transfer
+Config.Label.concurrentConnectionsInfo.text=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.
+Config.Label.language.text=Sprache
+Config.Label.languageInfo.text=Hier können Sie zwischen den Sprachen wechseln.
+Config.Button.close.text=Schließen
+Config.Button.save.text=Speichern
+
+# GenericNoticeWindowLayout
+GenericNotice.TitledBorder.noticePanel.title=Hinweis
+GenericNotice.Label.noticePanel.text=Bitte lesen und bestätigen Sie folgende rechtliche Hinweise:
+GenericNotice.CheckBox.agree.text=Ja, ich akzeptiere die Vereinbarung. \
+ Benachrichtigung nicht mehr anzeigen.
+GenericNotice.Button.continue.text=Weiter
+
+# ImageDetailsWindowLayout
+ImageDetails.Label.description.text=Beschreibung
+ImageDetails.Button.changeOwner.text=Ändern
+ImageDetails.Label.owner.text=Besitzer
+ImageDetails.Label.createTime.text=Erstellt am
+ImageDetails.Label.updater.text=Geändert durch
+ImageDetails.Label.updateTime.text=Geändert am
+ImageDetails.Label.OS.text=Betriebssystem
+ImageDetails.Label.shareMode.text=Freigabemodus
+ImageDetails.CheckBox.isTemplate.text=Vorlage
+ImageDetails.Label.version.text=Versions-ID
+ImageDetails.Label.ID.text=VM-ID
+ImageDetails.Label.virtualizer.text=Virtualisierer
+ImageDetails.Label.linkedLectureCount.text=Veranstaltungen
+ImageDetails.Button.showLinkingLectures.text=Anzeigen
+ImageDetails.Button.updateImage.text=Neue VM-Version hochladen
+ImageDetails.Button.updateImage.description=Neue VM-Version
+ImageDetails.Button.uploadToMaster.text=Landesweit veröffentlichen
+ImageDetails.Button.uploadToMaster.description=VM veröffentlichen
+ImageDetails.TitledBorder.defaultPermissionPane.title=Andere Nutzer
+ImageDetails.Label.defaultPerms.text=<html><body style='width:100%'>\
+ Hier können Sie Rechte für nicht in der Liste angegebene Nutzer festlegen:</body></html>
+ImageDetails.CheckBox.permAdmin.text=Admin
+ImageDetails.CheckBox.permDownload.text=Download
+ImageDetails.CheckBox.permEdit.text=Bearbeiten
+ImageDetails.CheckBox.permLink.text=Verlinken
+ImageDetails.Button.saveChanges.text=Speichern
+ImageDetails.Button.close.text=Schließen
+ImageDetails.Tab.overview.title=Übersicht
+ImageDetails.Tab.versions.title=VM-Versionen
+ImageDetails.Tab.permissions.title=Berechtigungen
+ImageDetails.Label.ImageName.text=Image Name
+ImageDetails.Label.ContainerRunOptions.text=Container Start Optionen
+
+# ImageListWindowLayout
+ImageList.Label.title.text=Übersicht Virtuelle Maschinen
+ImageList.Label.info.text=Hier können Sie Virtuelle Maschinen hochladen, herunterladen, bearbeiten und löschen.
+ImageList.Button.newVM.text=Neue VM
+ImageList.Button.newVM.description=Neue VM
+ImageList.Button.newLecture.text=Neue Veranstaltung
+ImageList.Button.newLecture.description=Neue Veranstaltung
+ImageList.Button.edit.text=Bearbeiten
+ImageList.Button.edit.description=VM bearbeiten
+ImageList.Button.download.text=Download
+ImageList.Button.download.description=VM herunterladen
+ImageList.Button.delete.text=Löschen
+ImageList.Button.delete.description=VM löschen
+ImageList.Button.switchView.text=Veranstaltungen zeigen
+ImageList.Button.switchView.description=Wechseln
+ImageList.Button.showPublishedImages.text=Öffentliche VMs
+ImageList.Button.showPublishedImages.description=Veröffentlichte VMs
+
+# ImagePublishedWindowLayout
+ImagePublished.Dialog.title=Öffentliche VMs
+ImagePublished.Label.filterPanel.text=Suchen:
+ImagePublished.Button.download.text=Herunterladen
+ImagePublished.Button.download.description=Herunterladen
+ImagePublished.Button.satDownload.text=Auf Satellit herunterladen
+ImagePublished.Button.satDownload.description=Auf Satellit herunterladen
+ImagePublished.Button.close.text=Schließen
+
+# LectureChangeImageLayout
+LectureChangeImage.Dialog.title=VM zum Verlinken auswählen
+LectureChangeImage.Button.ok.text=Übernehmen
+LectureChangeImage.Button.close.text=Abbrechen
+
+# LectureDetailsWindowLayout
+LectureDetails.Dialog.title=Veranstaltungsdetails
+LectureDetails.Label.owner.text=Besitzer
+LectureDetails.Label.createTime.text=Erstellt am
+LectureDetails.Label.updater.text=Geändert durch
+LectureDetails.Label.updateTime.text=Geändert am
+LectureDetails.Label.imageName.text=Verknüpfte VM
+LectureDetails.Label.startTime.text=Startdatum
+LectureDetails.Label.endTime.text=Enddatum
+LectureDetails.Label.useCount.text=Aufrufe
+LectureDetails.Label.title.text=Name
+LectureDetails.Label.description.text=Beschreibung
+LectureDetails.Label.ID.text=ID
+LectureDetails.Button.changeOwner.text=Ändern
+LectureDetails.Button.linkImage.text=Ändern
+LectureDetails.CheckBox.autoUpdate.text=Immer aktuellste Version verwenden
+LectureDetails.ComboBox.versionInvalid.text= [ungültig]
+LectureDetails.Button.downloadImage.text=Download
+LectureDetails.Button.downloadImage.toolTipText=Momentan verwendete Version herunterladen
+LectureDetails.Label.version.text=VM-Version
+LectureDetails.CheckBox.isActive.text=Veranstaltung aktiv
+LectureDetails.CheckBox.hasInternetAccess.text=Netzwerk-/Internetzugriff zulassen
+LectureDetails.Label.hasInternetAccess.text=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.
+LectureDetails.CheckBox.hasUSBAccess.text=Externe Speichermedien zulassen
+LectureDetails.Label.hasUSBAccess.text=Legen Sie hier fest, ob die Veranstaltung den Zugriff \
+ auf Speichermedien (CD, USB, ...) erlauben soll
+LectureDetails.CheckBox.isExam.text=Prüfungsmodus
+LectureDetails.Label.isExam.text=Markieren Sie diese Veranstaltung als E-Prüfung.\n\
+ Die Veranstaltung wird nur dann startbar sein, wenn {0} in den Prüfungsmodus versetzt wird. \
+ Kontaktieren Sie dazu Ihren lokalen {1}-Administrator.
+LectureDetails.TitledBorder.defaultPermissionPane.title=Andere Nutzer
+LectureDetails.CheckBox.permEdit.text=Bearbeiten
+LectureDetails.CheckBox.permAdmin.text=Admin
+LectureDetails.Tab.info.title=Übersicht
+LectureDetails.Tab.general.title=Allgemein
+LectureDetails.Tab.restrictions.title=Beschränkungen
+LectureDetails.Tab.netRules.title=Firewall
+LectureDetails.Tab.locations.title=Raumauswahl
+LectureDetails.Tab.runScript.title=VM-Start
+LectureDetails.Tab.permissions.title=Berechtigungen
+LectureDetails.Tab.netShare.title=Netzlaufwerke
+LectureDetails.Tab.ldapFilter.title=LDAP-Filter
+LectureDetails.Button.close.text=Schließen
+LectureDetails.Button.saveChanges.text=Speichern
+
+# LectureListWindowLayout
+LectureList.Label.title.text=Übersicht Veranstaltungen
+LectureList.Label.info.text=Hier können Sie Veranstaltungen anlegen, bearbeiten und löschen.
+LectureList.TitledBorder.filterPanel.title=Suchen
+LectureList.Label.visibleLectureCount.text=Sichtbar:
+LectureList.Button.newLecture.text=Neue Veranstaltung
+LectureList.Button.newLecture.description=Neue Veranstaltung
+LectureList.Button.editLecture.text=Bearbeiten
+LectureList.Button.editLecture.description=Veranstaltung bearbeiten
+LectureList.Button.deleteLecture.text=Löschen
+LectureList.Button.deleteLecture.description=Veranstaltung löschen
+LectureList.Button.switchView.text=VMs zeigen
+LectureList.Button.switchView.description=Wechseln
+LectureList.CheckBox.searchInDescription.text=Suche in Beschreibung
+
+# LocationSelectionWindowLayout
+LocationSelection.Label.info.text=Hier können Sie die Räume auswählen, \
+ in denen diese Veranstaltung sichtbar sein soll.
+LocationSelection.Button.close.text=Abbrechen
+LocationSelection.Button.saveChanges.text=Übernehmen
+
+# LoginWindowLayout
+Login.Dialog.title={0} - Login
+Login.RadioButton.loginType.text.0=Authentifizierung über {0}
+Login.RadioButton.loginType.text.1=Test-Zugang mit festem Benutzer
+Login.RadioButton.loginType.text.2=Direkter Zugang zum Satelliten
+Login.Button.settings.text=Einstellungen
+Login.Button.logDir.text=Logverzeichnis
+Login.Button.login.text=Login
+Login.CheckBox.saveUsername.text=Benutzername speichern
+Login.Button.openRegistration.text=Registrieren
+Login.TitledBorder.loginFormPanel.title=Zugangsdaten
+Login.Label.organization.text=Identity Provider
+Login.Label.username.text=Benutzername
+Login.Label.password.text=Passwort
+Login.TitledBorder.loginTypePanel.title=Authentifizierungsart
+Login.TitledBorder.advancedPanel.title=Erweitert
+Login.ComboBox.organization.emptyText=Wird geladen...
+
+# MainMenuWindowLayout
+MainMenu.TitledBorder.title={0} Hauptmenü
+MainMenu.Label.vmLogo.description=VM-Übersicht
+MainMenu.Label.vmInfo.text=<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>
+MainMenu.Label.lecturesLogo.description=Veranstaltungen
+MainMenu.Label.lecturesInfo.text=<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>
+MainMenu.Button.showVMs.text=Zu den VMs
+MainMenu.Button.showLectures.text=Zu den Veranstaltungen
+
+# SatelliteListWindowLayout
+SatelliteList.Dialog.title=Satellitenserver wählen
+SatelliteList.Label.satList.text=Vorgegebene Server
+SatelliteList.Label.customAddress.text=Server-Adresse selbst eingeben
+SatelliteList.Button.cancel.text=Abbrechen
+SatelliteList.Button.continue.text=Weiter
+
+# UserListWindowLayout
+UserList.Dialog.title=Benutzerliste
+UserList.Label.filterPanel.text=Suchen:
+UserList.Button.cancel.text=Schließen
+
+# VirtConfigEditorWindowLayout
+VirtConfigEditor.Dialog.title=VM-Konfiguration Editor
+VirtConfigEditor.TitledBorder.pnlWarning.title=WARNUNG
+VirtConfigEditor.Label.pnlWarning.text=<html>Änderungen an der VM-Konfiguration können zu Funktionsstörungen führen.\
+ <br>Benutzung auf eigene Gefahr!</html>
+VirtConfigEditor.Button.cancel.text=Abbrechen
+VirtConfigEditor.Button.save.text=Speichern
+
+# VirtDropDownConfigEditorWindowLayout
+VirtDropDownConfigEditor.Dialog.title=VM-Konfiguration Editor
+VirtDropDownConfigEditor.TitledBorder.pnlWarning.title=WARNUNG
+VirtDropDownConfigEditor.Label.pnlWarning.text=Hier können Sie einige Einstellungen bzgl. der \
+ verwendeten virtuellen 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.
+VirtDropDownConfigEditor.Label.sound.text=Soundkarte
+VirtDropDownConfigEditor.Label.3DAcceleration.text=3D-Beschleunigung
+VirtDropDownConfigEditor.Label.HWVersion.text=VMWare HW-Version
+VirtDropDownConfigEditor.Label.E0VirtDev.text=Netzwerkkarte
+VirtDropDownConfigEditor.Label.maxUSBSpeed.text=USB
+VirtDropDownConfigEditor.Button.more.text=Expertenmodus
+VirtDropDownConfigEditor.Button.cancel.text=Abbrechen
+VirtDropDownConfigEditor.Button.save.text=Speichern \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/window_layout_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/window_layout_tr_TR.properties
new file mode 100644
index 00000000..57fe904e
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/window_layout_tr_TR.properties
@@ -0,0 +1,245 @@
+# CheckUpdateWindowLayout
+CheckUpdate.Dialog.title=Sürüm
+CheckUpdate.TitledBorder.infoPanel.title=Güncelleme
+CheckUpdate.Label.localVersion.text=Mevcut sürüm
+CheckUpdate.Label.remoteVersion.text=En son sürüm
+CheckUpdate.TitledBorder.changelogPanel.title=Değişiklik kaydı
+CheckUpdate.Button.link.text=İndirme portalına git
+CheckUpdate.Button.close.text=Kapat
+
+# ConfigWindowLayout
+Config.Dialog.title={0} - Yapılandırma
+Config.Label.mailNotifications.text=E-posta bildirimleri
+Config.CheckBox.sendMeMail.text=Sanal makine ve etkinlik değişiklikleri hakkında e-posta ile bilgilendir
+Config.Label.sendMeMail.text=Bu seçenek için sunucunun e-posta gönderecek şekilde yapılandırılmış olması gerekir.
+Config.Label.proxyConfig.text=Ara sunucu
+Config.RadioButton.proxyNone.text=Ara sunucu kullanma
+Config.RadioButton.proxyAuto.text=Ara sunucu ayarlarını otomatik olarak algıla
+Config.Label.fontConfig.text=Yazı boyutu (%)
+Config.Label.fontConfigInfo.text=Bu işlev henüz test aşamasındadır. Görüntüleme hataları oluşabilir.
+Config.Label.lookAndFeel.text=LookAndFeel
+Config.Label.lookAndFeelInfo.text=Burada, arayüz görünümünü değiştirmek için birbirinden farklı ''LookAndFeels'' \
+ temaları arasında seçim yapabilirsiniz.
+Config.Label.concurrentConnections.text=Transfer başına bağlantı sayısı
+Config.Label.concurrentConnectionsInfo.text=En iyi sonuçlar genellikle bu ayar 1''de \
+ bırakıldığı zaman elde edilir. Şayet aktarım hızı \
+ ağ bağlantı kapasitenizi aşmıyorsa, bir sonraki yüksek değeri \
+ deneyebilirsiniz. Çok yüksek değerler aktarım hızını olumsuz etkileyebilir \
+ ve satelit sunucusunun aşırı yüklenmesine sebep olabilir.
+Config.Label.language.text=Dil
+Config.Label.languageInfo.text=Burada diller arasında geçiş yapabilirsiniz.
+Config.Button.close.text=Kapat
+Config.Button.save.text=Kaydet
+
+# GenericNoticeWindowLayout
+GenericNotice.TitledBorder.noticePanel.title=Not
+GenericNotice.Label.noticePanel.text=Lütfen aşağıdaki yasal bilgileri okuyun ve onaylayın:
+GenericNotice.CheckBox.agree.text=Evet, anlaşmayı kabul ediyorum. \
+ Bu bildirimi bir daha gösterme.
+GenericNotice.Button.continue.text=İleri
+
+# ImageDetailsWindowLayout
+ImageDetails.Label.description.text=Açıklama
+ImageDetails.Button.changeOwner.text=Değiştir
+ImageDetails.Label.owner.text=Sahibi
+ImageDetails.Label.createTime.text=Oluşturulma tarihi
+ImageDetails.Label.updater.text=Değiştiren
+ImageDetails.Label.updateTime.text=Değişiklik tarihi
+ImageDetails.Label.OS.text=İşletim sistemi
+ImageDetails.Label.shareMode.text=Paylaşım modu
+ImageDetails.CheckBox.isTemplate.text=Şablon
+ImageDetails.Label.version.text=Sürüm ID
+ImageDetails.Label.ID.text=Sanal makine ID
+ImageDetails.Label.virtualizer.text=Sanallaştırıcı
+ImageDetails.Label.linkedLectureCount.text=Etkinlikler
+ImageDetails.Button.showLinkingLectures.text=Göster
+ImageDetails.Button.updateImage.text=Yeni sanal makine sürümü yükle
+ImageDetails.Button.updateImage.description=Yeni sanal makine sürümü
+ImageDetails.Button.uploadToMaster.text=Ülke çapında yayınla
+ImageDetails.Button.uploadToMaster.description=Sanal makineyi yayınla
+ImageDetails.TitledBorder.defaultPermissionPane.title=Diğer kullanıcılar
+ImageDetails.Label.defaultPerms.text=<html><body style='width:100%'>\
+ Burada, listede olmayan diğer kullanıcılar için erişim izinleri tanımlayabilirsiniz:</body></html>
+ImageDetails.CheckBox.permAdmin.text=Yönetim
+ImageDetails.CheckBox.permDownload.text=İndirme
+ImageDetails.CheckBox.permEdit.text=Düzenleme
+ImageDetails.CheckBox.permLink.text=Bağlantı ekleme
+ImageDetails.Button.saveChanges.text=Kaydet
+ImageDetails.Button.close.text=Kapat
+ImageDetails.Tab.overview.title=Genel görünüm
+ImageDetails.Tab.versions.title=Sanal makine sürümleri
+ImageDetails.Tab.permissions.title=Erişim izinleri
+ImageDetails.Label.ImageName.text=Görüntü adı
+ImageDetails.Label.ContainerRunOptions.text=Container başlatma seçenekleri
+
+# ImageListWindowLayout
+ImageList.Label.title.text=Sanal makineler genel görünümü
+ImageList.Label.info.text=Burada sanal makineler yükleyebilir, indirebilir, düzenleyebilir veya silebilirsiniz.
+ImageList.Button.newVM.text=Yeni sanal makine
+ImageList.Button.newVM.description=Yeni sanal makine
+ImageList.Button.newLecture.text=Yeni etkinlik
+ImageList.Button.newLecture.description=Yeni etkinlik
+ImageList.Button.edit.text=Düzenle
+ImageList.Button.edit.description=Sanal makineyi düzenle
+ImageList.Button.download.text=İndir
+ImageList.Button.download.description=Sanal makineyi indir
+ImageList.Button.delete.text=Sil
+ImageList.Button.delete.description=Sanal makineyi sil
+ImageList.Button.switchView.text=Etkinlikleri göster
+ImageList.Button.switchView.description=Etkinlik görünümüne geç
+ImageList.Button.showPublishedImages.text=Herkese açık sanal makineler
+ImageList.Button.showPublishedImages.description=Yayınlanmış sanal makineler
+
+# ImagePublishedWindowLayout
+ImagePublished.Dialog.title=Herkese açık sanal makineler
+ImagePublished.Label.filterPanel.text=Arama:
+ImagePublished.Button.download.text=İndir
+ImagePublished.Button.download.description=İndir
+ImagePublished.Button.satDownload.text=Satelit sunucusuna indir
+ImagePublished.Button.satDownload.description=Satelit sunucusuna indir
+ImagePublished.Button.close.text=Kapat
+
+# LectureChangeImageLayout
+LectureChangeImage.Dialog.title=Bağlantı olarak eklemek için sanal makine seçin
+LectureChangeImage.Button.ok.text=Uygula
+LectureChangeImage.Button.close.text=İptal
+
+# LectureDetailsWindowLayout
+LectureDetails.Dialog.title=Etkinlik detayları
+LectureDetails.Label.owner.text=Sahibi
+LectureDetails.Label.createTime.text=Oluşturulma tarihi
+LectureDetails.Label.updater.text=Değiştiren
+LectureDetails.Label.updateTime.text=Değiştirilme tarihi
+LectureDetails.Label.imageName.text=Bağlantılı sanal makine
+LectureDetails.Label.startTime.text=Başlangıç tarihi
+LectureDetails.Label.endTime.text=Bitiş tarihi
+LectureDetails.Label.useCount.text=Görüntülenme sayısı
+LectureDetails.Label.title.text=İsim
+LectureDetails.Label.description.text=Açıklama
+LectureDetails.Label.ID.text=ID
+LectureDetails.Button.changeOwner.text=Değiştir
+LectureDetails.Button.linkImage.text=Değiştir
+LectureDetails.CheckBox.autoUpdate.text=Her zaman en son sürümü kullan
+LectureDetails.ComboBox.versionInvalid.text= [geçersiz]
+LectureDetails.Button.downloadImage.text=İndir
+LectureDetails.Button.downloadImage.toolTipText=Kullanılmakta olan sürümü indir
+LectureDetails.Label.version.text=Sanal makine sürümü
+LectureDetails.CheckBox.isActive.text=Etkinlik aktif
+LectureDetails.CheckBox.hasInternetAccess.text=Ağ/internet erişimine izin ver
+LectureDetails.Label.hasInternetAccess.text=Etkinliğin internet erişimi olup olmayacağını burada ayarlayabilirsiniz. \
+ Belirli adresleri veya hizmetleri listeye dâhil edebilir yahut listeden çıkartabilirsiniz.
+LectureDetails.CheckBox.hasUSBAccess.text=Harici depolama ortamına izin ver
+LectureDetails.Label.hasUSBAccess.text=Etkinliğin depolama ortamına (CD, USB, ...) erişime \
+ izin verip vermeyeceğini burada ayarlayabilirsiniz
+LectureDetails.CheckBox.isExam.text=Sınav modu
+LectureDetails.Label.isExam.text=Bu etkinliği bir e-sınav olarak işaretle.\n\
+ Etkinlik ancak {0} sınav moduna alınırsa başlatılabilir. \
+ Bunun için yerel {1} yöneticinize başvurun.
+LectureDetails.TitledBorder.defaultPermissionPane.title=Diğer kullanıcılar
+LectureDetails.CheckBox.permEdit.text=Düzenleme
+LectureDetails.CheckBox.permAdmin.text=Yönetim
+LectureDetails.Tab.info.title=Genel görünüm
+LectureDetails.Tab.general.title=Genel
+LectureDetails.Tab.restrictions.title=Kısıtlamalar
+LectureDetails.Tab.netRules.title=Güvenlik duvarı
+LectureDetails.Tab.locations.title=Oda seçimi
+LectureDetails.Tab.runScript.title=Sanal makine başlangıç komutları
+LectureDetails.Tab.permissions.title=Erişim izinleri
+LectureDetails.Tab.netShare.title=Ağ sürücüleri
+LectureDetails.Tab.ldapFilter.title=LDAP filtreleri
+LectureDetails.Button.close.text=Kapat
+LectureDetails.Button.saveChanges.text=Kaydet
+
+# LectureListWindowLayout
+LectureList.Label.title.text=Etkinlikler genel görünümü
+LectureList.Label.info.text=Burada etkinlikler oluşturabilir, düzenleyebilir veya silebilirsiniz.
+LectureList.TitledBorder.filterPanel.title=Arama
+LectureList.Label.visibleLectureCount.text=Görüntülenen:
+LectureList.Button.newLecture.text=Yeni etkinlik
+LectureList.Button.newLecture.description=Yeni etkinlik
+LectureList.Button.editLecture.text=Düzenle
+LectureList.Button.editLecture.description=Etkinliği düzenle
+LectureList.Button.deleteLecture.text=Sil
+LectureList.Button.deleteLecture.description=Etkinliği sil
+LectureList.Button.switchView.text=Sanal makineleri göster
+LectureList.Button.switchView.description=Sanal makine görünümüne geç
+LectureList.CheckBox.searchInDescription.text=Açıklamada ara
+
+# LocationSelectionWindowLayout
+LocationSelection.Label.info.text=Burada, bu etkinliğin görünür \
+ olması gereken odaları seçebilirsiniz.
+LocationSelection.Button.close.text=İptal
+LocationSelection.Button.saveChanges.text=Uygula
+
+# LoginWindowLayout
+Login.Dialog.title={0} - Oturum aç
+Login.RadioButton.loginType.text.0={0} üzerinden kimlik doğrulama
+Login.RadioButton.loginType.text.1=Test erişimi
+Login.RadioButton.loginType.text.2=Satelit sunucusuna doğrudan erişim
+Login.Button.settings.text=Ayarlar
+Login.Button.logDir.text=Günlük dizini
+Login.Button.login.text=Giriş yap
+Login.CheckBox.saveUsername.text=Kullanıcı adını hatırla
+Login.Button.openRegistration.text=Kayıt ol
+Login.TitledBorder.loginFormPanel.title=Giriş bilgileri
+Login.Label.organization.text=Kimlik sağlayıcı
+Login.Label.username.text=Kullanıcı adı
+Login.Label.password.text=Şifre
+Login.TitledBorder.loginTypePanel.title=Kimlik doğrulama türü
+Login.TitledBorder.advancedPanel.title=Gelişmiş
+Login.ComboBox.organization.emptyText=Yükleniyor...
+
+# MainMenuWindowLayout
+MainMenu.TitledBorder.title={0} Anasayfa
+MainMenu.Label.vmLogo.description=Sanal makineler
+MainMenu.Label.vmInfo.text=<html><b>Sanal makineler genel görünümü</b><br>\
+ Mevcut sanal makinelerin genel görünümüne geçiş yapabilirsiniz.<br>Burada:<br><br>\
+ 1) Sanal makineye dayalı etkinlikler oluşturabilir,<br>\
+ 2) Yeni sanal makineler yükleyebilir,<br>\
+ 3) Sanal makineleri indirebilir,<br>\
+ 4) Sanal makineleri düzenleyebilir veya silebilirsiniz.</html>
+MainMenu.Label.lecturesLogo.description=Etkinlikler
+MainMenu.Label.lecturesInfo.text=<html><b>Etkinlikler genel görünümü</b><br>\
+ Mevcut etkinliklerin genel görünümüne geçiş yapabilirsiniz.<br>Burada:<br><br>\
+ 1) Etkinlikleri düzenleyebilir veya silebilir,<br>\
+ 2) Etkinliklere ait sanal makineleri indirebilirsiniz.<br>&nbsp;</html>
+MainMenu.Button.showVMs.text=Sanal makinelere git
+MainMenu.Button.showLectures.text=Etkinliklere git
+
+# SatelliteListWindowLayout
+SatelliteList.Dialog.title=Satelit sunucusu seçimi
+SatelliteList.Label.satList.text=Varsayılan sunucu
+SatelliteList.Label.customAddress.text=Sunucu adresini kendiniz girin
+SatelliteList.Button.cancel.text=İptal
+SatelliteList.Button.continue.text=İleri
+
+# UserListWindowLayout
+UserList.Dialog.title=Kullanıcı listesi
+UserList.Label.filterPanel.text=Arama:
+UserList.Button.cancel.text=Kapat
+
+# VirtConfigEditorWindowLayout
+VirtConfigEditor.Dialog.title=Sanal makine yapılandırma düzenleyicisi
+VirtConfigEditor.TitledBorder.pnlWarning.title=UYARI
+VirtConfigEditor.Label.pnlWarning.text=<html>Sanal makine yapılandırmasındaki değişiklikler işlev bozukluklarına \
+ yol açabilir.<br>Sorumluluk size aittir!</html>
+VirtConfigEditor.Button.cancel.text=İptal
+VirtConfigEditor.Button.save.text=Kaydet
+
+# VirtDropDownConfigEditorWindowLayout
+VirtDropDownConfigEditor.Dialog.title=Sanal makine yapılandırma düzenleyicisi
+VirtDropDownConfigEditor.TitledBorder.pnlWarning.title=UYARI
+VirtDropDownConfigEditor.Label.pnlWarning.text=Burada, kullanılan sanal donanıma ilişkin \
+ bazı ayarları değiştirebilirsiniz. Değişikliklerin sanal makinede \
+ yeni sürücülerin bulunmasını gerektirebileceğini \
+ lütfen unutmayın. Bu durumda, sanal makineyi indirdikten sonra \
+ değişikliği lokal olarak yapmanız, gerekli sürücüleri kurmanız \
+ ve sanal makineyi tekrar yüklemeniz gerekir.
+VirtDropDownConfigEditor.Label.sound.text=Ses kartı
+VirtDropDownConfigEditor.Label.3DAcceleration.text=3D hızlandırıcı
+VirtDropDownConfigEditor.Label.HWVersion.text=VMWare donanım sürümü
+VirtDropDownConfigEditor.Label.E0VirtDev.text=Ethernet kartı
+VirtDropDownConfigEditor.Label.maxUSBSpeed.text=USB
+VirtDropDownConfigEditor.Button.more.text=Uzman modu
+VirtDropDownConfigEditor.Button.cancel.text=İptal
+VirtDropDownConfigEditor.Button.save.text=Kaydet \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/window_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/window_tr_TR.properties
new file mode 100644
index 00000000..1d5e2f93
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/window_tr_TR.properties
@@ -0,0 +1,147 @@
+# BwIdmLinkWindow
+BwIdmLink.Dialog.title=Kayıt olmanız gerekiyor
+BwIdmLink.Label.info.title=Uyarı
+BwIdmLink.Label.info.text=<html><body style='width:100%'>\
+ {0} sisteminde kayıtlı değilsiniz. \
+ Lütfen kaydolmak için belirtilen sayfaya gidin ve tekrar deneyin.\
+ </body></html>
+BwIdmLink.Button.link.text=Sayfayı tarayıcıda aç
+BwIdmLink.Button.ok.text=Kapat
+
+# ConfigWindow
+Config.Label.yourAddress.text=Adresiniz {0}
+Config.Message.error.couldNotGetUserConfFromSat=Satelit sunucusundan kullanıcıya özel yapılandırma \
+ alınamadı
+Config.Message.error.couldNotSaveUserConfOnSat=Kullanıcıya özel yapılandırma satelit sunucusuna \
+ kaydedilemedi
+Config.Message.info.restartNeededToApplyChanges=Değişiklikler ancak program yeniden başlatıldıktan sonra \
+ geçerli olur.
+
+# GenericNoticeWindow
+GenericNotice.Button.continue.text=Kapat
+GenericNotice.Message.yesNo.closeWindow=Bu yasal uyarıyı kabul etmediğiniz takdirde \
+ yazılımı kullanamazsınız! \
+ İptal etmek istediğinizden emin misiniz?
+
+# ImageDetailsWindow
+ImageDetails.MenuItem.newLecture.text=Yeni etkinlik
+ImageDetails.MenuItem.download.text=İndir
+ImageDetails.MenuItem.vmConfig.text=Sanal makine yapılandırması
+ImageDetails.MenuItem.delete.text=Sil
+ImageDetails.MenuItem.extendExpirationDate.text=Geçerlilik tarihini uzat
+ImageDetails.Message.yesNo.changeOwner=Sahiplik haklarını başka bir kullanıcıya \
+ aktarmak istediğinizden emin misiniz?
+ImageDetails.Button.changeOwner.caption=Sahibi ayarla
+ImageDetails.TextField.title.error=İsim boş bırakılamaz
+ImageDetails.TextField.description.error=Açıklama boş bırakılamaz
+ImageDetails.ComboBox.OS.error=Geçersiz işletim sistemi seçildi!
+ImageDetails.ComboBox.shareMode.error=Geçersiz işletim sistemi seçildi!
+ImageDetails.Message.error.couldNotRetrieveVMConfig=Sanal makine yapılandırması alınamadı.
+ImageDetails.Message.info.setImageOwner=Sahiplik haklarını {0} kullanıcısına aktar
+ImageDetails.Message.error.publishNonVMWareImage={0} henüz ülke çapında genel kullanım için yayınlanmış değil.
+ImageDetails.Message.yesNo.currentlyModified=Kaydedilmemiş değişiklikleriniz var, önce bunları kaydetmek ister misiniz?
+ImageDetails.Message.yesNo.confirmOrAbort=Bu sanal makineyi ülke çapında yayınlamak istediğinizden emin misiniz?
+ImageDetails.Message.error.uploadFailed=Sanal makinenin master sunucusuna yüklenmesi başarısız oldu. \
+ Kayıt olurken ülke çapında sanal makine değişimini kabul edip etmediğinizi kontrol edin.\n \
+ Bunu buradan kontrol edebilirsiniz:\n \
+ {0} \n\n
+ImageDetails.Message.info.passiveTransfer=Aktarım doğrudan satelit ve {0} merkez sunucusu arasında \
+ gerçekleşir.\n {1} uygulamasını kapatsanız bile aktarım devam eder.
+ImageDetails.Message.error.saveChangesInternal=Güncellenmiş meta veriler sunucuya gönderilemedi
+ImageDetails.Message.error.saveCustomPermissions=Değiştirilmiş erişim izinleri sunucuya gönderilemedi
+ImageDetails.Message.error.performImageDownload=Seçilen sürüm geçersiz
+ImageDetails.Message.error.extendVersionExpiry={0} sürümünün geçerlilik tarihi uzatılamadı.
+ImageDetails.Message.info.extendVersionExpiry=Başarılı bir şekilde uzatılmış olan imajlar: {0}
+ImageDetails.Message.yesNo.safeClose=Değişiklikler iptal edilecek, gerçekten kapatmak istiyor musunuz?
+ImageDetails.Constraint.NoEmptyDockerfile.text=Dockerfile boş bırakılamaz!
+ImageDetails.Constraint.NoEmptyName.text=Görüntü adı boş bırakılamaz!
+ImageDetails.Constraint.NoEmptyRunOptions.text=Container başlatma seçenekleri girilmedi!
+
+# ImageListWindow
+ImageList.MenuItem.newLecture.text=Yeni etkinlik
+ImageList.MenuItem.edit.text=Detay görünümü
+ImageList.MenuItem.delete.text=Sil
+ImageList.MenuItem.download.text=İndir
+ImageList.Message.error.hasLatestVersion=Seçilen sanal makinenin geçerli bir imaj sürümü yok
+ImageList.Message.info.deleteImages=Aşağıdaki imajlar silinemedi: {0}
+
+# ImagePublishedWindow
+ImagePublished.Message.error.satDownload=İndirme başlatılamadı
+ImagePublished.Message.info.satDownload=Aktarım doğrudan satelit ve {0} merkez sunucusu arasında \
+ gerçekleşir.\n {1} uygulamasını kapatsanız bile aktarım devam eder.
+
+# LectureChangeImage
+LectureChangeImage.Message.error.imageInvalid=Seçilen sanal makine geçersiz!
+LectureChangeImage.Message.error.canNotLinkToVM=Seçilen sanal makineye bağlantı ekleme hakkı yok.
+
+# LectureDetailsWindow
+LectureDetails.ComboBox.versions.error=Hiçbir sanal makine sürümü seçilmedi yada geçersiz sanal makine sürümü seçildi
+LectureDetails.Message.error.endAfterStart=Bitiş tarihi başlangıç tarihinden önce olmamalıdır
+LectureDetails.Message.error.endAfterMaxValidity=Bitiş tarihi {0} tarihinden sonra
+LectureDetails.TextField.title.error=Etkinlik adı boş bırakılamaz
+LectureDetails.TextField.description.error=Açıklama boş bırakılamaz
+LectureDetails.NetRulesConfigurator.error=Hatalı ağ kuralları
+LectureDetails.Message.yesNo.changeOwner=Sahiplik haklarını başka bir kullanıcıya \
+ aktarmak istediğinizden emin misiniz?
+LectureDetails.Button.changeOwner.caption=Sahibi ayarla
+LectureDetails.Message.info.setLectureOwner=Sahiplik haklarını {0} kullanıcısına aktar
+LectureDetails.Message.error.imageInvalid=Sanal makine geçersiz.
+LectureDetails.Message.error.imageVersionInvalid=Geçersiz sanal makine sürümü seçildi
+LectureDetails.Message.error.imageVersionFileSizeInvalid=Sanal makine imajının boyutu sorgulanırken hata oluştu.
+LectureDetails.Message.error.saveChangesInternal=Etkinlik kaydedilirken hata oluştu!
+LectureDetails.Message.error.saveCustomPermissions=Erişim izinleri aktarılırken hata oluştu!
+LectureDetails.Message.error.isPeriodValid=Etkinlik bitiş tarihinden sonra başlıyor!
+LectureDetails.Message.yesNo.safeClose=Değişiklikler iptal edilecek, gerçekten kapatmak istiyor musunuz?
+
+# LectureListWindow
+LectureList.FilterType.all=Tümünü göster
+LectureList.FilterType.own=Yalnızca kendimin/bana atanmış olanları göster
+LectureList.FilterType.active=Yalnızca aktif olanları göster
+LectureList.FilterType.editable=Yalnızca düzenlenebilir olanları göster
+LectureList.FilterType.expiring=Yakında sona erecek olanları göster
+LectureList.FilterType.exams=Sınav etkinliklerini göster
+LectureList.MenuItem.new.text=Yeni
+LectureList.MenuItem.edit.text=Detay görünümü
+LectureList.MenuItem.linked.text=Sanal makine detaylarını göster
+LectureList.MenuItem.download.text=Bağlantılı sanal makineyi indir
+LectureList.MenuItem.delete.text=Sil
+LectureList.Message.yesNo.switchView=Etkinlik oluşturabilmek için \
+ bir sanal makine seçmeniz gerekir. Sanal makine seçimine geçilsin mi?
+LectureList.Message.error.canNotListImages=Gerekli izinlere sahip değilsiniz.
+LectureList.Message.error.deleteLecture=Sebep: {0}
+LectureList.Message.info.deleteLectures=Aşağıdaki etkinlikler silinemedi: {0}
+
+# LocationSelectionWindow
+LocationSelection.Message.warning.saveChanges=Lütfen seçilen yerlerin sayısını azaltın
+LocationSelection.Message.error.locationSelector=Çok fazla yer seçildi!
+
+# LoginWindow
+Login.Message.error.noLoginType=Lütfen bir kimlik doğrulama türü seçin.
+Login.Message.error.noOrganization=Lütfen kuruluşunuzu ''Kimlik Sağlayıcı'' olarak seçin.
+Login.Message.error.noUsername=Kullanıcı adı girilmedi!
+Login.Message.error.noPassword=Şifre girilmedi!
+Login.Message.error.authIdentityProvider=Kimlik sağlayıcı hatası
+Login.Message.error.authServiceProvider=Servis sağlayıcıdan geçersiz belirteç!
+Login.Message.error.authInvalidURL=Geçersiz URL.
+Login.Message.error.authInternal=Dahili hata!
+Login.Message.error.authMasterServer=Master sunucu oturum açma girişimini \
+ aşağıdaki mesajla reddetti:\n\n{0}
+Login.Message.error.loginTypeDirectConnect=Henüz uygulanmadı
+Login.Message.error.loginTypeDefault=Hiçbir kimlik doğrulama türü seçilmedi!
+Login.Message.error.loginFailed=Giriş başarısız
+
+# SatelliteListWindow
+SatelliteList.Message.error.noSatellite=Hiçbir satelit sunucusu seçilmedi
+
+# VirtConfigEditorWindow
+VirtConfigEditor.Message.error.invalidInputTitle=Geçersiz girişler:\n
+VirtConfigEditor.Message.error.invalidInputText=Yine de kaydetmek istiyor musunuz? (Geçersiz satırlar \
+ otomatik olarak silinir.)
+VirtConfigEditor.Message.yesNo.safeClose=Bu penceredeki değişiklikleriniz kaybolacak, \
+ yine de iptal etmek istiyor musunuz?
+
+# VirtDropDownConfigEditorWindow
+VirtDropDownConfigEditor.Message.warning.initializeComboBoxes=En son yapılandırmanızda \n\
+ yanlış bir giriş kaydettiniz. \nSanal makine başlatılamayacak!
+VirtDropDownConfigEditor.Message.yesNo.safeClose=İptal etmek istediğinizden emin misiniz?\n\
+ Yaptığınız değişiklikler iptal edilecek. \ No newline at end of file
diff --git a/dozentenmodul/src/main/properties/i18n/wizard.properties b/dozentenmodul/src/main/properties/i18n/wizard.properties
new file mode 100644
index 00000000..95422c3d
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/wizard.properties
@@ -0,0 +1,27 @@
+# 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 option \
+ ''Contains software requiring a license'' for this virtual machine.
+ImageCreation.Message.error.UploadInitializationFailure=Upload initialisation failed
+ImageCreation.Message.yesNo.cancelRequest=Do you really want to cancel the process?
+
+# ImageUpdateWizard
+ImageUpdate.Message.error.updateImageVersionFailed=Unexpected error while setting the option \
+ ''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
diff --git a/dozentenmodul/src/main/properties/i18n/wizard_de_DE.properties b/dozentenmodul/src/main/properties/i18n/wizard_de_DE.properties
new file mode 100644
index 00000000..4422ee9c
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/wizard_de_DE.properties
@@ -0,0 +1,27 @@
+# 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.error.UploadInitializationFailure=Upload-Initialisierung fehlgeschlagen
+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_tr_TR.properties b/dozentenmodul/src/main/properties/i18n/wizard_tr_TR.properties
new file mode 100644
index 00000000..59c39569
--- /dev/null
+++ b/dozentenmodul/src/main/properties/i18n/wizard_tr_TR.properties
@@ -0,0 +1,27 @@
+# ImageCreationWizard
+ImageCreation.Wizard.title=Yeni sanal makine oluştur
+ImageCreation.Message.error.stateInvalid=Dahili bir hata oluştu.\n\nAyrıntılar günlük dosyasında.
+ImageCreation.Message.error.baseNotWritten=Sanal makine meta verileri satelit sunucusuna kaydedilemedi!
+ImageCreation.Message.error.permissionsNotWritten=Erişim izinleri satelit sunucusuna kaydedilemedi!
+ImageCreation.Message.error.updateImageVersionFailed=Bu sanal makine için ''Lisans gerektiren yazılım içeriyor'' \
+ seçeneği ayarlanırken beklenmedik bir hata oluştu.
+ImageCreation.Message.error.UploadInitializationFailure=Yükleme işlemi başlatılamadı
+ImageCreation.Message.yesNo.cancelRequest=İşlemi iptal etmek istediğinizden emin misiniz?
+
+# ImageUpdateWizard
+ImageUpdate.Message.error.updateImageVersionFailed=Bu sanal makine için ''Lisans gerektiren yazılım içeriyor'' \
+ seçeneği ayarlanırken beklenmedik bir hata oluştu.
+ImageUpdate.Message.yesNo.cancelRequest=İşlemi iptal etmek istediğinizden emin misiniz?
+ImageUpdate.Wizard.title=Yeni sanal makine sürümü
+
+# LectureWizard
+Lecture.Wizard.title=Yeni etkinlik oluştur
+Lecture.Message.yesNo.cancelRequest=İşlemi iptal etmek istediğinizden emin misiniz?
+Lecture.Message.info.finish=Etkinlik oluşturuldu!
+
+# Wizard
+Wizard.Button.prev.text=< Geri
+Wizard.Button.next.text=İleri >
+Wizard.Button.cancel.text=İptal
+Wizard.Button.finish.text.0=Bitir
+Wizard.Button.finish.text.1=Kapat \ No newline at end of file
diff --git a/dozentenmodul/src/main/resources/img/docker-icon.png b/dozentenmodul/src/main/resources/img/docker-icon.png
new file mode 100644
index 00000000..d7cd695b
--- /dev/null
+++ b/dozentenmodul/src/main/resources/img/docker-icon.png
Binary files differ
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java
index 6b672c86..da52a5b3 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java
@@ -57,7 +57,7 @@ public class DbImage {
// TODO: Implement tag search functionality
try (MysqlConnection connection = Database.getConnection()) {
MysqlStatement stmt = connection.prepareStatement("SELECT"
- + " i.imagebaseid, i.latestversionid, i.displayname,"
+ + " i.imagebaseid, i.latestversionid, i.displayname, i.description,"
+ " i.osid, i.virtid, i.createtime, i.updatetime, i.ownerid,"
+ " i.sharemode, i.istemplate, i.canlinkdefault, i.candownloaddefault,"
+ " i.caneditdefault, i.canadmindefault,"
@@ -87,7 +87,21 @@ public class DbImage {
public static ImageDetailsRead getImageDetails(UserInfo user, String imageBaseId)
throws TNotFoundException, SQLException {
try (MysqlConnection connection = Database.getConnection()) {
- MysqlStatement stmt = connection.prepareStatement("SELECT i.imagebaseid, i.latestversionid,"
+
+ // if Student is trying to download only needed information is filled
+ MysqlStatement stmt = null;
+ if (user.role.equals("STUDENT"))
+ {
+ stmt = connection.prepareStatement("SELECT i.imagebaseid, i.latestversionid,"
+ + " null, null, null, null, null, null, null, null,"
+ + " null, null,"
+ + " null, null, null, null,"
+ + " null, null, null, null"
+ + " FROM imagebase i"
+ + " LEFT JOIN imagepermission perm ON (i.imagebaseid = perm.imagebaseid AND perm.userid = :userid)"
+ + " WHERE i.imagebaseid = :imagebaseid");
+ } else {
+ stmt = connection.prepareStatement("SELECT i.imagebaseid, i.latestversionid,"
+ " i.displayname, i.description, i.osid, i.virtid, i.createtime, i.updatetime, i.ownerid, i.updaterid,"
+ " i.sharemode, i.istemplate,"
+ " i.canlinkdefault, i.candownloaddefault, i.caneditdefault, i.canadmindefault,"
@@ -95,6 +109,13 @@ public class DbImage {
+ " FROM imagebase i"
+ " LEFT JOIN imagepermission perm ON (i.imagebaseid = perm.imagebaseid AND perm.userid = :userid)"
+ " WHERE i.imagebaseid = :imagebaseid");
+ }
+
+
+
+ // if Student is trying to download only needed information is filled
+
+
stmt.setString("userid", user == null ? "-" : user.userId);
stmt.setString("imagebaseid", imageBaseId);
ResultSet rs = stmt.executeQuery();
@@ -102,7 +123,7 @@ public class DbImage {
throw new TNotFoundException();
// Exists:
List<String> tags = DbSoftwareTag.getImageTags(connection, imageBaseId);
- List<ImageVersionDetails> versions = getImageVersions(connection, imageBaseId);
+ List<ImageVersionDetails> versions = getImageVersions(connection, imageBaseId, user);
ImagePermissions defaultPermissions = DbImagePermissions.fromResultSetDefault(rs);
ImageDetailsRead image = new ImageDetailsRead(rs.getString("imagebaseid"),
rs.getString("latestversionid"), versions, rs.getString("displayname"),
@@ -188,8 +209,8 @@ public class DbImage {
private static ImageSummaryRead resultSetToSummary(UserInfo user, ResultSet rs) throws SQLException {
ImagePermissions defaultPermissions = DbImagePermissions.fromResultSetDefault(rs);
ImageSummaryRead entry = new ImageSummaryRead(rs.getString("imagebaseid"),
- rs.getString("latestversionid"), rs.getString("displayname"), rs.getInt("osid"),
- rs.getString("virtid"), rs.getLong("createtime"), rs.getLong("updatetime"),
+ rs.getString("latestversionid"), rs.getString("displayname"), rs.getString("description"),
+ rs.getInt("osid"), rs.getString("virtid"), rs.getLong("createtime"), rs.getLong("updatetime"),
rs.getLong("uploadtime"), rs.getLong("expiretime"), rs.getString("ownerid"),
rs.getString("uploaderid"), toShareMode(rs.getString("sharemode")), rs.getLong("filesize"),
rs.getByte("isrestricted") != 0, rs.getByte("isvalid") != 0, rs.getByte("isprocessed") != 0,
@@ -227,7 +248,7 @@ public class DbImage {
protected static ImageSummaryRead getImageSummary(MysqlConnection connection, UserInfo user,
String imageBaseId) throws SQLException, TNotFoundException {
MysqlStatement stmt = connection.prepareStatement("SELECT"
- + " i.imagebaseid, i.latestversionid, i.displayname,"
+ + " i.imagebaseid, i.latestversionid, i.displayname, i.description,"
+ " i.osid, i.virtid, i.createtime, i.updatetime, i.ownerid,"
+ " i.sharemode, i.istemplate, i.canlinkdefault, i.candownloaddefault,"
+ " i.caneditdefault, i.canadmindefault,"
@@ -247,13 +268,22 @@ public class DbImage {
return resultSetToSummary(user, rs);
}
- protected static List<ImageVersionDetails> getImageVersions(MysqlConnection connection, String imageBaseId)
+ protected static List<ImageVersionDetails> getImageVersions(MysqlConnection connection, String imageBaseId, UserInfo user)
throws SQLException {
List<ImageVersionDetails> versionList = new ArrayList<>();
- MysqlStatement stmt = connection.prepareStatement("SELECT"
- + " imageversionid, createtime, expiretime, filesize, uploaderid,"
- + " isrestricted, isvalid, isprocessed" + " FROM imageversion"
- + " WHERE imagebaseid = :imagebaseid");
+ MysqlStatement stmt = null;
+ if (user.role.equals("STUDENT")) {
+ stmt = connection.prepareStatement("SELECT"
+ + " imageversionid, createtime, expiretime, filesize, null,"
+ + " isrestricted, isvalid, isprocessed" + " FROM imageversion"
+ + " WHERE imagebaseid = :imagebaseid");
+ } else {
+ stmt = connection.prepareStatement("SELECT"
+ + " imageversionid, createtime, expiretime, filesize, uploaderid,"
+ + " isrestricted, isvalid, isprocessed" + " FROM imageversion"
+ + " WHERE imagebaseid = :imagebaseid");
+
+ }
stmt.setString("imagebaseid", imageBaseId);
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
index 3dc58d47..c07a0ed9 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
@@ -192,6 +192,7 @@ public class DbLecture {
LectureSummary lecture = new LectureSummary();
lecture.setLectureId(rs.getString("lectureid"));
lecture.setLectureName(rs.getString("lecturename"));
+ lecture.setDescription(rs.getString("description"));
lecture.setImageVersionId(rs.getString("imageversionid"));
lecture.setImageBaseId(rs.getString("imagebaseid"));
lecture.setIsEnabled(rs.getBoolean("isenabled"));
@@ -214,7 +215,7 @@ public class DbLecture {
}
private static final String summaryBaseSql = "SELECT"
- + " l.lectureid, l.displayname AS lecturename, l.imageversionid, i.imagebaseid,"
+ + " l.lectureid, l.displayname AS lecturename, l.description, l.imageversionid, i.imagebaseid,"
+ " l.isenabled, l.starttime, l.endtime, l.lastused, l.usecount, l.ownerid, l.updaterid,"
+ " l.isexam, l.hasinternetaccess, l.hasusbaccess, l.caneditdefault, l.canadmindefault,"
+ " i.isvalid AS imgvalid, perm.canedit, perm.canadmin"
@@ -566,7 +567,7 @@ public class DbLecture {
+ " FROM lecture l "
+ " INNER JOIN imageversion i USING (imageversionid)"
+ " INNER JOIN imagebase b USING (imagebaseid)"
- + " INNER JOIN os_x_virt o USING (osid, virtid)" + " WHERE l.lectureid = :lectureid");
+ + " LEFT JOIN os_x_virt o USING (osid, virtid)" + " WHERE l.lectureid = :lectureid");
stmt.setString("lectureid", lectureId);
ResultSet rs = stmt.executeQuery();
long now = Util.unixTime();
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java
index 06c1e5a7..4910ec4c 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java
@@ -303,7 +303,7 @@ public class ServerHandler implements SatelliteServer.Iface {
public ImageDetailsRead getImageDetails(String userToken, String imageBaseId)
throws TAuthorizationException, TNotFoundException, TInvocationException {
UserInfo user = SessionManager.getOrFail(userToken);
- User.canSeeImageDetailsOrFail(user);
+
try {
return DbImage.getImageDetails(user, imageBaseId);
} catch (SQLException e) {