Skip to content

Commit

Permalink
feat(vssue): add zh-TW language support
Browse files Browse the repository at this point in the history
  • Loading branch information
ycs77 committed Aug 10, 2020
1 parent 6549d84 commit 77b876e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/docs/src/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``:

- `'en'` (`'en-US'`)
- `'zh'` (`'zh-CN'`)
- `'zh-TW'`
- `'pt'` (`'pt-BR'`)
- `'ja'` (`'ja-JP'`)
- `'he'` (`'he-IL'`)
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 @@ -230,6 +230,7 @@ Vue.use(Vssue, {

- `'en'` (`'en-US'`)
- `'zh'` (`'zh-CN'`)
- `'zh-TW'`
- `'pt'` (`'pt-BR'`)
- `'ja'` (`'ja-JP'`)
- `'he'` (`'he-IL'`)
Expand Down
2 changes: 2 additions & 0 deletions packages/vssue/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Vue from 'vue';
import VueI18n from 'vue-i18n';
import enUS from './langs/en-US';
import zhCN from './langs/zh-CN';
import zhTW from './langs/zh-TW';
import ptBR from './langs/pt-BR';
import jaJP from './langs/ja-JP';
import heIL from './langs/he-IL';
Expand All @@ -18,6 +19,7 @@ const i18n: VueI18n = new VueI18n({
'en-US': enUS,
zh: zhCN,
'zh-CN': zhCN,
'zh-TW': zhTW,
pt: ptBR,
'pt-BR': ptBR,
ja: jaJP,
Expand Down
52 changes: 52 additions & 0 deletions packages/vssue/src/i18n/langs/zh-TW.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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} 條評論 | {count} 條評論',
loginToComment: '使用 {platform} 帳號登入後發表評論',
placeholder: '留下你的評論丨支持 Markdown 語法丨Ctrl + Enter 發表評論',
noLoginPlaceHolder: '登入後才能發表評論丨支持 Markdown 語法',

// status
failed: '評論加載失敗',
initializing: '正在初始化...',
issueNotCreated: '點擊創建 Issue',
loadingComments: '正在加載評論...',
loginRequired: '登入後查看評論',
noComments: '還沒有評論,來發表第一條評論吧!',

// alerts
reactionGiven: `已經點擊過 '{reaction}' 了`,
deleteConfirm: '確認要刪除該評論嗎?',
deleteFailed: '評論刪除失敗',
};

export default messages;

0 comments on commit 77b876e

Please sign in to comment.