diff --git a/i18n/i18next-config.ts b/i18n/i18next-config.ts index 0692979..958ab15 100644 --- a/i18n/i18next-config.ts +++ b/i18n/i18next-config.ts @@ -4,11 +4,14 @@ import { initReactI18next } from 'react-i18next' import commonEn from './lang/common.en' import commonEs from './lang/common.es' import commonZh from './lang/common.zh' +import commonJa from './lang/common.ja' import appEn from './lang/app.en' import appEs from './lang/app.es' import appZh from './lang/app.zh' +import appJa from './lang/app.ja' import toolsEn from './lang/tools.en' import toolsZh from './lang/tools.zh' +import toolsJa from './lang/tools.ja' import type { Locale } from '.' const resources = { @@ -34,6 +37,14 @@ const resources = { tools: toolsZh, }, }, + 'ja': { + translation: { + common: commonJa, + app: appJa, + // tools + tools: toolsJa, + }, + }, } i18n.use(initReactI18next) diff --git a/i18n/index.ts b/i18n/index.ts index 041b555..1a2729f 100644 --- a/i18n/index.ts +++ b/i18n/index.ts @@ -1,6 +1,6 @@ export const i18n = { defaultLocale: 'en', - locales: ['en', 'es', 'zh-Hans'], + locales: ['en', 'es', 'zh-Hans', 'ja'], } as const export type Locale = typeof i18n['locales'][number] diff --git a/i18n/lang/app.ja.ts b/i18n/lang/app.ja.ts new file mode 100644 index 0000000..d3115e5 --- /dev/null +++ b/i18n/lang/app.ja.ts @@ -0,0 +1,36 @@ +const translation = { + common: { + welcome: 'ご利用いただきありがとうございます', + appUnavailable: 'アプリは利用できません', + appUnkonwError: 'アプリは利用できません', + }, + chat: { + newChat: '新しいチャット', + newChatDefaultName: '新しい会話', + openingStatementTitle: 'オープニングステートメント', + powerBy: '提供元', + prompt: 'プロンプト', + privatePromptConfigTitle: '会話設定', + publicPromptConfigTitle: '初期プロンプト', + configStatusDes: '開始前に、会話設定を変更できます', + configDisabled: + '前回のセッション設定がこのセッションで使用されています。', + startChat: '開始', + privacyPolicyLeft: + 'ご利用前に、', + privacyPolicyMiddle: + 'プライバシーポリシー', + privacyPolicyRight: + ' をお読みください。', + }, + errorMessage: { + valueOfVarRequired: '変数の値は空にできません', + waitForResponse: + '前のメッセージの応答が完了するまでお待ちください。', + }, + variableTable: { + optional: '任意', + }, +} + +export default translation diff --git a/i18n/lang/common.ja.ts b/i18n/lang/common.ja.ts new file mode 100644 index 0000000..1fc9540 --- /dev/null +++ b/i18n/lang/common.ja.ts @@ -0,0 +1,33 @@ +const translation = { + api: { + success: '成功', + saved: '保存しました', + create: '作成しました', + }, + operation: { + confirm: '確認', + cancel: 'キャンセル', + clear: 'クリア', + save: '保存', + edit: '編集', + refresh: '再起動', + search: '検索', + send: '送信', + lineBreak: '改行', + like: 'いいね', + dislike: 'よくないね', + ok: 'OK', + }, + imageUploader: { + uploadFromComputer: 'コンピューターからアップロード', + uploadFromComputerReadError: '画像の読み込みに失敗しました。もう一度お試しください。', + uploadFromComputerUploadError: '画像のアップロードに失敗しました。もう一度アップロードしてください。', + uploadFromComputerLimit: 'アップロードする画像は{{size}} MBを超えてはいけません', + pasteImageLink: '画像リンクを貼り付け', + pasteImageLinkInputPlaceholder: 'ここに画像リンクを貼り付けてください', + pasteImageLinkInvalid: '無効な画像リンクです', + imageUpload: '画像アップロード', + }, +} + +export default translation diff --git a/i18n/lang/tools.ja.ts b/i18n/lang/tools.ja.ts new file mode 100644 index 0000000..d60d96c --- /dev/null +++ b/i18n/lang/tools.ja.ts @@ -0,0 +1,103 @@ +const translation = { + title: 'ツール', + createCustomTool: 'カスタムツールの作成', + type: { + all: 'すべて', + builtIn: '内蔵', + custom: 'カスタム', + }, + contribute: { + line1: '興味があります ', + line2: 'Difyにツールを貢献すること。', + viewGuide: 'ガイドを見る', + }, + author: '作成者', + auth: { + unauthorized: '認証が必要', + authorized: '認証済み', + setup: '使用するために認証を設定', + setupModalTitle: '認証設定', + setupModalTitleDescription: '資格情報を設定すると、ワークスペース内のすべてのメンバーがアプリケーションを編成する際にこのツールを使用できるようになります。', + }, + includeToolNum: '{{num}} のツールが含まれています', + addTool: 'ツールを追加', + createTool: { + title: 'カスタムツールの作成', + editAction: '設定', + editTitle: 'カスタムツールの編集', + name: '名前', + toolNamePlaceHolder: 'ツール名を入力してください', + schema: 'スキーマ', + schemaPlaceHolder: 'ここにOpenAPIスキーマを入力してください', + viewSchemaSpec: 'OpenAPI-Swagger仕様を見る', + importFromUrl: 'URLからインポート', + importFromUrlPlaceHolder: 'https://...', + urlError: '有効なURLを入力してください', + examples: '例', + exampleOptions: { + json: '天気予報(JSON)', + yaml: 'ペットストア(YAML)', + blankTemplate: '空のテンプレート', + }, + availableTools: { + title: '利用可能なツール', + name: '名前', + description: '説明', + method: 'メソッド', + path: 'パス', + action: 'アクション', + test: 'テスト', + }, + authMethod: { + title: '認証方法', + type: '認証タイプ', + types: { + none: 'なし', + api_key: 'APIキー', + }, + key: 'キー', + value: '値', + }, + privacyPolicy: 'プライバシーポリシー', + privacyPolicyPlaceholder: 'プライバシーポリシーを入力してください', + }, + test: { + title: 'テスト', + parametersValue: 'パラメータと値', + parameters: 'パラメータ', + value: '値', + testResult: 'テスト結果', + testResultPlaceholder: 'テスト結果はここに表示されます', + }, + thought: { + using: '使用中', + used: '使用済み', + requestTitle: 'リクエスト先', + responseTitle: 'レスポンス元', + }, + setBuiltInTools: { + info: '情報', + setting: '設定', + toolDescription: 'ツールの説明', + parameters: 'パラメータ', + string: '文字列', + number: '数値', + required: '必須', + infoAndSetting: '情報と設定', + }, + noCustomTool: { + title: 'カスタムツールがありません!', + content: 'ここでカスタムツールを追加および管理して、AIアプリを構築します。', + createTool: 'ツールの作成', + }, + noSearchRes: { + title: '申し訳ありません、結果が見つかりません!', + content: '検索条件に一致するツールは見つかりませんでした。', + reset: '検索をリセット', + }, + builtInPromptTitle: 'プロンプト', + toolRemoved: 'ツールが削除されました', + notAuthorized: 'ツールが認証されていません', +} + +export default translation