巴斯光年

白天教学生,晚上教自己。致力于推进教育信息化。支持开源
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ExtJS的中文化文件

Posted on 2009-03-31 08:51  巴斯光年  阅读(640)  评论(0编辑  收藏  举报
  1   /*
  2   * Simplified Chinese translation
  3   * By DavidHu
  4   * 09 April 2007
  5   */
  6  
  7  Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">加载中</div>';
  8  
  9  if(Ext.View){
 10     Ext.View.prototype.emptyText = "";
 11  }
 12  
 13  if(Ext.grid.Grid){
 14     Ext.grid.Grid.prototype.ddText = "{0} 选择行";
 15  }
 16  
 17  if(Ext.TabPanelItem){
 18     Ext.TabPanelItem.prototype.closeText = "关闭";
 19  }
 20  
 21  if(Ext.form.Field){
 22     Ext.form.Field.prototype.invalidText = "输入值非法";
 23  }
 24  
 25  Date.monthNames = [
 26     "一月",
 27     "二月",
 28     "三月",
 29     "四月",
 30     "五月",
 31     "六月",
 32     "七月",
 33     "八月",
 34     "九月",
 35     "十月",
 36     "十一月",
 37     "十二月"
 38  ];
 39  
 40  Date.dayNames = [
 41     "",
 42     "",
 43     "",
 44     "",
 45     "",
 46     "",
 47     ""
 48  ];
 49  
 50  if(Ext.MessageBox){
 51     Ext.MessageBox.buttonText = {
 52        ok     : "确定",
 53        cancel : "取消",
 54        yes    : "",
 55        no     : ""
 56     };
 57  }
 58  
 59  if(Ext.util.Format){
 60     Ext.util.Format.date = function(v, format){
 61        if(!v) return "";
 62        if(!(v instanceof Date)) v = new Date(Date.parse(v));
 63        return v.dateFormat(format || "y年m月d日");
 64     };
 65  }
 66  
 67  if(Ext.DatePicker){
 68     Ext.apply(Ext.DatePicker.prototype, {
 69        todayText         : "今天",
 70        minText           : "日期在最小日期之前",
 71        maxText           : "日期在最大日期之后",
 72        disabledDaysText  : "",
 73        disabledDatesText : "",
 74        monthNames        : Date.monthNames,
 75        dayNames          : Date.dayNames,
 76        nextText          : '下月 (Control+Right)',
 77        prevText          : '上月 (Control+Left)',
 78        monthYearText     : '选择一个月 (Control+Up/Down 来改变年)',
 79        todayTip          : "{0} (空格键选择)",
 80        format            : "y年m月d日",
 81        okText            : "确定",
 82        cancelText        : "取消"
 83     });
 84  }
 85  
 86  if(Ext.PagingToolbar){
 87     Ext.apply(Ext.PagingToolbar.prototype, {
 88        beforePageText : "",
 89        afterPageText  : "页共 {0} 页",
 90        firstText      : "第一页",
 91        prevText       : "前一页",
 92        nextText       : "下一页",
 93        lastText       : "最后页",
 94        refreshText    : "刷新",
 95        displayMsg     : "显示 {0} - {1},共 {2} 条",
 96        emptyMsg       : '没有数据需要显示'
 97     });
 98  }
 99  
100  if(Ext.form.TextField){
101     Ext.apply(Ext.form.TextField.prototype, {
102        minLengthText : "该输入项的最小长度是 {0}",
103        maxLengthText : "该输入项的最大长度是 {0}",
104        blankText     : "该输入项为必输项",
105        regexText     : "",
106        emptyText     : null
107     });
108  }
109  
110  if(Ext.form.NumberField){
111     Ext.apply(Ext.form.NumberField.prototype, {
112        minText : "该输入项的最小值是 {0}",
113        maxText : "该输入项的最大值是 {0}",
114        nanText : "{0} 不是有效数值"
115     });
116  }
117  
118  if(Ext.form.DateField){
119     Ext.apply(Ext.form.DateField.prototype, {
120        disabledDaysText  : "禁用",
121        disabledDatesText : "禁用",
122        minText           : "该输入项的日期必须在 {0} 之后",
123        maxText           : "该输入项的日期必须在 {0} 之前",
124        invalidText       : "{0} 是无效的日期 - 必须符合格式: {1}",
125        format            : "y年m月d日"
126     });
127  }
128  
129  if(Ext.form.ComboBox){
130     Ext.apply(Ext.form.ComboBox.prototype, {
131        loadingText       : "加载",
132        valueNotFoundText : undefined
133     });
134  }
135  
136  if(Ext.form.VTypes){
137     Ext.apply(Ext.form.VTypes, {
138        emailText    : '该输入项必须是电子邮件地址,格式如: "user@domain.com"',
139        urlText      : '该输入项必须是URL地址,格式如: "http:/'+'/www.domain.com"',
140        alphaText    : '该输入项只能包含字符和_',
141        alphanumText : '该输入项只能包含字符,数字和_'
142     });
143  }
144  
145  if(Ext.grid.GridView){
146     Ext.apply(Ext.grid.GridView.prototype, {
147        sortAscText  : "正序",
148        sortDescText : "逆序",
149        lockText     : "锁列",
150        unlockText   : "解锁列",
151        columnsText  : ""
152     });
153  }
154  
155  if(Ext.grid.PropertyColumnModel){
156     Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
157        nameText   : "名称",
158        valueText  : "",
159        dateFormat : "y年m月d日"
160     });
161  }
162  
163  if(Ext.layout.BorderLayout.SplitRegion){
164     Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
165        splitTip            : "拖动来改变尺寸.",
166        collapsibleSplitTip : "拖动来改变尺寸. 双击隐藏."
167     });
168  }
169