From 1bca7255942036c469d02ca2f8b243b978aaeea9 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 10 Nov 2011 09:10:35 +0100
Subject: [PATCH] FXOLAT-282: disable the validation for read-only meeting,
 vitero logo in title of course bb, set the locale of the user, wording

---
 .../olat/course/nodes/ViteroCourseNode.java   |  2 +-
 .../vitero/_i18n/LocalStrings_de.properties   |  2 +-
 .../vitero/_i18n/LocalStrings_en.properties   |  2 +-
 .../vitero/_i18n/LocalStrings_fr.properties   |  6 +++
 .../olat/vitero/manager/ViteroManager.java    |  7 +++-
 .../ui/ViteroBookingEditController.java       | 40 ++++++++++---------
 .../ui/_i18n/LocalStrings_de.properties       | 16 ++++----
 .../ui/_i18n/LocalStrings_en.properties       | 12 +++---
 .../ui/_i18n/LocalStrings_fr.properties       | 25 ++++++++++++
 9 files changed, 76 insertions(+), 36 deletions(-)
 create mode 100644 src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_fr.properties
 create mode 100644 src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_fr.properties

diff --git a/src/main/java/com/frentix/olat/course/nodes/ViteroCourseNode.java b/src/main/java/com/frentix/olat/course/nodes/ViteroCourseNode.java
index 2c1f44cd25a..a74aa6111b6 100644
--- a/src/main/java/com/frentix/olat/course/nodes/ViteroCourseNode.java
+++ b/src/main/java/com/frentix/olat/course/nodes/ViteroCourseNode.java
@@ -121,7 +121,7 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
 		OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, resourceId);
 		String courseTitle = userCourseEnv.getCourseEnvironment().getCourseTitle();
 		Controller runCtr = new ViteroBookingsRunController(ureq, wControl, null, ores, courseTitle, moderator);
-		Controller controller = TitledWrapperHelper.getWrapper(ureq, wControl, runCtr, this, "o_vc_icon");
+		Controller controller = TitledWrapperHelper.getWrapper(ureq, wControl, runCtr, this, "o_vitero_icon");
 		return new NodeRunConstructionResult(controller);
 	}
 
diff --git a/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_de.properties b/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_de.properties
index 55f7a60f406..8285b6920c0 100644
--- a/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_de.properties
+++ b/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_de.properties
@@ -1,4 +1,4 @@
-error.vmsNotAvailable=$com.frentix.olat.vitero.ui\:verror.vmsNotAvailable
+error.vmsNotAvailable=$com.frentix.olat.vitero.ui\:error.vmsNotAvailable
 table.empty=$com.frentix.olat.vitero.ui\:table.empty
 pane.tab.accessibility=Zugang
 pane.tab.vcconfig=Konfiguration
diff --git a/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_en.properties b/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_en.properties
index ee53d0c72ce..59950ba59dc 100644
--- a/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_en.properties
+++ b/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_en.properties
@@ -1,4 +1,4 @@
-error.vmsNotAvailable=$com.frentix.olat.vitero.ui\:verror.vmsNotAvailable
+error.vmsNotAvailable=$com.frentix.olat.vitero.ui\:error.vmsNotAvailable
 table.empty=$com.frentix.olat.vitero.ui\:table.empty
 pane.tab.accessibility=Access
 pane.tab.vcconfig=Configuration
diff --git a/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_fr.properties b/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_fr.properties
new file mode 100644
index 00000000000..3a53bf8c4d5
--- /dev/null
+++ b/src/main/java/com/frentix/olat/course/nodes/vitero/_i18n/LocalStrings_fr.properties
@@ -0,0 +1,6 @@
+error.vmsNotAvailable=$com.frentix.olat.vitero.ui\:error.vmsNotAvailable
+table.empty=$com.frentix.olat.vitero.ui\:table.empty
+pane.tab.accessibility=Accès
+pane.tab.vcconfig=Configuration
+condition.accessibility.title=Accès
+title_vc=vitero
\ No newline at end of file
diff --git a/src/main/java/com/frentix/olat/vitero/manager/ViteroManager.java b/src/main/java/com/frentix/olat/vitero/manager/ViteroManager.java
index 8a9e5effb00..31239d97109 100644
--- a/src/main/java/com/frentix/olat/vitero/manager/ViteroManager.java
+++ b/src/main/java/com/frentix/olat/vitero/manager/ViteroManager.java
@@ -349,7 +349,12 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
 			user.setCustomeridlist(customerIds);
 
 			//optional
