Skip to content

Commit

Permalink
feat($vssue): add language ja-JP (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouvill authored and meteorlxy committed Mar 29, 2019
1 parent 8f8bbc6 commit 4d3c9b9
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/docs/src/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``:
- `'en'` (`'en-US'`)
- `'zh'` (`'zh-CN'`)
- `'pt'` (`'pt-BR'`)
- `'ja'` (`'ja-JP'`)
Contributions welcome for more languages support.
:::
Expand Down
3 changes: 2 additions & 1 deletion packages/docs/src/pt-BR/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ O padrão comum para URL de repositório é `` `${baseURL}/${owner}/${repo}` ``

- `'en'` (`'en-US'`)
- `'zh'` (`'zh-CN'`)
- `'pt-BR'` (`'pt-BR'`)
- `'pt'` (`'pt-BR'`)
- `'ja'` (`'ja-JP'`)

Contribuições são bem-vindas para mais suporte a idiomas.
:::
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/zh/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ Vue.use(Vssue, {
- `'en'` (`'en-US'`)
- `'zh'` (`'zh-CN'`)
- `'pt'` (`'pt-BR'`)
- `'ja'` (`'ja-JP'`)

欢迎贡献代码帮助 Vssue 支持更多语言。
:::
Expand Down
3 changes: 3 additions & 0 deletions packages/vssue/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import VueI18n from 'vue-i18n'
import enUS from './langs/en-US'
import zhCN from './langs/zh-CN'
import ptBR from './langs/pt-BR'
import jaJP from './langs/ja-JP'

if (!Vue.prototype.hasOwnProperty('$i18n')) {
Vue.use(VueI18n)
Expand All @@ -18,6 +19,8 @@ const i18n: VueI18n = new VueI18n({
'zh-CN': zhCN,
'pt': ptBR,
'pt-BR': ptBR,
'ja': jaJP,
'ja-JP': jaJP,
},
})

Expand Down
51 changes: 51 additions & 0 deletions packages/vssue/src/i18n/langs/ja-JP.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import VueI18n from 'vue-i18n'

const messages: VueI18n.LocaleMessageObject = {
// auth
login: '{platform} でログイン',
logout: 'ログアウト',
currentUser: '現在のユーザー',

// comment input
loading: '読み込み中',
submit: '送信',
submitting: '送信中',
submitComment: 'コメントを送信',
cancel: 'キャンセル',
edit: '編集',
editMode: '編集モード',
delete: '削除',
reply: '返信',

// reactions
heart: 'ハート',
like: '高評価',
unlike: '低評価',

// pagination
perPage: 'コメント/ページ',
sort: '並び順を変更するにはクリックしてください',
page: 'ページ',
prev: '前のページ',
next: '次のページ',

// hint
comments: 'コメント | {count} コメント',
loginToComment: 'コメントを残すには {platform} アカウントでログインしてください。',
placeholder: 'コメントを残してください。Markdown 記法をサポートしています。 Ctrl + Enter で送信できます。',
noLoginPlaceHolder: 'コメントを残すにはログインしてください。マークダウン記法をサポートしています。',

// status
initializing: '初期化中...',
loadingComments: 'コメントの読み込み中...',
failed: 'コメントの読み込みに失敗しました',
requireLogin: 'コメントを見るにはログインしてください',
noComments: 'まだコメントがありません。最初のコメントを残しましょう!',

// alerts
reactionGiven: `既に '{reaction}' のリアクションをしています`,
deleteConfirm: '本当にコメントを削除してもいいですか?',
deleteFailed: 'コメントの削除に失敗しました',
}

export default messages

0 comments on commit 4d3c9b9

Please sign in to comment.