Skip to content

Commit

Permalink
i18n: experimental japanese localisation (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikoTan authored Apr 30, 2022
1 parent 47d06d5 commit 404835a
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 4 deletions.
11 changes: 11 additions & 0 deletions packages/cli/src/locales/ja.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
commands:
exit:
description: BOT をシャットダウンする。

options:
restart: BOT を再起動する。

messages:
exiting: シャットダウン中……
restarting: 再起動中……
restarted: 再起動完了。
1 change: 1 addition & 0 deletions packages/cli/src/worker/daemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function apply(ctx: Context, config: Config = {}) {

if (exitCommand) {
ctx.i18n.define('zh', require('../locales/zh'))
ctx.i18n.define('ja', require('../locales/ja'))
ctx.i18n.define('fr', require('../locales/fr'))

ctx
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class I18n {
this.define('', { '': '' })
this.define('zh', require('./locales/zh'))
this.define('en', require('./locales/en'))
this.define('ja', require('./locales/ja'))
this.define('fr', require('./locales/fr'))
this.registerBuiltins()
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ suggest:
command-prefix: ''
command-suffix: Send a period to apply the suggestion.
help-prefix: Command not found.
help-suffix: Send a blank line or a period to apply the suggestion.
help-suffix: Send a period to apply the suggestion.

commands:
help:
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ suggest:
command-prefix: ''
command-suffix: Tapez un point pour appliquer la suggestion.
help-prefix: Commande inconnue.
help-suffix: Tapez une ligne vide ou un point pour appliquer la suggestion.
help-suffix: Tapez un point pour appliquer la suggestion.

commands:
help:
Expand Down
53 changes: 53 additions & 0 deletions packages/core/src/locales/ja.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
general:
name: 日本語
paren: '({0})'
quote: '「{0}」'
comma: ''
and:
or:
day:
hour: 時間
minute:
second:

internal:
low-authority: 実行できる権限が付与されていません
insufficient-arguments: パラメータが不足しています、「help」を送信して使い方を確認してください。
redunant-arguments: パラメータ数が多すぎます、「help」を送信して使い方を確認してください。
invalid-argument: 無効なパラメータ「{0}」、{1}
unknown-option: 未知なオプション「{0}」、「help」を送信して使い方を確認してください。
invalid-option: 無効なオプション「{0}」、{1}
check-syntax: 「help」を送信して使い方を検索してください。
invalid-number: 数字を指定してください。
invalid-integer: 整数を指定してください。
invalid-posint: 正の整数を指定してください。
invalid-natural: 自然数を指定してください。
invalid-date: 日付を指定してください。
invalid-user: ユーザー名を指定してください。
invalid-channel: チャンネル名を指定してください。

suggest:
hint: 「{0}」を実行したいですか?
command-prefix: ''
command-suffix: 句点を送信してコマンドを実行します。
help-prefix: コマンドが見つかりません。
help-suffix: 句点を送信してこの提案を実行します。

commands:
help:
description: ヘルプを表示
options:
help: このメッセージを表示
authority: コマンドやオプションの権限を表示
showHidden: 隠しコマンドやオプションを表示
messages:
hint-authority: 最低権限は括弧にで表示されています
hint-subcommand: サブコマンドがあるコマンドはアスタリスクで表示されています
command-aliases: '別名: {0}。'
command-examples: 例:
command-authority: '最低権限:{0}。'
subcommand-prolog: '利用可能なサブコマンド{0}:'
global-prolog: '利用可能なコマンド{0}:'
global-epilog: 「help <command>」を送信してコマンドの使い方を表示します。
available-options: '利用可能なオプション:'
available-options-with-authority: '利用可能なオプション(必要な権限は括弧にで表示されています):'
4 changes: 2 additions & 2 deletions packages/core/src/locales/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ internal:
suggest:
hint: 您要找的是不是{0}?
command-prefix: ''
command-suffix: 发送空行或句号以使用推测的指令
command-suffix: 发送句号以使用推测的指令
help-prefix: 指令未找到。
help-suffix: 发送空行或句号以使用推测的指令
help-suffix: 发送句号以使用推测的指令

commands:
help:
Expand Down

0 comments on commit 404835a

Please sign in to comment.