-			user.setLocale("en");
+			String language = identity.getUser().getPreferences().getLanguage();
+			if(StringHelper.containsNonWhitespace(language) && language.startsWith("de")) {
+				user.setLocale("de");
+			} else {
+				user.setLocale("en");
+			}
 			user.setPcstate("NOT_TESTED");
 			user.setTimezone(viteroModule.getTimeZoneId());
 			
diff --git a/src/main/java/com/frentix/olat/vitero/ui/ViteroBookingEditController.java b/src/main/java/com/frentix/olat/vitero/ui/ViteroBookingEditController.java
index 1f7039821da..2e33a2a0aca 100644
--- a/src/main/java/com/frentix/olat/vitero/ui/ViteroBookingEditController.java
+++ b/src/main/java/com/frentix/olat/vitero/ui/ViteroBookingEditController.java
@@ -164,26 +164,30 @@ public class ViteroBookingEditController extends FormBasicController {
 		boolean allOk = true;
 
 		Date begin = beginChooser.getDate();
-		beginChooser.clearError();
-		if(begin == null) {
-			beginChooser.setErrorKey("form.legende.mandatory", null);
-			allOk = false;
-		} else if(new Date().after(begin)) {
-			beginChooser.setErrorKey("error.bookingInPast", null);
-			allOk = false;
+		if(beginChooser.isEnabled()) {
+			beginChooser.clearError();
+			if(begin == null) {
+				beginChooser.setErrorKey("form.legende.mandatory", null);
+				allOk = false;
+			} else if(new Date().after(begin)) {
+				beginChooser.setErrorKey("error.bookingInPast", null);
+				allOk = false;
+			}
 		}
 		
-		Date end = endChooser.getDate();
-		endChooser.clearError();
-		if(end == null) {
-			endChooser.setErrorKey("form.legende.mandatory", null);
-			allOk = false;
-		} else if(new Date().after(begin)) {
-			beginChooser.setErrorKey("error.bookingInPast", null);
-			allOk = false;
-		} else if(end.before(begin)) {
-			beginChooser.setErrorKey("error.bookingInPast", null);
-			allOk = false;
+		if(endChooser.isEnabled()) {
+			Date end = endChooser.getDate();
+			endChooser.clearError();
+			if(end == null) {
+				endChooser.setErrorKey("form.legende.mandatory", null);
+				allOk = false;
+			} else if(new Date().after(begin)) {
+				beginChooser.setErrorKey("error.bookingInPast", null);
+				allOk = false;
+			} else if(end.before(begin)) {
+				beginChooser.setErrorKey("error.bookingInPast", null);
+				allOk = false;
+			}
 		}
 		
 		roomSizeEl.clearError();
diff --git a/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_de.properties b/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_de.properties
index fbfb304137c..668c79ae892 100644
--- a/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_de.properties
+++ b/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_de.properties
@@ -1,8 +1,8 @@
-admin.menu.title=vitero Teamraum
-admin.menu.title.alt=Konfiguration eines vitero virtual team room Servers
-vitero.title=vitero Teamraum Konfiguration
-vitero.intro=Verfügen Sie über einen vitero virtual team room Server der Firma vitero GmbH, so können Sie das vitero Modul hier einschalten und die vitero Zugangsdaten eingeben. Nach erfolgreicher Konfiguration steht den Kursautoren der Kursbaustein "vitero Teamraum" zur Verfügung. Weitere Informationen über die Konfiguration und Funktionen finden Sie in der Hilfe rechts und auf der Webseite der Firma vitero GmbH.
-vitero.module.enabled=Modul "vitero Teamraum"
+admin.menu.title=vitero
+admin.menu.title.alt=Konfiguration eines vitero Servers
+vitero.title=vitero Konfiguration
+vitero.intro=Verfügen Sie über einen vitero Server der Firma vitero GmbH, so können Sie das vitero Modul hier einschalten und die vitero Zugangsdaten eingeben. Nach erfolgreicher Konfiguration steht den Kursautoren der Kursbaustein "vitero" zur Verfügung. Weitere Informationen über die Konfiguration und Funktionen finden Sie in der Hilfe rechts und auf der Webseite der Firma vitero GmbH.
+vitero.module.enabled=Modul "vitero"
 vitero.account=Konfiguration
 enabled=eingeschaltet
 signin=Eintragen
@@ -28,9 +28,9 @@ delete.confirm=Wollen Sie diesen Termin wirklich l
 booking.id=Terminidentifikator
 booking.infos=Detailinformationen
 booking.begin=Begin
-booking.beginBuffer=Begin Buffer (Minuten)
+booking.beginBuffer=Zeitpuffer vor Terminbeginn
 booking.end=Ende
-booking.endBuffer=Ende Buffer (Minuten)
+booking.endBuffer=Zeitpuffer nach Terminende
 booking.resource=Ressourcenname
 booking.title=Termine
 booking.admin.title=Terminverwaltung
@@ -57,7 +57,7 @@ error.url.invalid=Die angegebene vitero Server URL ist nicht g
 error.customer.invalid=Der angegebene Kundenidentifikator ist nicht gültig
 help.hover.vitero=Hilfe zu "$\:chelp.module.title"
 chelp.ced-vitero-config.title=$\:help.hover.vitero
-chelp.vitero1=Mit dem Kursbaustein "vitero Teamraum" können Sie vitero Termine mit Videokonferenz, Dokument. und Desktopsharing und vielem mehr. direkt in Ihren OLAT Kursen einbinden. Mehr zu den Funktionen des vitero virtual team room Systems erfahren Sie auf der Homepage von vitero GmbH:
+chelp.vitero1=Mit dem Kursbaustein "vitero" können Sie vitero Termine mit Videokonferenz, Dokument. und Desktopsharing und vielem mehr. direkt in Ihren OLAT Kursen einbinden. Mehr zu den Funktionen des vitero Systems erfahren Sie auf der Homepage von vitero GmbH:
 chelp.vitero2=Um die vitero Anbindung nutzen zu können müssen Sie über eine vitero Lizenz verfügen und in der Administrationsumgebung die Zugangsdaten eintragen:
 chelp.vitero3=Im Kurseditor wählen sie den vitero Kursbaustein und binden diesen in Ihre Kursstruktur ein und publizieren diesen. 
 chelp.vitero4=Im Kurseditor oder in der publizierten Ansicht können Sie nun vitero Termine erfassen. Wählen Sie dazu die Schaltfläche "$:new". Zuvor können Sie mit der Schaltfläche "$:roomsOverview" die aktuelle Auslastung der verfügbaren Teamräume ansehen um einen freien Termin zu finden.
diff --git a/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_en.properties b/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_en.properties
index b43d5177bc1..b1860d4f245 100644
--- a/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_en.properties
+++ b/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_en.properties
@@ -1,8 +1,8 @@
-admin.menu.title=vitero team room
-admin.menu.title.alt=Configuration of a vitero virtual team room servers
-vitero.title=vitero team room configuration
-vitero.intro=If you have a vitero virtual team room server from vitero GmbH you can enable the vitero module here and enter the vitero access informations. You can then use the "vitero team room" course element in your OLAT courses to create vitero meetings. More information about vitero and the configuration option can be found in the help at the right side and the vitero GmbH website.
-vitero.module.enabled=Module "vitero team room"
+admin.menu.title=vitero
+admin.menu.title.alt=Configuration of a vitero servers
+vitero.title=vitero configuration
+vitero.intro=If you have a vitero server from vitero GmbH you can enable the vitero module here and enter the vitero access informations. You can then use the "vitero" course element in your OLAT courses to create vitero meetings. More information about vitero and the configuration option can be found in the help at the right side and the vitero GmbH website.
+vitero.module.enabled=Module "vitero"
 vitero.account=Configuration
 enabled=enabled
 signin=Sign in
@@ -57,7 +57,7 @@ error.url.invalid=The vitero server URL is not valid
 error.customer.invalid=The vitero client identifyer is not valid
 help.hover.vitero=Help for "$\:chelp.module.title"
 chelp.ced-vitero-config.title=$\:help.hover.vitero
-chelp.vitero1=Using the course element "vitero team room" you can embedd vitero meetings including video conferencing, desktop and document sharing and more. More information about the vitero virtual team room system can be found on the vitero GmbH website:
+chelp.vitero1=Using the course element "vitero" you can embedd vitero meetings including video conferencing, desktop and document sharing and more. More information about the vitero system can be found on the vitero GmbH website:
 chelp.vitero2=To be able to use the vitero system you need to have a vitero license and add the access information in the administration area:
 chelp.vitero3=Choose the vitero course element in the course editor, add it to your course structure and publish the course. 
 chelp.vitero4=After publishing you can create vitero meetings either from within the course editor or also from the published view. Use the button "$:new" to add a meeting. Using the button "$:roomsOverview" you can preview the current booking of the team rooms to find a free spot. 
diff --git a/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_fr.properties b/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_fr.properties
new file mode 100644
index 00000000000..48413197107
--- /dev/null
+++ b/src/main/java/com/frentix/olat/vitero/ui/_i18n/LocalStrings_fr.properties
@@ -0,0 +1,25 @@
+#Tue Nov 08 13:58:50 CET 2011
+admin.menu.title=vitero
+admin.menu.title.alt=Configuration d'un serveur vitero pour salle de conf\u00E9rence virtuelle
+available.places={0} places libre pour ce rendez-vous
+booking.admin.title=Gestion d'agenda
+booking.autoSignIn=Inscription par l'utilisateur
+booking.begin=D\u00E9but
+booking.beginBuffer=Buffer de d\u00E9but (minutes)
+booking.end=Fin
+booking.endBuffer=Buffer de fin (minutes)
+booking.id=Identificateur du rendez-vous
+booking.infos=Informations d\u00E9taill\u00E9es
+booking.raw=Rendez-vous
+booking.raw.title=Informations d\u00E9taill\u00E9es du rendez-vous
+booking.resource=Nom de la ressource
+booking.roomSize=Taille du salon
+booking.title=Rendez-vous
+check=Tester la connection
+check.nok=Le test de la connection n'a pas \u00E9t\u00E9 couronn\u00E9 de succ\u00E8s. V\u00E9rifiez s'il-vous-pla\u00EEt l'adresse URL du serveur, le nom d'utilisateur et son mot-de-passe.
+check.ok=Le test de la connection a \u00E9t\u00E9 couronn\u00E9 de succ\u00E8s. Vous pouvez utiliser vitero.
+chelp.module.title=vitero\: configuration
+chelp.module1=Pour utiliser l'int\u00E9gration \u00E0 vitero, vous devez d\u00E9tenir une licence vitero et dans l'environnement d'administration entrer les identifiants pour l'API du service Web.
+chelp.module2=Sous "$\:option.olatTimeZone" vous pouvez adapter le fuseau horaire de votre syst\u00E8me OLAT. Ceci est n\u00E9cessaire pour accorder les rendez-vous avec le serveur vitero.
+chelp.module3=Vous obtiendrez les donn\u00E9es suivantes de votre administrateur OLAT ou vitero\: "$\:option.baseurl", "$\:option.adminlogin", "$\:option.adminpassword" et "$\:option.customerId".
+chelp.module4=Apr\u00E8s avoir entrer les donn\u00E9es, choisissez le bouton "$\:check" pour tester la configuration et la connexion au serveur vitero. Ensuite vous pouvez sauver la configuration et utiliser vitero dans vos cours.
-- 
GitLab