From eefeb97ff8b5f78802ec18306deb64399988f4f1 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Tue, 17 May 2016 14:40:28 +0200
Subject: [PATCH] OO-725: wording, fix random order of map

---
 .../olat/course/nodes/VideoCourseNode.java    |  2 +-
 .../nodes/video/VideoEditController.java      | 31 +++++++------------
 .../video/_i18n/LocalStrings_de.properties    |  9 ++++--
 .../video/_i18n/LocalStrings_en.properties    |  5 ++-
 .../video/_i18n/LocalStrings_fr.properties    |  5 ++-
 .../video/ui/_i18n/LocalStrings_de.properties |  8 ++---
 .../video/ui/_i18n/LocalStrings_en.properties | 10 +++---
 .../_i18n/LocalStrings_de.properties          |  2 +-
 .../_i18n/LocalStrings_en.properties          |  2 +-
 .../_i18n/LocalStrings_fr.properties          |  2 +-
 10 files changed, 39 insertions(+), 37 deletions(-)

diff --git a/src/main/java/org/olat/course/nodes/VideoCourseNode.java b/src/main/java/org/olat/course/nodes/VideoCourseNode.java
index 0045c23d097..a049b34a9e8 100644
--- a/src/main/java/org/olat/course/nodes/VideoCourseNode.java
+++ b/src/main/java/org/olat/course/nodes/VideoCourseNode.java
@@ -70,7 +70,7 @@ public class VideoCourseNode extends AbstractAccessableCourseNode {
 	@Override
 	public TabbableController createEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, ICourse course, UserCourseEnvironment euce) {
 		updateModuleConfigDefaults(false);
-		VideoEditController childTabCntrllr = new VideoEditController(this, ureq, wControl, stackPanel, course, euce);
+		VideoEditController childTabCntrllr = new VideoEditController(this, ureq, wControl, course, euce);
 		CourseNode chosenNode = course.getEditorTreeModel().getCourseNode(euce.getCourseEditorEnv().getCurrentCourseNodeId());
 		return new NodeEditController(ureq, wControl, course.getEditorTreeModel(), course, chosenNode, euce, childTabCntrllr);
 	}
diff --git a/src/main/java/org/olat/course/nodes/video/VideoEditController.java b/src/main/java/org/olat/course/nodes/video/VideoEditController.java
index 69fa5ad7b7c..02ef7698d5c 100644
--- a/src/main/java/org/olat/course/nodes/video/VideoEditController.java
+++ b/src/main/java/org/olat/course/nodes/video/VideoEditController.java
@@ -19,9 +19,6 @@
  */
 package org.olat.course.nodes.video;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.olat.core.gui.UserRequest;
 import org.olat.core.gui.components.Component;
 import org.olat.core.gui.components.form.flexible.FormItem;
@@ -35,7 +32,6 @@ import org.olat.core.gui.components.form.flexible.impl.FormEvent;
 import org.olat.core.gui.components.link.Link;
 import org.olat.core.gui.components.link.LinkFactory;
 import org.olat.core.gui.components.panel.Panel;
-import org.olat.core.gui.components.stack.BreadcrumbPanel;
 import org.olat.core.gui.components.tabbedpane.TabbedPane;
 import org.olat.core.gui.components.velocity.VelocityContainer;
 import org.olat.core.gui.control.Controller;
@@ -109,7 +105,7 @@ public class VideoEditController  extends ActivateableTabbableDefaultController
 	private TabbedPane myTabbedPane;
 	private CloseableModalController cmc;
 
