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 2014/05/03 13:20:58 UTC

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

Author: marcus
Date: Sat May  3 11:20:57 2014
New Revision: 1592183

URL: http://svn.apache.org/r1592183
Log:
Deleted global variable, updated comments

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

Modified: openoffice/ooo-site/trunk/content/download/test/download_droplist.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download_droplist.js?rev=1592183&r1=1592182&r2=1592183&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download_droplist.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download_droplist.js Sat May  3 11:20:57 2014
@@ -41,12 +41,11 @@ function init() {
 function initVars() {
 	// Define variables without "var" to make them globally available
 
-	NL_LANGUAGE				= "";	 // Manual set ISO code (see "index.html") that can override LANG_ISO
 	LANG_ISO				= "";	 // The language as ISO code
 	LANG_ARRAY				= "";	 // This array contains all language specific data
 	UI_PLATFORM				= "";	 // The platform as readable string
 	URL_PLATFORM				= "";	 // The platform as part of the download URL
-	OLD_PLATFORM				= false; // The browser platform is old (true) or not (false)
+	OLD_PLATFORM				= false; // Is the browser platform old (true) or not (false)?
 	RELEASE_MATRIX_PLATFORM_POS_FULL	= 0;	 // The position of the platform in the release matrix array
 	RELEASE_MATRIX_PLATFORM_POS_LP		= 0;	 // The position of the platform in the release matrix array
 	RELEASE_MATRIX_PLATFORM			= "";	 // The platform in the release matrix array
@@ -68,10 +67,10 @@ function initVars() {
 	LINK_CHECKSUM_ASC_LP			= "";	 // The ASC file as download URL (for language pack)
 	LINK_CHECKSUM_MD5_LP			= "";	 // The MD5 file as download URL (for language pack)
 	LINK_CHECKSUM_SHA256_LP			= "";	 // The SHA256 file as download URL (for language pack)
-	SOURCEFORGE				= false; // The download URL points to Soureforge
-	OTHER					= false; // The download URL points to 'other.html'
-	ARCHIVE					= false; // The download URL points to the ASF archive
-	ERROR					= false; // The download URL is correct (false) or not (true)?
+	SOURCEFORGE				= false; // Does the download URL points to Soureforge?
+	OTHER					= false; // Does the download URL points to 'other.html'?
+	ARCHIVE					= false; // Does the download URL points to the ASF archive?
+	ERROR					= false; // Is the download URL in general correct (false) or not (true)?
 }
 
 /*
@@ -80,6 +79,7 @@ function initVars() {
 function alertDbg( function_name ) {
 	alert ( ""
 	+ function_name												+ "\n"
+	+ "NL_LANG: "				+ "\t\t\t\t\t"		+ NL_LANG				+ "\n"
 	+ "LANG_ISO: "				+ "\t\t\t\t\t"		+ LANG_ISO				+ "\n"
 	+ "LANG_ARRAY: "			+ "\t\t\t\t\t"		+ LANG_ARRAY				+ "\n"
 	+ "RELEASE_MATRIX_PLATFORM_POS_FULL: "	+ "\t"			+ RELEASE_MATRIX_PLATFORM_POS_FULL	+ "\n"
@@ -115,13 +115,14 @@ function alertDbg( function_name ) {
 
 /*
  * Get array and ISO code for language
- * Depends on $NL_LANGUAGE and array-list
+ * Depends on $NL_LANG and array-list
  */
 function getLanguage() {
 	var language = "";
 
-	if ( NL_LANGUAGE != "" )
-		language = NL_LANGUAGE;
+	// Manual set ISO code (see "index.html") that overrides $LANG_ISO.
+	if ( NL_LANG != "" )
+		language = NL_LANG;
 	else if ( navigator.language )
 		language = navigator.language;
 	else if ( navigator.userLanguage )