You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/07/17 13:25:40 UTC
svn commit: r1611329 - in
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src:
main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/
origin/external/
Author: lofwyr
Date: Thu Jul 17 11:25:39 2014
New Revision: 1611329
URL: http://svn.apache.org/r1611329
Log:
TOBAGO-1405 + TOBAGO-1407
optimize i18n
Added:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.js
- copied, changed from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.min.js
- copied, changed from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.min.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.js
- copied, changed from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.min.js
- copied, changed from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.min.js
Removed:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.min.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.min.js
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-resources.sh
Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.js (from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.js)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.js?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.js&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.js&r1=1611269&r2=1611329&rev=1611329&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.js Thu Jul 17 11:25:39 2014
@@ -1,7 +1,7 @@
/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
/* Written by William Griffiths. */
jQuery(function($){
- $.datepicker.regional['cy-GB'] = {
+ $.datepicker.regional['cy'] = {
closeText: 'Done',
prevText: 'Prev',
nextText: 'Next',
@@ -19,5 +19,5 @@ jQuery(function($){
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
+ $.datepicker.setDefaults($.datepicker.regional['cy']);
});
Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.min.js (from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.min.js)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.min.js?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.min.js&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.min.js&r1=1611269&r2=1611329&rev=1611329&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy_GB.min.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_cy.min.js Thu Jul 17 11:25:39 2014
@@ -2,4 +2,4 @@
* http://jqueryui.com
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
-jQuery(function(e){e.datepicker.regional["cy-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],monthNamesShort:["Ion","Chw","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tac","Rha"],dayNames:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],dayNamesShort:["Sul","Llu","Maw","Mer","Iau","Gwe","Sad"],dayNamesMin:["Su","Ll","Ma","Me","Ia","Gw","Sa"],weekHeader:"Wy",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["cy-GB"])});
\ No newline at end of file
+jQuery(function(e){e.datepicker.regional["cy"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],monthNamesShort:["Ion","Chw","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tac","Rha"],dayNames:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],dayNamesShort:["Sul","Llu","Maw","Mer","Iau","Gwe","Sad"],dayNamesMin:["Su","Ll","Ma","Me","Ia","Gw","Sa"],weekHeader:"Wy",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["cy"])});
\ No newline at end of file
Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.js (from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.js)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.js?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.js&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.js&r1=1611269&r2=1611329&rev=1611329&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.js Thu Jul 17 11:25:39 2014
@@ -1,7 +1,7 @@
/* Chinese initialisation for the jQuery UI date picker plugin. */
/* Written by Cloudream (cloudream@gmail.com). */
jQuery(function($){
- $.datepicker.regional['zh-CN'] = {
+ $.datepicker.regional['zh'] = {
closeText: 'å
³é',
prevText: '<ä¸æ',
nextText: 'ä¸æ>',
@@ -19,5 +19,5 @@ jQuery(function($){
isRTL: false,
showMonthAfterYear: true,
yearSuffix: 'å¹´'};
- $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+ $.datepicker.setDefaults($.datepicker.regional['zh']);
});
Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.min.js (from r1611269, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.min.js)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.min.js?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.min.js&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.min.js&r1=1611269&r2=1611329&rev=1611329&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh_CN.min.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/contrib/jquery-ui-datepicker-i18n-1.10.4_zh.min.js Thu Jul 17 11:25:39 2014
@@ -2,4 +2,4 @@
* http://jqueryui.com
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
-jQuery(function(e){e.datepicker.regional["zh-CN"]={closeText:"å
³é",prevText:"<ä¸æ",nextText:"ä¸æ>",currentText:"ä»å¤©",monthNames:["ä¸æ","äºæ","ä¸æ","åæ","äºæ","å
æ","ä¸æ","å
«æ","ä¹æ","åæ","åä¸æ","åäºæ"],monthNamesShort:["ä¸æ","äºæ","ä¸æ","åæ","äºæ","å
æ","ä¸æ","å
«æ","ä¹æ","åæ","åä¸æ","åäºæ"],dayNames:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"],dayNamesShort:["å¨æ¥","å¨ä¸","å¨äº","å¨ä¸","å¨å","å¨äº","å¨å
"],dayNamesMin:["æ¥","ä¸","äº","ä¸","å","äº","å
"],weekHeader:"å¨",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,s
howMonthAfterYear:!0,yearSuffix:"å¹´"},e.datepicker.setDefaults(e.datepicker.regional["zh-CN"])});
\ No newline at end of file
+jQuery(function(e){e.datepicker.regional["zh"]={closeText:"å
³é",prevText:"<ä¸æ",nextText:"ä¸æ>",currentText:"ä»å¤©",monthNames:["ä¸æ","äºæ","ä¸æ","åæ","äºæ","å
æ","ä¸æ","å
«æ","ä¹æ","åæ","åä¸æ","åäºæ"],monthNamesShort:["ä¸æ","äºæ","ä¸æ","åæ","äºæ","å
æ","ä¸æ","å
«æ","ä¹æ","åæ","åä¸æ","åäºæ"],dayNames:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"],dayNamesShort:["å¨æ¥","å¨ä¸","å¨äº","å¨ä¸","å¨å","å¨äº","å¨å
"],dayNamesMin:["æ¥","ä¸","äº","ä¸","å","äº","å
"],weekHeader:"å¨",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,show
MonthAfterYear:!0,yearSuffix:"å¹´"},e.datepicker.setDefaults(e.datepicker.regional["zh"])});
\ No newline at end of file
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-resources.sh
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-resources.sh?rev=1611329&r1=1611328&r2=1611329&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-resources.sh (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-resources.sh Thu Jul 17 11:25:39 2014
@@ -23,6 +23,25 @@ SOURCE=~/Downloads/jquery-ui-1.10.4.cust
TARGET=../../main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard
VERSION=1.10.4
+patchLocale () {
+
+# TODO: you will need to fix the locale inside the 3 files manually
+
+ if [ "${OLD_LOCALE}" = "cy_GB" ]; then
+ echo "*1"
+ NEW_LOCALE="_cy"
+# elif [ "${OLD_LOCALE}" = "en_GB" ]; then
+# echo "*2"
+# NEW_LOCALE="_en"
+ elif [ "${OLD_LOCALE}" = "zh_CN" ]; then
+ echo "*3"
+ NEW_LOCALE="_zh"
+ else
+ NEW_LOCALE="_${OLD_LOCALE}"
+ fi
+ echo "${NEW_LOCALE}"
+}
+
# Scripts
cp ${SOURCE}/js/jquery-ui-${VERSION}.custom.js ${TARGET}/script/contrib
@@ -31,16 +50,18 @@ cp ${SOURCE}/js/jquery-ui-${VERSION}.cus
for FILE in $(find ${SOURCE}/development-bundle/ui/i18n -type file -name "jquery.ui.datepicker-*.js") ; do
# echo ${FILE};
# e.g. jquery.ui.datepicker-zh-TW.js -> jquery-ui-datepicker-$VERSION_zh_TW.js
- LOCALE=`basename ${FILE} | sed "s|jquery.ui.datepicker-||g" | sed "s|.js||g"| sed "s|-|_|g"`
- NAME=jquery-ui-datepicker-i18n-${VERSION}_${LOCALE}.js
+ OLD_LOCALE=`basename ${FILE} | sed "s|jquery.ui.datepicker-||g" | sed "s|.js||g"| sed "s|-|_|g"`
+ patchLocale
+ NAME=jquery-ui-datepicker-i18n-${VERSION}${NEW_LOCALE}.js
cp ${FILE} ${TARGET}/script/contrib/${NAME}
done
for FILE in $(find ${SOURCE}/development-bundle/ui/minified/i18n -type file -name "jquery.ui.datepicker-*.min.js") ; do
# echo ${FILE};
# e.g. jquery.ui.datepicker-zh-TW.js -> jquery-ui-datepicker-$VERSION_zh_TW.js
- LOCALE=`basename ${FILE} | sed "s|jquery.ui.datepicker-||g" | sed "s|.min.js||g"| sed "s|-|_|g"`
- NAME=jquery-ui-datepicker-i18n-${VERSION}_${LOCALE}.min.js
+ OLD_LOCALE=`basename ${FILE} | sed "s|jquery.ui.datepicker-||g" | sed "s|.min.js||g"| sed "s|-|_|g"`
+ patchLocale
+ NAME=jquery-ui-datepicker-i18n-${VERSION}${NEW_LOCALE}.min.js
cp ${FILE} ${TARGET}/script/contrib/${NAME}
done