-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(i18n): Support i18n and welcome PR contributions
- Loading branch information
1 parent
fe32de2
commit a61f3b4
Showing
41 changed files
with
1,060 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import i18next from 'i18next'; | ||
import { initReactI18next } from 'react-i18next'; | ||
|
||
import en from './lang/en'; | ||
import ja_JP from './lang/ja_JP'; | ||
import ko_KR from './lang/ko_KR'; | ||
import zh_CN from './lang/zh_CN'; | ||
import zh_HK from './lang/zh_HK'; | ||
|
||
i18next.use(initReactI18next).init({ | ||
debug: process.env.NODE_ENV === 'development', | ||
fallbackLng: 'en', | ||
lng: 'en', | ||
resources: { | ||
en: { | ||
translation: en, | ||
}, | ||
ja_JP: { | ||
translation: ja_JP, | ||
}, | ||
ko_KR: { | ||
translation: ko_KR, | ||
}, | ||
zh_CN: { | ||
translation: zh_CN, | ||
}, | ||
zh_HK: { | ||
translation: zh_HK, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { type SelectProps } from 'antd'; | ||
|
||
export const i18nOptions: SelectProps['options'] = [ | ||
{ | ||
label: 'English', | ||
value: 'en', | ||
}, | ||
{ | ||
label: '简体中文', | ||
value: 'zh_CN', | ||
}, | ||
{ | ||
label: '繁體中文', | ||
value: 'zh_HK', | ||
}, | ||
{ | ||
label: '日本語', | ||
value: 'ja_JP', | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
const translation = { | ||
community: 'Community', | ||
custom: 'Custom', | ||
extraNetwork: 'Extra Network', | ||
feedback: 'Feedback', | ||
fixed: 'Fixed', | ||
float: 'Float', | ||
help: 'Help', | ||
kitchen: 'Kitchen', | ||
loadPrompt: 'Load Prompt', | ||
lobe: 'Lobe', | ||
moreProducts: 'More Products', | ||
negative: 'Negative', | ||
positive: 'Positive', | ||
quickSetting: 'Quick Setting', | ||
resizable: 'Resizable', | ||
resources: 'Resources', | ||
scroll: 'Scroll', | ||
setPrompt: 'Set Prompt', | ||
setting: 'Setting', | ||
settingButtomReset: 'Reset', | ||
settingButtomSubmit: 'Apply and Restart Interface', | ||
settingCustomLogo: 'Custom Logo', | ||
settingCustomLogoDesc: 'Support URL / Base64 / Emoji symbols', | ||
settingCustomTitle: 'Custom Title', | ||
settingCustomTitleDesc: 'Custom Logo Title', | ||
settingExtraNetworkSidebarDefaultCardSize: 'Model Cover Size', | ||
settingExtraNetworkSidebarDefaultCardSizeDesc: 'Default value of model cover size when starting', | ||
settingExtraNetworkSidebarDefaultExpand: 'Default Expand', | ||
settingExtraNetworkSidebarDefaultExpandDesc: | ||
'Whether to expand the sidebar by default when starting', | ||
settingExtraNetworkSidebarDefaultWidth: 'Default Width', | ||
settingExtraNetworkSidebarDefaultWidthDesc: 'Default width of the sidebar when starting', | ||
settingExtraNetworkSidebarDisplayMode: 'Display Mode', | ||
settingExtraNetworkSidebarDisplayModeDesc: | ||
'Fixed as grid mode for constant display, auto-expand when the mouse moves to the side in floating mode', | ||
settingExtraNetworkSidebarEnable: 'Enable', | ||
settingExtraNetworkSidebarEnableDesc: 'Enable the extra network sidebar on the right side', | ||
settingGroupExtraNetworkSidebar: 'Extra Network Sidebar', | ||
settingGroupLayout: 'Layout Settings', | ||
settingGroupPromotTextarea: 'Prompt Textbox', | ||
settingGroupQuickSettingSidebar: 'Quick Setting Sidebar', | ||
settingGroupTheme: 'Theme Settings', | ||
settingHideFooter: 'Hide Footer', | ||
settingHideFooterDesc: | ||
'Hide the theme footer and only display the default footer of stable diffusion webui', | ||
settingLanguage: 'Language', | ||
settingLanguageDesc: 'Lobe Theme language', | ||
settingLogoPreview: 'Preview', | ||
settingLogoType: 'Logo Type', | ||
settingLogoTypeDesc: 'Logo Type', | ||
settingNeutralColor: 'Neutral Color', | ||
settingNeutralColorDesc: | ||
'Customize different shades of gray with different color tendencies, the second one is the original Kitchen neutral color', | ||
settingPrimaryColor: 'Primary Color', | ||
settingPrimaryColorDesc: | ||
'Custom primary color, the second one is the original Kitchen theme color', | ||
settingPromptDisplayMode: 'Display Mode', | ||
settingPromptDisplayModeDesc: 'Fixed height or auto height with draggable resize support', | ||
settingPromptEditor: 'Prompt Editor', | ||
settingPromptEditorDesc: 'Provide a simple prompt editor at the top of the quick setting sidebar', | ||
settingQuickSettingSidebarDefaultExpand: 'Default Expand', | ||
settingQuickSettingSidebarDefaultExpandDesc: | ||
'Whether to expand the sidebar by default when starting', | ||
settingQuickSettingSidebarDefaultWidth: 'Default Width', | ||
settingQuickSettingSidebarDefaultWidthDesc: 'Default width of the sidebar when starting', | ||
settingQuickSettingSidebarDisplayMode: 'Display Mode', | ||
settingQuickSettingSidebarDisplayModeDesc: | ||
'Fixed as grid mode for constant display, auto-expand when the mouse moves to the side in floating mode', | ||
settingQuickSettingSidebarEnable: 'Enable', | ||
settingQuickSettingSidebarEnableDesc: 'Enable the quick setting sidebar on the left side', | ||
settingReduceAnimation: 'Reduce Animation', | ||
settingReduceAnimationDesc: | ||
'Reduce the blur effect and background flow color, which can improve smoothness and save CPU usage', | ||
settingSplitPreviewer: 'Split Previewer', | ||
settingSplitPreviewerDesc: | ||
'Put the prompt input box on the left and the generate button on the right, ensuring that the generated image is always displayed at the top when scrolling (experimental)', | ||
settingSvgIcons: 'Use SVG Icons', | ||
settingSvgIconsDesc: 'Replace all Emoji icons in stable diffusion webui with SVG icons globally', | ||
switchTheme: 'Switch Light/Dark Theme', | ||
themeFeedback: 'Theme Feedback', | ||
themeSetting: 'Theme Settings', | ||
}; | ||
|
||
export default translation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import type { Translation } from '@/types'; | ||
|
||
const translation: Translation = { | ||
community: 'コミュニティ', | ||
custom: 'カスタム', | ||
extraNetwork: '追加ネットワーク', | ||
feedback: 'フィードバック', | ||
fixed: '固定', | ||
float: 'フロート', | ||
help: 'ヘルプ', | ||
kitchen: 'キッチン', | ||
loadPrompt: 'プロンプトをロード', | ||
lobe: 'ローブ', | ||
moreProducts: 'その他の製品', | ||
negative: 'ネガティブなヒント', | ||
positive: 'ポジティブなヒント', | ||
quickSetting: 'クイック設定', | ||
resizable: 'リサイズ可能', | ||
resources: '関連リソース', | ||
scroll: 'スクロール', | ||
setPrompt: 'プロンプトを設定', | ||
setting: '設定', | ||
settingButtomReset: 'リセット', | ||
settingButtomSubmit: '適用して再起動', | ||
settingCustomLogo: 'カスタムロゴ', | ||
settingCustomLogoDesc: 'URL / Base64 / 絵文字をサポート', | ||
settingCustomTitle: 'カスタムタイトル', | ||
settingCustomTitleDesc: 'カスタムロゴのタイトル名', | ||
settingExtraNetworkSidebarDefaultCardSize: 'モデルカバーサイズ', | ||
settingExtraNetworkSidebarDefaultCardSizeDesc: '起動時のモデルカバーサイズのデフォルト値', | ||
settingExtraNetworkSidebarDefaultExpand: 'デフォルトで展開', | ||
settingExtraNetworkSidebarDefaultExpandDesc: '起動時にサイドバーをデフォルトで展開しますか?', | ||
settingExtraNetworkSidebarDefaultWidth: 'デフォルト幅', | ||
settingExtraNetworkSidebarDefaultWidthDesc: '起動時のサイドバーのデフォルト幅', | ||
settingExtraNetworkSidebarDisplayMode: '表示モード', | ||
settingExtraNetworkSidebarDisplayModeDesc: | ||
'グリッドモードで常に表示するか、ホバー時に自動的に展開するフロートモードで表示するか', | ||
settingExtraNetworkSidebarEnable: '有効にする', | ||
settingExtraNetworkSidebarEnableDesc: '右側の追加ネットワークサイドバーを有効にする', | ||
settingGroupExtraNetworkSidebar: '追加ネットワークサイドバー', | ||
settingGroupLayout: 'レイアウト設定', | ||
settingGroupPromotTextarea: 'プロンプトテキストエリア', | ||
settingGroupQuickSettingSidebar: 'クイック設定サイドバー', | ||
settingGroupTheme: 'テーマ設定', | ||
settingHideFooter: 'フッターを非表示にする', | ||
settingHideFooterDesc: | ||
'テーマのフッターを非表示にし、stable diffusion webui のデフォルトフッターのみ表示します', | ||
settingLanguage: '言語', | ||
settingLanguageDesc: 'Lobe Themeの言語', | ||
settingLogoPreview: 'プレビュー', | ||
settingLogoType: 'ロゴタイプ', | ||
settingLogoTypeDesc: 'ロゴタイプ', | ||
settingNeutralColor: '中立色', | ||
settingNeutralColorDesc: | ||
'異なる色相のグレースケールのカスタマイズ。2番目は元のKitchenの中立色です', | ||
settingPrimaryColor: 'プライマリカラー', | ||
settingPrimaryColorDesc: 'カスタムプライマリカラー。2番目は元のKitchenのプライマリカラーです', | ||
settingPromptDisplayMode: '表示モード', | ||
settingPromptDisplayModeDesc: '固定の高さまたはドラッグリサイズをサポートする自動の高さ', | ||
settingPromptEditor: 'プロンプトエディタ', | ||
settingPromptEditorDesc: 'クイック設定サイドバーの上部に簡単なプロンプトエディタを提供します', | ||
settingQuickSettingSidebarDefaultExpand: 'デフォルトで展開', | ||
settingQuickSettingSidebarDefaultExpandDesc: '起動時にサイドバーをデフォルトで展開しますか?', | ||
settingQuickSettingSidebarDefaultWidth: 'デフォルト幅', | ||
settingQuickSettingSidebarDefaultWidthDesc: '起動時のサイドバーのデフォルト幅', | ||
settingQuickSettingSidebarDisplayMode: '表示モード', | ||
settingQuickSettingSidebarDisplayModeDesc: | ||
'グリッドモードで常に表示するか、ホバー時に自動的に展開するフロートモードで表示するか', | ||
settingQuickSettingSidebarEnable: '有効にする', | ||
settingQuickSettingSidebarEnableDesc: '左側のクイック設定サイドバーを有効にする', | ||
settingReduceAnimation: 'アニメーションを削減', | ||
settingReduceAnimationDesc: | ||
'ガラスのエフェクトと背景の流れる色を削減し、スムーズさを向上させ、CPUの使用量を節約できます', | ||
settingSplitPreviewer: '2列モード', | ||
settingSplitPreviewerDesc: | ||
'プロンプト入力ボックスを左側に配置し、生成ボタンを右側に配置し、スクロール時に生成された画像が常にトップに表示されるようにします(実験的)', | ||
settingSvgIcons: 'SVGアイコンを使用', | ||
settingSvgIconsDesc: 'stable diffusion webuiの絵文字アイコンをすべてSVGアイコンに置き換えます', | ||
switchTheme: '明暗テーマを切り替える', | ||
themeFeedback: 'テーマのフィードバック', | ||
themeSetting: 'テーマ設定', | ||
}; | ||
|
||
export default translation; |
Oops, something went wrong.