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 2021/03/21 10:00:41 UTC

[openoffice-org] 03/05: Add check for new variable if exist, if yes then use it

This is an automated email from the ASF dual-hosted git repository.

marcus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openoffice-org.git

commit 915c9418867f4d5e8ea2249428e3fc725a3f3f82
Author: Marcus <ma...@apache.org>
AuthorDate: Sun Mar 21 10:40:53 2021 +0100

    Add check for new variable if exist, if yes then use it
---
 assets/download/download.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/assets/download/download.js b/assets/download/download.js
index 58d1727..d562f1f 100644
--- a/assets/download/download.js
+++ b/assets/download/download.js
@@ -332,9 +332,20 @@ DL.fillVersionSelection = function() {
 		selection.appendChild( option );
 	}
 
+	if( l10n.dl_green_box_select_box_version_older ) {
+		// Add the translated item "Older releases" as last item into the select box.
+		option       = document.createElement( "option" );
+		// Assign the text as index value.
+		option.value = "older";
+		// Assign the UI text.
+		option.text  = l10n.dl_green_box_select_box_version_older;
+		// Add the new option to the already existing ones.
+		selection.appendChild( option );
+	}
+
 	// Check if 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_version_values[ 0 ].length > 0 ) {
+	if( l10n.dl_green_box_select_box_version_values[ 0 ].length > 0 ) {
 		// Search through the localized names.
 		for( i = 0, j = l10n.dl_green_box_select_box_version_values.length; i < j; i++ ) {
 			// Exchange the version name with the localized one.