- {USER_TYPE_SELECTIONS.map((option) => {
+ {getUserTypeSelections(t).map((option) => {
const isSelected = userType === option.type
return (
@@ -266,6 +269,7 @@ const OnboardingStepContent = ({
}
const OnboardingViewContent = ({ onboardingModels }: { onboardingModels: OnboardingModelGroup }) => {
+ const { t } = useTranslation("settings")
const { handleFieldsChange } = useApiConfigurationHandlers()
const { openRouterModels, hideSettings, hideAccount, setShowWelcome } = useExtensionState()
@@ -362,10 +366,10 @@ const OnboardingViewContent = ({ onboardingModels }: { onboardingModels: Onboard
)
const stepDisplayInfo = useMemo(() => {
- const step = stepNumber === 0 || stepNumber === 2 ? STEP_CONFIG[stepNumber] : null
- const title = step ? step.title : userType ? STEP_CONFIG[userType].title : STEP_CONFIG[0].title
+ const step = stepNumber === 0 || stepNumber === 2 ? getStepConfig(t)[stepNumber] : null
+ const title = step ? step.title : userType ? getStepConfig(t)[userType].title : getStepConfig(t)[0].title
const description = step ? step.description : null
- const buttons = step ? step.buttons : userType ? STEP_CONFIG[userType].buttons : STEP_CONFIG[0].buttons
+ const buttons = step ? step.buttons : userType ? getStepConfig(t)[userType].buttons : getStepConfig(t)[0].buttons
return { title, description, buttons }
}, [stepNumber, userType])
@@ -411,7 +415,7 @@ const OnboardingViewContent = ({ onboardingModels }: { onboardingModels: Onboard
{stepNumber !== 2 && (
-
You can change this later in settings
+
{t("onboarding.canChangeLater")}
)}
diff --git a/webview-ui/src/components/onboarding/data-steps.ts b/webview-ui/src/components/onboarding/data-steps.ts
index 84f629e0..14236585 100644
--- a/webview-ui/src/components/onboarding/data-steps.ts
+++ b/webview-ui/src/components/onboarding/data-steps.ts
@@ -1,3 +1,5 @@
+import type { TFunction } from "i18next"
+
export enum NEW_USER_TYPE {
FREE = "free",
POWER = "power",
@@ -10,45 +12,45 @@ type UserTypeSelection = {
type: NEW_USER_TYPE
}
-export const STEP_CONFIG = {
+export const getStepConfig = (t: TFunction) => ({
0: {
- title: "How will you use Cline?",
- description: "Select an option below to get started.",
+ title: t("onboarding.howWillYouUse"),
+ description: t("onboarding.selectOption"),
buttons: [
- { text: "Continue", action: "next", variant: "default" },
- { text: "Login to Cline", action: "signin", variant: "secondary" },
+ { text: t("onboarding.continue"), action: "next", variant: "default" },
+ { text: t("onboarding.loginToCline"), action: "signin", variant: "secondary" },
],
},
[NEW_USER_TYPE.FREE]: {
- title: "Select a free model",
+ title: t("onboarding.selectFreeModel"),
buttons: [
- { text: "Create my Account", action: "signup", variant: "default" },
- { text: "Back", action: "back", variant: "secondary" },
+ { text: t("onboarding.createMyAccount"), action: "signup", variant: "default" },
+ { text: t("onboarding.back"), action: "back", variant: "secondary" },
],
},
[NEW_USER_TYPE.POWER]: {
- title: "Select your model",
+ title: t("onboarding.selectYourModel"),
buttons: [
- { text: "Create my Account", action: "signup", variant: "default" },
- { text: "Back", action: "back", variant: "secondary" },
+ { text: t("onboarding.createMyAccount"), action: "signup", variant: "default" },
+ { text: t("onboarding.back"), action: "back", variant: "secondary" },
],
},
[NEW_USER_TYPE.BYOK]: {
- title: "Configure your provider",
+ title: t("onboarding.configureYourProvider"),
buttons: [
- { text: "Continue", action: "done", variant: "default" },
- { text: "Back", action: "back", variant: "secondary" },
+ { text: t("onboarding.continue"), action: "done", variant: "default" },
+ { text: t("onboarding.back"), action: "back", variant: "secondary" },
],
},
2: {
- title: "Almost there!",
- description: "Complete account creation in your browser. Then come back here to finish up.",
- buttons: [{ text: "Back", action: "back", variant: "secondary" }],
+ title: t("onboarding.almostThere"),
+ description: t("onboarding.completeInBrowser"),
+ buttons: [{ text: t("onboarding.back"), action: "back", variant: "secondary" }],
},
-} as const
+})
-export const USER_TYPE_SELECTIONS: UserTypeSelection[] = [
- { title: "Absolutely Free", description: "Get started at no cost", type: NEW_USER_TYPE.FREE },
- { title: "Frontier Model", description: "Claude, GPT Codex, Gemini, etc.", type: NEW_USER_TYPE.POWER },
- { title: "Bring my own API key", description: "Use Cline with your provider of choice", type: NEW_USER_TYPE.BYOK },
+export const getUserTypeSelections = (t: TFunction): UserTypeSelection[] => [
+ { title: t("onboarding.absolutelyFree"), description: t("onboarding.getStartedNoCost"), type: NEW_USER_TYPE.FREE },
+ { title: t("onboarding.frontierModel"), description: t("onboarding.frontierModelDescription"), type: NEW_USER_TYPE.POWER },
+ { title: t("onboarding.bringOwnKey"), description: t("onboarding.bringOwnKeyDescription"), type: NEW_USER_TYPE.BYOK },
]
diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx
index 37e81905..9fa3eedb 100644
--- a/webview-ui/src/components/settings/ApiOptions.tsx
+++ b/webview-ui/src/components/settings/ApiOptions.tsx
@@ -4,6 +4,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import { KeyboardEvent, useCallback, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useInterval } from "react-use"
import styled from "styled-components"
import { normalizeApiConfiguration } from "@/components/settings/utils/providerUtils"
@@ -97,6 +98,7 @@ const ApiOptions = ({
currentMode,
initialModelTab,
}: ApiOptionsProps) => {
+ const { t } = useTranslation("settings")
// Use full context state for immediate save payload
const { apiConfiguration, remoteConfigSettings } = useExtensionState()
@@ -282,16 +284,16 @@ const ApiOptions = ({
- API Provider
+ {t("settings.apiProvider")}
-
Provider options are managed by your organization's remote configuration
+
{t("settings.providerManagedByOrg")}
) : (
- API Provider
+ {t("settings.apiProvider")}
)}
@@ -307,7 +309,7 @@ const ApiOptions = ({
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select provider..."
+ placeholder={t("settings.searchSelectProvider")}
role="combobox"
style={{
width: "100%",
@@ -318,7 +320,7 @@ const ApiOptions = ({
value={searchTerm}>
{searchTerm && searchTerm !== currentProviderLabel && (
{
setSearchTerm("")
diff --git a/webview-ui/src/components/settings/BasetenModelPicker.tsx b/webview-ui/src/components/settings/BasetenModelPicker.tsx
index 945afd5e..825056c2 100644
--- a/webview-ui/src/components/settings/BasetenModelPicker.tsx
+++ b/webview-ui/src/components/settings/BasetenModelPicker.tsx
@@ -3,6 +3,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import React, { KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "../../context/ExtensionStateContext"
import { highlight } from "../history/HistoryView"
import { ModelInfoView } from "./common/ModelInfoView"
@@ -15,6 +16,7 @@ export interface BasetenModelPickerProps {
}
const BasetenModelPicker: React.FC
= ({ isPopup, currentMode }) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, basetenModels: dynamicBasetenModels } = useExtensionState()
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -195,7 +197,7 @@ const BasetenModelPicker: React.FC = ({ isPopup, curren
- Model
+ {t("settings.model")}
= ({ isPopup, curren
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{
width: "100%",
diff --git a/webview-ui/src/components/settings/ClineAccountInfoCard.tsx b/webview-ui/src/components/settings/ClineAccountInfoCard.tsx
index 86fe88da..052664fe 100644
--- a/webview-ui/src/components/settings/ClineAccountInfoCard.tsx
+++ b/webview-ui/src/components/settings/ClineAccountInfoCard.tsx
@@ -1,11 +1,13 @@
import { EmptyRequest } from "@shared/proto/cline/common"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
import { useState } from "react"
+import { useTranslation } from "react-i18next"
import { useClineAuth } from "@/context/ClineAuthContext"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { AccountServiceClient } from "@/services/grpc-client"
export const ClineAccountInfoCard = () => {
+ const { t } = useTranslation("settings")
const { clineUser } = useClineAuth()
const { navigateToAccount } = useExtensionState()
const [isLoading, setIsLoading] = useState(false)
@@ -29,15 +31,15 @@ export const ClineAccountInfoCard = () => {
{user ? (
- View Billing & Usage
+ {t("settings.viewBillingUsage")}
) : (
- Sign Up with Cline
+ {t("settings.signUpWithCline")}
{isLoading && (
-
+
)}
diff --git a/webview-ui/src/components/settings/ClineModelPicker.tsx b/webview-ui/src/components/settings/ClineModelPicker.tsx
index 7b642e22..333e2a5b 100644
--- a/webview-ui/src/components/settings/ClineModelPicker.tsx
+++ b/webview-ui/src/components/settings/ClineModelPicker.tsx
@@ -6,8 +6,10 @@ import type { Mode } from "@shared/storage/types"
import { isClaudeOpusAdaptiveThinkingModel, resolveClaudeOpusAdaptiveThinking } from "@shared/utils/reasoning-support"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
+import i18next from "i18next"
import type React from "react"
import { type KeyboardEvent, useCallback, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import styled from "styled-components"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -79,7 +81,9 @@ function toFeaturedModelCardEntry(
return {
id: model.id,
- description: model.description || (fallbackLabel === "FREE" ? "Free model" : "Recommended model"),
+ description:
+ model.description ||
+ (fallbackLabel === "FREE" ? i18next.t("settings.freeModel") : i18next.t("settings.recommendedModel")),
label: normalizedLabel || fallbackLabel,
}
}
@@ -93,6 +97,7 @@ const FREE_MODELS_FALLBACK: FeaturedModelCardEntry[] = CLINE_RECOMMENDED_MODELS_
.filter((model): model is FeaturedModelCardEntry => model !== null)
const ClineModelPicker: React.FC
= ({ isPopup, currentMode, showProviderRouting, initialTab }) => {
+ const { t } = useTranslation("settings")
const { handleModeFieldsChange, handleFieldChange } = useApiConfigurationHandlers()
const { apiConfiguration, favoritedModelIds, clineModels, refreshClineModels } = useExtensionState()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -391,7 +396,7 @@ const ClineModelPicker: React.FC = ({ isPopup, currentMod
- Model
+ {t("settings.model")}
<>
@@ -452,7 +457,7 @@ const ClineModelPicker: React.FC = ({ isPopup, currentMod
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{
width: "100%",
@@ -571,11 +576,7 @@ const ClineModelPicker: React.FC = ({ isPopup, currentMod
}
currentMode={currentMode}
defaultEffort={showAdaptiveThinkingEffort ? adaptiveThinkingDefaultEffort : "medium"}
- description={
- showAdaptiveThinkingEffort
- ? "Use None to disable adaptive thinking. Higher effort increases response detail and token usage."
- : undefined
- }
+ description={showAdaptiveThinkingEffort ? t("settings.adaptiveThinkingDescription") : undefined}
label={showAdaptiveThinkingEffort ? "Adaptive Thinking" : undefined}
/>
)}
@@ -596,8 +597,7 @@ const ClineModelPicker: React.FC = ({ isPopup, currentMod
marginTop: 0,
color: "var(--vscode-descriptionForeground)",
}}>
- The extension automatically fetches the latest Cline model list. If you're unsure which model to choose, Cline
- works best with anthropic/claude-sonnet-4.5 .
+ {t("settings.autoFetchModelList")} anthropic/claude-sonnet-4.5 .
)}
diff --git a/webview-ui/src/components/settings/GroqModelPicker.tsx b/webview-ui/src/components/settings/GroqModelPicker.tsx
index ee2886ab..6f5ce00a 100644
--- a/webview-ui/src/components/settings/GroqModelPicker.tsx
+++ b/webview-ui/src/components/settings/GroqModelPicker.tsx
@@ -5,6 +5,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import React, { KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import { useExtensionState } from "../../context/ExtensionStateContext"
import { ModelsServiceClient } from "../../services/grpc-client"
@@ -19,6 +20,7 @@ export interface GroqModelPickerProps {
}
const GroqModelPicker: React.FC = ({ isPopup, currentMode }) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, groqModels: dynamicGroqModels, setGroqModels } = useExtensionState()
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -192,7 +194,7 @@ const GroqModelPicker: React.FC = ({ isPopup, currentMode
- Model
+ {t("settings.model")}
= ({ isPopup, currentMode
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{
width: "100%",
diff --git a/webview-ui/src/components/settings/HicapModelPicker.tsx b/webview-ui/src/components/settings/HicapModelPicker.tsx
index ed1cbce8..b2d2b4b8 100644
--- a/webview-ui/src/components/settings/HicapModelPicker.tsx
+++ b/webview-ui/src/components/settings/HicapModelPicker.tsx
@@ -3,6 +3,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import React, { KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { StateServiceClient } from "@/services/grpc-client"
@@ -29,6 +30,7 @@ export interface HicapModelPickerProps {
}
const HicapModelPicker: React.FC = ({ isPopup, currentMode }) => {
+ const { t } = useTranslation("settings")
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const { apiConfiguration, favoritedModelIds, hicapModels, refreshHicapModels } = useExtensionState()
@@ -165,7 +167,7 @@ const HicapModelPicker: React.FC = ({ isPopup, currentMod
- Model ID
+ {t("providers.openaiCompatible.modelId")}
@@ -179,7 +181,7 @@ const HicapModelPicker: React.FC = ({ isPopup, currentMod
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{ zIndex: HICAP_MODEL_PICKER_Z_INDEX }}
value={searchTerm}>
diff --git a/webview-ui/src/components/settings/HuggingFaceModelPicker.tsx b/webview-ui/src/components/settings/HuggingFaceModelPicker.tsx
index 4d542c26..b1c62052 100644
--- a/webview-ui/src/components/settings/HuggingFaceModelPicker.tsx
+++ b/webview-ui/src/components/settings/HuggingFaceModelPicker.tsx
@@ -4,6 +4,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import React, { KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import { useExtensionState } from "../../context/ExtensionStateContext"
import { ModelsServiceClient } from "../../services/grpc-client"
@@ -18,6 +19,7 @@ export interface HuggingFaceModelPickerProps {
}
const HuggingFaceModelPicker: React.FC = ({ isPopup, currentMode }) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, huggingFaceModels: dynamicModels, setHuggingFaceModels } = useExtensionState()
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -180,7 +182,7 @@ const HuggingFaceModelPicker: React.FC = ({ isPopup
setSelectedIndex(-1)
}}
onKeyDown={handleKeyDown}
- placeholder="Search models..."
+ placeholder={t("modelPicker.searchModel")}
role="combobox"
value={searchTerm}>
{searchTerm && (
diff --git a/webview-ui/src/components/settings/ModelDescriptionMarkdown.tsx b/webview-ui/src/components/settings/ModelDescriptionMarkdown.tsx
index 7f1aea61..1c38b4f5 100644
--- a/webview-ui/src/components/settings/ModelDescriptionMarkdown.tsx
+++ b/webview-ui/src/components/settings/ModelDescriptionMarkdown.tsx
@@ -1,4 +1,5 @@
import { memo, useEffect, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useRemark } from "react-remark"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
@@ -10,6 +11,7 @@ interface ModelDescriptionMarkdownProps {
}
export const ModelDescriptionMarkdown = memo(({ markdown, key, isPopup }: ModelDescriptionMarkdownProps) => {
+ const { t } = useTranslation("settings")
// Update the markdown content when the prop changes
const [reactContent, setMarkdown] = useRemark()
const contentRef = useRef(null)
@@ -51,7 +53,7 @@ export const ModelDescriptionMarkdown = memo(({ markdown, key, isPopup }: ModelD
})}
onClick={() => setIsExpanded(!isExpanded)}
variant="link">
- {isExpanded ? "See less" : "See more"}
+ {isExpanded ? t("settings.seeLess") : t("settings.seeMore")}
)}
diff --git a/webview-ui/src/components/settings/OllamaModelPicker.tsx b/webview-ui/src/components/settings/OllamaModelPicker.tsx
index 5fe7a1ee..b1c07e0d 100644
--- a/webview-ui/src/components/settings/OllamaModelPicker.tsx
+++ b/webview-ui/src/components/settings/OllamaModelPicker.tsx
@@ -1,6 +1,7 @@
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import React, { KeyboardEvent, memo, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import styled from "styled-components"
import { highlight } from "../history/HistoryView"
@@ -13,12 +14,9 @@ export interface OllamaModelPickerProps {
placeholder?: string
}
-const OllamaModelPicker: React.FC
= ({
- ollamaModels,
- selectedModelId,
- onModelChange,
- placeholder = "Search and select a model...",
-}) => {
+const OllamaModelPicker: React.FC = ({ ollamaModels, selectedModelId, onModelChange, placeholder }) => {
+ const { t } = useTranslation("settings")
+ const resolvedPlaceholder = placeholder ?? t("settings.searchSelectModel")
const [searchTerm, setSearchTerm] = useState(selectedModelId || "")
const [isDropdownVisible, setIsDropdownVisible] = useState(false)
const [selectedIndex, setSelectedIndex] = useState(-1)
@@ -138,7 +136,7 @@ const OllamaModelPicker: React.FC = ({
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder={placeholder}
+ placeholder={resolvedPlaceholder}
role="combobox"
style={{
width: "100%",
diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx
index 740d9f41..c172269d 100644
--- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx
+++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx
@@ -6,6 +6,7 @@ import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import type React from "react"
import { type KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import styled from "styled-components"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -25,6 +26,7 @@ import { useApiConfigurationHandlers } from "./utils/useApiConfigurationHandlers
// Star icon for favorites
const StarIcon = ({ isFavorite, onClick }: { isFavorite: boolean; onClick: (e: React.MouseEvent) => void }) => {
+ const { t } = useTranslation("settings")
return (
= ({ isPopup,
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{
width: "100%",
diff --git a/webview-ui/src/components/settings/PreferredLanguageSetting.tsx b/webview-ui/src/components/settings/PreferredLanguageSetting.tsx
index e4b75515..cc35d7db 100644
--- a/webview-ui/src/components/settings/PreferredLanguageSetting.tsx
+++ b/webview-ui/src/components/settings/PreferredLanguageSetting.tsx
@@ -1,9 +1,11 @@
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import React from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { updateSetting } from "./utils/settingsHandlers"
const PreferredLanguageSetting: React.FC = () => {
+ const { t } = useTranslation("settings")
const { preferredLanguage } = useExtensionState()
const handleLanguageChange = (newLanguage: string) => {
@@ -13,7 +15,7 @@ const PreferredLanguageSetting: React.FC = () => {
return (
- Preferred Language
+ {t("settings.preferredLanguage")}
{
Traditional Chinese - 繁體中文
Turkish - Türkçe
-
The language that Cline should use for communication.
+
{t("settings.preferredLanguageDescription")}
)
}
diff --git a/webview-ui/src/components/settings/ReasoningEffortSelector.tsx b/webview-ui/src/components/settings/ReasoningEffortSelector.tsx
index 32181820..e100736a 100644
--- a/webview-ui/src/components/settings/ReasoningEffortSelector.tsx
+++ b/webview-ui/src/components/settings/ReasoningEffortSelector.tsx
@@ -1,5 +1,6 @@
import { isOpenaiReasoningEffort, Mode, OPENAI_REASONING_EFFORT_OPTIONS, OpenaiReasoningEffort } from "@shared/storage/types"
import { memo } from "react"
+import { useTranslation } from "react-i18next"
import { Label } from "@/components/ui/label"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -16,11 +17,14 @@ interface ReasoningEffortSelectorProps {
const ReasoningEffortSelector = ({
currentMode,
- label = "Reasoning Effort",
- description = "Higher effort improves depth, but uses more tokens.",
+ label,
+ description,
allowedEfforts = OPENAI_REASONING_EFFORT_OPTIONS,
defaultEffort = "medium",
}: ReasoningEffortSelectorProps) => {
+ const { t } = useTranslation("settings")
+ const resolvedLabel = label ?? t("settings.reasoningEffort")
+ const resolvedDescription = description ?? t("settings.reasoningEffortDescription")
const { apiConfiguration } = useExtensionState()
const { handleModeFieldChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -31,7 +35,7 @@ const ReasoningEffortSelector = ({
return (
- {label}
+ {resolvedLabel}
handleModeFieldChange({ plan: "planModeReasoningEffort", act: "actModeReasoningEffort" }, value, currentMode)
@@ -55,7 +59,7 @@ const ReasoningEffortSelector = ({
marginBottom: 0,
color: "var(--vscode-descriptionForeground)",
}}>
- {description}
+ {resolvedDescription}
)
diff --git a/webview-ui/src/components/settings/RequestyModelPicker.tsx b/webview-ui/src/components/settings/RequestyModelPicker.tsx
index c3c70b63..e9bd6129 100644
--- a/webview-ui/src/components/settings/RequestyModelPicker.tsx
+++ b/webview-ui/src/components/settings/RequestyModelPicker.tsx
@@ -5,6 +5,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import React, { KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import styled from "styled-components"
import { useExtensionState } from "../../context/ExtensionStateContext"
@@ -22,6 +23,7 @@ export interface RequestyModelPickerProps {
}
const RequestyModelPicker: React.FC
= ({ isPopup, baseUrl, currentMode }) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, requestyModels, setRequestyModels } = useExtensionState()
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -187,7 +189,7 @@ const RequestyModelPicker: React.FC = ({ isPopup, base
- Model
+ {t("settings.model")}
= ({ isPopup, base
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{
width: "100%",
diff --git a/webview-ui/src/components/settings/SapAiCoreModelPicker.tsx b/webview-ui/src/components/settings/SapAiCoreModelPicker.tsx
index e049705b..794a39f6 100644
--- a/webview-ui/src/components/settings/SapAiCoreModelPicker.tsx
+++ b/webview-ui/src/components/settings/SapAiCoreModelPicker.tsx
@@ -2,6 +2,7 @@ import { sapAiCoreModels } from "@shared/api"
import { SapAiCoreModelDeployment } from "@shared/proto/index.cline"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import React, { memo, useEffect, useMemo } from "react"
+import { useTranslation } from "react-i18next"
import { DropdownContainer } from "./common/ModelSelector"
export const SAP_AI_CORE_MODEL_PICKER_Z_INDEX = 1_000
@@ -26,9 +27,11 @@ const SapAiCoreModelPicker: React.FC = ({
selectedModelId,
selectedDeploymentId,
onModelChange,
- placeholder = "Select a model...",
+ placeholder,
useOrchestrationMode = false,
}) => {
+ const { t } = useTranslation("settings")
+ const resolvedPlaceholder = placeholder ?? t("settings.selectModel")
// Auto-fix deployment ID mismatch or missing deployment ID when deployments change (when ai core creds changes)
useEffect(() => {
if (!selectedModelId) {
@@ -102,7 +105,7 @@ const SapAiCoreModelPicker: React.FC = ({
// Add placeholder option
options.push(
- {placeholder}
+ {resolvedPlaceholder}
,
)
@@ -161,7 +164,7 @@ const SapAiCoreModelPicker: React.FC = ({
return (
- Model
+ {t("settings.model")}
{
+const renderSectionHeader = (tabId: string, t: (key: string) => string) => {
const tab = SETTINGS_TABS.find((t) => t.id === tabId)
if (!tab) {
return null
}
+ const headerKey = `settings.tabs.${tabId}Header` as string
return (
-
{tab.headerText}
+
{t(headerKey)}
)
}
const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
+ const { t } = useTranslation("settings")
// Memoize to avoid recreation
const TAB_CONTENT_MAP: Record> = useMemo(
() => ({
@@ -225,10 +228,10 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
},
)}>
- {tab.name}
+ {t(`settings.tabs.${tab.id}`)}
- {tab.tooltipText}
+ {t(`settings.tabs.${tab.id}Tooltip`)}
)
@@ -244,7 +247,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
}
// Special props for specific components
- const props: any = { renderSectionHeader }
+ const props: any = { renderSectionHeader: (tabId: string) => renderSectionHeader(tabId, t) }
if (activeTab === "debug") {
props.onResetState = handleResetState
} else if (activeTab === "about") {
@@ -254,11 +257,11 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
}
return
- }, [activeTab, handleResetState, settingsInitialModelTab, version])
+ }, [activeTab, handleResetState, settingsInitialModelTab, version, t])
return (
-
+
{
+ const { t } = useTranslation("settings")
const { terminalOutputLineLimit } = useExtensionState()
const handleSliderChange = (event: React.ChangeEvent) => {
- const value = parseInt(event.target.value, 10)
+ const value = Number.parseInt(event.target.value, 10)
updateSetting("terminalOutputLineLimit", value)
}
@@ -29,8 +31,7 @@ const TerminalOutputLineLimitSlider: React.FC = () => {
{terminalOutputLineLimit ?? 500}
- Maximum number of lines to include in terminal output when executing commands. When exceeded, lines will be
- removed from the middle, saving tokens.
+ {t("settings.terminalOutputLimitDescription")}
)
diff --git a/webview-ui/src/components/settings/ThinkingBudgetSlider.tsx b/webview-ui/src/components/settings/ThinkingBudgetSlider.tsx
index 3abbae03..778f735a 100644
--- a/webview-ui/src/components/settings/ThinkingBudgetSlider.tsx
+++ b/webview-ui/src/components/settings/ThinkingBudgetSlider.tsx
@@ -2,6 +2,7 @@ import { ANTHROPIC_MAX_THINKING_BUDGET, ANTHROPIC_MIN_THINKING_BUDGET } from "@s
import { Mode } from "@shared/storage/types"
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import { memo, useCallback, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import styled from "styled-components"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { getModeSpecificFields } from "./utils/providerUtils"
@@ -68,6 +69,7 @@ interface ThinkingBudgetSliderProps {
}
const ThinkingBudgetSlider = ({ currentMode, maxBudget, showEnableToggle = true }: ThinkingBudgetSliderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleModeFieldChange } = useApiConfigurationHandlers()
@@ -141,7 +143,7 @@ const ThinkingBudgetSlider = ({ currentMode, maxBudget, showEnableToggle = true
) : (
- Thinking is enabled by default for this model. ({localValue.toLocaleString()} tokens)
+ {t("settings.thinkingEnabledByDefault")} ({localValue.toLocaleString()} {t("settings.tokens")})
)}
diff --git a/webview-ui/src/components/settings/UseCustomPromptCheckbox.tsx b/webview-ui/src/components/settings/UseCustomPromptCheckbox.tsx
index eac4d5c7..3892f6f5 100644
--- a/webview-ui/src/components/settings/UseCustomPromptCheckbox.tsx
+++ b/webview-ui/src/components/settings/UseCustomPromptCheckbox.tsx
@@ -1,5 +1,6 @@
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import React, { useCallback, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { updateSetting } from "./utils/settingsHandlers"
@@ -11,6 +12,7 @@ interface CustomPromptCheckboxProps {
* Checkbox to enable or disable the use of a compact prompt for local models providers.
*/
const UseCustomPromptCheckbox: React.FC = ({ providerId }) => {
+ const { t } = useTranslation("settings")
const { customPrompt } = useExtensionState()
const [isCompactPromptEnabled, setIsCompactPromptEnabled] = useState(customPrompt === "compact")
@@ -25,10 +27,10 @@ const UseCustomPromptCheckbox: React.FC = ({ provider
Use compact prompt
- A system prompt optimized for smaller context window (e.g. 8k or less).
+ {t("settings.compactPromptDescription")}
- Does not support Mcp and Focus Chain
+ {t("settings.compactPromptNoMcpFocus")}
diff --git a/webview-ui/src/components/settings/VercelModelPicker.tsx b/webview-ui/src/components/settings/VercelModelPicker.tsx
index fab2224a..e2d0f143 100644
--- a/webview-ui/src/components/settings/VercelModelPicker.tsx
+++ b/webview-ui/src/components/settings/VercelModelPicker.tsx
@@ -5,6 +5,7 @@ import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import type React from "react"
import { type KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useMount } from "react-use"
import styled from "styled-components"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -21,6 +22,7 @@ export interface VercelModelPickerProps {
}
const VercelModelPicker: React.FC
= ({ isPopup, currentMode }) => {
+ const { t } = useTranslation("settings")
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const { apiConfiguration, vercelAiGatewayModels, refreshVercelAiGatewayModels } = useExtensionState()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -220,7 +222,7 @@ const VercelModelPicker: React.FC = ({ isPopup, currentM
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search and select a model..."
+ placeholder={t("settings.searchSelectModel")}
role="combobox"
style={{
width: "100%",
@@ -268,7 +270,7 @@ const VercelModelPicker: React.FC = ({ isPopup, currentM
{Object.keys(vercelAiGatewayModels).length === 0
? "Loading models..."
- : "No models found"}
+ : t("modelPicker.noModelsFound")}
)}
diff --git a/webview-ui/src/components/settings/common/ApiKeyField.tsx b/webview-ui/src/components/settings/common/ApiKeyField.tsx
index d968ddf8..f703f865 100644
--- a/webview-ui/src/components/settings/common/ApiKeyField.tsx
+++ b/webview-ui/src/components/settings/common/ApiKeyField.tsx
@@ -1,4 +1,5 @@
import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { useDebouncedInput } from "../utils/useDebouncedInput"
/**
@@ -24,6 +25,7 @@ export const ApiKeyField = ({
placeholder = "Enter API Key...",
helpText,
}: ApiKeyFieldProps) => {
+ const { t } = useTranslation("settings")
const [localValue, setLocalValue] = useDebouncedInput(initialValue, onChange)
return (
@@ -35,7 +37,7 @@ export const ApiKeyField = ({
style={{ width: "100%" }}
type="password"
value={localValue}>
- {providerName} API Key
+ {t("commonFields.apiKey", { provider: providerName })}
- {helpText || "This key is stored locally and only used to make API requests from this extension."}
+ {helpText || t("commonFields.apiKeyStoredLocally")}
{!localValue && signupUrl && (
- You can get a{/^[aeiou]/i.test(providerName) ? "n" : ""} {providerName} API key by signing up here.
+ {t("commonFields.getApiKeySignup", { provider: providerName })}
)}
diff --git a/webview-ui/src/components/settings/common/BaseUrlField.tsx b/webview-ui/src/components/settings/common/BaseUrlField.tsx
index e71b3f2b..66f91431 100644
--- a/webview-ui/src/components/settings/common/BaseUrlField.tsx
+++ b/webview-ui/src/components/settings/common/BaseUrlField.tsx
@@ -1,5 +1,6 @@
import { VSCodeCheckbox, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import { useState } from "react"
+import { useTranslation } from "react-i18next"
import { useDebouncedInput } from "../utils/useDebouncedInput"
/**
@@ -21,11 +22,13 @@ interface BaseUrlFieldProps {
export const BaseUrlField = ({
initialValue,
onChange,
- label = "Use custom base URL",
+ label,
placeholder = "Default: https://api.example.com",
disabled = false,
showLockIcon = false,
}: BaseUrlFieldProps) => {
+ const { t } = useTranslation("settings")
+ const resolvedLabel = label ?? t("settings.useCustomBaseUrl")
const [isEnabled, setIsEnabled] = useState(!!initialValue)
const [localValue, setLocalValue] = useDebouncedInput(initialValue || "", onChange)
@@ -41,7 +44,7 @@ export const BaseUrlField = ({
- {label}
+ {resolvedLabel}
{showLockIcon && }
diff --git a/webview-ui/src/components/settings/common/ContextWindowSwitcher.tsx b/webview-ui/src/components/settings/common/ContextWindowSwitcher.tsx
index 7d620353..eaa0568f 100644
--- a/webview-ui/src/components/settings/common/ContextWindowSwitcher.tsx
+++ b/webview-ui/src/components/settings/common/ContextWindowSwitcher.tsx
@@ -1,5 +1,6 @@
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { useMemo } from "react"
+import { useTranslation } from "react-i18next"
interface ContextWindowSwitcherProps {
selectedModelId: string
@@ -17,23 +18,24 @@ export const ContextWindowSwitcher = ({
base1mModelId,
onModelChange,
}: ContextWindowSwitcherProps) => {
+ const { t } = useTranslation("settings")
const switcherInfo = useMemo(() => {
if (selectedModelId === base200kModelId) {
return {
current: base200kModelId,
alternate: base1mModelId,
- linkText: "Switch to 1M context window model",
+ linkText: t("settings.switchTo1mContext"),
}
}
if (selectedModelId === base1mModelId) {
return {
current: base1mModelId,
alternate: base200kModelId,
- linkText: "Switch to 200K context window model",
+ linkText: t("settings.switchTo200kContext"),
}
}
return null
- }, [selectedModelId, base200kModelId, base1mModelId])
+ }, [selectedModelId, base200kModelId, base1mModelId, t])
if (!switcherInfo) {
return null
diff --git a/webview-ui/src/components/settings/common/ModelInfoView.tsx b/webview-ui/src/components/settings/common/ModelInfoView.tsx
index 32893f2c..f3596e16 100644
--- a/webview-ui/src/components/settings/common/ModelInfoView.tsx
+++ b/webview-ui/src/components/settings/common/ModelInfoView.tsx
@@ -1,6 +1,7 @@
import { geminiModels, ModelInfo } from "@shared/api"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import { useState } from "react"
+import { useTranslation } from "react-i18next"
import styled from "styled-components"
import { ModelDescriptionMarkdown } from "../ModelDescriptionMarkdown"
import { formatPrice, hasThinkingBudget, supportsBrowserUse, supportsImages, supportsPromptCache } from "../utils/pricingUtils"
@@ -186,6 +187,7 @@ export const ModelInfoView = ({
onProviderSortingChange,
showProviderRouting,
}: ModelInfoViewProps) => {
+ const { t } = useTranslation("settings")
const [advancedExpanded, setAdvancedExpanded] = useState(false)
const isGemini = Object.keys(geminiModels).includes(selectedModelId)
@@ -211,19 +213,19 @@ export const ModelInfoView = ({
{modelInfo.contextWindow !== undefined && modelInfo.contextWindow > 0 && (
- Context:
+ {t("commonFields.context")}
{formatCompactContext(modelInfo.contextWindow)}
)}
{modelInfo.inputPrice !== undefined && (
- Input:
+ {t("commonFields.inputLabel")}
{formatCompactPrice(modelInfo.inputPrice)}
)}
{modelInfo.outputPrice !== undefined && (
- Output:
+ {t("commonFields.outputLabel")}
{hasThinkingConfig && modelInfo.thinkingConfig?.outputPrice !== undefined
? formatCompactPrice(modelInfo.thinkingConfig.outputPrice)
@@ -236,23 +238,23 @@ export const ModelInfoView = ({
{/* Collapsible Advanced Section */}
setAdvancedExpanded(!advancedExpanded)}>
▶
- Advanced
+ {t("commonFields.advanced")}
{/* Capabilities */}
- Images
- {hasImages ? "Yes" : "No"}
+ {t("commonFields.images")}
+ {hasImages ? t("commonFields.yes") : t("commonFields.no")}
- Browser
- {hasBrowser ? "Yes" : "No"}
+ {t("commonFields.browser")}
+ {hasBrowser ? t("commonFields.yes") : t("commonFields.no")}
{!isGemini && (
- Prompt Caching
- {hasCaching ? "Yes" : "No"}
+ {t("commonFields.promptCaching")}
+ {hasCaching ? t("commonFields.yes") : t("commonFields.no")}
)}
@@ -261,13 +263,13 @@ export const ModelInfoView = ({
<>
{modelInfo.cacheReadsPrice !== undefined && (
- Cache Reads
+ {t("commonFields.cacheReads")}
{formatCompactPrice(modelInfo.cacheReadsPrice)}
)}
{modelInfo.cacheWritesPrice !== undefined && (
- Cache Writes
+ {t("commonFields.cacheWrites")}
{formatCompactPrice(modelInfo.cacheWritesPrice)}
)}
@@ -277,16 +279,16 @@ export const ModelInfoView = ({
{/* Tiered Pricing */}
{hasTiers && (
-
Tiered Pricing:
+
{t("commonFields.tieredPricing")}
{modelInfo.tiers && (
<>
- Input:
+ {t("commonFields.inputLabel")}
{formatTiers(modelInfo.tiers, "inputPrice")}
- Output:
+ {t("commonFields.outputLabel")}
{formatTiers(modelInfo.tiers, "outputPrice")}
@@ -298,15 +300,15 @@ export const ModelInfoView = ({
{/* Provider Routing */}
{showProviderRouting && onProviderSortingChange && (
- Provider Routing
+ {t("commonFields.providerRouting")}
onProviderSortingChange(e.target.value)}
style={{ width: "100%" }}
value={providerSorting || ""}>
- Default
- Price
- Throughput
- Latency
+ {t("commonFields.default")}
+ {t("commonFields.price")}
+ {t("commonFields.throughput")}
+ {t("commonFields.latency")}
- {!providerSorting &&
- "Load balance across providers (AWS, Google Vertex, etc.), prioritizing price while considering uptime"}
- {providerSorting === "price" && "Sort by price, prioritizing the lowest cost provider"}
- {providerSorting === "throughput" &&
- "Sort by throughput, prioritizing highest throughput (may increase cost)"}
- {providerSorting === "latency" && "Sort by response time, prioritizing lowest latency"}
+ {!providerSorting && t("commonFields.providerRoutingDefault")}
+ {providerSorting === "price" && t("commonFields.providerRoutingPrice")}
+ {providerSorting === "throughput" && t("commonFields.providerRoutingThroughput")}
+ {providerSorting === "latency" && t("commonFields.providerRoutingLatency")}
)}
diff --git a/webview-ui/src/components/settings/common/ModelSelector.tsx b/webview-ui/src/components/settings/common/ModelSelector.tsx
index 9e41c86d..678a6a8e 100644
--- a/webview-ui/src/components/settings/common/ModelSelector.tsx
+++ b/webview-ui/src/components/settings/common/ModelSelector.tsx
@@ -1,5 +1,6 @@
import { ModelInfo } from "@shared/api"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import styled from "styled-components"
/**
@@ -47,13 +48,14 @@ OG Saoud Note:
* A reusable component for selecting models from a dropdown
*/
export const ModelSelector = ({ models, selectedModelId, onChange, zIndex, label = "Model" }: ModelSelectorProps) => {
+ const { t } = useTranslation("settings")
return (
{label}
- Select a model...
+ {t("settings.selectModel")}
{Object.keys(models).map((modelId) => (
{modelId}
diff --git a/webview-ui/src/components/settings/common/RemotelyConfiguredInputWrapper.tsx b/webview-ui/src/components/settings/common/RemotelyConfiguredInputWrapper.tsx
index 5526a6ff..6f610c6e 100644
--- a/webview-ui/src/components/settings/common/RemotelyConfiguredInputWrapper.tsx
+++ b/webview-ui/src/components/settings/common/RemotelyConfiguredInputWrapper.tsx
@@ -1,9 +1,11 @@
+import { useTranslation } from "react-i18next"
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
export function RemotelyConfiguredInputWrapper({ hidden, children }: React.PropsWithChildren<{ hidden: boolean }>) {
+ const { t } = useTranslation("settings")
return (
- This setting is managed by your organization's remote configuration
+ {t("settings.remotelyConfiguredMessage")}
{children}
)
diff --git a/webview-ui/src/components/settings/providers/AihubmixProvider.tsx b/webview-ui/src/components/settings/providers/AihubmixProvider.tsx
index f5831a0e..1d638970 100644
--- a/webview-ui/src/components/settings/providers/AihubmixProvider.tsx
+++ b/webview-ui/src/components/settings/providers/AihubmixProvider.tsx
@@ -2,6 +2,7 @@ import { ModelInfo } from "@shared/api"
import { EmptyRequest } from "@shared/proto/cline/common"
import { Mode } from "@shared/storage/types"
import { useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ModelsServiceClient } from "@/services/grpc-client"
import { ApiKeyField } from "../common/ApiKeyField"
@@ -23,6 +24,7 @@ interface AIhubmixProviderProps {
* The AIhubmix provider configuration component
*/
export const AIhubmixProvider = ({ showModelOptions, isPopup, currentMode }: AIhubmixProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange, handleModeFieldsChange } = useApiConfigurationHandlers()
const { selectedModelId, selectedModelInfo } = normalizeApiConfiguration(apiConfiguration, currentMode)
@@ -91,7 +93,7 @@ export const AIhubmixProvider = ({ showModelOptions, isPopup, currentMode }: AIh
{showModelOptions && (
<>
{
const newModelId = e.target.value
diff --git a/webview-ui/src/components/settings/providers/AnthropicProvider.tsx b/webview-ui/src/components/settings/providers/AnthropicProvider.tsx
index 74185197..87a238df 100644
--- a/webview-ui/src/components/settings/providers/AnthropicProvider.tsx
+++ b/webview-ui/src/components/settings/providers/AnthropicProvider.tsx
@@ -1,6 +1,7 @@
import { ANTHROPIC_FAST_MODE_SUFFIX, anthropicModels, CLAUDE_SONNET_1M_SUFFIX } from "@shared/api"
import type { Mode } from "@shared/storage/types"
import { isClaudeOpusAdaptiveThinkingModel, resolveClaudeOpusAdaptiveThinking } from "@shared/utils/reasoning-support"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { BaseUrlField } from "../common/BaseUrlField"
@@ -40,6 +41,7 @@ interface AnthropicProviderProps {
* The Anthropic provider configuration component
*/
export const AnthropicProvider = ({ showModelOptions, isPopup, currentMode }: AnthropicProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, remoteConfigSettings } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -68,9 +70,9 @@ export const AnthropicProvider = ({ showModelOptions, isPopup, currentMode }: An
handleFieldChange("anthropicBaseUrl", value)}
- placeholder="Default: https://api.anthropic.com"
+ placeholder={t("providers.anthropic.defaultBaseUrl")}
showLockIcon={!!remoteConfigSettings?.anthropicBaseUrl}
/>
@@ -134,8 +136,8 @@ export const AnthropicProvider = ({ showModelOptions, isPopup, currentMode }: An
allowedEfforts={["none", "low", "medium", "high", "xhigh"] as const}
currentMode={currentMode}
defaultEffort={adaptiveThinkingDefaultEffort}
- description="Use None to disable adaptive thinking. Higher effort increases response detail and token usage."
- label="Adaptive Thinking"
+ description={t("settings.adaptiveThinkingDescription")}
+ label={t("settings.adaptiveThinking")}
/>
) : SUPPORTED_ANTHROPIC_THINKING_MODELS.includes(selectedModelId) ? (
diff --git a/webview-ui/src/components/settings/providers/AskSageProvider.tsx b/webview-ui/src/components/settings/providers/AskSageProvider.tsx
index db36fa26..167e961a 100644
--- a/webview-ui/src/components/settings/providers/AskSageProvider.tsx
+++ b/webview-ui/src/components/settings/providers/AskSageProvider.tsx
@@ -1,6 +1,7 @@
import { askSageDefaultURL, askSageModels, ModelInfo } from "@shared/api"
import { Mode } from "@shared/storage/types"
import { useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { DebouncedTextField } from "../common/DebouncedTextField"
@@ -22,6 +23,7 @@ interface AskSageProviderProps {
* The AskSage provider configuration component
*/
export const AskSageProvider = ({ showModelOptions, isPopup, currentMode }: AskSageProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
const [availableModels, setAvailableModels] = useState>(askSageModels)
@@ -82,7 +84,7 @@ export const AskSageProvider = ({ showModelOptions, isPopup, currentMode }: AskS
placeholder="Enter AskSage API URL..."
style={{ width: "100%" }}
type="text">
- AskSage API URL
+ {t("providers.askSage.apiUrl")}
{showModelOptions && (
diff --git a/webview-ui/src/components/settings/providers/BedrockProvider.tsx b/webview-ui/src/components/settings/providers/BedrockProvider.tsx
index b901ffb2..3b9b4e6b 100644
--- a/webview-ui/src/components/settings/providers/BedrockProvider.tsx
+++ b/webview-ui/src/components/settings/providers/BedrockProvider.tsx
@@ -12,6 +12,7 @@ import {
} from "@vscode/webview-ui-toolkit/react"
import Fuse from "fuse.js"
import { type KeyboardEvent, useEffect, useMemo, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import styled from "styled-components"
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -48,6 +49,7 @@ interface BedrockProviderProps {
}
export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: BedrockProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, remoteConfigSettings } = useExtensionState()
const { handleFieldChange, handleModeFieldChange, handleModeFieldsChange } = useApiConfigurationHandlers()
@@ -168,9 +170,9 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
handleFieldChange("awsAuthentication", value)
}}
value={apiConfiguration?.awsAuthentication ?? (apiConfiguration?.awsProfile ? "profile" : "credentials")}>
- API Key
- AWS Profile
- AWS Credentials
+ {t("providers.bedrock.apiKeyOption")}
+ {t("providers.bedrock.awsProfileOption")}
+ {t("providers.bedrock.awsCredentialsOption")}
{(apiConfiguration?.awsAuthentication === undefined && apiConfiguration?.awsUseProfile) ||
@@ -181,7 +183,7 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
key="profile"
onChange={(value) => handleFieldChange("awsProfile", value)}
placeholder="Enter profile name (default if empty)">
- AWS Profile Name
+ {t("providers.bedrock.awsProfileName")}
) : apiConfiguration?.awsAuthentication === "apikey" ? (
handleFieldChange("awsBedrockApiKey", value)}
placeholder="Enter Bedrock Api Key"
type="password">
- AWS Bedrock Api Key
+ {t("providers.bedrock.awsBedrockApiKey")}
) : (
<>
@@ -202,7 +204,7 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
onChange={(value) => handleFieldChange("awsAccessKey", value)}
placeholder="Enter Access Key..."
type="password">
- AWS Access Key
+ {t("providers.bedrock.awsAccessKey")}
handleFieldChange("awsSecretKey", value)}
placeholder="Enter Secret Key..."
type="password">
- AWS Secret Key
+ {t("providers.bedrock.awsSecretKey")}
handleFieldChange("awsSessionToken", value)}
placeholder="Enter Session Token..."
type="password">
- AWS Session Token
+ {t("providers.bedrock.awsSessionToken")}
>
)}
@@ -231,7 +233,7 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
- AWS Region
+ {t("providers.bedrock.awsRegion")}
{remoteConfigSettings?.awsRegion !== undefined && (
@@ -258,7 +260,7 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
setIsDropdownVisible(true)
}}
onKeyDown={handleKeyDown}
- placeholder="Search or enter custom region..."
+ placeholder={t("providers.bedrock.searchOrEnterRegion")}
role="combobox"
style={{
width: "100%",
@@ -345,7 +347,7 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
disabled={remoteConfigSettings?.awsBedrockEndpoint !== undefined}
initialValue={apiConfiguration?.awsBedrockEndpoint || ""}
onChange={(value) => handleFieldChange("awsBedrockEndpoint", value)}
- placeholder="Enter VPC Endpoint URL (optional)"
+ placeholder={t("providers.bedrock.enterVpcEndpoint")}
type="text"
/>
)}
@@ -497,7 +499,7 @@ export const BedrockProvider = ({ showModelOptions, isPopup, currentMode }: Bedr
Model ID
- Base Inference Model
+ {t("providers.bedrock.baseInferenceModel")}
) : SUPPORTED_BEDROCK_THINKING_MODELS.includes(selectedModelId) ||
(modeFields.awsBedrockCustomSelected &&
diff --git a/webview-ui/src/components/settings/providers/CerebrasProvider.tsx b/webview-ui/src/components/settings/providers/CerebrasProvider.tsx
index 8f35d87b..ae2a784c 100644
--- a/webview-ui/src/components/settings/providers/CerebrasProvider.tsx
+++ b/webview-ui/src/components/settings/providers/CerebrasProvider.tsx
@@ -1,5 +1,6 @@
import { cerebrasModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -20,6 +21,7 @@ interface CerebrasProviderProps {
* The Cerebras provider configuration component
*/
export const CerebrasProvider = ({ showModelOptions, isPopup, currentMode }: CerebrasProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -38,7 +40,7 @@ export const CerebrasProvider = ({ showModelOptions, isPopup, currentMode }: Cer
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/ClaudeCodeProvider.tsx b/webview-ui/src/components/settings/providers/ClaudeCodeProvider.tsx
index 8286e39e..3473624a 100644
--- a/webview-ui/src/components/settings/providers/ClaudeCodeProvider.tsx
+++ b/webview-ui/src/components/settings/providers/ClaudeCodeProvider.tsx
@@ -1,5 +1,6 @@
import { claudeCodeModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { DebouncedTextField } from "../common/DebouncedTextField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -35,6 +36,7 @@ interface ClaudeCodeProviderProps {
* The Claude Code provider configuration component
*/
export const ClaudeCodeProvider = ({ showModelOptions, isPopup, currentMode }: ClaudeCodeProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -49,7 +51,7 @@ export const ClaudeCodeProvider = ({ showModelOptions, isPopup, currentMode }: C
placeholder="Default: claude"
style={{ width: "100%", marginTop: 3 }}
type="text">
- Claude Code CLI Path
+ {t("providers.claudeCode.cliPath")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -38,7 +40,7 @@ export const DeepSeekProvider = ({ showModelOptions, isPopup, currentMode }: Dee
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/DifyProvider.tsx b/webview-ui/src/components/settings/providers/DifyProvider.tsx
index 4579da94..d0423e06 100644
--- a/webview-ui/src/components/settings/providers/DifyProvider.tsx
+++ b/webview-ui/src/components/settings/providers/DifyProvider.tsx
@@ -1,4 +1,5 @@
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { DebouncedTextField } from "../common/DebouncedTextField"
@@ -14,6 +15,7 @@ interface DifyProviderProps {
}
export const DifyProvider = ({ showModelOptions, isPopup, currentMode }: DifyProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -40,7 +42,7 @@ export const DifyProvider = ({ showModelOptions, isPopup, currentMode }: DifyPro
placeholder={"Enter base URL..."}
style={{ width: "100%", marginBottom: 10 }}
type="text">
- Base URL
+ {t("providers.dify.baseUrl")}
- Note: The model selection is handled within your Dify application configuration.
+ Note: {t("providers.dify.noteModelSelection")}
diff --git a/webview-ui/src/components/settings/providers/DoubaoProvider.tsx b/webview-ui/src/components/settings/providers/DoubaoProvider.tsx
index 066e76c8..719d6594 100644
--- a/webview-ui/src/components/settings/providers/DoubaoProvider.tsx
+++ b/webview-ui/src/components/settings/providers/DoubaoProvider.tsx
@@ -1,5 +1,6 @@
import { doubaoModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -20,6 +21,7 @@ interface DoubaoProviderProps {
* The ByteDance Doubao provider configuration component
*/
export const DoubaoProvider = ({ showModelOptions, isPopup, currentMode }: DoubaoProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -38,7 +40,7 @@ export const DoubaoProvider = ({ showModelOptions, isPopup, currentMode }: Douba
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/FireworksProvider.tsx b/webview-ui/src/components/settings/providers/FireworksProvider.tsx
index ca26126f..241e11e6 100644
--- a/webview-ui/src/components/settings/providers/FireworksProvider.tsx
+++ b/webview-ui/src/components/settings/providers/FireworksProvider.tsx
@@ -1,5 +1,6 @@
import { fireworksModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -20,6 +21,7 @@ interface FireworksProviderProps {
* The Fireworks provider configuration component
*/
export const FireworksProvider = ({ currentMode, isPopup, showModelOptions }: FireworksProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleModeFieldChange, handleFieldChange } = useApiConfigurationHandlers()
@@ -34,7 +36,7 @@ export const FireworksProvider = ({ currentMode, isPopup, showModelOptions }: Fi
signupUrl="https://fireworks.ai/"
/>
{
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/GeminiProvider.tsx b/webview-ui/src/components/settings/providers/GeminiProvider.tsx
index a2e94f3d..a491f6dc 100644
--- a/webview-ui/src/components/settings/providers/GeminiProvider.tsx
+++ b/webview-ui/src/components/settings/providers/GeminiProvider.tsx
@@ -1,5 +1,6 @@
import { geminiModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { BaseUrlField } from "../common/BaseUrlField"
@@ -22,6 +23,7 @@ interface GeminiProviderProps {
* The Gemini provider configuration component
*/
export const GeminiProvider = ({ showModelOptions, isPopup, currentMode }: GeminiProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -40,9 +42,9 @@ export const GeminiProvider = ({ showModelOptions, isPopup, currentMode }: Gemin
handleFieldChange("geminiBaseUrl", value)}
- placeholder="Default: https://generativelanguage.googleapis.com"
+ placeholder={t("providers.gemini.defaultBaseUrl")}
/>
{showModelOptions && (
diff --git a/webview-ui/src/components/settings/providers/HicapProvider.tsx b/webview-ui/src/components/settings/providers/HicapProvider.tsx
index cc15377a..0cfda076 100644
--- a/webview-ui/src/components/settings/providers/HicapProvider.tsx
+++ b/webview-ui/src/components/settings/providers/HicapProvider.tsx
@@ -2,6 +2,7 @@ import { EmptyRequest } from "@shared/proto/cline/common"
import { Mode } from "@shared/storage/types"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
import { useEffect } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { AccountServiceClient } from "@/services/grpc-client"
import { DebouncedTextField } from "../common/DebouncedTextField"
@@ -21,6 +22,7 @@ interface HicapProviderProps {
* The Hicap provider configuration component
*/
export const HicapProvider = ({ showModelOptions, isPopup, currentMode }: HicapProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, refreshHicapModels } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -52,7 +54,7 @@ export const HicapProvider = ({ showModelOptions, isPopup, currentMode }: HicapP
width: "100%",
margin: "10px 0 0 0",
}}>
- Hicap API Key
+ {t("providers.hicap.apiKey")}
diff --git a/webview-ui/src/components/settings/providers/HuaweiCloudMaasProvider.tsx b/webview-ui/src/components/settings/providers/HuaweiCloudMaasProvider.tsx
index 6733df2b..0b7239a8 100644
--- a/webview-ui/src/components/settings/providers/HuaweiCloudMaasProvider.tsx
+++ b/webview-ui/src/components/settings/providers/HuaweiCloudMaasProvider.tsx
@@ -1,5 +1,6 @@
import { huaweiCloudMaasModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -14,6 +15,7 @@ interface HuaweiCloudMaasProviderProps {
}
export const HuaweiCloudMaasProvider = ({ showModelOptions, isPopup, currentMode }: HuaweiCloudMaasProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldsChange } = useApiConfigurationHandlers()
@@ -30,7 +32,7 @@ export const HuaweiCloudMaasProvider = ({ showModelOptions, isPopup, currentMode
{showModelOptions && (
<>
{
const modelId = e.target.value
diff --git a/webview-ui/src/components/settings/providers/HuggingFaceProvider.tsx b/webview-ui/src/components/settings/providers/HuggingFaceProvider.tsx
index 43aecd33..e6c149dd 100644
--- a/webview-ui/src/components/settings/providers/HuggingFaceProvider.tsx
+++ b/webview-ui/src/components/settings/providers/HuggingFaceProvider.tsx
@@ -1,4 +1,5 @@
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { DebouncedTextField } from "../common/DebouncedTextField"
import { HuggingFaceModelPicker } from "../HuggingFaceModelPicker"
@@ -18,6 +19,7 @@ interface HuggingFaceProviderProps {
* The Hugging Face provider configuration component
*/
export const HuggingFaceProvider = ({ showModelOptions, isPopup, currentMode }: HuggingFaceProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -32,7 +34,7 @@ export const HuggingFaceProvider = ({ showModelOptions, isPopup, currentMode }:
placeholder="Enter API Key..."
style={{ width: "100%" }}
type="password">
- Hugging Face API Key
+ {t("providers.huggingface.apiKey")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -96,7 +98,7 @@ export const LMStudioProvider = ({ currentMode }: LMStudioProviderProps) => {
handleFieldChange("lmStudioBaseUrl", value)}
placeholder="Default: http://localhost:1234"
/>
diff --git a/webview-ui/src/components/settings/providers/LiteLlmProvider.tsx b/webview-ui/src/components/settings/providers/LiteLlmProvider.tsx
index b10f5aa7..3a8e2619 100644
--- a/webview-ui/src/components/settings/providers/LiteLlmProvider.tsx
+++ b/webview-ui/src/components/settings/providers/LiteLlmProvider.tsx
@@ -4,6 +4,7 @@ import { Mode } from "@shared/storage/types"
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { RefreshCwIcon } from "lucide-react"
import { useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ModelsServiceClient } from "@/services/grpc-client"
import { DebouncedTextField } from "../common/DebouncedTextField"
@@ -24,6 +25,7 @@ interface LiteLlmProviderProps {
}
export const LiteLlmProvider = ({ showModelOptions, isPopup, currentMode }: LiteLlmProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, remoteConfigSettings, liteLlmModels, refreshLiteLlmModels } = useExtensionState()
const { handleModeFieldsChange } = useApiConfigurationHandlers()
@@ -77,7 +79,7 @@ export const LiteLlmProvider = ({ showModelOptions, isPopup, currentMode }: Lite
style={{ width: "100%" }}
type="text">
- Base URL (optional)
+ {t("providers.litellm.baseUrlOptional")}
{remoteConfigSettings?.liteLlmBaseUrl !== undefined && }
@@ -102,7 +104,7 @@ export const LiteLlmProvider = ({ showModelOptions, isPopup, currentMode }: Lite
style={{ width: "100%" }}
type="password">
- API Key
+ {t("providers.litellm.apiKey")}
{remoteConfigSettings?.configuredApiKeys?.litellm && }
diff --git a/webview-ui/src/components/settings/providers/MiniMaxProvider.tsx b/webview-ui/src/components/settings/providers/MiniMaxProvider.tsx
index 3e923559..13d57b37 100644
--- a/webview-ui/src/components/settings/providers/MiniMaxProvider.tsx
+++ b/webview-ui/src/components/settings/providers/MiniMaxProvider.tsx
@@ -1,6 +1,7 @@
import { minimaxModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -22,6 +23,7 @@ interface MinimaxProviderProps {
* The Minimax AI Studio provider configuration component
*/
export const MinimaxProvider = ({ showModelOptions, isPopup, currentMode }: MinimaxProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -32,7 +34,7 @@ export const MinimaxProvider = ({ showModelOptions, isPopup, currentMode }: Mini
- MiniMax Entrypoint
+ {t("providers.minimax.entrypoint")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -38,7 +40,7 @@ export const MistralProvider = ({ showModelOptions, isPopup, currentMode }: Mist
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/MoonshotProvider.tsx b/webview-ui/src/components/settings/providers/MoonshotProvider.tsx
index 2ad33cec..f9a033d3 100644
--- a/webview-ui/src/components/settings/providers/MoonshotProvider.tsx
+++ b/webview-ui/src/components/settings/providers/MoonshotProvider.tsx
@@ -2,6 +2,7 @@ import { moonshotModels } from "@shared/api"
import { UpdateApiConfigurationRequestNew } from "@shared/proto/index.cline"
import { Mode } from "@shared/storage/types"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ModelsServiceClient } from "@/services/grpc-client"
import { ApiKeyField } from "../common/ApiKeyField"
@@ -22,6 +23,7 @@ interface MoonshotProviderProps {
* The Moonshot AI Studio provider configuration component
*/
export const MoonshotProvider = ({ showModelOptions, isPopup, currentMode }: MoonshotProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
// Get the normalized configuration
@@ -31,7 +33,7 @@ export const MoonshotProvider = ({ showModelOptions, isPopup, currentMode }: Moo
- Moonshot Entrypoint
+ {t("providers.moonshot.entrypoint")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -28,7 +30,7 @@ export const NebiusProvider = ({ showModelOptions, isPopup, currentMode }: Nebiu
return (
handleFieldChange("nebiusApiKey", value)}
providerName="Nebius"
@@ -38,7 +40,7 @@ export const NebiusProvider = ({ showModelOptions, isPopup, currentMode }: Nebiu
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/NousresearchProvider.tsx b/webview-ui/src/components/settings/providers/NousresearchProvider.tsx
index 968b11a9..dc8d095d 100644
--- a/webview-ui/src/components/settings/providers/NousresearchProvider.tsx
+++ b/webview-ui/src/components/settings/providers/NousresearchProvider.tsx
@@ -1,5 +1,6 @@
import { nousResearchModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -20,6 +21,7 @@ interface NousResearchProviderProps {
* The NousResearch provider configuration component
*/
export const NousResearchProvider = ({ showModelOptions, isPopup, currentMode }: NousResearchProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -37,7 +39,7 @@ export const NousResearchProvider = ({ showModelOptions, isPopup, currentMode }:
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/OcaModelPicker.tsx b/webview-ui/src/components/settings/providers/OcaModelPicker.tsx
index 6416a709..498e0ead 100644
--- a/webview-ui/src/components/settings/providers/OcaModelPicker.tsx
+++ b/webview-ui/src/components/settings/providers/OcaModelPicker.tsx
@@ -2,6 +2,7 @@ import type { ApiConfiguration, OcaModelInfo } from "@shared/api"
import { Mode } from "@shared/storage/types"
import { VSCodeButton, VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import React, { useMemo } from "react"
+import { useTranslation } from "react-i18next"
import { VSC_BUTTON_BACKGROUND, VSC_BUTTON_FOREGROUND, VSC_DESCRIPTION_FOREGROUND, VSC_FOREGROUND } from "@/utils/vscStyles"
import { ModelInfoView } from "../common/ModelInfoView"
import ThinkingBudgetSlider from "../ThinkingBudgetSlider"
@@ -27,6 +28,7 @@ const OcaModelPicker: React.FC = ({
loading,
lastRefreshedAt,
}: OcaModelPickerProps) => {
+ const { t } = useTranslation("settings")
const { handleModeFieldsChange } = useApiConfigurationHandlers()
const [pendingModelId, setPendingModelId] = React.useState(null)
const [showRestrictedPopup, setShowRestrictedPopup] = React.useState(false)
@@ -106,9 +108,8 @@ const OcaModelPicker: React.FC = ({
const selectedReasoningEffort = useMemo(() => {
if (currentMode == "plan") {
return apiConfiguration?.planModeOcaReasoningEffort
- } else {
- return apiConfiguration?.actModeOcaReasoningEffort
}
+ return apiConfiguration?.actModeOcaReasoningEffort
}, [apiConfiguration, currentMode])
const reasoningEffortOptions = selectedModelInfo ? (selectedModelInfo as OcaModelInfo).reasoningEffortOptions : []
@@ -145,7 +146,7 @@ const OcaModelPicker: React.FC = ({
overflow: auto;
}
`}
- Model
+ {t("settings.model")}
= ({
minWidth: 0,
margin: 0,
}}>
- {loading ? "Refreshing…" : "Refresh"}
+ loading ? t("modelPicker.refreshing") : t("modelPicker.refresh")
{lastRefreshedText ? (
@@ -193,7 +194,7 @@ const OcaModelPicker: React.FC = ({
) : null}
{!loading && selectedModelInfo && selectedModelInfo.supportsReasoning && reasoningEffortOptions.length > 0 && (
- Reasoning Effort
+ {t("settings.reasoningEffort")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -60,17 +62,17 @@ export const OllamaProvider = ({ showModelOptions, isPopup, currentMode }: Ollam
handleFieldChange("ollamaBaseUrl", value)}
- placeholder="Default: http://localhost:11434"
+ placeholder={t("providers.ollama.defaultBaseUrl")}
/>
{apiConfiguration?.ollamaBaseUrl && (
handleFieldChange("ollamaApiKey", value)}
- placeholder="Enter API Key (optional)..."
+ placeholder={t("providers.ollama.enterApiKeyOptional")}
providerName="Ollama"
/>
)}
@@ -101,7 +103,7 @@ export const OllamaProvider = ({ showModelOptions, isPopup, currentMode }: Ollam
onChange={(v) => handleFieldChange("ollamaApiOptionsCtxNum", v || undefined)}
placeholder={"e.g. 32768"}
style={{ width: "100%" }}>
- Model Context Window
+ {t("providers.ollama.modelContextWindow")}
{showModelOptions && (
@@ -110,18 +112,16 @@ export const OllamaProvider = ({ showModelOptions, isPopup, currentMode }: Ollam
initialValue={apiConfiguration?.requestTimeoutMs ? apiConfiguration.requestTimeoutMs.toString() : "30000"}
onChange={(value) => {
// Convert to number, with validation
- const numValue = parseInt(value, 10)
+ const numValue = Number.parseInt(value, 10)
if (!Number.isNaN(numValue) && numValue > 0) {
handleFieldChange("requestTimeoutMs", numValue)
}
}}
- placeholder="Default: 30000 (30 seconds)"
+ placeholder={t("providers.ollama.requestTimeoutDefault")}
style={{ width: "100%" }}>
- Request Timeout (ms)
+ {t("providers.ollama.requestTimeout")}
-
- Maximum time in milliseconds to wait for API responses before timing out.
-
+ {t("providers.ollama.requestTimeoutDescription")}
>
)}
@@ -140,8 +140,7 @@ export const OllamaProvider = ({ showModelOptions, isPopup, currentMode }: Ollam
quickstart guide.
{" "}
- (Note: Cline uses complex prompts and works best with Claude models.
- Less capable models may not work as expected.)
+ {t("providers.openaiCompatible.noteComplexPrompts")}
diff --git a/webview-ui/src/components/settings/providers/OpenAICompatible.tsx b/webview-ui/src/components/settings/providers/OpenAICompatible.tsx
index 72e70303..6d37328e 100644
--- a/webview-ui/src/components/settings/providers/OpenAICompatible.tsx
+++ b/webview-ui/src/components/settings/providers/OpenAICompatible.tsx
@@ -4,6 +4,7 @@ import { OpenAiModelsRequest } from "@shared/proto/cline/models"
import { Mode } from "@shared/storage/types"
import { VSCodeButton, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import { useCallback, useEffect, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { Tooltip } from "@/components/ui/tooltip"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ModelsServiceClient } from "@/services/grpc-client"
@@ -30,6 +31,7 @@ interface OpenAICompatibleProviderProps {
* The OpenAI Compatible provider configuration component
*/
export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMode }: OpenAICompatibleProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, remoteConfigSettings } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -78,7 +80,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
-
Base URL
+
{t("commonFields.baseUrl")}
{remoteConfigSettings?.openAiBaseUrl !== undefined && (
)}
@@ -117,7 +119,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
}
placeholder={"Enter Model ID..."}
style={{ width: "100%", marginBottom: 10 }}>
-
Model ID
+
{t("providers.openaiCompatible.modelId")}
{/* OpenAI Compatible Custom Headers */}
@@ -130,7 +132,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
- Custom Headers
+ {t("providers.openaiCompatible.customHeaders")}
{remoteConfigSettings?.openAiHeaders !== undefined && (
)}
@@ -169,7 +171,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
})
}
}}
- placeholder="Header name"
+ placeholder={t("commonFields.headerName")}
style={{ width: "40%" }}
/>
handleFieldChange("azureApiVersion", value)}
placeholder={`Default: ${azureOpenAiDefaultApiVersion}`}
showLockIcon={true}
@@ -217,7 +219,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
) : (
handleFieldChange("azureApiVersion", value)}
placeholder={`Default: ${azureOpenAiDefaultApiVersion}`}
/>
@@ -306,7 +308,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
)
}}
style={{ flex: 1 }}>
- Context Window Size
+ {t("providers.openaiCompatible.contextWindowSize")}
- Max Output Tokens
+ {t("providers.openaiCompatible.maxOutputTokens")}
@@ -346,7 +348,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
)
}}
style={{ flex: 1 }}>
- Input Price / 1M tokens
+ {t("providers.openaiCompatible.inputPricePerMillion")}
- Output Price / 1M tokens
+ {t("providers.openaiCompatible.outputPricePerMillion")}
@@ -385,7 +387,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
currentMode,
)
}}>
-
Temperature
+
{t("providers.openaiCompatible.temperature")}
>
@@ -398,8 +400,7 @@ export const OpenAICompatibleProvider = ({ showModelOptions, isPopup, currentMod
color: "var(--vscode-descriptionForeground)",
}}>
- (Note: Cline uses complex prompts and works best with Claude models.
- Less capable models may not work as expected.)
+ {t("providers.openaiCompatible.noteComplexPrompts")}
diff --git a/webview-ui/src/components/settings/providers/OpenAINative.tsx b/webview-ui/src/components/settings/providers/OpenAINative.tsx
index 33eb9bf2..806647a7 100644
--- a/webview-ui/src/components/settings/providers/OpenAINative.tsx
+++ b/webview-ui/src/components/settings/providers/OpenAINative.tsx
@@ -1,5 +1,6 @@
import { openAiNativeModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -21,6 +22,7 @@ interface OpenAINativeProviderProps {
* The OpenAI (native) provider configuration component
*/
export const OpenAINativeProvider = ({ showModelOptions, isPopup, currentMode }: OpenAINativeProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -40,7 +42,7 @@ export const OpenAINativeProvider = ({ showModelOptions, isPopup, currentMode }:
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/OpenAiCodexProvider.tsx b/webview-ui/src/components/settings/providers/OpenAiCodexProvider.tsx
index 5e7e651d..7bb00036 100644
--- a/webview-ui/src/components/settings/providers/OpenAiCodexProvider.tsx
+++ b/webview-ui/src/components/settings/providers/OpenAiCodexProvider.tsx
@@ -1,6 +1,7 @@
import { openAiCodexModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { AccountServiceClient } from "@/services/grpc-client"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -20,6 +21,7 @@ interface OpenAiCodexProviderProps {
* Uses OAuth authentication instead of API keys.
*/
export const OpenAiCodexProvider = ({ showModelOptions, isPopup, currentMode }: OpenAiCodexProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration, openAiCodexIsAuthenticated } = useExtensionState()
const { handleModeFieldChange } = useApiConfigurationHandlers()
@@ -47,7 +49,7 @@ export const OpenAiCodexProvider = ({ showModelOptions, isPopup, currentMode }:
{openAiCodexIsAuthenticated ? (
- Signed in to OpenAI Codex
+ t("providers.openAiCodex.signedIn")
Sign Out
@@ -62,7 +64,7 @@ export const OpenAiCodexProvider = ({ showModelOptions, isPopup, currentMode }:
}}>
Sign in with your ChatGPT Plus or Pro subscription to use GPT-5 models without an API key.
- Sign in to OpenAI Codex
+ t("providers.openAiCodex.signIn")
)}
diff --git a/webview-ui/src/components/settings/providers/OpenRouterProvider.tsx b/webview-ui/src/components/settings/providers/OpenRouterProvider.tsx
index 7679f7f1..860b717b 100644
--- a/webview-ui/src/components/settings/providers/OpenRouterProvider.tsx
+++ b/webview-ui/src/components/settings/providers/OpenRouterProvider.tsx
@@ -1,6 +1,7 @@
import { EmptyRequest } from "@shared/proto/cline/common"
import { Mode } from "@shared/storage/types"
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { AccountServiceClient } from "@/services/grpc-client"
import { useOpenRouterKeyInfo } from "../../ui/hooks/useOpenRouterKeyInfo"
@@ -13,10 +14,15 @@ import { useApiConfigurationHandlers } from "../utils/useApiConfigurationHandler
* Component to display OpenRouter balance information
*/
const OpenRouterBalanceDisplay = ({ apiKey }: { apiKey: string }) => {
+ const { t } = useTranslation("settings")
const { data: keyInfo, isLoading, error } = useOpenRouterKeyInfo(apiKey)
if (isLoading) {
- return Loading...
+ return (
+
+ {t("providers.openRouter.loading")}
+
+ )
}
if (error || !keyInfo || keyInfo.limit === null) {
@@ -40,7 +46,7 @@ const OpenRouterBalanceDisplay = ({ apiKey }: { apiKey: string }) => {
cursor: "pointer",
}}
title={`Remaining balance: ${formattedBalance}\nLimit: ${formatPrice(keyInfo.limit)}\nUsage: ${formatPrice(keyInfo.usage)}`}>
- Balance: {formattedBalance}
+ {t("providers.openRouter.balance")} {formattedBalance}
)
}
@@ -58,6 +64,7 @@ interface OpenRouterProviderProps {
* The OpenRouter provider configuration component
*/
export const OpenRouterProvider = ({ showModelOptions, isPopup, currentMode }: OpenRouterProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -71,7 +78,7 @@ export const OpenRouterProvider = ({ showModelOptions, isPopup, currentMode }: O
style={{ width: "100%" }}
type="password">
- OpenRouter API Key
+ {t("providers.openRouter.apiKey")}
{apiConfiguration?.openRouterApiKey && (
)}
@@ -97,7 +104,7 @@ export const OpenRouterProvider = ({ showModelOptions, isPopup, currentMode }: O
marginTop: "5px",
color: "var(--vscode-descriptionForeground)",
}}>
- This key is stored locally and only used to make API requests from this extension.
+ {t("providers.openRouter.keyStoredLocally")}
diff --git a/webview-ui/src/components/settings/providers/QwenCodeProvider.tsx b/webview-ui/src/components/settings/providers/QwenCodeProvider.tsx
index 0082a0fd..562db354 100644
--- a/webview-ui/src/components/settings/providers/QwenCodeProvider.tsx
+++ b/webview-ui/src/components/settings/providers/QwenCodeProvider.tsx
@@ -1,6 +1,7 @@
import { qwenCodeModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ModelInfoView } from "../common/ModelInfoView"
import { ModelSelector } from "../common/ModelSelector"
@@ -20,6 +21,7 @@ interface QwenCodeProviderProps {
* The Qwen Code provider configuration component
*/
export const QwenCodeProvider = ({ showModelOptions, isPopup, currentMode }: QwenCodeProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -28,7 +30,7 @@ export const QwenCodeProvider = ({ showModelOptions, isPopup, currentMode }: Qwe
return (
-
Qwen Code API Configuration
+
{t("providers.qwenCode.title")}
handleFieldChange("qwenCodeOauthPath", e.target.value)}
placeholder="~/.qwen/oauth_creds.json"
diff --git a/webview-ui/src/components/settings/providers/QwenProvider.tsx b/webview-ui/src/components/settings/providers/QwenProvider.tsx
index ea74a7d2..1a74b4c6 100644
--- a/webview-ui/src/components/settings/providers/QwenProvider.tsx
+++ b/webview-ui/src/components/settings/providers/QwenProvider.tsx
@@ -2,6 +2,7 @@ import { internationalQwenModels, mainlandQwenModels, QwenApiRegions } from "@sh
import { Mode } from "@shared/storage/types"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import { useMemo } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { DROPDOWN_Z_INDEX } from "../ApiOptions"
import { ApiKeyField } from "../common/ApiKeyField"
@@ -40,6 +41,7 @@ export const qwenApiOptions: QwenApiRegions[] = Object.values(QwenApiRegions)
* The Alibaba Qwen provider configuration component
*/
export const QwenProvider = ({ showModelOptions, isPopup, currentMode }: QwenProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -56,7 +58,7 @@ export const QwenProvider = ({ showModelOptions, isPopup, currentMode }: QwenPro
- Alibaba API Line
+ {t("providers.qwen.alibabaApiLine")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -79,7 +81,7 @@ export const RequestyProvider = ({ showModelOptions, isPopup, currentMode }: Req
handleFieldChange("requestyBaseUrl", value)
}
}}
- placeholder="Custom base URL"
+ placeholder={t("providers.requesty.customBaseUrl")}
style={{ width: "100%", marginBottom: 5 }}
type="text"
/>
diff --git a/webview-ui/src/components/settings/providers/SambanovaProvider.tsx b/webview-ui/src/components/settings/providers/SambanovaProvider.tsx
index 0b99b88d..58a95dc4 100644
--- a/webview-ui/src/components/settings/providers/SambanovaProvider.tsx
+++ b/webview-ui/src/components/settings/providers/SambanovaProvider.tsx
@@ -1,5 +1,6 @@
import { sambanovaModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -20,6 +21,7 @@ interface SambanovaProviderProps {
* The SambaNova provider configuration component
*/
export const SambanovaProvider = ({ showModelOptions, isPopup, currentMode }: SambanovaProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -38,7 +40,7 @@ export const SambanovaProvider = ({ showModelOptions, isPopup, currentMode }: Sa
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/SapAiCoreProvider.tsx b/webview-ui/src/components/settings/providers/SapAiCoreProvider.tsx
index dcf03d27..03fac8c5 100644
--- a/webview-ui/src/components/settings/providers/SapAiCoreProvider.tsx
+++ b/webview-ui/src/components/settings/providers/SapAiCoreProvider.tsx
@@ -2,6 +2,7 @@ import { SapAiCoreModelDeployment, SapAiCoreModelsRequest } from "@shared/proto/
import { Mode } from "@shared/storage/types"
import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { useCallback, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ModelsServiceClient } from "@/services/grpc-client"
import { DebouncedTextField } from "../common/DebouncedTextField"
@@ -23,6 +24,7 @@ interface SapAiCoreProviderProps {
* The SAP AI Core provider configuration component
*/
export const SapAiCoreProvider = ({ showModelOptions, isPopup, currentMode }: SapAiCoreProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldsChange } = useApiConfigurationHandlers()
@@ -197,7 +199,7 @@ export const SapAiCoreProvider = ({ showModelOptions, isPopup, currentMode }: Sa
checked={apiConfiguration?.sapAiCoreUseOrchestrationMode}
onChange={(e) => handleOrchestrationChange((e.target as HTMLInputElement).checked)}
/>
- Orchestration Mode
+ {t("providers.sapaicore.orchestrationMode")}
diff --git a/webview-ui/src/components/settings/providers/TogetherProvider.tsx b/webview-ui/src/components/settings/providers/TogetherProvider.tsx
index ce487b40..67f76a63 100644
--- a/webview-ui/src/components/settings/providers/TogetherProvider.tsx
+++ b/webview-ui/src/components/settings/providers/TogetherProvider.tsx
@@ -1,4 +1,5 @@
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { DebouncedTextField } from "../common/DebouncedTextField"
@@ -18,6 +19,7 @@ interface TogetherProviderProps {
* The Together provider configuration component
*/
export const TogetherProvider = ({ showModelOptions, isPopup, currentMode }: TogetherProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -37,7 +39,7 @@ export const TogetherProvider = ({ showModelOptions, isPopup, currentMode }: Tog
}
placeholder={"Enter Model ID..."}
style={{ width: "100%" }}>
- Model ID
+ {t("providers.openaiCompatible.modelId")}
- (Note: Cline uses complex prompts and works best with Claude models.
- Less capable models may not work as expected.)
+ {t("providers.openaiCompatible.noteComplexPrompts")}
diff --git a/webview-ui/src/components/settings/providers/VSCodeLmProvider.tsx b/webview-ui/src/components/settings/providers/VSCodeLmProvider.tsx
index 56d10e03..168b4b7c 100644
--- a/webview-ui/src/components/settings/providers/VSCodeLmProvider.tsx
+++ b/webview-ui/src/components/settings/providers/VSCodeLmProvider.tsx
@@ -2,6 +2,7 @@ import { EmptyRequest } from "@shared/proto/cline/common"
import { Mode } from "@shared/storage/types"
import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import { useCallback, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import { useInterval } from "react-use"
import * as vscodemodels from "vscode"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -15,6 +16,7 @@ interface VSCodeLmProviderProps {
}
export const VSCodeLmProvider = ({ currentMode }: VSCodeLmProviderProps) => {
+ const { t } = useTranslation("settings")
const [vsCodeLmModels, setVsCodeLmModels] = useState([])
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -44,7 +46,7 @@ export const VSCodeLmProvider = ({ currentMode }: VSCodeLmProviderProps) => {
- Language Model
+ {t("providers.vscodeLm.languageModel")}
{vsCodeLmModels.length > 0 ? (
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange } = useApiConfigurationHandlers()
@@ -30,7 +32,7 @@ export const VercelAIGatewayProvider = ({ showModelOptions, isPopup, currentMode
placeholder="Enter API Key..."
style={{ width: "100%" }}
type="password">
- Vercel AI Gateway API Key
+ {t("providers.vercelAiGateway.apiKey")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration, remoteConfigSettings } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
const modeFields = getModeSpecificFields(apiConfiguration, currentMode)
@@ -72,7 +74,7 @@ export const VertexProvider = ({ showModelOptions, isPopup, currentMode }: Verte
placeholder="Enter Project ID..."
style={{ width: "100%" }}>
- Google Cloud Project ID
+ {t("providers.vertex.googleCloudProjectId")}
{remoteConfigSettings?.vertexProjectId !== undefined && }
@@ -84,7 +86,7 @@ export const VertexProvider = ({ showModelOptions, isPopup, currentMode }: Verte
className="flex items-center gap-2 mb-1"
style={{ opacity: remoteConfigSettings?.vertexRegion !== undefined ? 0.4 : 1 }}>
- Google Cloud Region
+ {t("providers.vertex.googleCloudRegion")}
{remoteConfigSettings?.vertexRegion !== undefined && }
@@ -94,7 +96,7 @@ export const VertexProvider = ({ showModelOptions, isPopup, currentMode }: Verte
onChange={(e: any) => handleFieldChange("vertexRegion", e.target.value)}
style={{ width: "100%" }}
value={apiConfiguration?.vertexRegion || ""}>
- Select a region...
+ {t("providers.vertex.selectRegion")}
{REGIONS.map((region) => (
{region}
@@ -144,8 +146,8 @@ export const VertexProvider = ({ showModelOptions, isPopup, currentMode }: Verte
allowedEfforts={["none", "low", "medium", "high", "xhigh"] as const}
currentMode={currentMode}
defaultEffort={adaptiveThinkingDefaultEffort}
- description="Use None to disable adaptive thinking. Higher effort increases response detail and token usage."
- label="Adaptive Thinking"
+ description={t("settings.adaptiveThinkingDescription")}
+ label={t("settings.adaptiveThinking")}
/>
) : SUPPORTED_THINKING_MODELS.includes(selectedModelId) ? (
diff --git a/webview-ui/src/components/settings/providers/WandbProvider.tsx b/webview-ui/src/components/settings/providers/WandbProvider.tsx
index f771cc55..cdd5ed44 100644
--- a/webview-ui/src/components/settings/providers/WandbProvider.tsx
+++ b/webview-ui/src/components/settings/providers/WandbProvider.tsx
@@ -1,5 +1,6 @@
import { wandbModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { ApiKeyField } from "../common/ApiKeyField"
import { ModelInfoView } from "../common/ModelInfoView"
@@ -14,6 +15,7 @@ interface WandbProviderProps {
}
export const WandbProvider = ({ showModelOptions, isPopup, currentMode }: WandbProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -22,7 +24,7 @@ export const WandbProvider = ({ showModelOptions, isPopup, currentMode }: WandbP
return (
handleFieldChange("wandbApiKey", value)}
providerName="W&B"
@@ -32,7 +34,7 @@ export const WandbProvider = ({ showModelOptions, isPopup, currentMode }: WandbP
{showModelOptions && (
<>
handleModeFieldChange(
diff --git a/webview-ui/src/components/settings/providers/XaiProvider.tsx b/webview-ui/src/components/settings/providers/XaiProvider.tsx
index 80620c7c..11f53d30 100644
--- a/webview-ui/src/components/settings/providers/XaiProvider.tsx
+++ b/webview-ui/src/components/settings/providers/XaiProvider.tsx
@@ -2,6 +2,7 @@ import { xaiModels } from "@shared/api"
import { Mode } from "@shared/storage/types"
import { VSCodeCheckbox, VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import { useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { DROPDOWN_Z_INDEX } from "../ApiOptions"
import { ApiKeyField } from "../common/ApiKeyField"
@@ -20,6 +21,7 @@ interface XaiProviderProps {
}
export const XaiProvider = ({ showModelOptions, isPopup, currentMode }: XaiProviderProps) => {
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
@@ -90,7 +92,7 @@ export const XaiProvider = ({ showModelOptions, isPopup, currentMode }: XaiProvi
{reasoningEffortSelected && (
- Reasoning Effort
+ {t("providers.xai.reasoningEffort")}
{
+ const { t } = useTranslation("settings")
const { apiConfiguration } = useExtensionState()
const { handleFieldChange, handleModeFieldChange } = useApiConfigurationHandlers()
diff --git a/webview-ui/src/components/settings/sections/AboutSection.tsx b/webview-ui/src/components/settings/sections/AboutSection.tsx
index 6e84d53e..d899fecb 100644
--- a/webview-ui/src/components/settings/sections/AboutSection.tsx
+++ b/webview-ui/src/components/settings/sections/AboutSection.tsx
@@ -1,4 +1,5 @@
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import Section from "../Section"
interface AboutSectionProps {
@@ -6,19 +7,20 @@ interface AboutSectionProps {
renderSectionHeader: (tabId: string) => JSX.Element | null
}
const AboutSection = ({ version, renderSectionHeader }: AboutSectionProps) => {
+ const { t } = useTranslation("settings")
return (
{renderSectionHeader("about")}
-
Cline v{version}
+
t("settingsSections.aboutVersion", {version})
An AI assistant that can use your CLI and Editor. Cline can handle complex software development tasks
step-by-step with tools that let him create & edit files, explore large projects, use the browser, and
execute terminal commands (after you grant permission).
-
Community & Support
+
{t("settingsSections.communitySupport")}
X
{" • "}
@@ -27,11 +29,11 @@ const AboutSection = ({ version, renderSectionHeader }: AboutSectionProps) => {
r/cline
-
Development
+
{t("settingsSections.development")}
GitHub
{" • "}
- Issues
+ {t("settingsSections.issues")}
{" • "}
{" "}
@@ -39,9 +41,9 @@ const AboutSection = ({ version, renderSectionHeader }: AboutSectionProps) => {
-
Resources
+
{t("settingsSections.resources")}
- Documentation
+ {t("settingsSections.documentation")}
{" • "}
https://cline.bot
diff --git a/webview-ui/src/components/settings/sections/ApiConfigurationSection.tsx b/webview-ui/src/components/settings/sections/ApiConfigurationSection.tsx
index 99cf8b5c..52370075 100644
--- a/webview-ui/src/components/settings/sections/ApiConfigurationSection.tsx
+++ b/webview-ui/src/components/settings/sections/ApiConfigurationSection.tsx
@@ -2,6 +2,7 @@ import { UpdateSettingsRequest } from "@shared/proto/cline/state"
import { Mode } from "@shared/storage/types"
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import { useState } from "react"
+import { useTranslation } from "react-i18next"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { StateServiceClient } from "@/services/grpc-client"
import { TabButton } from "../../mcp/configuration/McpConfigurationView"
@@ -16,6 +17,7 @@ interface ApiConfigurationSectionProps {
}
const ApiConfigurationSection = ({ renderSectionHeader, initialModelTab }: ApiConfigurationSectionProps) => {
+ const { t } = useTranslation("settings")
const { planActSeparateModelsSetting, mode, apiConfiguration } = useExtensionState()
const [currentTab, setCurrentTab] = useState
(mode)
const { handleFieldsChange } = useApiConfigurationHandlers()
diff --git a/webview-ui/src/components/settings/sections/BrowserSettingsSection.tsx b/webview-ui/src/components/settings/sections/BrowserSettingsSection.tsx
index 5d3ef335..7c81dfa4 100644
--- a/webview-ui/src/components/settings/sections/BrowserSettingsSection.tsx
+++ b/webview-ui/src/components/settings/sections/BrowserSettingsSection.tsx
@@ -1,6 +1,7 @@
import { EmptyRequest, StringRequest } from "@shared/proto/cline/common"
import { VSCodeButton, VSCodeCheckbox, VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import React, { useCallback, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import styled from "styled-components"
import { BROWSER_VIEWPORT_PRESETS } from "../../../../../src/shared/BrowserSettings"
import { useExtensionState } from "../../../context/ExtensionStateContext"
@@ -32,21 +33,24 @@ const ConnectionStatusIndicator = ({
{isChecking ? (
<>
- Checking connection...
+ {t("settingsSections.checkingConnection")}
>
) : isConnected === true ? (
<>
- Connected
+
+ {t("settingsSections.connected")}
+
>
) : isConnected === false ? (
- Not connected
+ {t("settingsSections.notConnected")}
) : null}
)
}
export const BrowserSettingsSection: React.FC = ({ renderSectionHeader }) => {
+ const { t } = useTranslation("settings")
const { browserSettings } = useExtensionState()
const [isCheckingConnection, setIsCheckingConnection] = useState(false)
const [connectionStatus, setConnectionStatus] = useState(null)
@@ -175,14 +179,16 @@ export const BrowserSettingsSection: React.FC = ({
color: "var(--vscode-descriptionForeground)",
margin: "4px 0 0 0px",
}}>
- Prevent Cline from using browser actions (e.g. launch, click, type).
+ {t("settingsSections.disableBrowserDescription")}
- Viewport size
+
+ {t("settingsSections.viewportSize")}
+
handleViewportChange(event as Event)}
style={{ width: "100%" }}
@@ -208,7 +214,7 @@ export const BrowserSettingsSection: React.FC = ({
color: "var(--vscode-descriptionForeground)",
margin: 0,
}}>
- Set the size of the browser viewport for screenshots and interactions.
+ {t("settingsSections.viewportSizeDescription")}
@@ -246,9 +252,9 @@ export const BrowserSettingsSection: React.FC
= ({
color: "var(--vscode-descriptionForeground)",
margin: "0 0 6px 0px",
}}>
- Enable Cline to use your Chrome
+ {t("settingsSections.remoteBrowserDescription")}
{isBundled
- ? "(not detected on your machine)"
+ ? t("settingsSections.notDetectedOnMachine")
: detectedChromePath
? ` (${detectedChromePath})`
: ""}
@@ -257,8 +263,9 @@ export const BrowserSettingsSection: React.FC = ({
{browserSettings.remoteBrowserEnabled ? (
<>
{" "}
- manually (--remote-debugging-port=9222) or using the button below. Enter the
- host address or leave it blank for automatic discovery.
+ {t("settingsSections.remoteBrowserDebugManually")} (
+ --remote-debugging-port=9222) or using the button below. Enter the host
+ address or leave it blank for automatic discovery.
>
) : (
"."
@@ -282,7 +289,9 @@ export const BrowserSettingsSection: React.FC = ({
disabled={debugMode}
onClick={relaunchChromeDebugMode}
style={{ flex: 1 }}>
- {debugMode ? "Launching Browser..." : "Launch Browser with Debug Mode"}
+ {debugMode
+ ? t("settingsSections.launchingBrowser")
+ : t("settingsSections.launchBrowserDebug")}
)}
@@ -312,7 +321,8 @@ export const BrowserSettingsSection: React.FC = ({
fontSize: "12px",
color: "var(--vscode-descriptionForeground)",
margin: 0,
- }}>
+ }}
+ />
)}
{/* Chrome Executable Path section now follows remote-specific settings */}
@@ -335,7 +345,7 @@ export const BrowserSettingsSection: React.FC = ({
color: "var(--vscode-descriptionForeground)",
margin: "4px 0 0 0",
}}>
- Leave blank to auto-detect.
+ {t("settingsSections.leaveBlankAutoDetect")}
{/* Custom Browser Arguments section */}
@@ -358,7 +368,7 @@ export const BrowserSettingsSection: React.FC = ({
color: "var(--vscode-descriptionForeground)",
margin: "4px 0 0 0",
}}>
- Space-separated arguments to pass to the browser executable.
+ {t("settingsSections.customBrowserArgsDescription")}
diff --git a/webview-ui/src/components/settings/sections/DebugSection.tsx b/webview-ui/src/components/settings/sections/DebugSection.tsx
index 933c563f..972805d9 100644
--- a/webview-ui/src/components/settings/sections/DebugSection.tsx
+++ b/webview-ui/src/components/settings/sections/DebugSection.tsx
@@ -1,3 +1,4 @@
+import { useTranslation } from "react-i18next"
import { Button } from "@/components/ui/button"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { StateServiceClient } from "@/services/grpc-client"
@@ -9,6 +10,7 @@ interface DebugSectionProps {
}
const DebugSection = ({ onResetState, renderSectionHeader }: DebugSectionProps) => {
+ const { t } = useTranslation("settings")
const { setShowWelcome } = useExtensionState()
return (
@@ -21,7 +23,7 @@ const DebugSection = ({ onResetState, renderSectionHeader }: DebugSectionProps)
Reset Global State
- This will reset all global state and secret storage in the extension.
+ {t("settingsSections.resetStateDescription")}
diff --git a/webview-ui/src/components/settings/sections/FeatureSettingsSection.tsx b/webview-ui/src/components/settings/sections/FeatureSettingsSection.tsx
index 5779674d..05d54f80 100644
--- a/webview-ui/src/components/settings/sections/FeatureSettingsSection.tsx
+++ b/webview-ui/src/components/settings/sections/FeatureSettingsSection.tsx
@@ -1,5 +1,6 @@
import { UpdateSettingsRequest } from "@shared/proto/cline/state"
import { memo, type ReactNode, useCallback } from "react"
+import { useTranslation } from "react-i18next"
import { Label } from "@/components/ui/label"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Switch } from "@/components/ui/switch"
@@ -209,6 +210,50 @@ interface FeatureSettingsSectionProps {
}
const FeatureSettingsSection = ({ renderSectionHeader }: FeatureSettingsSectionProps) => {
+ const { t } = useTranslation("settings")
+
+ const featureTranslations: Record = {
+ subagents: { label: t("featureSettings.subagents"), description: t("featureSettings.subagentsDescription") },
+ "native-tool-call": {
+ label: t("featureSettings.nativeToolCall"),
+ description: t("featureSettings.nativeToolCallDescription"),
+ },
+ "parallel-tool-calling": {
+ label: t("featureSettings.parallelToolCalling"),
+ description: t("featureSettings.parallelToolCallingDescription"),
+ },
+ "strict-plan-mode": {
+ label: t("featureSettings.strictPlanMode"),
+ description: t("featureSettings.strictPlanModeDescription"),
+ },
+ "auto-compact": { label: t("featureSettings.autoCompact"), description: t("featureSettings.autoCompactDescription") },
+ "focus-chain": { label: t("featureSettings.focusChain"), description: t("featureSettings.focusChainDescription") },
+ "show-feature-tips": {
+ label: t("featureSettings.featureTips"),
+ description: t("featureSettings.featureTipsDescription"),
+ },
+ "background-edit": {
+ label: t("featureSettings.backgroundEdit"),
+ description: t("featureSettings.backgroundEditDescription"),
+ },
+ checkpoints: { label: t("featureSettings.checkpoints"), description: t("featureSettings.checkpointsDescription") },
+ "cline-web-tools": {
+ label: t("featureSettings.clineWebTools"),
+ description: t("featureSettings.clineWebToolsDescription"),
+ },
+ worktrees: { label: t("featureSettings.worktrees"), description: t("featureSettings.worktreesDescription") },
+ yolo: { label: t("featureSettings.yoloMode"), description: t("featureSettings.yoloModeDescription") },
+ "double-check-completion": {
+ label: t("featureSettings.doubleCheckCompletion"),
+ description: t("featureSettings.doubleCheckCompletionDescription"),
+ },
+ "lazy-teammate": {
+ label: t("featureSettings.lazyTeammateMode"),
+ description: t("featureSettings.lazyTeammateModeDescription"),
+ },
+ hooks: { label: t("featureSettings.hooks"), description: t("featureSettings.hooksDescription") },
+ }
+
const {
enableCheckpointsSetting,
hooksEnabled,
@@ -287,7 +332,9 @@ const FeatureSettingsSection = ({ renderSectionHeader }: FeatureSettingsSectionP
{/* Core features */}
-
Agent
+
+ {t("featureSettings.agent")}
+
@@ -295,10 +342,10 @@ const FeatureSettingsSection = ({ renderSectionHeader }: FeatureSettingsSectionP
feature.nestedKey === "enabled"
? handleFeatureChange(feature, checked)
@@ -307,7 +354,7 @@ const FeatureSettingsSection = ({ renderSectionHeader }: FeatureSettingsSectionP
/>
{feature.id === "focus-chain" && featureState[feature.stateKey] && (
- Editor
+
+ {t("featureSettings.editor")}
+
{editorFeatures.map((feature) => (
handleFeatureChange(feature, checked)}
/>
))}
@@ -342,19 +391,21 @@ const FeatureSettingsSection = ({ renderSectionHeader }: FeatureSettingsSectionP
{/* Experimental features */}
-
Experimental
+
+ {t("featureSettings.experimental")}
+
{experimentalFeatures.map((feature) => (
handleFeatureChange(feature, checked)}
remoteTooltip="This setting is managed by your organization's remote configuration"
/>
@@ -365,32 +416,36 @@ const FeatureSettingsSection = ({ renderSectionHeader }: FeatureSettingsSectionP
{/* Advanced */}
-
Advanced
+
+ {t("featureSettings.advanced")}
+
{advancedFeatures.map((feature) => (
handleFeatureChange(feature, checked)}
/>
))}
{/* MCP Display Mode */}
-
MCP Display Mode
-
Controls how MCP responses are displayed
+
+ {t("featureSettings.mcpDisplayMode")}
+
+
{t("featureSettings.mcpDisplayModeDescription")}
updateSetting("mcpDisplayMode", v)} value={mcpDisplayMode}>
- Plain Text
- Rich Display
- Markdown
+ {t("featureSettings.plainText")}
+ {t("featureSettings.richDisplay")}
+ {t("featureSettings.markdown")}
diff --git a/webview-ui/src/components/settings/sections/GeneralSettingsSection.tsx b/webview-ui/src/components/settings/sections/GeneralSettingsSection.tsx
index e38660a6..72e51db2 100644
--- a/webview-ui/src/components/settings/sections/GeneralSettingsSection.tsx
+++ b/webview-ui/src/components/settings/sections/GeneralSettingsSection.tsx
@@ -1,4 +1,5 @@
import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
+import { useTranslation } from "react-i18next"
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
import { useExtensionState } from "@/context/ExtensionStateContext"
import PreferredLanguageSetting from "../PreferredLanguageSetting"
@@ -10,6 +11,7 @@ interface GeneralSettingsSectionProps {
}
const GeneralSettingsSection = ({ renderSectionHeader }: GeneralSettingsSectionProps) => {
+ const { t } = useTranslation("settings")
const { telemetrySetting, remoteConfigSettings } = useExtensionState()
return (
@@ -21,7 +23,7 @@ const GeneralSettingsSection = ({ renderSectionHeader }: GeneralSettingsSectionP
- This setting is managed by your organization's remote configuration
+ {t("settings.remotelyConfiguredMessage")}
@@ -50,14 +52,13 @@ const GeneralSettingsSection = ({ renderSectionHeader }: GeneralSettingsSectionP
style={{ fontSize: "inherit", textDecoration: "underline" }}>
telemetry overview
{" "}
- and{" "}
+ {t("settingsSections.telemetryDescription").split(".")[1] ? "" : ""}{" "}
privacy policy
{" "}
- for more details.
diff --git a/webview-ui/src/components/settings/sections/RemoteConfigSection.tsx b/webview-ui/src/components/settings/sections/RemoteConfigSection.tsx
index 40b3fb70..36e02ad2 100644
--- a/webview-ui/src/components/settings/sections/RemoteConfigSection.tsx
+++ b/webview-ui/src/components/settings/sections/RemoteConfigSection.tsx
@@ -1,6 +1,7 @@
import { EmptyRequest } from "@shared/proto/index.cline"
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { useEffect, useRef, useState } from "react"
+import { useTranslation } from "react-i18next"
import { RemoteConfigToggle } from "@/components/account/RemoteConfigToggle"
import { useClineAuth } from "@/context/ClineAuthContext"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -23,6 +24,7 @@ function BaseRemoteConfigSection({ renderSectionHeader, children }: React.PropsW
const AUTOMATIC_DELAY_MS = 30000
function RefreshButton() {
+ const { t } = useTranslation("settings")
const [isLoading, setIsLoading] = useState(false)
const [retryIn, setRetryIn] = useState(null)
const intervalRef = useRef()
@@ -69,12 +71,17 @@ interface SettingRowProps {
}
function SettingRow({ label, value, isSecret }: SettingRowProps) {
+ const { t } = useTranslation("settings")
const displayValue = (() => {
if (value === undefined || value === null) {
- return Not configured
+ return {t("remoteConfig.notConfigured")}
}
if (typeof value === "boolean") {
- return value ? Enabled : Disabled
+ return value ? (
+ {t("remoteConfig.enabled")}
+ ) : (
+ {t("remoteConfig.disabled")}
+ )
}
if (isSecret && typeof value === "string" && value.length > 0) {
return {"•".repeat(Math.min(value.length, 20))}
@@ -108,6 +115,7 @@ interface TestButtonProps {
}
function TestButton({ label, onClick, disabled, successMessage }: TestButtonProps) {
+ const { t } = useTranslation("settings")
const [isLoading, setIsLoading] = useState(false)
const [result, setResult] = useState<{ success: boolean; message: string } | null>(null)
const timeoutRef = useRef()
@@ -125,9 +133,9 @@ function TestButton({ label, onClick, disabled, successMessage }: TestButtonProp
setResult(null)
try {
await onClick()
- setResult({ success: true, message: successMessage || "Success!" })
+ setResult({ success: true, message: successMessage || t("remoteConfig.success") })
} catch (error) {
- setResult({ success: false, message: error instanceof Error ? error.message : "Failed" })
+ setResult({ success: false, message: error instanceof Error ? error.message : t("remoteConfig.failed") })
} finally {
setIsLoading(false)
timeoutRef.current = setTimeout(() => setResult(null), 5000)
@@ -141,7 +149,7 @@ function TestButton({ label, onClick, disabled, successMessage }: TestButtonProp
className={isLoading ? "animate-pulse" : ""}
disabled={disabled || isLoading}
onClick={handleClick}>
- {isLoading ? "Testing..." : label}
+ {isLoading ? t("remoteConfig.testing") : label}
{result && {result.message} }
@@ -149,6 +157,7 @@ function TestButton({ label, onClick, disabled, successMessage }: TestButtonProp
}
function OtelSettingsSection() {
+ const { t } = useTranslation("settings")
const { remoteConfigSettings } = useExtensionState()
const otelEnabled = remoteConfigSettings?.openTelemetryEnabled
@@ -176,40 +185,55 @@ function OtelSettingsSection() {
OpenTelemetry Configuration
-
-
-
-
-
+
+
+
+
+
{remoteConfigSettings?.openTelemetryOtlpMetricsEndpoint && (
-
+
)}
{remoteConfigSettings?.openTelemetryOtlpLogsEndpoint && (
-
+
)}
{remoteConfigSettings?.openTelemetryOtlpHeaders && (
)}
{remoteConfigSettings?.openTelemetryMetricExportInterval && (
)}
{remoteConfigSettings?.openTelemetryOtlpInsecure !== undefined && (
-
+
)}
{remoteConfigSettings?.openTelemetryLogBatchSize && (
-
+
)}
{remoteConfigSettings?.openTelemetryLogBatchTimeout && (
-
+
)}
{remoteConfigSettings?.openTelemetryLogMaxQueueSize && (
-
+
)}
@@ -217,9 +241,9 @@ function OtelSettingsSection() {
)}
@@ -228,6 +252,7 @@ function OtelSettingsSection() {
}
function PromptUploadingSection() {
+ const { t } = useTranslation("settings")
const { remoteConfigSettings } = useExtensionState()
const blobStoreConfig = remoteConfigSettings?.blobStoreConfig
@@ -249,26 +274,37 @@ function PromptUploadingSection() {
Prompt Uploading Configuration
-
-
-
- {blobStoreConfig.endpoint && }
- {blobStoreConfig.accountId && }
-
-
- {blobStoreConfig.intervalMs && }
- {blobStoreConfig.batchSize && }
- {blobStoreConfig.maxRetries && }
- {blobStoreConfig.maxQueueSize && }
-
+
+
+
+ {blobStoreConfig.endpoint && }
+ {blobStoreConfig.accountId && (
+
+ )}
+
+
+ {blobStoreConfig.intervalMs && (
+
+ )}
+ {blobStoreConfig.batchSize && (
+
+ )}
+ {blobStoreConfig.maxRetries && (
+
+ )}
+ {blobStoreConfig.maxQueueSize && (
+
+ )}
+
-
+
)
}
export function RemoteConfigSection({ renderSectionHeader }: RemoteConfigSectionProps) {
+ const { t } = useTranslation("settings")
const { remoteConfigSettings, optOutOfRemoteConfig } = useExtensionState()
const { activeOrganization } = useClineAuth()
@@ -276,7 +312,7 @@ export function RemoteConfigSection({ renderSectionHeader }: RemoteConfigSection
return (
-
You have opted out of remote config. Opt back in to apply it and see it here.
+ {t("remoteConfig.optedOut")}
@@ -290,7 +326,10 @@ export function RemoteConfigSection({ renderSectionHeader }: RemoteConfigSection
You haven't configured remote config yet. Do so through our{" "}
- dashboard .
+
+ {t("remoteConfig.dashboard")}
+
+ .
@@ -302,9 +341,7 @@ export function RemoteConfigSection({ renderSectionHeader }: RemoteConfigSection
return (
-
- These settings are managed by your organization's remote configuration.
-
+
{t("remoteConfig.settingsManagedByOrg")}
diff --git a/webview-ui/src/components/settings/sections/TerminalSettingsSection.tsx b/webview-ui/src/components/settings/sections/TerminalSettingsSection.tsx
index 1aced59c..c9bfaa47 100644
--- a/webview-ui/src/components/settings/sections/TerminalSettingsSection.tsx
+++ b/webview-ui/src/components/settings/sections/TerminalSettingsSection.tsx
@@ -1,6 +1,7 @@
import { UpdateTerminalConnectionTimeoutResponse } from "@shared/proto/index.cline"
import { VSCodeCheckbox, VSCodeDropdown, VSCodeOption, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import React, { useState } from "react"
+import { useTranslation } from "react-i18next"
import { PlatformType } from "@/config/platform.config"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { usePlatform } from "@/context/PlatformContext"
@@ -14,6 +15,7 @@ interface TerminalSettingsSectionProps {
}
export const TerminalSettingsSection: React.FC
= ({ renderSectionHeader }) => {
+ const { t } = useTranslation("settings")
const {
shellIntegrationTimeout,
terminalReuseEnabled,
@@ -33,9 +35,9 @@ export const TerminalSettingsSection: React.FC = (
setInputValue(value)
- const seconds = parseFloat(value)
+ const seconds = Number.parseFloat(value)
if (Number.isNaN(seconds) || seconds <= 0) {
- setInputError("Please enter a positive number")
+ setInputError(t("settingsSections.enterPositiveNumber"))
return
}
@@ -107,19 +109,19 @@ export const TerminalSettingsSection: React.FC = (
))}
- Select the default terminal Cline will use. 'Default' uses your VSCode global setting.
+ {t("settingsSections.defaultTerminalProfileDescription")}
-
Shell integration timeout (seconds)
+
{t("settingsSections.shellIntegrationTimeout")}
handleTimeoutChange(event as Event)}
- placeholder="Enter timeout in seconds"
+ placeholder={t("settingsSections.shellIntegrationPlaceholder")}
value={inputValue}
/>
@@ -154,11 +156,11 @@ export const TerminalSettingsSection: React.FC
= (
id="terminal-execution-mode"
onChange={(event) => handleExecutionModeChange(event as Event)}
value={vscodeTerminalExecutionMode ?? "vscodeTerminal"}>
- VS Code Terminal
- Background Exec
+ {t("settingsSections.vsCodeTerminal")}
+ {t("settingsSections.backgroundExec")}
- Choose whether Cline runs commands in the VS Code terminal or a background process.
+ {t("settingsSections.terminalExecutionModeDescription")}
)}
diff --git a/webview-ui/src/components/settings/utils/pricingUtils.ts b/webview-ui/src/components/settings/utils/pricingUtils.ts
index d86af2ef..3d014893 100644
--- a/webview-ui/src/components/settings/utils/pricingUtils.ts
+++ b/webview-ui/src/components/settings/utils/pricingUtils.ts
@@ -67,6 +67,6 @@ export const parsePrice = (value: string, defaultValue: number): number => {
if (value === "" || value === ".") {
return defaultValue
}
- const num = parseFloat(value)
+ const num = Number.parseFloat(value)
return isNaN(num) ? defaultValue : num
}
diff --git a/webview-ui/src/components/settings/utils/useDebouncedInput.ts b/webview-ui/src/components/settings/utils/useDebouncedInput.ts
index d096f6ce..0f380089 100644
--- a/webview-ui/src/components/settings/utils/useDebouncedInput.ts
+++ b/webview-ui/src/components/settings/utils/useDebouncedInput.ts
@@ -10,11 +10,7 @@ import { useDebounceEffect } from "@/utils/useDebounceEffect"
* @param debounceMs - Debounce delay in milliseconds (default: 500ms)
* @returns A tuple of [currentValue, setValue] similar to useState
*/
-export function useDebouncedInput
(
- initialValue: T,
- onChange: (value: T) => void,
- debounceMs: number = 100,
-): [T, (value: T) => void] {
+export function useDebouncedInput(initialValue: T, onChange: (value: T) => void, debounceMs = 100): [T, (value: T) => void] {
// Local state to prevent jumpy input - initialize once
const [localValue, setLocalValue] = useState(initialValue)
diff --git a/webview-ui/src/components/ui/button.tsx b/webview-ui/src/components/ui/button.tsx
index b31b7467..4ec79dca 100644
--- a/webview-ui/src/components/ui/button.tsx
+++ b/webview-ui/src/components/ui/button.tsx
@@ -24,14 +24,14 @@ const buttonVariants = cva(
"bg-success/10 text-success border-[#176f2c] text-white hover:bg-[#197f31] hover:border-[#197f31] active:bg-[#156528] active:border-[#156528] hover:text-white",
danger: "bg-[#c42b2b] border-[#c42b2b]! text-white! hover:bg-[#a82424]! hover:border-[#a82424]! active:bg-[#8f1f1f]! active:border-[#8f1f1f]!",
},
- size: {
- default: "py-1.5 px-4 [&_svg]:size-3",
- sm: "py-1 px-3 text-sm [&_svg]:size-2",
- xs: "p-1 text-xs [&_svg]:size-2",
- lg: "py-4 px-8 [&_svg]:size-4 font-medium",
- icon: "px-0.5 m-0 [&_svg]:size-2",
- header: "py-1 px-4 [&_svg]:size-2.5",
- },
+ size: {
+ default: "py-1.5 px-4 [&_svg]:size-3",
+ sm: "py-1 px-3 text-sm [&_svg]:size-2",
+ xs: "p-1 text-xs [&_svg]:size-2",
+ lg: "py-4 px-8 [&_svg]:size-4 font-medium",
+ icon: "px-0.5 m-0 [&_svg]:size-2",
+ header: "py-1 px-4 [&_svg]:size-2.5",
+ },
},
defaultVariants: {
variant: "default",
diff --git a/webview-ui/src/components/ui/hooks/useOpenRouterKeyInfo.ts b/webview-ui/src/components/ui/hooks/useOpenRouterKeyInfo.ts
index 14585ac3..46d5466a 100644
--- a/webview-ui/src/components/ui/hooks/useOpenRouterKeyInfo.ts
+++ b/webview-ui/src/components/ui/hooks/useOpenRouterKeyInfo.ts
@@ -86,7 +86,7 @@ export const useOpenRouterKeyInfo = (apiKey?: string) => {
}
const now = Date.now()
- const cacheAge = moduleLastFetchTime ? now - moduleLastFetchTime : Infinity
+ const cacheAge = moduleLastFetchTime ? now - moduleLastFetchTime : Number.POSITIVE_INFINITY
const isCacheStale = cacheAge >= CACHE_DURATION_MS
const hasCache = !!moduleCachedData
diff --git a/webview-ui/src/components/welcome/HomeHeader.tsx b/webview-ui/src/components/welcome/HomeHeader.tsx
index d95bf543..8cdd7f37 100644
--- a/webview-ui/src/components/welcome/HomeHeader.tsx
+++ b/webview-ui/src/components/welcome/HomeHeader.tsx
@@ -1,4 +1,5 @@
import { EmptyRequest } from "@shared/proto/cline/common"
+import { useTranslation } from "react-i18next"
import ClineLogoSanta from "@/assets/ClineLogoSanta"
import ClineLogoTired from "@/assets/ClineLogoTired"
import ClineLogoVariable from "@/assets/ClineLogoVariable"
@@ -11,6 +12,7 @@ interface HomeHeaderProps {
const HomeHeader = ({ shouldShowQuickWins = false }: HomeHeaderProps) => {
const { environment, lazyTeammateModeEnabled } = useExtensionState()
+ const { t } = useTranslation("common")
const handleTakeATour = async () => {
try {
@@ -23,7 +25,7 @@ const HomeHeader = ({ shouldShowQuickWins = false }: HomeHeaderProps) => {
// Lazy Teammate Mode takes priority, then December festive logo, then default
const isDecember = new Date().getMonth() === 11 // 11 = December (0-indexed)
const LogoComponent = lazyTeammateModeEnabled ? ClineLogoTired : isDecember ? ClineLogoSanta : ClineLogoVariable
- const headingText = lazyTeammateModeEnabled ? "I guess I'm here to help" : "What can I do for you?"
+ const headingText = lazyTeammateModeEnabled ? t("homeHeader.lazyTeammateHeading") : t("homeHeader.defaultHeading")
return (
@@ -39,7 +41,7 @@ const HomeHeader = ({ shouldShowQuickWins = false }: HomeHeaderProps) => {
className="flex items-center gap-2 px-4 py-2 rounded-full border border-border-panel bg-white/2 hover:bg-list-background-hover transition-colors duration-150 ease-in-out text-code-foreground text-sm font-medium cursor-pointer"
onClick={handleTakeATour}
type="button">
- Take a Tour
+ {t("homeHeader.takeATour")}
diff --git a/webview-ui/src/components/welcome/QuickWinCard.tsx b/webview-ui/src/components/welcome/QuickWinCard.tsx
index 63b71f15..c1386e7f 100644
--- a/webview-ui/src/components/welcome/QuickWinCard.tsx
+++ b/webview-ui/src/components/welcome/QuickWinCard.tsx
@@ -8,7 +8,7 @@ interface QuickWinCardProps {
const renderIcon = (iconName?: string) => {
if (!iconName) {
- return
+ return
}
let iconClass = "codicon-rocket"
@@ -25,7 +25,7 @@ const renderIcon = (iconName?: string) => {
default:
break
}
- return
+ return
}
const QuickWinCard: React.FC = ({ task, onExecute }) => {
diff --git a/webview-ui/src/components/welcome/SuggestedTasks.tsx b/webview-ui/src/components/welcome/SuggestedTasks.tsx
index 02eea58c..f9926385 100644
--- a/webview-ui/src/components/welcome/SuggestedTasks.tsx
+++ b/webview-ui/src/components/welcome/SuggestedTasks.tsx
@@ -1,10 +1,12 @@
import { NewTaskRequest } from "@shared/proto/cline/task"
import React from "react"
+import { useTranslation } from "react-i18next"
import { TaskServiceClient } from "@/services/grpc-client"
import QuickWinCard from "./QuickWinCard"
import { QuickWinTask, quickWinTasks } from "./quickWinTasks"
export const SuggestedTasks: React.FC<{ shouldShowQuickWins: boolean }> = ({ shouldShowQuickWins }) => {
+ const { t } = useTranslation("common")
const handleExecuteQuickWin = async (prompt: string) => {
await TaskServiceClient.newTask(NewTaskRequest.create({ text: prompt, images: [] }))
}
@@ -14,7 +16,9 @@ export const SuggestedTasks: React.FC<{ shouldShowQuickWins: boolean }> = ({ sho
{" "}
- Quick [Wins] with Cline
+ {t("suggestedTasks.title")}
+ {t("suggestedTasks.titleHighlight")}
+ {t("suggestedTasks.titleSuffix")}
{" "}
diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx
index 276f489b..436778c1 100644
--- a/webview-ui/src/components/welcome/WelcomeView.tsx
+++ b/webview-ui/src/components/welcome/WelcomeView.tsx
@@ -1,6 +1,7 @@
import { BooleanRequest, EmptyRequest } from "@shared/proto/cline/common"
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { memo, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import ClineLogoWhite from "@/assets/ClineLogoWhite"
import ApiOptions from "@/components/settings/ApiOptions"
import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -8,6 +9,7 @@ import { AccountServiceClient, StateServiceClient } from "@/services/grpc-client
import { validateApiConfiguration } from "@/utils/validate"
const WelcomeView = memo(() => {
+ const { t } = useTranslation("common")
const { apiConfiguration, mode } = useExtensionState()
const [apiErrorMessage, setApiErrorMessage] = useState
(undefined)
const [showApiOptions, setShowApiOptions] = useState(false)
@@ -39,27 +41,23 @@ const WelcomeView = memo(() => {
return (
-
Hi, I'm Cline
+
{t("welcome.title")}
- I can do all kinds of tasks thanks to breakthroughs in{" "}
+ {t("welcome.description")}{" "}
- Claude 4.6 Sonnet's
+ {t("welcome.descriptionLink")}
- agentic coding capabilities and access to tools that let me create & edit files, explore complex projects, use
- a browser, and execute terminal commands (with your permission, of course) . I can even use MCP to
- create new tools and extend my own capabilities.
+ {t("welcome.descriptionCapabilities")} {t("welcome.descriptionPermission")} .{" "}
+ {t("welcome.descriptionMcp")}
-
- Sign up for an account to get started for free, or use an API key that provides access to models like Claude
- Sonnet.
-
+
{t("welcome.signupPrompt")}
- Get Started for Free
+ {t("welcome.getStartedFree")}
{isLoading && (
@@ -72,7 +70,7 @@ const WelcomeView = memo(() => {
appearance="secondary"
className="mt-2.5 w-full"
onClick={() => setShowApiOptions(!showApiOptions)}>
- Use your own API key
+ {t("welcome.useOwnApiKey")}
)}
@@ -81,7 +79,7 @@ const WelcomeView = memo(() => {
- Let's go!
+ {t("welcome.letsGo")}
)}
diff --git a/webview-ui/src/components/welcome/quickWinTasks.ts b/webview-ui/src/components/welcome/quickWinTasks.ts
index 6d1ffb8b..9825999e 100644
--- a/webview-ui/src/components/welcome/quickWinTasks.ts
+++ b/webview-ui/src/components/welcome/quickWinTasks.ts
@@ -1,3 +1,5 @@
+import { useTranslation } from "react-i18next"
+
export interface QuickWinTask {
id: string
title: string
@@ -8,6 +10,41 @@ export interface QuickWinTask {
buttonText?: string
}
+const useQuickWinTasks = () => {
+ const { t } = useTranslation("common")
+ const quickWinTasks: QuickWinTask[] = [
+ {
+ id: "nextjs_notetaking_app",
+ title: t("suggestedTasks.buildNextjsApp"),
+ description: t("suggestedTasks.buildNextjsAppDesc"),
+ icon: "WebAppIcon",
+ actionCommand: "cline/createNextJsApp",
+ prompt: "Make a beautiful Next.js notetaking app, using Tailwind CSS for styling. Set up the basic structure and a simple UI for adding and viewing notes.",
+ buttonText: ">",
+ },
+ {
+ id: "terminal_cli_tool",
+ title: t("suggestedTasks.craftCliTool"),
+ description: t("suggestedTasks.craftCliToolDesc"),
+ icon: "TerminalIcon",
+ actionCommand: "cline/createCliTool",
+ prompt: "Make a terminal CLI tool using Node.js that organizes files in a directory by type, size, or date. It should have options to sort files into folders, show file statistics, find duplicates, and clean up empty directories. Include colorful output and progress indicators.",
+ buttonText: ">",
+ },
+ {
+ id: "snake_game",
+ title: t("suggestedTasks.developGame"),
+ description: t("suggestedTasks.developGameDesc"),
+ icon: "GameIcon",
+ actionCommand: "cline/createSnakeGame",
+ prompt: "Make a classic Snake game using HTML, CSS, and JavaScript. The game should be playable in the browser, with keyboard controls for the snake, a scoring system, and a game over state.",
+ buttonText: ">",
+ },
+ ]
+ return quickWinTasks
+}
+
+// For backward compatibility, keep the static export (translations won't work here but this maintains the interface)
export const quickWinTasks: QuickWinTask[] = [
{
id: "nextjs_notetaking_app",
@@ -37,3 +74,5 @@ export const quickWinTasks: QuickWinTask[] = [
buttonText: ">",
},
]
+
+export { useQuickWinTasks }
diff --git a/webview-ui/src/components/worktrees/CreateWorktreeModal.tsx b/webview-ui/src/components/worktrees/CreateWorktreeModal.tsx
index facd40f6..4b67d00f 100644
--- a/webview-ui/src/components/worktrees/CreateWorktreeModal.tsx
+++ b/webview-ui/src/components/worktrees/CreateWorktreeModal.tsx
@@ -3,6 +3,7 @@ import { CreateWorktreeRequest, SwitchWorktreeRequest } from "@shared/proto/clin
import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import { AlertCircle, AlertTriangle, Loader2, X } from "lucide-react"
import { memo, useCallback, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import { WorktreeServiceClient } from "@/services/grpc-client"
interface CreateWorktreeModalProps {
@@ -15,6 +16,7 @@ interface CreateWorktreeModalProps {
}
const CreateWorktreeModal = ({ open, onClose, openAfterCreate = false, onSuccess }: CreateWorktreeModalProps) => {
+ const { t } = useTranslation("misc")
const [newWorktreePath, setNewWorktreePath] = useState("")
const [newBranchName, setNewBranchName] = useState("")
const [isCreating, setIsCreating] = useState(false)
@@ -98,12 +100,10 @@ const CreateWorktreeModal = ({ open, onClose, openAfterCreate = false, onSuccess
return null
}
- const title = openAfterCreate ? "New Worktree" : "Create New Worktree"
- const buttonText = openAfterCreate ? "Create & Open" : "Create Worktree"
- const creatingText = openAfterCreate ? "Creating & Opening..." : "Creating..."
- const description = openAfterCreate
- ? "This will create a copy of your project on a new branch and open in a separate window."
- : "This will create a copy of your project on a new branch."
+ const title = openAfterCreate ? t("worktrees.create.titleOpen") : t("worktrees.create.title")
+ const buttonText = openAfterCreate ? t("worktrees.create.createOpen") : t("worktrees.create.createWorktree")
+ const creatingText = openAfterCreate ? t("worktrees.create.creatingOpening") : t("worktrees.create.creating")
+ const description = openAfterCreate ? t("worktrees.create.descriptionOpen") : t("worktrees.create.description")
return (
)}
-
Branch Name *
+
{t("worktrees.create.branchName")}
setNewBranchName((e.target as HTMLInputElement).value)}
- placeholder="feature/my-feature"
+ placeholder={t("worktrees.create.branchNamePlaceholder")}
value={newBranchName}>
{newBranchName && (
- Your new copy will be checked out to this branch.
+ {t("worktrees.create.branchNameHint")}
-
Folder Path *
+
{t("worktrees.create.folderPath")}
setNewWorktreePath((e.target as HTMLInputElement).value)}
- placeholder="../my-feature-worktree"
+ placeholder={t("worktrees.create.folderPathPlaceholder")}
value={newWorktreePath}>
{newWorktreePath && (
- Where the project will be copied for the worktree.
+ {t("worktrees.create.folderPathHint")}
{createError && (
@@ -207,7 +207,7 @@ const CreateWorktreeModal = ({ open, onClose, openAfterCreate = false, onSuccess
{isLoadingDefaults ? (
<>
- Loading...
+ {t("worktrees.create.loading")}
>
) : isCreating ? (
<>
diff --git a/webview-ui/src/components/worktrees/DeleteWorktreeModal.tsx b/webview-ui/src/components/worktrees/DeleteWorktreeModal.tsx
index cc5ef4ea..ceeb81b8 100644
--- a/webview-ui/src/components/worktrees/DeleteWorktreeModal.tsx
+++ b/webview-ui/src/components/worktrees/DeleteWorktreeModal.tsx
@@ -1,6 +1,7 @@
import { VSCodeButton, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import { AlertTriangle, Loader2, X } from "lucide-react"
import { memo, useCallback, useState } from "react"
+import { useTranslation } from "react-i18next"
import { Button } from "@/components/ui/button"
interface DeleteWorktreeModalProps {
@@ -12,6 +13,7 @@ interface DeleteWorktreeModalProps {
}
const DeleteWorktreeModal = ({ open, onClose, onConfirm, worktreePath, branchName }: DeleteWorktreeModalProps) => {
+ const { t } = useTranslation("misc")
const [isDeleting, setIsDeleting] = useState(false)
const [deleteBranch, setDeleteBranch] = useState(false)
@@ -51,12 +53,12 @@ const DeleteWorktreeModal = ({ open, onClose, onConfirm, worktreePath, branchNam
{/* Title row with icon */}
-
Delete Worktree
+
{t("worktrees.delete.title")}
{/* Content */}
- This will delete the worktree directory at{" "}
+ {t("worktrees.delete.description")}
{worktreePath}
@@ -66,29 +68,30 @@ const DeleteWorktreeModal = ({ open, onClose, onConfirm, worktreePath, branchNam
onChange={(e) => setDeleteBranch((e.target as HTMLInputElement).checked)}
/>
- Also delete branch {branchName}
+ {t("worktrees.delete.alsoDeleteBranch")}
+ {branchName}
{deleteBranch && (
- Warning: Unpushed commits on this branch will be lost.
+ {t("worktrees.delete.warningUnpushed")}
)}
{/* Buttons */}
- Cancel
+ {t("worktrees.delete.cancel")}
{isDeleting ? (
<>
- Deleting...
+ {t("worktrees.delete.deleting")}
>
) : (
- "Delete"
+ t("worktrees.delete.delete")
)}
diff --git a/webview-ui/src/components/worktrees/WorktreesView.tsx b/webview-ui/src/components/worktrees/WorktreesView.tsx
index 432545f3..d44f45a1 100644
--- a/webview-ui/src/components/worktrees/WorktreesView.tsx
+++ b/webview-ui/src/components/worktrees/WorktreesView.tsx
@@ -10,6 +10,7 @@ import {
import { VSCodeButton, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import { AlertCircle, Check, ExternalLink, FolderOpen, GitBranch, GitMerge, Loader2, Plus, Trash2, X } from "lucide-react"
import { memo, useCallback, useEffect, useState } from "react"
+import { useTranslation } from "react-i18next"
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { FileServiceClient, TaskServiceClient, WorktreeServiceClient } from "@/services/grpc-client"
@@ -22,6 +23,7 @@ type WorktreesViewProps = {
}
const WorktreesView = ({ onDone }: WorktreesViewProps) => {
+ const { t } = useTranslation("misc")
const { environment } = useExtensionState()
const [worktrees, setWorktrees] = useState([])
const [isLoading, setIsLoading] = useState(true)
@@ -241,24 +243,23 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
{/* Sticky Header with title and Done button */}
- Worktrees
+ {t("worktrees.title")}
- Done
+ {t("worktrees.done")}
{/* Scrollable Content */}
{/* Description */}
- Git worktrees let you work on multiple branches at the same time, each in its own folder. Open worktrees in
- their own windows so Cline can work on multiple tasks in parallel.{" "}
+ {t("worktrees.description")}
- Learn more
+ {t("worktrees.learnMore")}
@@ -273,35 +274,35 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
{hasWorktreeInclude ? (
- .worktreeinclude detected.{" "}
+ {t("worktrees.worktreeIncludeDetected")}{" "}
- Learn more
+ {t("worktrees.learnMore")}
) : (
- Tip: Create a{" "}
+ {t("worktrees.tipCreateFile")}
.worktreeinclude
{" "}
- file to automatically copy files like{" "}
+ {t("worktrees.fileToAutoCopy")}
node_modules/
{" "}
- to new worktrees, so you don't have to reinstall dependencies.{" "}
+ {t("worktrees.toNewWorktrees")}
- Learn more
+ {t("worktrees.learnMore")}
{hasGitignore && (
@@ -312,10 +313,10 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
{isCreatingWorktreeInclude ? (
<>
- Creating...
+ {t("worktrees.creating")}
>
) : (
- "Create from .gitignore"
+ t("worktrees.createFromGitignore")
)}
)}
@@ -328,25 +329,19 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
{isLoading ? (
- Loading...
+ {t("worktrees.loading")}
) : isMultiRoot ? (
-
Multi-folder workspace detected
-
- Worktrees are not supported when multiple folders are open in the same workspace. Please open a single
- repository folder to use this feature.
-
+
{t("worktrees.multiFolderDetected")}
+
{t("worktrees.multiFolderDesc")}
) : isSubfolder ? (
-
Subfolder of a git repository
-
- You have a subfolder open instead of the repository root. Please open the root folder to use
- worktrees:
-
+
{t("worktrees.subfolderDetected")}
+
{t("worktrees.subfolderDesc")}
{gitRootPath}
@@ -354,22 +349,20 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
) : !isGitRepo ? (
-
- Worktrees require a git repository. Please initialize git to use worktrees.
-
+
{t("worktrees.requireGit")}
) : error ? (
{error}
- Retry
+ {t("worktrees.retry")}
) : worktrees.length === 0 ? (
-
No worktrees found.
+
{t("worktrees.noWorktrees")}
) : (
<>
@@ -390,36 +383,35 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
- {worktree.branch || (worktree.isDetached ? "HEAD (detached)" : "unknown")}
+ {worktree.branch ||
+ (worktree.isDetached
+ ? t("worktrees.headDetached")
+ : t("worktrees.unknown"))}
{isMainWorktree(worktree) && (
- Primary
+ {t("worktrees.primary")}
-
- The original worktree where your .git directory lives.
-
+ {t("worktrees.primaryTooltip")}
)}
{worktree.isCurrent && (
- Current
+ {t("worktrees.current")}
-
- This is the worktree currently open in this window.
-
+ {t("worktrees.currentTooltip")}
)}
{worktree.isLocked && (
- Locked
+ {t("worktrees.locked")}
)}
@@ -435,7 +427,9 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
-
Open in current window
+
+ {t("worktrees.openCurrentWindow")}
+
@@ -445,7 +439,9 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
- Open in new window
+
+ {t("worktrees.openNewWindow")}
+
>
)}
@@ -460,7 +456,7 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
- Merge into {getMainBranch()}
+ {t("worktrees.mergeInto", { branch: getMainBranch() })}
@@ -471,7 +467,9 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
- Delete this worktree
+
+ {t("worktrees.deleteWorktree")}
+
>
)}
@@ -497,7 +495,7 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
}}>
setShowCreateForm(true)} style={{ width: "100%" }}>
- New Worktree
+ {t("worktrees.newWorktree")}
)}
@@ -535,7 +533,7 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
-
Merge Worktree
+ {t("worktrees.merge.title")}
{/* Success state */}
@@ -546,7 +544,7 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
{mergeResult.message}
- Done
+ {t("worktrees.merge.done")}
) : mergeResult?.hasConflicts ? (
@@ -555,9 +553,11 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
-
Merge conflicts detected
+
+ {t("worktrees.merge.mergeConflictsDetected")}
+
- The following files have conflicts:
+ {t("worktrees.merge.followingFilesConflicts")}
{mergeResult.conflictingFiles.slice(0, 3).map((file) => (
@@ -565,7 +565,9 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
))}
{mergeResult.conflictingFiles.length > 3 && (
- ...and {mergeResult.conflictingFiles.length - 3} more
+ {t("worktrees.merge.andMore", {
+ count: mergeResult.conflictingFiles.length - 3,
+ })}
)}
@@ -574,10 +576,10 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
- Ask Cline to Resolve
+ {t("worktrees.merge.askClineToResolve")}
- I'll Resolve Manually
+ {t("worktrees.merge.resolveManually")}
@@ -585,11 +587,11 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
/* Default state - confirm merge */
- This will merge branch{" "}
+ {t("worktrees.merge.willMergeBranch")}
{mergeWorktree.branch}
{" "}
- into{" "}
+ {t("worktrees.merge.into")}
{getMainBranch()}
@@ -601,7 +603,7 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
checked={deleteAfterMerge}
onChange={(e) => setDeleteAfterMerge((e.target as HTMLInputElement).checked)}
/>
- Delete worktree after successful merge
+ {t("worktrees.merge.deleteAfterMerge")}
{mergeError && (
@@ -613,18 +615,18 @@ Please help me resolve these merge conflicts, then complete the merge, and delet
- Cancel
+ {t("worktrees.merge.cancel")}
{isMerging ? (
<>
- Merging...
+ {t("worktrees.merge.merging")}
>
) : (
<>
- Merge
+ {t("worktrees.merge.merge")}
>
)}
diff --git a/webview-ui/src/locales/en/common-misc.json b/webview-ui/src/locales/en/common-misc.json
index 891e1811..fa10b2d0 100644
--- a/webview-ui/src/locales/en/common-misc.json
+++ b/webview-ui/src/locales/en/common-misc.json
@@ -162,6 +162,7 @@
"arguments": "Arguments",
"requestTimeout": "Request Timeout",
"restarting": "Restarting...",
+ "serverDisabled": "Server Disabled",
"restartServerBtn": "Restart Server",
"requiresApiKey": "Requires API key"
},
diff --git a/webview-ui/src/locales/zh-CN/common-misc.json b/webview-ui/src/locales/zh-CN/common-misc.json
index e85b6401..311ab2f0 100644
--- a/webview-ui/src/locales/zh-CN/common-misc.json
+++ b/webview-ui/src/locales/zh-CN/common-misc.json
@@ -162,6 +162,7 @@
"arguments": "参数",
"requestTimeout": "请求超时",
"restarting": "正在重启...",
+ "serverDisabled": "服务器已禁用",
"restartServerBtn": "重启服务器",
"requiresApiKey": "需要 API 密钥"
},
diff --git a/webview-ui/src/main.tsx b/webview-ui/src/main.tsx
index 5468af79..059f3bd7 100644
--- a/webview-ui/src/main.tsx
+++ b/webview-ui/src/main.tsx
@@ -1,5 +1,6 @@
import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
+import "./i18n/config"
import "./main.css"
import "./index.css"
import App from "./App.tsx"