PDA

View Full Version : [CLOSED][PR3]ext-lang-zh_CN & ext-lang-zn_TW update



andy_ghg
10 Mar 2011, 10:42 PM
Modifies
Ext.Date modified Ext.util.Date
Ext.UpdateManager modified Ext.Updater
DateFormat: y?m?d? modified Y-m-d
Added something else into ext-lang-zh_TW.js

This is a new ext-lang-zh_TW.js



/*!
* Ext JS Library 4.x
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
?/*
* Traditional Chinese translation
* By hata1234
* 09 April 2007
*
* update by andy_ghg
* Time:2009-10-22 15:00:57
* Time:2011-3-11 13:29:34 for Ext JS 4
*/
Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">???...</div>';

if(Ext.data.Types){
Ext.data.Types.stripRe = /[\$,%]/g;
}

if(Ext.DataView){
Ext.DataView.prototype.emptyText = "";
}

if(Ext.grid.GridPanel){
Ext.grid.GridPanel.prototype.ddText = "??? {0} ?";
}

if(Ext.TabPanelItem){
Ext.TabPanelItem.prototype.closeText = "?????";
}

if(Ext.form.Field){
Ext.form.Field.prototype.invalidText = "??????";
}

if (Ext.LoadMask) {
Ext.LoadMask.prototype.msg = "???...";
}

Ext.util.Date.monthNames = [
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"???",
"???"
];

Ext.util.Date.dayNames = [
"?",
"?",
"?",
"?",
"?",
"?",
"?"
];

Ext.util.Date.formatCodes.a = "(this.getHours() < 12 ? '??' : '??')";
Ext.util.Date.formatCodes.A = "(this.getHours() < 12 ? '??' : '??')";

if(Ext.MessageBox){
Ext.MessageBox.buttonText = {
ok : "??",
cancel : "??",
yes : "?",
no : "?"
};
}

if(Ext.util.Format){
Ext.util.Format.date = function(v, format){
if(!v) return "";
if(!(v instanceof Date)) v = new Date(Date.parse(v));
return v.dateFormat(format || "Y/m/d");
};
}

if(Ext.DatePicker){
Ext.apply(Ext.DatePicker.prototype, {
todayText : "??",
minText : "????????????",
maxText : "????????????",
disabledDaysText : "",
disabledDatesText : "",
monthNames : Date.monthNames,
dayNames : Date.dayNames,
nextText : '??? (Ctrl+????)',
prevText : '??? (Ctrl+????)',
monthYearText : '???? (Ctrl+?/????????)',
todayTip : "{0} (???)",
format : "Y/m/d",
okText : "??",
cancelText : "??"
});
}

if(Ext.PagingToolbar){
Ext.apply(Ext.PagingToolbar.prototype, {
beforePageText : "?",
afterPageText : "???{0}?",
firstText : "???",
prevText : "???",
nextText : "???",
lastText : "???",
refreshText : "????",
displayMsg : "??{0} - {1}?,?{2}?",
emptyMsg : '??????'
});
}

if(Ext.form.BasicForm){
Ext.form.BasicForm.prototype.waitTitle = "???..."
}

if(Ext.form.TextField){
Ext.apply(Ext.form.TextField.prototype, {
minLengthText : "???????? {0} ??",
maxLengthText : "??????? {0} ??",
blankText : "??????",
regexText : "",
emptyText : null
});
}

if(Ext.form.NumberField){
Ext.apply(Ext.form.NumberField.prototype, {
minText : "?????????? {0}",
maxText : "?????????? {0}",
nanText : "{0} ???????"
});
}

if(Ext.form.DateField){
Ext.apply(Ext.form.DateField.prototype, {
disabledDaysText : "????",
disabledDatesText : "????",
minText : "????????? {0} ??",
maxText : "????????? {0} ??",
invalidText : "{0} ????????? - ???? ? {1} ? ?????",
format : "Y/m/d"
});
}

if(Ext.form.ComboBox){
Ext.apply(Ext.form.ComboBox.prototype, {
loadingText : "??? ...",
valueNotFoundText : undefined
});
}

if(Ext.form.VTypes){
Ext.apply(Ext.form.VTypes, {
emailText : '???????? "user@example.com" ?E-Mail??',
urlText : '???????? "http:/'+'/www.example.com" ?????',
alphaText : '????????????????( _ )??',
alphanumText : '???????????????????( _ )??'
});
}

