Am 08/30/2013 08:04 PM, schrieb Marcus (OOo):
Am 08/30/2013 04:49 PM, schrieb Rob Weir:
On Fri, Aug 30, 2013 at 10:28 AM, Ariel Constenla-Haile
<arie...@apache.org> wrote:
On Fri, Aug 30, 2013 at 08:26:51AM -0400, Rob Weir wrote:
But one question: what is the strategy on locale detection on the
download page for NL pages? It looks like you are hardcoding it to
"es", but preserving the OS detection code?

I see:

var NL_LANGUAGE = "es";

Is that all that is needed? We can otherwise just reuse the same
scripts?

yes, var NL_LANGUAGE = ""; will default to en-US.

The download page, with all that javascript in it, is rather hard to
translate. Isn't it possible to use a cgi script (server-side vs.
client-side js)?


I assume you mean JS like this that generates the UI for the download
box:

if ( LINK.toLowerCase().indexOf( "sourceforge" ) != -1 ) {
// Download directly from a mirror with displayed platform and language.
document.write( "<div class=\"first button green\"
id=\"optionitem1\" onclick=\"openItem('optionitem1','"
+ LINK + "');" + "return false;\">" );
document.write( "<h2><a href='" + LINK + "' title='Version " +
VERSION + " - Milestone " + MILESTONE
+ " - Build ID " + BUILD + " - SVN " + SVN_REV + "'>Download
Apache OpenOffice " + VERSION + "</a></h2>"
+ "<p><a href='" + LINK + "' title='Version " + VERSION + " -
Milestone " + MILESTONE + " - Build ID " + BUILD
+ " - SVN " + SVN_REV + "'>Click here for the most recent
version for:<br />"
+ "<b>" + UI_PLATFORM +"</b> and<b>" + LANG_ARRAY[ 2 ] +"</b>
(~" + FILESIZE + " MByte)</a></p>" );


That is a mix of HTML structure, code and language strings. I wonder
if we could define a per-locale strings with place holders like we do
with Pootle:

"Download Apache OpenOffice %s"
"Click here for the most recent version for:"
"%s and %s (%s Megabytes)"

If we get that kind of separation, then doing the substitutions could
be done server side or client side.

As I wrote earlier I have already some kind of separation done but not
yet committed. I'll try to commit this into the
"http://www.openoffice.org/test/"; area on Sunday or Monday.

So, please be patient before doing maybe double work. ;-)

I've added "index_en.html" and "download_l10n_en.js".

Please note that only the green box is changed and no other strings, just to show how it works.

http://ooo-site.staging.apache.org/download/test/index_en.html:
Only HTML code and JS variable names are used but no other hard-coded strings - at least nothing that has to be translated.

http://ooo-site.staging.apache.org/download/test/download_l10n_en.js:
This file contains the variables with the respective localizeable strings (here: English US).

Marcus


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to