tiny-editor icon indicating copy to clipboard operation
tiny-editor copied to clipboard

🐛 [Bug]: 配置 i18n:{ lang: 'zh-CN' } 为中文后,表格模块的工具栏还是英文

Open kagol opened this issue 1 month ago • 1 comments

Version

latest

Link to minimal reproduction

配置 i18n 模块为中文后,期望富文本所有内容都是中文的,但实际上表格模块的工具栏还是英文。

i18n: {
  lang: 'zh-CN'
}
Image

Step to reproduce

如上

What is expected

No response

What is actually happening

No response

What is your project name

Wiki

Any additional comments (optional)

No response

kagol avatar Nov 24 '25 02:11 kagol

踩过这个坑,目前要自己覆盖 [TableUp.moduleName]: { customSelect: defaultCustomSelect, // 中文文案覆盖,包含选择器、颜色面板与菜单工具提示 texts: { fullCheckboxText: '插入全宽表格', customBtnText: '自定义', confirmText: '确认', cancelText: '取消', rowText: '行', colText: '列', notPositiveNumberError: '请输入正整数', custom: '自定义', clear: '清除', transparent: '透明', perWidthInsufficient: '百分比宽度不足,需要将表格转换为固定宽度以完成操作,是否继续?', // 菜单工具提示 CopyCell: '复制单元格', CutCell: '剪切单元格', InsertTop: '在上方插入行', InsertRight: '在右侧插入列', InsertBottom: '在下方插入行', InsertLeft: '在左侧插入列', MergeCell: '合并单元格', SplitCell: '拆分单元格', DeleteRow: '删除行', DeleteColumn: '删除列', DeleteTable: '删除表格', BackgroundColor: '设置背景色', BorderColor: '设置边框色', // 额外工具 SwitchWidth: '切换表格宽度', InsertCaption: '插入表格标题', ToggleTdBetweenTh: '在 th 与 td 间切换', ConvertTothead: '转换为 thead', ConvertTotfoot: '转换为 tfoot' }, modules: [ { module: TableResizeLine }, { module: TableResizeScale }, { module: TableSelection }, { module: TableMenuContextmenu }, // 选择区域菜单:插入/删除/合并/拆分/背景/边框/复制/剪切/宽度切换/标题

        // 表格对齐工具
        { module: TableAlign }
      ]
    }

skylingfly avatar Nov 24 '25 12:11 skylingfly