You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2017/12/02 18:20:48 UTC

svn commit: r1816976 - /openoffice/ooo-site/trunk/content/download/test/download.js

Author: marcus
Date: Sat Dec  2 18:20:48 2017
New Revision: 1816976

URL: http://svn.apache.org/viewvc?rev=1816976&view=rev
Log:
Select box for languages: Changes for localized strings that can be sorted individual

Modified:
    openoffice/ooo-site/trunk/content/download/test/download.js

Modified: openoffice/ooo-site/trunk/content/download/test/download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download.js?rev=1816976&r1=1816975&r2=1816976&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download.js Sat Dec  2 18:20:48 2017
@@ -128,6 +128,13 @@ DL.initVariables = function( init_all )
 	DL.SHOW_SUB_BOX			= true;	 // Is the download URL OK to show the sub-box (true) or not (false)?
 	DL.ERROR			= false; // Is the download URL in general OK (false) or not (true)?
 
+	// Check if all option names in the selection box for languages are localized.
+	// If the first string in the array element is larger than 0, assume all are localized and should be used.
+	// Otherwise use the default names.
+	if ( l10n.dl_green_box_select_box_lang_values_custom[ 0 ].length > 0 ) {
+		DL.SEL_LANG = l10n.dl_green_box_select_box_lang_values_custom;
+	}
+
 	return;
 }
 
@@ -283,7 +290,7 @@ DL.fillLanguageSelection = function() {
 		selection.appendChild( option );
 	}
 
-	// Check if the option names are localized. 
+	// Check if only the option names are localized.
 	// If the first string in the array element is larger than 0, assume all are localized and should be used.
 	if ( l10n.dl_green_box_select_box_language_values[ 0 ].length > 0 ) {
 		// Search through the localized names.
@@ -296,6 +303,7 @@ DL.fillLanguageSelection = function() {
 				+ "Text:	\t\t"   + selection.options[ i ].text				+ "\n"
 				+ "Title:	\t\t"   + selection.options[ i ].title );
 */
+
 		}
 	}
 
@@ -465,13 +473,13 @@ DL.getLanguageSelection = function() {
 	// Search through the <select> element until the chosen language is found.
 	for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 3 ) {
 		if( DL.SEL_LANG[ i ] === language_value ) {
-			DL.LANG_SEL = language_value;
+			DL.SEL_LANG = language_value;
 			break;
 		}
 	}
 
-	DL.LANG_ISO = DL.LANG_SEL;
-	return DL.LANG_SEL;
+	DL.LANG_ISO = DL.SEL_LANG;
+	return DL.SEL_LANG;
 }
 
 /*
@@ -668,7 +676,7 @@ DL.checkForLinkExceptions = function() {
 	}
 
 	// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user.
-	if( ( DL.VERSION_SEL === "4.1.3" || DL.VERSION_SEL === "4.1.2" || DL.VERSION_SEL === "4.1.1" || DL.VERSION_SEL === "4.1.0" ) && DL.PLATFORM === "mac32" ) {
+	if( ( DL.VERSION_SEL === "4.1.4" || DL.VERSION_SEL === "4.1.3" || DL.VERSION_SEL === "4.1.2" || DL.VERSION_SEL === "4.1.1" || DL.VERSION_SEL === "4.1.0" ) && DL.PLATFORM === "mac32" ) {
 		// Show an error message that the chosen items do not lead to a download.
 
 		// If a customized string is not available in the "msg_prop_l10n_XX.js" file.