Skip to content

Commit

Permalink
feat(i18n): zh_CN translation
Browse files Browse the repository at this point in the history
Re #163 The simplified Chinese translation
  • Loading branch information
iliyaZelenko committed May 1, 2020
2 parents 544f684 + 08ce155 commit ccc02a6
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ If you have Vuetify `1.x` (not `2.x`), then you can find docs and demo [here](ht

- used vuetify components
- support for different types of icons ([fa](https://fontawesome.com/), [md](https://material.io/tools/icons/), [mdi](https://materialdesignicons.com/), [mdiSvg](https://vuetifyjs.com/en/customization/icons#install-material-design-icons-js-svg))
- internationalization (en, es, fr, pl, ru, uk, ptbr, tr, he, nl, ja, de, ko), with automatic detection of the current language through the Vuetify. You can make a PR for your language if it is not there, [here](https://github.com/iliyaZelenko/tiptap-vuetify/pull/118/files) is an example.
- internationalization (en, es, fr, pl, ru, uk, ptbr, tr, he, nl, ja, de, ko, zh-CN), with automatic detection of the current language through the Vuetify. You can make a PR for your language if it is not there, [here](https://github.com/iliyaZelenko/tiptap-vuetify/pull/118/files) is an example.
- markdown support
- easy to start using
- props and events are available
Expand Down
2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { MAIN_MODULE } from './config'

const vuetify = new Vuetify({
lang: {
current: 'en' // en | es | fr | pl | ru | uk | ptbr | tr | he | nl | ja | de | ko
current: 'en' // en | es | fr | pl | ru | uk | ptbr | tr | he | nl | ja | de | ko | zh-CN
}
})

Expand Down
4 changes: 3 additions & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import nl from './nl'
import ja from './ja'
import de from './de'
import ko from './ko'
import zh from './zh'
import ConsoleLogger from '~/logging/ConsoleLogger'
import { TiptapVuetifyPlugin } from '~/main'

Expand All @@ -28,7 +29,8 @@ export const dictionary = {
nl,
ja,
de,
ko
ko,
zh
}

export function getCurrentLang () {
Expand Down
135 changes: 135 additions & 0 deletions src/i18n/zh/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
export default {
extensions: {
Blockquote: {
buttons: {
blockquote: {
tooltip: '引用'
}
}
},
Bold: {
buttons: {
bold: {
tooltip: '粗体'
}
}
},
BulletList: {
buttons: {
bulletList: {
tooltip: '项目符号'
}
}
},
Code: {
buttons: {
code: {
tooltip: '代码'
}
}
},
CodeBlock: {
buttons: {
codeBlock: {
tooltip: '代码块'
}
}
},
History: {
buttons: {
undo: {
tooltip: '撤销'
},
redo: {
tooltip: '重做'
}
}
},
HorizontalRule: {
buttons: {
horizontalRule: {
tooltip: '水平线'
}
}
},
Italic: {
buttons: {
italic: {
tooltip: '斜体'
}
}
},
OrderedList: {
buttons: {
orderedList: {
tooltip: '数字编号'
}
}
},
Paragraph: {
buttons: {
paragraph: {
tooltip: '段落'
}
}
},
Strike: {
buttons: {
strike: {
tooltip: '删除线'
}
}
},
Underline: {
buttons: {
underline: {
tooltip: '下划线'
}
}
},
Heading: {
buttons: {
heading: {
tooltip: ({ level }) => level + ' 级标题 '
}
}
},
Link: {
buttons: {
isActive: {
tooltip: '改变链接'
},
notActive: {
tooltip: '增加链接'
}
},
window: {
title: '增加链接',
form: {
hrefLabel: '链接'
},
buttons: {
close: '关闭',
remove: '移除',
apply: '使用'
}
}
},
Image: {
buttons: {
tooltip: '图片'
},
window: {
title: '添加图片',
or: '或者',
form: {
sourceLink: '图片链接'
},
buttons: {
close: '关闭',
apply: '使用'
}
}
}
}
}

0 comments on commit ccc02a6

Please sign in to comment.