if(Ext.form.HtmlEditor){
Ext.apply(Ext.form.HtmlEditor.prototype, {
createLinkText : '????:',
buttonTips : {
bold : {
title: '??(Ctrl+B)',
text: '???????????',
cls: 'x-html-editor-tip'
},
italic : {
title: '??(Ctrl+I)',
text: '???????????',
cls: 'x-html-editor-tip'
},
underline : {
title: '?? (Ctrl+U)',
text: '??????????(_)',
cls: 'x-html-editor-tip'
},
increasefontsize : {
title: '????',
text: '????',
cls: 'x-html-editor-tip'
},
decreasefontsize : {
title: '????',
text: '????',
cls: 'x-html-editor-tip'
},
backcolor : {
title: '???????',
text: '?????????????????',
cls: 'x-html-editor-tip'
},
forecolor : {
title: '????',
text: '???????',
cls: 'x-html-editor-tip'
},
justifyleft : {
title: '???',
text: '???????',
cls: 'x-html-editor-tip'
},
justifycenter : {
title: '??',
text: '???????',
cls: 'x-html-editor-tip'
},
justifyright : {
title: '???',
text: '???????',
cls: 'x-html-editor-tip'
},
insertunorderedlist : {
title: '????',
text: '??????????',
cls: 'x-html-editor-tip'
},
insertorderedlist : {
title: '??',
text: '????????',
cls: 'x-html-editor-tip'
},
createlink : {
title: '????',
text: '??????????',
cls: 'x-html-editor-tip'
},
sourceedit : {
title: '????',
text: '??????????',
cls: 'x-html-editor-tip'
}
}
});
}


if(Ext.grid.GridView){
Ext.apply(Ext.grid.GridView.prototype, {
sortAscText : "????",
sortDescText : "????",
lockText : "????",
unlockText : "??????",
columnsText : "??"
});
}

if(Ext.grid.BooleanColumn){
Ext.apply(Ext.grid.BooleanColumn.prototype, {
trueText : "?",
falseText : "?",
undefinedText: '&#160;'
});
}

if(Ext.grid.NumberColumn){
Ext.apply(Ext.grid.NumberColumn.prototype, {
format : '0,000.00'
});
}

if(Ext.grid.GroupingView){
Ext.apply(Ext.grid.GroupingView.prototype, {
emptyGroupText : '(?)',
groupByText : '???????',
showGroupsText : '??????'
});
}

if(Ext.form.TimeField){
Ext.apply(Ext.form.TimeField.prototype, {
minText : "?????????{0}",
maxText : "?????????{0}",
invalidText : "{0}????????",
format : "g:i A",
altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
});
}

if(Ext.form.CheckboxGroup){
Ext.apply(Ext.form.CheckboxGroup.prototype, {
blankText : "???????"
});
}

if(Ext.form.RadioGroup){
Ext.apply(Ext.form.RadioGroup.prototype, {
blankText : "???????"
});
}

if(Ext.grid.PropertyColumnModel){
Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
nameText : "??",
valueText : "??",
dateFormat : "Y/m/d"
});
}

if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
splitTip : "??????.",
collapsibleSplitTip : "??????. ??????."
});
}


This is a new ext-lang-zh_CN.js


/*!
* Ext JS Library 4.x
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
/*
* Simplified Chinese translation
* By DavidHu
* 09 April 2007
*
* update by andy_ghg
* Time:2009-10-22 15:00:57
* Time:2011-3-11 13:29:34 for Ext JS 4
*/

Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">???...</div>';

if(Ext.DataView){
Ext.DataView.prototype.emptyText = "";
}

if(Ext.grid.GridPanel){
Ext.grid.GridPanel.prototype.ddText = "??? {0} ?";
}

if(Ext.TabPanelItem){
Ext.TabPanelItem.prototype.closeText = "?????";
}

if(Ext.form.BaseField){
Ext.form.BaseField.prototype.invalidText = "?????";
}

if (Ext.LoadMask) {
Ext.LoadMask.prototype.msg = "???...";
}

Ext.util.Date.monthNames = [
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"??",
"???",
"???"
];

Ext.util.Date.dayNames = [
"?",
"?",
"?",
"?",
"?",
"?",
"?"
];

