/* eslint-disable no-template-curly-in-string */
import Pagination from 'rc-pagination/lib/locale/zh_CN';
import DatePicker from '../date-picker/locale/zh_CN';
import TimePicker from '../time-picker/locale/zh_CN';
import Calendar from '../calendar/locale/zh_CN';
import { Locale } from '../locale-provider';

const typeTemplate = '${label}不是一个有效的${type}';

const localeValues: Locale = {
  locale: 'zh-cn',
  Pagination,
  DatePicker,
  TimePicker,
  Calendar,
  // locales for all components
  global: {
    placeholder: '请选择',
  },
  Table: {
    filterTitle: '筛选',
    filterConfirm: '确定',
    filterReset: '重置',
    filterEmptyText: '无筛选项',
    selectAll: '全选当页',
    selectInvert: '反选当页',
    selectNone: '清空所有',
    selectionAll: '全选所有',
    sortTitle: '排序',
    expand: '展开行',
    collapse: '关闭行',
    triggerDesc: '点击降序',
    triggerAsc: '点击升序',
    cancelSort: '取消排序',
  },
  Modal: {
    okText: '确定',
    cancelText: '取消',
    justOkText: '知道了',
  },
  Transfer: {
    searchPlaceholder: '请输入搜索内容',
    itemUnit: '项',
    itemsUnit: '项',
    remove: '删除',
    selectCurrent: '全选当页',
    removeCurrent: '删除当页',
    selectAll: '全选所有',
    removeAll: '删除全部',
    selectInvert: '反选当页',
  },
  Upload: {
    uploading: '文件上传中',
    removeFile: '删除文件',
    uploadError: '上传错误',
    previewFile: '预览文件',
    downloadFile: '下载文件',
  },
  Empty: {
    description: '暂无数据',
  },
  Icon: {
    icon: '图标',
  },
  Text: {
    edit: '编辑',
    copy: '复制',
    copied: '复制成功',
    expand: '展开',
  },
  PageHeader: {
    back: '返回',
  },
  Form: {
    optional: '（可选）',
    defaultValidateMessages: {
      default: '字段验证错误${label}',
      required: '请输入${label}',
      enum: '${label}必须是其中一个[${enum}]',
      whitespace: '${label}不能为空字符',
      date: {
        format: '${label}日期格式无效',
        parse: '${label}不能转换为日期',
        invalid: '${label}是一个无效日期',
      },
      types: {
        string: typeTemplate,
        method: typeTemplate,
        array: typeTemplate,
        object: typeTemplate,
        number: typeTemplate,
        date: typeTemplate,
        boolean: typeTemplate,
        integer: typeTemplate,
        float: typeTemplate,
        regexp: typeTemplate,
        email: typeTemplate,
        url: typeTemplate,
        hex: typeTemplate,
      },
      string: {
        len: '${label}须为${len}个字符',
        min: '${label}最少${min}个字符',
        max: '${label}最多${max}个字符',
        range: '${label}须在${min}-${max}字符之间',
      },
      number: {
        len: '${label}必须等于${len}',
        min: '${label}最小值为${min}',
        max: '${label}最大值为${max}',
        range: '${label}须在${min}-${max}之间',
      },
      array: {
        len: '须为${len}个${label}',
        min: '最少${min}个${label}',
        max: '最多${max}个${label}',
        range: '${label}数量须在${min}-${max}之间',
      },
      pattern: {
        mismatch: '${label}与模式不匹配${pattern}',
      },
    },
  },
  Image: {
    preview: '预览',
  },
  Filters: {
    moreFilters: '更多筛选器',
    moreFiltersWithCount: '更多筛选器 (${count}) 个',
    filter: '筛选',
    noFiltersApplied: '未应用筛选条件',
    done: '完成',
    clearAllFilters: '清除所有筛选条件',
    clear: '清除',
  },
  ApolloTable: {
    sortingLabel: '排序方式',
    sortPlaceholder: '请选择排序',
    sort: '排序',
    selected: '已选择',
    selectAll: '选择所有',
    selectedAll: '已选择所有',
    item: '项',
    itemEnd: '项。',
    undo: '撤销',
    moreActions: '其它操作',
    leftPin: '固定在列首',
    rightPin: '固定在列尾',
    noPin: '不固定',
    all: '所有',
    viewName: '视图名称',
    viewError: '此名称已被使用',
    viewSaveHelpText: '视图将保存为此列表顶部的新标签。',
    cancelText: '取消',
    saveViewText: '保存视图',
    editViewText: '编辑视图',
    deleteViewText: '删除视图',
    deleteHelpText: '此操作无法撤消。',
    removeText: '删除',
    filterText: '筛选条件',
    reset: '重置',
    loading: '正在加载...',
    moreThan: '大于等于',
    lessThan: '小于等于',
  },
  ContextualSaveBar: {
    saveText: '保存',
    cancelText: '取消',
    discardText: '取消',
    title: '放弃所有未保存的更改',
    message: '如果放弃更改，您将删除自上次保存以来所做的所有编辑。',
    primaryAction: '放弃更改',
    secondaryAction: '继续编辑',
    unsavedChanges: '未保存的更改',
    leavePageText: '退出页面',
    leavePageMessage: '如果退出此页面，任何未保存的更改都将丢失。',
  },
  TagInput: {
    errorText: '您已使用',
  },
  PopoverRangePicker: {
    type: '类型',
    date: '日期',
    dateTime: '日期时间',
    range: '范围',
    custom: '自定义',
    currentHour: '当前小时',
    lastHour: '过去一个小时',
    lastThreeHours: '过去三个小时',
    Today: '今天',
    yesterday: '昨天',
    sevenDaysAgo: '过去七天',
    thirtyDaysAgo: '过去三十天',
    ninetyDaysAgo: '过去九十天',
    lastYear: '去年',
    thisWeek: '至今周数',
    thisMonth: '至今月数',
    thisQuarter: '至今季度',
    thisYear: '至今年数',
    compare: '比较',
    lastTerm: '上一期',
    lastWeek: '上周',
    lastMonth: '上个月',
    comparePlaceholder: '请选择比较类型',
    cancel: '取消',
    ok: '确定',
  },
  Thumbnail: {
    title: '预览图片',
  },
  Notification: {
    confirmText: '确定',
    closeText: '关闭',
  },
};

export default localeValues;
