feat(core): syntax highlight editor overlay - Transparent highlight-layer behind textarea with regex-based token coloring - Supports heading, bold, italic, strikethrough, code, link, image, list, quote, hr - Scroll-synced with textarea, config.syntaxHighlight toggle feat(core): preview link click interception - Clicks on preview links intercepted, emitted as 'linkClick' event - Configurable via onLinkClick(uri, text, editor) callback - Default: opens in new tab, anchor links pass through feat(parser): Mermaid diagram rendering - ```mermaid code blocks render as <div class="me-mermaid"><pre class="mermaid"> feat(plugins): fileSystem plugin (IndexedDB persistence) - saveToFile(id) / loadFromFile(id) / deleteFile(id) / listFiles() - Uses IndexedDB 'metona-editor-fs' database feat(config): maxLength (char limit), syntaxHighlight toggle style: syntax highlight theme colors, Mermaid container chore: bump version 0.1.13 → 0.1.14 across all files
169 lines
4.2 KiB
JavaScript
169 lines
4.2 KiB
JavaScript
/**
|
|
* MetonaEditor Locales — 国际化翻译数据
|
|
* @module locales
|
|
* @version 0.1.14
|
|
* @description 内置 zh-CN / en-US 完整翻译
|
|
*/
|
|
|
|
export const LOCALES = {
|
|
'zh-CN': {
|
|
bold: '粗体',
|
|
italic: '斜体',
|
|
underline: '下划线',
|
|
strikethrough: '删除线',
|
|
h1: '标题1',
|
|
h2: '标题2',
|
|
h3: '标题3',
|
|
quote: '引用',
|
|
code: '代码',
|
|
link: '链接',
|
|
image: '图片',
|
|
table: '表格',
|
|
ul: '无序列表',
|
|
ol: '有序列表',
|
|
indent: '增加缩进',
|
|
outdent: '减少缩进',
|
|
hr: '分隔线',
|
|
undo: '撤销',
|
|
redo: '重做',
|
|
edit: '编辑',
|
|
split: '分屏',
|
|
preview: '预览',
|
|
fullscreen: '全屏',
|
|
fullscreenExit: '退出全屏',
|
|
theme: '主题',
|
|
light: '亮色',
|
|
dark: '暗色',
|
|
auto: '自动',
|
|
warm: '暖色',
|
|
wordCount: '字数统计',
|
|
characters: '字符',
|
|
words: '词数',
|
|
lines: '行数',
|
|
readingTime: '阅读',
|
|
minutes: '分钟',
|
|
placeholder: '开始输入 Markdown...',
|
|
empty: '暂无内容',
|
|
copied: '已复制',
|
|
copyContent: '复制内容',
|
|
copyHTML: '复制 HTML',
|
|
copySuccess: '复制成功',
|
|
copyFailed: '复制失败',
|
|
clearContent: '清空内容',
|
|
clearConfirm: '确定要清空所有内容吗?',
|
|
linkPlaceholder: '请输入链接地址',
|
|
imagePlaceholder: '请输入图片地址',
|
|
altPlaceholder: '请输入替代文本',
|
|
tableRows: '行数',
|
|
tableCols: '列数',
|
|
confirm: '确认',
|
|
cancel: '取消',
|
|
exportMarkdown: '导出 Markdown',
|
|
exportHTML: '导出 HTML',
|
|
search: '搜索',
|
|
replace: '替换',
|
|
replaceAll: '全部替换',
|
|
searchPlaceholder: '查找内容',
|
|
replacePlaceholder: '替换为',
|
|
findNext: '查找下一个',
|
|
findPrev: '查找上一个',
|
|
matchCase: '区分大小写',
|
|
wholeWord: '全字匹配',
|
|
close: '关闭',
|
|
open: '打开',
|
|
save: '保存',
|
|
saved: '已保存',
|
|
saving: '保存中...',
|
|
delete: '删除',
|
|
confirmDelete: '确定要删除吗?',
|
|
unsavedChanges: '有未保存的更改',
|
|
error: '错误',
|
|
success: '成功',
|
|
warning: '警告',
|
|
info: '信息',
|
|
loading: '加载中...',
|
|
retry: '重试',
|
|
renderError: '渲染失败',
|
|
},
|
|
|
|
'en-US': {
|
|
bold: 'Bold',
|
|
italic: 'Italic',
|
|
underline: 'Underline',
|
|
strikethrough: 'Strikethrough',
|
|
h1: 'Heading 1',
|
|
h2: 'Heading 2',
|
|
h3: 'Heading 3',
|
|
quote: 'Quote',
|
|
code: 'Code',
|
|
link: 'Link',
|
|
image: 'Image',
|
|
table: 'Table',
|
|
ul: 'Bullet List',
|
|
ol: 'Numbered List',
|
|
indent: 'Indent',
|
|
outdent: 'Outdent',
|
|
hr: 'Horizontal Rule',
|
|
undo: 'Undo',
|
|
redo: 'Redo',
|
|
edit: 'Edit',
|
|
split: 'Split',
|
|
preview: 'Preview',
|
|
fullscreen: 'Fullscreen',
|
|
fullscreenExit: 'Exit Fullscreen',
|
|
theme: 'Theme',
|
|
light: 'Light',
|
|
dark: 'Dark',
|
|
auto: 'Auto',
|
|
warm: 'Warm',
|
|
wordCount: 'Word Count',
|
|
characters: 'Characters',
|
|
words: 'Words',
|
|
lines: 'Lines',
|
|
readingTime: 'Reading',
|
|
minutes: 'min',
|
|
placeholder: 'Start typing Markdown...',
|
|
empty: 'No content',
|
|
copied: 'Copied',
|
|
copyContent: 'Copy Content',
|
|
copyHTML: 'Copy HTML',
|
|
copySuccess: 'Copied successfully',
|
|
copyFailed: 'Copy failed',
|
|
clearContent: 'Clear Content',
|
|
clearConfirm: 'Clear all content?',
|
|
linkPlaceholder: 'Enter link URL',
|
|
imagePlaceholder: 'Enter image URL',
|
|
altPlaceholder: 'Enter alt text',
|
|
tableRows: 'Rows',
|
|
tableCols: 'Columns',
|
|
confirm: 'Confirm',
|
|
cancel: 'Cancel',
|
|
exportMarkdown: 'Export Markdown',
|
|
exportHTML: 'Export HTML',
|
|
search: 'Search',
|
|
replace: 'Replace',
|
|
replaceAll: 'Replace All',
|
|
searchPlaceholder: 'Find',
|
|
replacePlaceholder: 'Replace with',
|
|
findNext: 'Find Next',
|
|
findPrev: 'Find Previous',
|
|
matchCase: 'Match Case',
|
|
wholeWord: 'Whole Word',
|
|
close: 'Close',
|
|
open: 'Open',
|
|
save: 'Save',
|
|
saved: 'Saved',
|
|
saving: 'Saving...',
|
|
delete: 'Delete',
|
|
confirmDelete: 'Are you sure you want to delete?',
|
|
unsavedChanges: 'You have unsaved changes',
|
|
error: 'Error',
|
|
success: 'Success',
|
|
warning: 'Warning',
|
|
info: 'Info',
|
|
loading: 'Loading...',
|
|
retry: 'Retry',
|
|
renderError: 'Render failed',
|
|
},
|
|
};
|