﻿/*
 * Traditional Chinese translation
 * By hata1234
 * 09 April 2007
 */

Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">讀取中...</div>';

if(Ext.View){
    Ext.View.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 = "讀取中...";
}

Date.monthNames = [
    "一月",
    "二月",
    "三月",
    "四月",
    "五月",
    "六月",
    "七月",
    "八月",
    "九月",
    "十月",
    "十一月",
    "十二月"
];

Date.dayNames = [
    "日",
    "一",
    "二",
    "三",
    "四",
    "五",
    "六"
];

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.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@domain.com" 之E-Mail格式',
       urlText      : '此欄位必須輸入像 "http:/'+'/www.domain.com" 之網址格式',
       alphaText    : '此欄位僅能輸入半形英文字母及底線( _ )符號',
       alphanumText : '此欄位僅能輸入半形英文字母、數字及底線( _ )符號'
    });
}

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 : "拖曳縮放大小. 滑鼠雙擊隱藏."
    });
}

if(Ext.form.TimeField){
	Ext.apply(Ext.form.TimeField.prototype, {
		format : 'H:i',
		increment : 5,
		minText : "該輸入項的時間必須大於或等於： {0}",
		maxText : "該輸入項的時間必須小於或等於： {0}",
		invalidText       : "{0} 不是有效的時間格式"
	});
}

if(Ext.form.HtmlEditor){
	Ext.apply(Ext.form.HtmlEditor.prototype, {
		createLinkText : '請輸入的網址:',
		fontFamilies : ['Arial','Comic Sans MS','Courier New','Tahoma','Times New Roman','Verdana','細明體','新細明體','標楷體'],
		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'}
    }
	});
}
