Skip to content

Commit e506f48

Browse files
authored
Merge pull request RooCodeInc#1495 from brownrw8/i18n-continued
Uncomment i18n Feature + Add to Welcome Page
2 parents 32069f2 + a528a9e commit e506f48

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useExtensionState } from "../../context/ExtensionStateContext"
55
import { validateApiConfiguration, validateModelId } from "../../utils/validate"
66
import { vscode } from "../../utils/vscode"
77
import ApiOptions from "./ApiOptions"
8-
//import LanguageOptions from "./LanguageOptions"
8+
import LanguageOptions from "./LanguageOptions"
99
import SettingsButton from "../common/SettingsButton"
1010

1111
const IS_DEV = false // FIXME: use flags when packaging
@@ -117,9 +117,9 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
117117
{t("customInstructionsDescription")}
118118
</p>
119119
</div>
120-
{/*<div style={{ marginBottom: 5 }}>
120+
<div style={{ marginBottom: 5 }}>
121121
<LanguageOptions />
122-
</div>*/}
122+
</div>
123123

124124
{IS_DEV && (
125125
<>

webview-ui/src/components/welcome/WelcomeView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { validateApiConfiguration } from "../../utils/validate"
55
import { vscode } from "../../utils/vscode"
66
import ApiOptions from "../settings/ApiOptions"
77
import { useTranslation } from "react-i18next"
8+
import LanguageOptions from "../settings/LanguageOptions"
89
import { Trans } from "react-i18next"
910

1011
const WelcomeView = () => {
@@ -53,6 +54,7 @@ const WelcomeView = () => {
5354

5455
<div style={{ marginTop: "10px" }}>
5556
<ApiOptions showModelOptions={false} />
57+
<LanguageOptions />
5658
<VSCodeButton onClick={handleSubmit} disabled={disableLetsGoButton} style={{ marginTop: "3px" }}>
5759
{t("letsGo")}
5860
</VSCodeButton>

webview-ui/src/i18n.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import i18n from "i18next"
22
import { initReactI18next } from "react-i18next"
33

44
import translationEN from "./locales/en/translation.json"
5-
//import translationES from "./locales/es/translation.json"
6-
//import translationDE from "./locales/de/translation.json"
7-
//import translationZHCN from "./locales/zh-cn/translation.json"
8-
//import translationZHTW from "./locales/zh-tw/translation.json"
9-
//import translationJA from "./locales/ja/translation.json"
5+
import translationES from "./locales/es/translation.json"
6+
import translationDE from "./locales/de/translation.json"
7+
import translationZHCN from "./locales/zh-cn/translation.json"
8+
import translationZHTW from "./locales/zh-tw/translation.json"
9+
import translationJA from "./locales/ja/translation.json"
1010

1111
i18n.use(initReactI18next) // passes i18n down to react-i18next
1212
.init({
@@ -20,10 +20,10 @@ i18n.use(initReactI18next) // passes i18n down to react-i18next
2020
})
2121

2222
i18n.addResourceBundle("en", "translation", translationEN)
23-
//i18n.addResourceBundle("es", "translation", translationES)
24-
//i18n.addResourceBundle("de", "translation", translationDE)
25-
//i18n.addResourceBundle("zh-CN", "translation", translationZHCN)
26-
//i18n.addResourceBundle("zh-TW", "translation", translationZHTW)
27-
//i18n.addResourceBundle("ja", "translation", translationJA)
23+
i18n.addResourceBundle("es", "translation", translationES)
24+
i18n.addResourceBundle("de", "translation", translationDE)
25+
i18n.addResourceBundle("zh-CN", "translation", translationZHCN)
26+
i18n.addResourceBundle("zh-TW", "translation", translationZHTW)
27+
i18n.addResourceBundle("ja", "translation", translationJA)
2828

2929
export default i18n

0 commit comments

Comments
 (0)