Ext.util.Date.formatCodes.a = "(this.getHours() < 12 ? '??' : '??')";
Ext.util.Date.formatCodes.A = "(this.getHours() < 12 ? '??' : '??')";

if(Ext.MessageBox){
Ext.MessageBox.buttonText = {
ok : "??",
cancel : "??",
yes : "?",
no : "?"
};
}

if(Ext.util.Format){
Ext.apply(Ext.util.Format, {
thousandSeparator: '.',
decimalSeparator: ',',
currencySign: '\u00a5', // Chinese Yuan(?)
dateFormat: 'Y-m-d'
});
}

if(Ext.picker.Date){
Ext.apply(Ext.DatePicker.prototype, {
todayText : "??",
minText : "????????????",
maxText : "????????????",
disabledDaysText : "",
disabledDatesText : "",
monthNames : Ext.Date.monthNames,
dayNames : Ext.Date.dayNames,
nextText : '??? (Ctrl+Right)',
prevText : '??? (Ctrl+Left)',
monthYearText : '????? (Control+Up/Down ?????)',
todayTip : "{0} (?????)",
format : "Y-m-d",
okText : "??",
cancelText : "??"
});
}

if(Ext.toolbar.PagingToolbar){
Ext.apply(Ext.PagingToolbar.prototype, {
beforePageText : "?",
afterPageText : "?,? {0} ?",
firstText : "???",
prevText : "???",
nextText : "???",
lastText : "???",
refreshText : "??",
displayMsg : "?? {0} - {1}??? {2} ?",
emptyMsg : '????'
});
}

if(Ext.form.Text){
Ext.apply(Ext.form.Text.prototype, {
minLengthText : "?????????? {0} ???",
maxLengthText : "?????????? {0} ???",
blankText : "????????",
regexText : "",
emptyText : null
});
}

if(Ext.form.Number){
Ext.apply(Ext.form.Number.prototype, {
minText : "????????? {0}",
maxText : "????????? {0}",
nanText : "{0} ??????"
});
}

if(Ext.form.Date){
Ext.apply(Ext.form.Date.prototype, {
disabledDaysText : "??",
disabledDatesText : "??",
minText : "?????????? {0} ??",
maxText : "?????????? {0} ??",
invalidText : "{0} ?????? - ??????? {1}",
format : "Y-m-d"
});
}

if(Ext.form.ComboBox){
Ext.apply(Ext.form.ComboBox.prototype, {
loadingText : "???...",
valueNotFoundText : undefined
});
}

if(Ext.form.VTypes){
Ext.apply(Ext.form.VTypes, {
emailText : '?????????????????? "user@example.com"',
urlText : '?????????????? "http:/'+'/www.example.com"',
alphaText : '?????????????_',
alphanumText : '????????????,???_'
});
}

if(Ext.form.HtmlEditor){
Ext.apply(Ext.form.HtmlEditor.prototype, {
createLinkText : '??????:',
buttonTips : {
bold : {
title: '?? (Ctrl+B)',
text: '???????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
italic : {
title: '?? (Ctrl+I)',
text: '???????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
underline : {
title: '??? (Ctrl+U)',
text: '?????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
increasefontsize : {
title: '????',
text: '????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
decreasefontsize : {
title: '????',
text: '????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
backcolor : {
title: '???????????',
text: '??????????????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
forecolor : {
title: '????',
text: '??????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
justifyleft : {
title: '???',
text: '??????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
justifycenter : {
title: '??',
text: '???????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
justifyright : {
title: '???',
text: '??????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
insertunorderedlist : {
title: '????',
text: '??????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
insertorderedlist : {
title: '??',
text: '????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
createlink : {
title: '??????',
text: '????????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
sourceedit : {
title: '????',
text: '??????????',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
}
}
});
}


if(Ext.grid.GridView){
Ext.apply(Ext.grid.GridView.prototype, {
sortAscText : "??",
sortDescText : "??",
lockText : "???",
unlockText : "????",
columnsText : "?"
});
}

if(Ext.grid.PropertyColumnModel){
Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
nameText : "??",
valueText : "?",
dateFormat : "Y-m-d"
});
}

if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
splitTip : "???????.",
collapsibleSplitTip : "???????. ????."
});
}