diff --git a/src/main/java/org/olat/core/util/i18n/ui/_content/translationToolI18nItemEdit.html b/src/main/java/org/olat/core/util/i18n/ui/_content/translationToolI18nItemEdit.html index 5e9ed1f67fcb23f20e6f83c9f2492d0b0d375ada..e4ba5a82652ecce7c439d8862d97dba477e24073 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/_content/translationToolI18nItemEdit.html +++ b/src/main/java/org/olat/core/util/i18n/ui/_content/translationToolI18nItemEdit.html @@ -47,7 +47,8 @@ <div class="b_translation_refKey b_float_right b_with_small_icon_left" style="display: none" onclick="this.style.display='none'"> <code></code> = <span></span> </div> - <h5 class="b_with_small_icon_left b_flag_$targetLanguageKey">$r.translate("generic.${customizingPrefix}lang.target"): $targetLanguage</h5> + <a href="#top" onclick="copyFromReference();" class="b_button b_xsmall b_float_right"><span>$r.translate('copy')</span></a> + <h5 class="b_with_small_icon_left b_flag_$targetLanguageKey">$r.translate("generic.${customizingPrefix}lang.target"): $targetLanguage</h5> $r.render("targetArea") </div> <div class="b_button_group"> @@ -69,8 +70,8 @@ //FIXME:FG:6.2: Implement Java way of setting flexi form link buttons dirty on change function b_SetTranslationSaveLinksDirty() { var save=jQuery("#$f.getItemId("saveLink")"); - if (!save.hasClassName('b_button_dirty')) { - save.addClassName('b_button_dirty'); + if (!save.hasClass('b_button_dirty')) { + save.addClass('b_button_dirty'); #if ($hasNext) jQuery("#$f.getItemId("saveNextLink")").addClass('b_button_dirty'); #end @@ -90,7 +91,7 @@ function checkClick(wrapperName, langCode) { ## Get content from text area within this wrapper var area = jQuery('div.' + wrapperName + ' textarea')[0]; var cursorPos = area.selectionStart; - var content = area.getValue(); + var content = area.value; ## Find the start position of the next i18n reference supported style: var counter = 0; while (content.indexOf("$") != -1 && counter < 10) { @@ -99,10 +100,10 @@ function checkClick(wrapperName, langCode) { if (startPos <= cursorPos && endPos >= cursorPos) { var reference = content.substring(startPos, endPos); ## remove {wrapper} brakes - if (reference.startsWith("{")) reference = reference.substring(1, reference.length-1); + if (reference.match("^\{")) reference = reference.substring(1, reference.length-1); var bundleName = ""; var key = ""; - if (reference.startsWith(":")) { + if (reference.match("^:")) { ## of type ':my.key' - get current bundle from bundles selction dropdown key = reference.substring(1, reference.length); var select = jQuery("#bundlesSelectionContainer select")[0]; @@ -119,9 +120,9 @@ function checkClick(wrapperName, langCode) { var translated = trans.translate(key); if (translated != reference) { ## set new key and value, make element visible - jQuery('div.' + wrapperName + ' div.b_translation_refKey code')[0].update(reference); - jQuery('div.' + wrapperName + ' div.b_translation_refKey span')[0].update(translated); - jQuery('div.' + wrapperName + ' div.b_translation_refKey')[0].setStyle('display: inline'); + jQuery('div.' + wrapperName + ' div.b_translation_refKey code').html(reference); + jQuery('div.' + wrapperName + ' div.b_translation_refKey span').html(translated); + jQuery('div.' + wrapperName + ' div.b_translation_refKey').css('display: inline'); } } break; @@ -134,6 +135,12 @@ function checkClick(wrapperName, langCode) { } } +## Method to copy the text from the reference language to the target language +function copyFromReference() { + var refVal = jQuery('.b_translation_edit_reference textarea').val(); + jQuery('.b_translation_edit_target textarea').val(refVal); +} + ## Initialize observers jQuery(function() { jQuery('div.b_translation_edit_reference textarea').each(function(index, el) { diff --git a/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_de.properties index ffac783fdf29b67fb441dc52d5dcb7fed42e7cd5..6d8291522bc5a6ccd752a775881e9424eb90c0ea 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_de.properties @@ -4,6 +4,7 @@ cache.flush=Cache leeren cache.flush.ok=Der Cache wurde geleert. cache.intro=Dr\u00FCcken Sie auf "Cache leeren" wenn Ihre \u00DCbersetzungen im GUI nicht automatisch angezeigt werden. Wenn Sie OLAT mit einem lokalen Texteditor \u00FCbersetzen, muss ebenfalls der Cache gel\u00F6scht werden damit Ihre \u00DCbersetzungen aktiv werden. cache.title=\u00DCbersetzungscache +copy=Referezsprache kopieren configuration.default.lang.must.be.enabed=Die Standardsprache "{0}"ann nicht deaktiviert werden. configuration.defaultLangSelection=Standardsprache configuration.defaultLangSelection.intro=Die Standardsprache wird auf der OLAT Loginseite sowie bei neu erstellten Benutzerkonten verwendet. diff --git a/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_en.properties index 7a3562d53b099ed1d62ddea5cb4422f041f57973..fbd415664e3402a1f87eb54a168660fbc34737c7 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/core/util/i18n/ui/_i18n/LocalStrings_en.properties @@ -4,6 +4,7 @@ cache.flush=Empty cache cache.flush.ok=Cache emptied. cache.intro=Click on "Empty cache" if your translation is not automatically displayed in the GUI. When translating OpenOLAT by means of a local text editor you will also have to empty your cache to activate your translations. cache.title=Translation cache +copy=Copy from reference configuration.default.lang.must.be.enabed=The standard language "{0}" must be activated. configuration.defaultLangSelection=Standard language configuration.defaultLangSelection.intro=This standard language is used on the OpenOLAT login page as well as when creating new user accounts. diff --git a/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_en.properties index aca6760e4865e40ca74d0730b4e50237e28a11fe..5844699260ebadd96aa721af2a7c1203a1ecf2e6 100644 --- a/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_en.properties @@ -1,4 +1,4 @@ -#Fri Feb 01 13:48:31 CET 2013 +#Thu Aug 08 08:49:27 CEST 2013 add.member=$org.olat.group.ui.main\:add.member areachoice.no.areas.admin=No learning areas found. Please create a learning area within your group management. areachoice.no.areas.owner=No learning areas found. New learning areas can only be created by users who have access to the entire group management. @@ -121,6 +121,7 @@ table.header.lastName=$org.olat.group.ui.main\:table.header.lastName table.header.lastTime=$org.olat.group.ui.main\:table.header.lastTime table.header.login=$org.olat.group.ui.main\:table.header.login table.header.mail=$org.olat.group.ui.main\:table.header.mail +table.header.online=$org.olat.group.ui.main\:table.header.online table.header.participants=$org.olat.group.ui.main\:table.header.participants table.header.participantsCount=$org.olat.group.ui.main\:table.header.participantsCount table.header.remove=$org.olat.group.ui.main\:table.header.remove diff --git a/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_en.properties index f6fb1ed8c2ed02ac0b0792a8585f2002210c00c2..1020fc5415e9a7ffc15cd3aca2ed7dc9db15853f 100644 --- a/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_en.properties @@ -154,6 +154,6 @@ import.file=Import file import.failed=Questions has not been imported. import.success={0} questions has been imported. create.success=1 question has been created. -error.input.toolong=Leider ist Ihr gerade eingegebener Text mit {1} Zeichen zu lang. Bitte beschr\u00E4nken Sie sich auf maximal {0} Zeichen. -share.options=Wollen Sie anderen Personen erlauben diese Frage(n) zu bearbeiten? +error.input.toolong=The text you entered is to long ({1} characters). Only {1} characters are allowed. +share.options=Do you want to allow another person to edit this/these question(s)? share.editable=Edit \ No newline at end of file