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. -Rob > > Regards > -- > Ariel Constenla-Haile > La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org