-	public VideoEditController(VideoCourseNode videoNode, UserRequest ureq, WindowControl wControl,  BreadcrumbPanel stackPanel,ICourse course, UserCourseEnvironment euce) {
+	public VideoEditController(VideoCourseNode videoNode, UserRequest ureq, WindowControl wControl, ICourse course, UserCourseEnvironment euce) {
 		super(ureq, wControl);
 		this.config = videoNode.getModuleConfiguration();
 		main = new Panel("videomain");
@@ -362,13 +358,11 @@ class VideoOptionsForm extends FormBasicController{
 		videoAutoplay = uifactory.addCheckboxesHorizontal("videoAutoplay", "video.config.autoplay", formLayout, new String[]{"xx"}, new String[]{null});
 		videoAutoplay.select("xx",autoplay);
 
-		Map<String, String> descriptionOptions = new HashMap<String, String>();
-		descriptionOptions.put("none" ,"none");//TODO: internationalize
-		descriptionOptions.put("resourceDescription", "Resource description");
-		descriptionOptions.put("customDescription", "custom description");
+		String[] descriptionkeys = new String[]{ "none", "resourceDescription", "customDescription" };
+		String[] descriptionValues = new String[]{ translate("description.none"), translate("description.resource"), translate("description.custom") };
 
 		//add textfield for custom description
-		description = uifactory.addDropdownSingleselect("video.config.description", formLayout, descriptionOptions.keySet().toArray(new String[3]), descriptionOptions.values().toArray(new String[3]), new String[3]);
+		description = uifactory.addDropdownSingleselect("video.config.description", formLayout, descriptionkeys, descriptionValues, null);
 		description.addActionListener(FormEvent.ONCHANGE);
 		description.select(config.getStringValue(VideoEditController.CONFIG_KEY_DESCRIPTION_SELECT,"none"), true);
 		String desc = repoEntry.getDescription();
@@ -385,22 +379,21 @@ class VideoOptionsForm extends FormBasicController{
 		}
 	}
 
-	//update visibility of the textfield for entering custom description
-	private void updateDescriptionField(){
-		switch(description.getSelected()){
-		case 2:
+	/**
+	 * Update visibility of the textfield for entering custom description
+	 */
+	private void updateDescriptionField() {
+		String selectDescOption = description.getSelectedKey();
+		if("none".equals(selectDescOption)) {
 			descriptionField.setVisible(false);
-			break;
-		case 1:
+		} else if("resourceDescription".equals(selectDescOption)) {
 			descriptionField.setVisible(true);
 			descriptionField.setValue(repoEntry.getDescription());
 			descriptionField.setEnabled(false);
-			break;
-		case 0:
+		} else if("customDescription".equals(selectDescOption)) {
 			descriptionField.setVisible(true);
 			descriptionField.setValue(config.getStringValue(VideoEditController.CONFIG_KEY_DESCRIPTION_CUSTOMTEXT, ""));
 			descriptionField.setEnabled(true);
-			break;
 		}
 	}
 
diff --git a/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_de.properties
index 62ef468eee2..17e745821c2 100644
--- a/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_de.properties
@@ -1,9 +1,12 @@
 chosenvideo=Gew\u00E4hltes Video
-command.changevideo=Video ersetzten
-command.choosevideo=Video auswählen
+command.changevideo=Video auswechseln
+command.choosevideo=Video ausw\u00E4hlen
 command.closevideo=Fenster schliessen
-command.createvideo=Video auswählen oder importieren
+command.createvideo=Video ausw\u00E4hlen oder importieren
 command.preview=preview video
+description.none=Nichts
+description.custom=Eigene Beschreibung
+description.resource=Beschreibung aus Infoseite
 title_video=Video
 condition.accessibility.title=Zugang
 header=Video auswählen
diff --git a/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_en.properties
index c12541807ab..29bbe66b800 100644
--- a/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_en.properties
+++ b/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_en.properties
@@ -4,11 +4,14 @@ command.choosevideo=Choose Video
 command.closevideo=Close window
 command.createvideo=Select or import Video
 command.preview=preview video
+description.none=None
+description.custom=Custom description
+description.resource=Ressource description
 title_video=Video
 condition.accessibility.title=Access
 header=Select Video
 optionsSection=Options
-no.video.chosen=No Videoressource selected
+no.video.chosen=<i>No video selected</i>
 preview.video=Preview
 title_cvideo=Videoressource
 pane.tab.accessibility=Zugang
diff --git a/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_fr.properties
index ba365f58ab6..b45eecc5cc7 100644
--- a/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_fr.properties
+++ b/src/main/java/org/olat/course/nodes/video/_i18n/LocalStrings_fr.properties
@@ -4,9 +4,12 @@ command.changevideo=Remplacer la ressource vid\u00E9o
 command.choosevideo=S\u00E9lectionner une ressource vid\u00E9o
 command.closevideo=Fermer la fen\u00EAtre
 command.createvideo=S\u00E9lectionner ou importer une ressource vid\u00E9o
+description.none=Aucune
+description.custom=Propre description
+description.resource=Description de la page d'infos
 condition.accessibility.title=Acc\u00E8s
 header=S\u00E9lectionner une vid\u00E9o
-no.video.chosen=Aucune vid\u00E9o s\u00E9lectionn\u00E9e
+no.video.chosen=<i>Aucune vid\u00E9o s\u00E9lectionn\u00E9e</i>
 optionsSection=Options
 pane.tab.accessibility=Acc\u00E8s
 pane.tab.deliveryOptions=$org.olat.core.gui.control.generic.iframe\:option.delivery
diff --git a/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_de.properties
index 810466b574d..9de3aa0a3f6 100644
--- a/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_de.properties
@@ -1,7 +1,7 @@
 #Thu Apr 21 15:21:09 CEST 2016
 add.track=Untertitel hinzuf\u00FCgen
-admin.config.enable=Videoresource einschalten
-admin.config.title=Video Konfiguration
+admin.config.enable=Videoressource einschalten
+admin.config.title=Videokonfiguration
 admin.config.transcoding=Transcoding aktivieren
 admin.config.videoNode=Video Kursbaustein aktivieren
 admin.menu.title=Video
@@ -28,7 +28,7 @@ tab.video.qualityConfig=Videoqualit\u00E4ten
 tab.video.settings=Videokonfiguration
 tab.video.trackConfig=Untertitel konfigurieren
 topnav.video=LearnTube
-topnav.video.alt=Bibliothek mit frei verfügbaren Lernvideos
+topnav.video.alt=Bibliothek mit frei verf\u00FCgbaren Lernvideos
 track.delete=L\u00F6schen
 track.langs=Sprache
 track.notrack=F\u00FCr dieses Video wurden noch keine Untertitel hinterlegt. W\u00E4hlen Sie den Button "$\:add.track" um Untertiteldateien hinzuzuf\u00FCgen.
@@ -45,7 +45,7 @@ video.config.fileSize=Gr\u00F6sse der Videodatei
 video.config.filename=Dateinamen
 video.config.height=H\u00F6he
 video.config.poster=Poster
-video.config.poster.hint=Hier legen Sie fest welches Bild sowohl als Poster / Startbild für das Video im Kurs als auch als Titelbild für die Lernressource auf der Infoseite benutzt wird.
+video.config.poster.hint=Hier legen Sie fest welches Bild sowohl als Poster / Startbild f\u00FCr das Video im Kurs als auch als Titelbild f\u00FCr die Lernressource auf der Infoseite benutzt wird.
 video.config.poster.replace=Poster ersetzen
 video.config.poster.upload=Poster hochladen
 video.config.ratio=Seitenverh\u00E4ltnis
diff --git a/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_en.properties
index 769a6ced37f..fd78e786a5f 100644
--- a/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_en.properties
+++ b/src/main/java/org/olat/modules/video/ui/_i18n/LocalStrings_en.properties
@@ -1,14 +1,14 @@
 #Thu Apr 21 15:22:05 CEST 2016
 add.track=Add Subtitle
-admin.config.enable=Enable videoresource
-admin.config.title=Video Configuration
+admin.config.enable=Enable video resource
+admin.config.title=Video configuration
 admin.config.transcoding=Enable video transcoding
-admin.config.videoNode=Enable video coursenode
+admin.config.videoNode=Enable video course element
 admin.menu.title=Video
 admin.menu.title.alt=Configuration of the Video-Resource
-poster.select=Select this poster frame
+poster.select=Select poster frame
 tab.video.metaDataConfig=Metadata
-tab.video.posterConfig=Poster configuration
+tab.video.posterConfig=Replace poster
 tab.video.settings=Video settings
 tab.video.trackConfig=Subtitle configuration
 tab.video.qualityConfig=Video quality
diff --git a/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties
index ace493d9b68..14810920661 100644
--- a/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties
@@ -142,7 +142,7 @@ cmd.delete=Bild entfernen
 cmd.finish=Wizard abschliessen
 cmd.forward=Weiter
 cmd.import.ressource=Importieren
-cmd.import.ressource.desc=W\u00E4hlen Sie eine Lernressource f\u00FCr den Import\:<ul><li>OpenOLAT Formate\: Kurs, Ressourcenordner, Glossar, Wiki, Podcast, Blog, Portfoliovorlage</li><li>Standardformate\: IMS Content Packaging, IMS QTI Test oder Fragebogen, SCORM 1.2</li><li>Dateien\: beliebig</li><li>Videos\: MP4</li></ul>
+cmd.import.ressource.desc=W\u00E4hlen Sie eine Lernressource f\u00FCr den Import\:<ul><li>OpenOLAT Formate\: Kurs, Ressourcenordner, Glossar, Wiki, Podcast, Blog, Portfoliovorlage</li><li>Videos\: MP4</li><li>Standardformate\: IMS Content Packaging, IMS QTI Test oder Fragebogen, SCORM 1.2</li><li>Dateien\: beliebig</li></ul>
 comments=Kommentar
 confirmation.no.toolHelp=Aktion abbrechen.
 confirmation.yes.toolHelp=Lernressource l\u00F6schen.
diff --git a/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties
index 457e03d0abb..4bf3fcc5494 100644
--- a/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties
+++ b/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties
@@ -142,7 +142,7 @@ cmd.delete=Delete image
 cmd.finish=Finish Wizard 
 cmd.forward=Next
 cmd.import.ressource=Import
-cmd.import.ressource.desc=Choose a learning resource to import\:<ul><li>OpenOLAT formats\: course, resource folder, glossary, wiki, podcast, blog, portfolio template</li><li>Standard formats\: IMS Content Packaging, IMS QTI assessment or survey, SCORM 1.2</li><li>Files\: any</li><li>Videos\: MP4</li></ul> 
+cmd.import.ressource.desc=Choose a learning resource to import\:<ul><li>OpenOLAT formats\: course, resource folder, glossary, wiki, podcast, blog, portfolio template</li><li>Videos\: MP4</li><li>Standard formats\: IMS Content Packaging, IMS QTI assessment or survey, SCORM 1.2</li><li>Files\: any</li></ul> 
 comments=Comments
 confirmation.no.toolHelp=Cancel action.
 confirmation.yes.toolHelp=Delete learning resource.
diff --git a/src/main/java/org/olat/repository/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/repository/_i18n/LocalStrings_fr.properties
index eafe5947f7b..c3e7c1a5e9a 100644
--- a/src/main/java/org/olat/repository/_i18n/LocalStrings_fr.properties
+++ b/src/main/java/org/olat/repository/_i18n/LocalStrings_fr.properties
@@ -142,7 +142,7 @@ cmd.delete=enlever image
 cmd.finish=Fermer l'assistant
 cmd.forward=Continuer
 cmd.import.ressource=Importer
-cmd.import.ressource.desc=Choisissez une ressource didactique \u00E0 importer\:<ul><li>Formats OpenOLAT\: Cours, le dossier de fichiers, glossaire, wiki, podcasts, blogs, mod\u00E8le  portfolio</li><li>Formats standards\: IMS Content Packaging, test ou questionnaire IMS QTI, SCORM 1.2</li><li>Fichiers\: quelconque</ li> </ ul>
+cmd.import.ressource.desc=Choisissez une ressource didactique \u00E0 importer\:<ul><li>Formats OpenOLAT\: Cours, le dossier de fichiers, glossaire, wiki, podcasts, blogs, mod\u00E8le  portfolio</li><li>Vid\u00E9os\: MP4</li><li>Formats standards\: IMS Content Packaging, test ou questionnaire IMS QTI, SCORM 1.2</li><li>Fichiers\: quelconque</ li> </ ul>
 comments=Commentaires
 confirmation.no.toolHelp=Annuler l'op\u00E9ration
 confirmation.yes.toolHelp=Supprimer la ressource
-- 
GitLab