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 2012/05/19 16:01:10 UTC
svn commit: r1340483 - in /incubator/ooo/ooo-site/trunk/content/download:
download_new_dl_aoo.js download_new_mirrorbrain_aoo.js index_aoo.html
Author: marcus
Date: Sat May 19 14:01:10 2012
New Revision: 1340483
URL: http://svn.apache.org/viewvc?rev=1340483&view=rev
Log:
Reworked the JS code and text in the green box to show a language name in native language, to ease the translation of the 'index.html' for the NL community
Modified:
incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js
incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js
incubator/ooo/ooo-site/trunk/content/download/index_aoo.html
Modified: incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js?rev=1340483&r1=1340482&r2=1340483&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js (original)
+++ incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js Sat May 19 14:01:10 2012
@@ -324,11 +324,18 @@ function getArray( nl_language ) {
}
/*
- * get language for user-language
+ * get language in en-US for user-language
*/
function getLanguage( nl_language ) {
var a = getArray( nl_language );
- return a[ 1 ];
+
+ if ( a[ 1 ].indexOf( "English" ) > -1 ) {
+ // Return language name in en-US
+ return a[ 1 ];
+ } else {
+ // Return the native language name
+ return a[ 2 ];
+ }
}
/*
@@ -405,9 +412,17 @@ function hasMirrorLink( nl_language ) {
if ( platform == "none" ) {
return false;
}
-
+
+ // Check the flag in "languages.js", 'y' -> provide download link, 'n' -> redirect to alternative webpage
+ if ( a[ 4 ] == 'y' ) {
+ return true;
+ } else {
+ return false;
+ }
+
+ /* old code, can be deleted when it's sure it's working without it for a longer time
if ( a[ 4 ] == 'y' ) {
- // special handling for MAC, links in combination with general flag a[4]
+ // special handling for MAC, links in combination with general flag a[ 4 ]
if ( platform.indexOf( "Mac" ) == -1 || a[ 5 ] == 'y' ) {
return true;
} else {
@@ -416,6 +431,7 @@ function hasMirrorLink( nl_language ) {
} else {
return false;
}
+ */
}
/*
Modified: incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js?rev=1340483&r1=1340482&r2=1340483&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js (original)
+++ incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js Sat May 19 14:01:10 2012
@@ -69,8 +69,9 @@ function mirrorbrain_getLink( version, n
// return "http://porting.openoffice.org/mac/download/";
// } else {
// use direct link
- return a[2];
+ // return a[ 2 ];
// }
+ return a[ 3 ];
}
}
Modified: incubator/ooo/ooo-site/trunk/content/download/index_aoo.html
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/index_aoo.html?rev=1340483&r1=1340482&r2=1340483&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/download/index_aoo.html (original)
+++ incubator/ooo/ooo-site/trunk/content/download/index_aoo.html Sat May 19 14:01:10 2012
@@ -12,7 +12,8 @@
<script type="text/javascript" src="download_new_dl_aoo.js"></script>
<!-- <script type="text/javascript" src="download_new_mirrorbrain.js"></script> -->
<script type="text/javascript" src="download_new_mirrorbrain_aoo.js"></script>
- <script type="text/javascript" src="languages_new_dl.js"></script>
+ <!-- <script type="text/javascript" src="languages_new_dl.js"></script> -->
+ <script type="text/javascript" src="languages_new_dl_aoo.js"></script>
<script type="text/javascript" src="../scripts/entourage.js"></script>
<style type="text/css">
/* <![CDATA[ */
@@ -58,13 +59,13 @@
// dump SF download and redirect to NL webpage (see URLs in "languages.js") if no mirror link (hasMirrorLink() == false)
// Get first the array data for NL_LANGUAGE and then the redirect link from the array data
var a = getArray( NL_LANGUAGE );
- var OLANG = a[ 1 ];
- var OLINK = a[ 2 ];
+ var OLANG = a[ 2 ];
+ var OLINK = a[ 3 ];
document.write( "<div class=\"first button green\" id=\"optionitem1\" onclick=\"openItem('optionitem1','"
+ OLINK + "');" + "return false;\">" );
document.write( "<h2><a href='" + OLINK + "' title='" + OLINK + "'>Download Apache OpenOffice " + VERSION + "</a></h2>"
- + "<p><a href='" + OLINK + "' title='" + OLINK + "'>Apache OpenOffice for " + OLANG + " is not available. "
+ + "<p><a href='" + OLINK + "' title='" + OLINK + "'>A release for " + OLANG + " is not available. "
+ "Please choose from the alternative download webpage for another language.</a></p>" );
}