Am 07/01/2014 06:47 PM, schrieb Andrea Pescetti:
Aivaras Stepukonis wrote:
What must we do simply to change a bad link in a final “.html” file?
Use CMS, edit the html file of your interest (for a native-lang project,
usually located in <.../trunk/content/native-lang/...>), then submit,
commit, stage, and publish.
This does not work for the download pages. The main download page is
generated using JavaScript, so you have no "generated" HTML file since
that is assembled directly in the visitor's browser.
To restrict the conversation to the exact example Jon Peli mentioned,
the string
"OpenOffice 4.1.0 is not available in Basque"
is generated here:
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/download.js?view=markup
starting from line 545.
In theory one could check the language there and generate a different
string (with a different order of pieces) for Basque. It is a dangerous
path to follow, but it may work so long as the exceptions are maintainable.
Otherwise (this would be my favorite, but it would break existing pages
if not done properly, so CCing Marcus) we could use the bottom part of
the msg_prop_l10n_XY.js file to store "derived strings" like
var error_not_available = l10n_download_error_aoo_text + VERSION_SEL
+ l10n_download_error_not_available_for_text + "<b>" + RELEASE_LANG[ 1 ]
+ " ("
+ RELEASE_LANG[ 2 ] + ") (" + LANG_SEL + ")</b>.";
so that we have customized versions for those too in the
msg_prop_l10n_XY.js file.
Yes, could be a way to allow more customization.
However, everybody should keep in mide that this will for sure increase
the complexity again. ;-)
@Aivaras:
Would you like to volunteer to try out this idea for Basque?
I could think of the following way, showing via a source code excerpt:
(I hope that the line breaks do not go mad. ;-) )
// If language is not supported, show the none-availability to the user.
if( ! isLangSupported() ) {
// Show an error message that the chosen items do not lead to a
// download.
var error_text = "<b>" + l10n_download_error_problem_text + "</b>"
+ l10n_download_error_aoo_text + VERSION_SEL
+ l10n_download_error_not_available_for_text + "<b>"
+ RELEASE_LANG[ 1 ] + " (" + RELEASE_LANG[ 2 ] + ")"
+ (" + LANG_SEL + ")</b>."
+ "<br />"
+ "<b>" + l10n_download_error_solution_text + "</b>"
+ l10n_download_error_please_select_4_text;
if( ! l10n_download_error_text_custom_1_text ) {
// Show the error text assembled above.
showErrorMessage( error_text );
} else {
// Show the customized error text from "msg_prop_l10n_XX.js".
showErrorMessage( l10n_download_error_text_custom_1_text );
}
} else {
// If language is supported, assemble the filenames and text for
// download and checksums.
// Go on in "getLinkSel().
}
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]