Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(i18n): ja translation #118

Merged
merged 5 commits into from
Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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), 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/55/files) is an example.
- internationalization (en, es, fr, pl, ru, uk, ptbr, tr, he, nl, ja), 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
current: 'en' // en | es | fr | pl | ru | uk | ptbr | tr | he | nl | ja
}
})

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

Expand All @@ -22,7 +23,8 @@ export const dictionary = {
ptbr,
tr,
he,
nl
nl,
ja
}

export function getCurrentLang () {
Expand Down
135 changes: 135 additions & 0 deletions src/i18n/ja/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: '画像URL'
},
buttons: {
close: '閉じる',
apply: '適用'
}
}
}
}
}