Author: sascharodekamp
Date: Wed Aug 31 08:57:29 2011 New Revision: 1163533 URL: http://svn.apache.org/viewvc?rev=1163533&view=rev Log: A patch from Leon to get the correct "jquery.ui.datepicker-xx-XX.js" (https://issues.apache.org/jira/browse/OFBIZ-4377) It uses "locale" (e.g. zh_TW) to form the jquery.ui.datepicker file name in method JsLanguageFileMappingCreator.createJsLanguageFileMapping, but jquery uses dash ("-") instead of underscore ("_") to concat the language code and country code, such as zh-TW vs. zh_TW. A very trivial update to JsLanguageFileMappingCreator.java, and after that, update the JsLanguageFileMapping.java file by running service "createJsLanguageFileMapping". In attached, contains both of patches to these two files. Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFileMappingCreator.java ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFileMappingCreator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFileMappingCreator.java?rev=1163533&r1=1163532&r2=1163533&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFileMappingCreator.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFileMappingCreator.java Wed Aug 31 08:57:29 2011 @@ -119,11 +119,11 @@ public class JsLanguageFileMappingCreato if (file.exists()) { fileUrl = jqueryUiLocaleRelPath + jqueryUiLocalePrefix + strippedLocale + jsFilePostFix; } else { - fileName = componentRoot + jqueryUiLocaleRelPath + jqueryUiLocalePrefix + locale + jsFilePostFix; + fileName = componentRoot + jqueryUiLocaleRelPath + jqueryUiLocalePrefix + modifiedDisplayCountry + jsFilePostFix; file = FileUtil.getFile(fileName); if (file.exists()) { - fileUrl = jqueryUiLocaleRelPath + jqueryUiLocalePrefix + locale + jsFilePostFix; + fileUrl = jqueryUiLocaleRelPath + jqueryUiLocalePrefix + modifiedDisplayCountry + jsFilePostFix; } } Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java?rev=1163533&r1=1163532&r2=1163533&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java Wed Aug 31 08:57:29 2011 @@ -227,10 +227,10 @@ public final class JsLanguageFilesMappin localeFiles.put("ca", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js"); localeFiles.put("ca_ES", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js"); localeFiles.put("zh", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-en.js"); - localeFiles.put("zh_CN", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-en.js"); - localeFiles.put("zh_HK", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-en.js"); + localeFiles.put("zh_CN", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js"); + localeFiles.put("zh_HK", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-HK.js"); localeFiles.put("zh_SG", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-en.js"); - localeFiles.put("zh_TW", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-en.js"); + localeFiles.put("zh_TW", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-TW.js"); localeFiles.put("hr", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js"); localeFiles.put("hr_HR", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js"); localeFiles.put("cs", "/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-cs.js"); |
Free forum by Nabble | Edit this page |