using DevExpress.XtraGrid.Localization;
using System.Collections.Generic;

namespace Intend
{
    public class CustomGridLocalizer : GridLocalizer
    {
        Dictionary<GridStringId, string> CusLocalizedKeyValue = new Dictionary<GridStringId, string>
        {
            {GridStringId.FileIsNotFoundError,"未找到文件 {0}"},
            {GridStringId.ColumnViewExceptionMessage,"您想更正该值吗？"},
            {GridStringId.CustomizationCaption,"定制化"},
            {GridStringId.CustomizationColumns,"列"},
            {GridStringId.FilterPanelCustomizeButton,"编辑过滤器"},
            {GridStringId.PopupFilterAll,"（全部）"},
            {GridStringId.PopupFilterCustom,"（自定义）"},
            {GridStringId.PopupFilterBlanks,"（空白）"},
            {GridStringId.PopupFilterNonBlanks,"（非空白）"},
            {GridStringId.CustomFilterDialogFormCaption,"自定义自动过滤器"},
            {GridStringId.CustomFilterDialogCaption,"显示行，其中："},
            {GridStringId.CustomFilterDialogRadioAnd,"＆和"},
            {GridStringId.CustomFilterDialogRadioOr,"或者"},
            {GridStringId.CustomFilterDialogOkButton,"＆好的"},
            {GridStringId.CustomFilterDialogClearFilter,"清除过滤器(&L)"},
            {GridStringId.CustomFilterDialog2FieldCheck,"场地"},
            {GridStringId.CustomFilterDialogCancelButton,"＆取消"},
            {GridStringId.CustomFilterDialogEmptyValue,"（输入一个值）"},
            {GridStringId.CustomFilterDialogEmptyOperator,"（选择运营商）"},
            {GridStringId.CustomFilterDialogHint,"使用 _ 代表任意单个字符#使用 % 代表任意一系列字符"},
            {GridStringId.WindowErrorCaption,"错误"},
            {GridStringId.MenuFooterSum,"和"},
            {GridStringId.MenuFooterMin,"最小"},
            {GridStringId.MenuFooterMax,"最大限度"},
            {GridStringId.MenuFooterCount,"数数"},
            {GridStringId.MenuFooterAverage,"平均的"},
            {GridStringId.MenuFooterNone,"没有任何"},
            {GridStringId.MenuFooterSumFormat,"总和={0:0.##}"},
            {GridStringId.MenuFooterMinFormat,"最小值={0}"},
            {GridStringId.MenuFooterMaxFormat,"最大值={0}"},
            {GridStringId.MenuFooterCountFormat,"{0}"},
            {GridStringId.MenuFooterAverageFormat,"平均值={0:0.##}"},
            {GridStringId.MenuColumnSortAscending,"升序"},
            {GridStringId.MenuColumnSortDescending,"降序排序"},
            {GridStringId.MenuColumnShowColumn,"显示此栏目"},
            {GridStringId.MenuColumnRemoveColumn,"隐藏此栏"},
            {GridStringId.MenuColumnGroup,"按此列分组"},
            {GridStringId.MenuColumnUnGroup,"取消分组"},
            {GridStringId.MenuColumnColumnCustomization,"列选择器"},
            {GridStringId.MenuColumnBandCustomization,"列/频段选择器"},
            {GridStringId.MenuColumnBestFit,"最合适"},
            {GridStringId.MenuColumnFilter,"可以过滤"},
            {GridStringId.MenuColumnClearFilter,"清除过滤器"},
            {GridStringId.MenuColumnBestFitAllColumns,"最适合（所有列）"},
            {GridStringId.MenuColumnResetGroupSummarySort,"清晰的摘要排序"},
            {GridStringId.MenuColumnGroupSummarySortFormat,"{1}，作者：“{0}”- {2}"},
            {GridStringId.MenuColumnSumSummaryTypeDescription,"和"},
            {GridStringId.MenuColumnMinSummaryTypeDescription,"最小"},
            {GridStringId.MenuColumnMaxSummaryTypeDescription,"最大限度"},
            {GridStringId.MenuColumnCountSummaryTypeDescription,"数数"},
            {GridStringId.MenuColumnAverageSummaryTypeDescription,"平均的"},
            {GridStringId.MenuColumnCustomSummaryTypeDescription,"风俗"},
            {GridStringId.MenuColumnSortGroupBySummaryMenu,"按摘要排序"},
            {GridStringId.MenuColumnGroupIntervalMenu,"组间间隔"},
            {GridStringId.MenuColumnGroupIntervalNone,"没有任何"},
            {GridStringId.MenuColumnGroupIntervalDay,"天"},
            {GridStringId.MenuColumnGroupIntervalMonth,"月"},
            {GridStringId.MenuColumnGroupIntervalYear,"年"},
            {GridStringId.MenuColumnGroupIntervalSmart,"聪明的"},
            {GridStringId.MenuColumnGroupSummaryEditor,"小组总结编辑..."},
            {GridStringId.MenuColumnExpressionEditor,"表达式编辑器..."},
            {GridStringId.MenuColumnConditionalFormatting,"条件格式"},
            {GridStringId.MenuColumnFilterMode,"过滤模式"},
            {GridStringId.MenuColumnFilterModeValue,"价值"},
            {GridStringId.MenuColumnFilterModeDisplayText,"显示文字"},
            {GridStringId.MenuGroupRowExpand,"扩张"},
            {GridStringId.MenuGroupRowCollapse,"坍塌"},
            {GridStringId.MenuGroupPanelFullExpand,"完全展开"},
            {GridStringId.MenuGroupPanelFullCollapse,"全面崩溃"},
            {GridStringId.MenuGroupPanelClearGrouping,"清晰的分组"},
            {GridStringId.MenuGroupPanelShow,"显示分组依据框"},
            {GridStringId.MenuGroupPanelHide,"隐藏分组依据框"},
            {GridStringId.PrintDesignerGridView,"打印设置（网格视图）"},
            {GridStringId.PrintDesignerCardView,"打印设置（卡片视图）"},
            {GridStringId.PrintDesignerLayoutView,"打印设置（布局视图）"},
            {GridStringId.PrintDesignerBandedView,"打印设置（带状视图）"},
            {GridStringId.PrintDesignerBandHeader,"带标头"},
            {GridStringId.MenuColumnGroupBox,"按框分组"},
            {GridStringId.CardViewNewCard,"新卡"},
            {GridStringId.CardViewQuickCustomizationButton,"定制"},
            {GridStringId.CardViewQuickCustomizationButtonFilter,"筛选"},
            {GridStringId.CardViewQuickCustomizationButtonSort,"种类："},
            {GridStringId.CardViewCaptionFormat,"记录 N {0}"},
            {GridStringId.GridGroupPanelText,"将列标题拖动到此处以按该列进行分组"},
            {GridStringId.GridNewRowText,"单击此处添加新行"},
            {GridStringId.GridOutlookIntervals,"较早;上个月;本月早些时候;三周前;两周前;上周;;;;;;;;昨天;今天;明天;;;;;;;;下周;两周后;三周后;本月晚些时候;下个月;下个月之后;"},
            {GridStringId.PrintDesignerDescription,"为当前视图设置各种打印选项。"},
            {GridStringId.MenuFooterCustomFormat,"自定义={0}"},
            {GridStringId.MenuFooterCountGroupFormat,"计数={0}"},
            {GridStringId.MenuColumnClearSorting,"清晰排序"},
            {GridStringId.MenuColumnClearAllSorting,"清除所有排序"},
            {GridStringId.MenuColumnFilterEditor,"过滤器编辑器..."},
            {GridStringId.MenuColumnAutoFilterRowHide,"隐藏自动筛选行"},
            {GridStringId.MenuColumnAutoFilterRowShow,"显示自动过滤行"},
            {GridStringId.MenuColumnFindFilterHide,"隐藏查找面板"},
            {GridStringId.MenuColumnFindFilterShow,"显示查找面板"},
            {GridStringId.FilterBuilderOkButton,"＆好的"},
            {GridStringId.FilterBuilderCancelButton,"＆取消"},
            {GridStringId.FilterBuilderApplyButton,"＆申请"},
            {GridStringId.FilterBuilderCaption,"过滤器编辑器"},
            {GridStringId.CustomizationFormColumnHint,"将列拖放到此处以自定义布局"},
            {GridStringId.CustomizationFormBandHint,"将带区拖放到此处以自定义布局"},
            {GridStringId.LayoutViewSingleModeBtnHint,"一卡"},
            {GridStringId.LayoutViewRowModeBtnHint,"一排"},
            {GridStringId.LayoutViewColumnModeBtnHint,"一栏"},
            {GridStringId.LayoutViewMultiRowModeBtnHint,"多行"},
            {GridStringId.LayoutViewMultiColumnModeBtnHint,"多列"},
            {GridStringId.LayoutViewCarouselModeBtnHint,"轮播模式"},
            {GridStringId.LayoutViewPanBtnHint,"平移"},
            {GridStringId.LayoutViewCustomizeBtnHint,"定制化"},
            {GridStringId.LayoutViewCloseZoomBtnHintClose,"恢复视图"},
            {GridStringId.LayoutViewCloseZoomBtnHintZoom,"最大化细节"},
            {GridStringId.LayoutViewButtonApply,"＆申请"},
            {GridStringId.LayoutViewButtonPreview,"显示更多卡片"},
            {GridStringId.LayoutViewButtonOk,"＆好的"},
            {GridStringId.LayoutViewButtonCancel,"＆取消"},
            {GridStringId.LayoutViewButtonSaveLayout,"保存布局(&V)..."},
            {GridStringId.LayoutViewButtonLoadLayout,"加载布局(&L)..."},
            {GridStringId.LayoutViewFormLoadLayoutCaption,"负载布局"},
            {GridStringId.LayoutViewFormSaveLayoutCaption,"保存布局"},
            {GridStringId.LayoutViewButtonCustomizeShow,"显示定制(&S)"},
            {GridStringId.LayoutViewButtonCustomizeHide,"隐藏自定义(&Z)"},
            {GridStringId.LayoutViewButtonReset,"重置模板卡(&R)"},
            {GridStringId.LayoutViewButtonShrinkToMinimum,"收缩模板卡(&S)"},
            {GridStringId.LayoutViewPageTemplateCard,"模板卡"},
            {GridStringId.LayoutViewPageViewLayout,"查看布局"},
            {GridStringId.LayoutViewGroupCustomization,"定制化"},
            {GridStringId.LayoutViewGroupCaptions,"字幕"},
            {GridStringId.LayoutViewGroupIndents,"缩进"},
            {GridStringId.LayoutViewGroupHiddenItems,"隐藏物品"},
            {GridStringId.LayoutViewGroupTreeStructure,"布局树视图"},
            {GridStringId.LayoutViewGroupPropertyGrid,"属性网格"},
            {GridStringId.LayoutViewLabelTextIndent,"文本缩进"},
            {GridStringId.LayoutViewLabelPadding,"填充"},
            {GridStringId.LayoutViewLabelSpacing,"间距"},
            {GridStringId.LayoutViewLabelCaptionLocation,"字段标题位置："},
            {GridStringId.LayoutViewLabelGroupCaptionLocation,"组标题位置："},
            {GridStringId.LayoutViewLabelTextAlignment,"字段标题文本对齐方式："},
            {GridStringId.LayoutViewGroupView,"看法"},
            {GridStringId.LayoutViewGroupLayout,"布局"},
            {GridStringId.LayoutViewGroupCards,"牌"},
            {GridStringId.LayoutViewGroupFields,"领域"},
            {GridStringId.LayoutViewLabelShowLines,"显示线路"},
            {GridStringId.LayoutViewLabelShowHeaderPanel,"显示标题面板"},
            {GridStringId.LayoutViewLabelShowFilterPanel,"显示过滤器面板："},
            {GridStringId.LayoutViewLabelScrollVisibility,"滚动可见性："},
            {GridStringId.LayoutViewLabelViewMode,"查看模式："},
            {GridStringId.LayoutViewLabelCardArrangeRule,"排列规则："},
            {GridStringId.LayoutViewLabelCardEdgeAlignment,"卡边缘对齐："},
            {GridStringId.LayoutViewGroupIntervals,"间隔"},
            {GridStringId.LayoutViewLabelHorizontal,"水平间隔"},
            {GridStringId.LayoutViewLabelVertical,"垂直间隔"},
            {GridStringId.LayoutViewLabelShowCardCaption,"显示标题"},
            {GridStringId.LayoutViewLabelShowCardExpandButton,"显示展开按钮"},
            {GridStringId.LayoutViewLabelShowCardBorder,"显示边框"},
            {GridStringId.LayoutViewLabelAllowFieldHotTracking,"允许热跟踪"},
            {GridStringId.LayoutViewLabelShowFieldBorder,"显示边框"},
            {GridStringId.LayoutViewLabelShowFieldHint,"显示提示"},
            {GridStringId.LayoutViewCustomizationFormCaption,"布局视图定制"},
            {GridStringId.LayoutViewCustomizationFormDescription,"使用拖放和自定义菜单自定义卡片布局"},
            {GridStringId.LayoutModifiedWarning,"布局已修改。"},
            {GridStringId.LayoutViewCardCaptionFormat,"记录 [{0} 个，共 {1} 个]"},
            {GridStringId.LayoutViewFieldCaptionFormat,"{0}："},
            {GridStringId.GroupSummaryEditorFormCaption,"小组总结编辑"},
            {GridStringId.GroupSummaryEditorFormOkButton,"好的"},
            {GridStringId.GroupSummaryEditorFormCancelButton,"取消"},
            {GridStringId.GroupSummaryEditorFormItemsTabCaption,"项目"},
            {GridStringId.GroupSummaryEditorFormOrderTabCaption,"命令"},
            {GridStringId.GroupSummaryEditorSummaryMin,"最小"},
            {GridStringId.GroupSummaryEditorSummaryMax,"最大限度"},
            {GridStringId.GroupSummaryEditorSummaryAverage,"平均的"},
            {GridStringId.GroupSummaryEditorSummarySum,"和"},
            {GridStringId.GroupSummaryEditorSummaryCount,"数数"},
            {GridStringId.FindControlFindButton,"寻找"},
            {GridStringId.FindControlClearButton,"清除"},
            {GridStringId.FindControlNextButton,"下一个"},
            {GridStringId.FindControlPrevButton,"以前的"},
            {GridStringId.SearchLookUpMissingRows,"显示所有行"},
            {GridStringId.SearchLookUpAddNewButton,"添新"},
            {GridStringId.MenuFooterAddSummaryItem,"添加新摘要"},
            {GridStringId.MenuFooterClearSummaryItems,"清晰的摘要项目"},
            {GridStringId.MenuShowSplitItem,"分裂"},
            {GridStringId.MenuHideSplitItem,"删除分割"},
            {GridStringId.ServerRequestError,"处理请求期间发生错误（{0}...）"},
            {GridStringId.WindowWarningCaption,"警告"},
            {GridStringId.EditFormUpdateButton,"更新"},
            {GridStringId.EditFormCancelButton,"取消"},
            {GridStringId.EditFormCancelMessage,"您想取消编辑吗？"},
            {GridStringId.EditFormSaveMessage,"您的数据已被修改。 您想保存更改吗？"},
            {GridStringId.CheckboxSelectorColumnCaption,"选择"},
            {GridStringId.FindNullPrompt,"输入文字进行搜索..."},
            {GridStringId.SearchForBand,"寻找乐队..."},
            {GridStringId.MenuFooterShow,"显示页脚"},
            {GridStringId.MenuFooterHide,"隐藏页脚"},
            {GridStringId.MenuFooterMode,"模式"},
            {GridStringId.MenuFooterAllRows,"所有行"},
            {GridStringId.MenuFooterSelection,"选择"},
            {GridStringId.MenuFooterMixed,"混合"}
        };

        public override string GetLocalizedString(GridStringId id)
        {
            if (CusLocalizedKeyValue != null && CusLocalizedKeyValue.ContainsKey(id))
            {
                string gridStringDisplay = string.Empty;
                foreach (var gridLocalizer in CusLocalizedKeyValue)
                {
                    if (gridLocalizer.Key.Equals(id))
                    {
                        gridStringDisplay = gridLocalizer.Value;
                        break;
                    }
                }

                return gridStringDisplay;
            }

            return base.GetLocalizedString(id);
        }
    }
}
