Return-Path: X-Original-To: apmail-openoffice-commits-archive@www.apache.org Delivered-To: apmail-openoffice-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 154E2116D0 for ; Wed, 2 Jul 2014 20:28:34 +0000 (UTC) Received: (qmail 70446 invoked by uid 500); 2 Jul 2014 20:28:33 -0000 Delivered-To: apmail-openoffice-commits-archive@openoffice.apache.org Received: (qmail 70376 invoked by uid 500); 2 Jul 2014 20:28:33 -0000 Mailing-List: contact commits-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list commits@openoffice.apache.org Received: (qmail 70326 invoked by uid 99); 2 Jul 2014 20:28:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2014 20:28:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2014 20:28:33 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E6F7323889E1; Wed, 2 Jul 2014 20:28:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1607470 - /openoffice/ooo-site/trunk/content/download/test/download.js Date: Wed, 02 Jul 2014 20:28:06 -0000 To: commits@openoffice.apache.org From: marcus@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140702202806.E6F7323889E1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: marcus Date: Wed Jul 2 20:28:06 2014 New Revision: 1607470 URL: http://svn.apache.org/r1607470 Log: Added a possibility to show a customized error text in the sub-red box when the default error text cannot be correctly translated Modified: openoffice/ooo-site/trunk/content/download/test/download.js Modified: openoffice/ooo-site/trunk/content/download/test/download.js URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download.js?rev=1607470&r1=1607469&r2=1607470&view=diff ============================================================================== --- openoffice/ooo-site/trunk/content/download/test/download.js (original) +++ openoffice/ooo-site/trunk/content/download/test/download.js Wed Jul 2 20:28:06 2014 @@ -539,30 +539,50 @@ function isLanguageSupported() { * Depends on chosen OS, language and version */ function checkForLinkExceptions() { - // If recognized platform is not Windows, Linux or Mac, show the none-availability to the user. + // If recognized resp. selected platform, language or version does not lead to a normal download link, + // show the none-availability to the user. - var error_text = ""; SHOW_SUB_BOX = true; ERROR = false; // If language is not supported, show the none-availability to the user. if( ! isLanguageSupported() ) { // Show an error message that the chosen items do not lead to a download. - error_text = "" + l10n_download_error_problem_text + "" + l10n_download_error_aoo_text + VERSION_SEL - + l10n_download_error_not_available_for_text + "" + RELEASE_LANG[ 1 ] + " (" - + RELEASE_LANG[ 2 ] + ") (" + LANG_SEL + ")." - + "
" + l10n_download_error_solution_text + "" - + l10n_download_error_please_select_4_text; + + // If a customized string is not available in the "msg_prop_l10n_XX.js" file. + if( l10n_download_error_custom_4_text === "" ) { + // Show the default error text. + var error_text = "" + l10n_download_error_problem_text + "" + + l10n_download_error_aoo_text + VERSION_SEL + + l10n_download_error_not_available_for_text + + "" + RELEASE_LANG[ 1 ] + " (" + RELEASE_LANG[ 2 ] + ") (" + LANG_SEL + ")." + + "
" + + "" + l10n_download_error_solution_text + "" + + l10n_download_error_please_select_4_text; + } else + // Show the customized error text. + var error_text = l10n_download_error_custom_4_text; showErrorMessage( error_text ); } + // If the browser-guessed platform is not supported, show the none-availability to the user. if( UI_PLATFORM_NO_SUP !== "" ) { // Show an error message that the chosen items do not lead to a download. - error_text = "" + l10n_download_error_problem_text + "" + l10n_download_error_aoo_text + VERSION_SEL - + l10n_download_error_not_available_for_text + "" + UI_PLATFORM_NO_SUP + "." - + "
" + l10n_download_error_solution_text + "" - + l10n_download_error_please_select_3_text; + + // If a customized string is not available in the "msg_prop_l10n_XX.js" file. + if( l10n_download_error_custom_3_text === "" ) { + // Show the default error text. + var error_text = "" + l10n_download_error_problem_text + "" + + l10n_download_error_aoo_text + VERSION_SEL + + l10n_download_error_not_available_for_text + + "" + UI_PLATFORM_NO_SUP + "." + + "
" + + "" + l10n_download_error_solution_text + "" + + l10n_download_error_please_select_3_text; + } else + // Show the customized error text. + var error_text = l10n_download_error_custom_3_text; showErrorMessage( error_text ); } @@ -570,21 +590,41 @@ function checkForLinkExceptions() { // If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user. if( VERSION_SEL === "4.1.0" && PLATFORM === "mac32" ) { // Show an error message that the chosen items do not lead to a download. - error_text = "" + l10n_download_error_problem_text + "" + l10n_download_error_aoo_text + VERSION_SEL - + l10n_download_error_not_available_for_text + "" + UI_PLATFORM + "." - + "
" + l10n_download_error_solution_text + "" - + l10n_download_error_please_select_1_text; + + // If a customized string is not available in the "msg_prop_l10n_XX.js" file. + if( l10n_download_error_custom_1_text === "" ) { + // Show the default error text. + var error_text = "" + l10n_download_error_problem_text + "" + + l10n_download_error_aoo_text + VERSION_SEL + + l10n_download_error_not_available_for_text + + "" + UI_PLATFORM + "." + + "
" + + "" + l10n_download_error_solution_text + "" + + l10n_download_error_please_select_1_text; + } else + // Show the customized error text. + var error_text = l10n_download_error_custom_1_text; showErrorMessage( error_text ); } // If version is '4.0.1' (or older) and platform is 'Mac OS X >= 10.7', show the none-availability to the user. if( ( VERSION_SEL === "4.0.1" || VERSION_SEL === "4.0.0" ) && PLATFORM === "mac64" ) { - // Set the values for all elements that should not be empty. - error_text = "" + l10n_download_error_problem_text + "" + l10n_download_error_aoo_text + VERSION_SEL - + l10n_download_error_not_available_for_text + "" + UI_PLATFORM + "." - + "
" + l10n_download_error_solution_text + "" - + l10n_download_error_please_select_2_text; + // Show an error message that the chosen items do not lead to a download. + + // If a customized string is not available in the "msg_prop_l10n_XX.js" file. + if( l10n_download_error_custom_2_text === "" ) { + // Show the default error text. + var error_text = "" + l10n_download_error_problem_text + "" + + l10n_download_error_aoo_text + VERSION_SEL + + l10n_download_error_not_available_for_text + + "" + UI_PLATFORM + "." + + "
" + + "" + l10n_download_error_solution_text + "" + + l10n_download_error_please_select_2_text; + } else + // Show the customized error text. + var error_text = l10n_download_error_custom_2_text; showErrorMessage( error_text ); } @@ -695,11 +735,15 @@ function getLinkSelection() { document.getElementById( "dl_lp_link" ).title = l10n_download_langpack_link_title + FILENAME_LP; // Set the values in the sub-box for the 3 text lines. - document.getElementById( "dl_rel_info" ).innerHTML = "" + l10n_download_rel_info_headline_text + " " + REL_TEXT + " | "; + document.getElementById( "dl_rel_info" ).innerHTML = "" + l10n_download_rel_info_headline_text + + " " + REL_TEXT + " | "; document.getElementById( "dl_rel_notes" ).href = REL_NOTES; document.getElementById( "dl_rel_notes" ).innerHTML = l10n_download_rel_notes_text; document.getElementById( "dl_rel_notes" ).title = l10n_download_rel_notes_title + VERSION_SEL; - document.getElementById( "dl_f_info" ).innerHTML = "" + l10n_download_headline_full_text + "" + l10n_download_filesize_text + FILESIZE_FULL + l10n_download_megabyte_text + " | " + l10n_download_checksum_headline_text; + document.getElementById( "dl_f_info" ).innerHTML = "" + l10n_download_headline_full_text + "" + + l10n_download_filesize_text + FILESIZE_FULL + + l10n_download_megabyte_text + " | " + + l10n_download_checksum_headline_text; document.getElementById( "dl_f_chk_keys" ).href = LINK_CHK_KEYS; document.getElementById( "dl_f_chk_keys" ).innerHTML = l10n_download_checksum_keys_text; document.getElementById( "dl_f_chk_keys" ).title = l10n_download_checksum_keys_title; @@ -715,7 +759,10 @@ function getLinkSelection() { document.getElementById( "dl_f_chk_sha256" ).href = LINK_CHK_SHA256_FULL; document.getElementById( "dl_f_chk_sha256" ).innerHTML = l10n_download_checksum_sha256_text; document.getElementById( "dl_f_chk_sha256" ).title = l10n_download_checksum_sha256_title + FILENAME_FULL; - document.getElementById( "dl_lp_info" ).innerHTML = "" + l10n_download_headline_langpack_text + "" + l10n_download_filesize_text + FILESIZE_LP + l10n_download_megabyte_text + " | " + l10n_download_checksum_headline_text; + document.getElementById( "dl_lp_info" ).innerHTML = "" + l10n_download_headline_langpack_text + + "" + l10n_download_filesize_text + + FILESIZE_LP + l10n_download_megabyte_text + + " | " + l10n_download_checksum_headline_text; document.getElementById( "dl_lp_chk_keys" ).href = LINK_CHK_KEYS; document.getElementById( "dl_lp_chk_keys" ).innerHTML = l10n_download_checksum_keys_text; document.getElementById( "dl_lp_chk_keys" ).title = l10n_download_checksum_keys_title;