mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 16:02:50 +00:00
fix(i18n): localize remaining onboarding UI
Reviewed and approved by Codex.
This commit is contained in:
@@ -211,17 +211,33 @@ export function LinearRow(props: { compact?: boolean } = {}): React.JSX.Element
|
||||
onOpenChange={setDialogOpen}
|
||||
overlayClassName="z-[110]"
|
||||
contentClassName="z-[120]"
|
||||
connectLabel="Add Linear access"
|
||||
connectLabel={translate(
|
||||
'auto.components.onboarding.IntegrationsStep.04ef416712',
|
||||
'Add Linear access'
|
||||
)}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const CAPABILITIES = [
|
||||
'Start a workspace from any GitHub issue or pull request, prefilled with its title and context',
|
||||
'Browse GitHub issues and pull requests in the Tasks view without leaving Orca',
|
||||
'See issue state, review status, and CI checks on every worktree',
|
||||
'Read, comment on, and merge pull requests without leaving Orca'
|
||||
{
|
||||
key: 'components.onboarding.integrations.capabilities.startWorkspaceFromIssue',
|
||||
fallback:
|
||||
'Start a workspace from any GitHub issue or pull request, prefilled with its title and context'
|
||||
},
|
||||
{
|
||||
key: 'components.onboarding.integrations.capabilities.browseIssues',
|
||||
fallback: 'Browse GitHub issues and pull requests in the Tasks view without leaving Orca'
|
||||
},
|
||||
{
|
||||
key: 'components.onboarding.integrations.capabilities.reviewStatus',
|
||||
fallback: 'See issue state, review status, and CI checks on every worktree'
|
||||
},
|
||||
{
|
||||
key: 'components.onboarding.integrations.capabilities.managePullRequests',
|
||||
fallback: 'Read, comment on, and merge pull requests without leaving Orca'
|
||||
}
|
||||
] as const
|
||||
|
||||
export function IntegrationsStep(): React.JSX.Element {
|
||||
@@ -234,10 +250,10 @@ export function IntegrationsStep(): React.JSX.Element {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<ul className="-mt-6 space-y-1.5 text-[14px] leading-relaxed text-muted-foreground">
|
||||
{CAPABILITIES.map((line) => (
|
||||
<li key={line} className="flex gap-2.5">
|
||||
{CAPABILITIES.map(({ key, fallback }) => (
|
||||
<li key={key} className="flex gap-2.5">
|
||||
<span className="mt-2 size-1 shrink-0 rounded-full bg-muted-foreground" aria-hidden />
|
||||
<span>{line}</span>
|
||||
<span>{translate(key, fallback)}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -90,11 +90,31 @@ const stepCopy = {
|
||||
} as const
|
||||
|
||||
const stepTooltipLabels = {
|
||||
agent: 'Default Agent',
|
||||
theme: 'Appearance',
|
||||
windows_terminal: 'Windows Terminal',
|
||||
notifications: 'Notifications',
|
||||
integrations: 'Integrations'
|
||||
agent: {
|
||||
get value() {
|
||||
return translate('components.onboarding.flow.stepTooltip.agent', 'Default Agent')
|
||||
}
|
||||
},
|
||||
theme: {
|
||||
get value() {
|
||||
return translate('components.onboarding.flow.stepTooltip.theme', 'Appearance')
|
||||
}
|
||||
},
|
||||
windows_terminal: {
|
||||
get value() {
|
||||
return translate('components.onboarding.flow.stepTooltip.windowsTerminal', 'Windows Terminal')
|
||||
}
|
||||
},
|
||||
notifications: {
|
||||
get value() {
|
||||
return translate('components.onboarding.flow.stepTooltip.notifications', 'Notifications')
|
||||
}
|
||||
},
|
||||
integrations: {
|
||||
get value() {
|
||||
return translate('components.onboarding.flow.stepTooltip.integrations', 'Integrations')
|
||||
}
|
||||
}
|
||||
} as const
|
||||
|
||||
type OnboardingFlowProps = {
|
||||
@@ -113,7 +133,10 @@ export default function OnboardingFlow({
|
||||
const shouldShowSkipToProjectSetup = currentStep.id !== 'notifications'
|
||||
const shouldShowFooterBusy = Boolean(busyLabel)
|
||||
const footerPrimaryLabel =
|
||||
busyLabel ?? (currentStep.id === 'notifications' ? 'Add your first project' : 'Continue')
|
||||
busyLabel ??
|
||||
(currentStep.id === 'notifications'
|
||||
? translate('components.onboarding.flow.actions.addFirstProject', 'Add your first project')
|
||||
: translate('components.onboarding.flow.actions.continue', 'Continue'))
|
||||
const [skipConfirmOpen, setSkipConfirmOpen] = useState(false)
|
||||
const skipConfirmAdvancedViaRef = useRef<'button' | 'keyboard'>('button')
|
||||
const { next: flowNext, dismissOnboarding: flowDismissOnboarding } = flow
|
||||
@@ -218,6 +241,7 @@ export default function OnboardingFlow({
|
||||
{flow.progressSteps.map(({ step, index: realStepIndex }, progressIdx) => {
|
||||
const isActive = realStepIndex === stepIndex
|
||||
const isDone = realStepIndex < stepIndex
|
||||
const stepTooltipLabel = stepTooltipLabels[step.id].value
|
||||
return (
|
||||
<Tooltip key={step.id}>
|
||||
<TooltipTrigger asChild>
|
||||
@@ -236,14 +260,14 @@ export default function OnboardingFlow({
|
||||
aria-label={translate(
|
||||
'auto.components.onboarding.OnboardingFlow.adaa0aa627',
|
||||
'Go to onboarding step {{value0}}: {{value1}}',
|
||||
{ value0: progressIdx + 1, value1: stepTooltipLabels[step.id] }
|
||||
{ value0: progressIdx + 1, value1: stepTooltipLabel }
|
||||
)}
|
||||
aria-current={isActive ? 'step' : undefined}
|
||||
onClick={() => flow.jumpToStep(realStepIndex)}
|
||||
/>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" sideOffset={8} style={{ zIndex: 110 }}>
|
||||
{stepTooltipLabels[step.id]}
|
||||
{stepTooltipLabel}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)
|
||||
|
||||
@@ -22,8 +22,12 @@ export const ONBOARDING_SKIP_CONFIRMATION_COPY = {
|
||||
"It won't take long!"
|
||||
)
|
||||
},
|
||||
skipLabel: 'Skip',
|
||||
keepGoingLabel: 'No, keep going'
|
||||
get skipLabel() {
|
||||
return translate('components.onboarding.skipConfirmation.skip', 'Skip')
|
||||
},
|
||||
get keepGoingLabel() {
|
||||
return translate('components.onboarding.skipConfirmation.keepGoing', 'No, keep going')
|
||||
}
|
||||
} as const
|
||||
|
||||
export function OnboardingSkipConfirmationDialog(props: {
|
||||
|
||||
@@ -195,19 +195,19 @@ export function ThemeStep({ theme, onThemeChange, settings, updateSettings }: Th
|
||||
{
|
||||
id: 'system',
|
||||
label: translate('auto.components.onboarding.ThemeStep.827ea7b4a2', 'System'),
|
||||
hint: 'Match OS',
|
||||
hint: translate('components.onboarding.theme.hints.system', 'Match OS'),
|
||||
icon: Monitor
|
||||
},
|
||||
{
|
||||
id: 'dark',
|
||||
label: translate('auto.components.onboarding.ThemeStep.fa7b673ea9', 'Dark'),
|
||||
hint: 'Easy on the eyes',
|
||||
hint: translate('components.onboarding.theme.hints.dark', 'Easy on the eyes'),
|
||||
icon: Moon
|
||||
},
|
||||
{
|
||||
id: 'light',
|
||||
label: translate('auto.components.onboarding.ThemeStep.ad192706e6', 'Light'),
|
||||
hint: 'Bright & crisp',
|
||||
hint: translate('components.onboarding.theme.hints.light', 'Bright & crisp'),
|
||||
icon: Sun
|
||||
}
|
||||
]
|
||||
|
||||
@@ -117,7 +117,12 @@ export function useOnboardingFlowActions({
|
||||
if (result.ok) {
|
||||
trackCurrentStepCompleted(advancedVia)
|
||||
if (currentStep.id === 'notifications') {
|
||||
setBusyLabel('Opening Add Project...')
|
||||
setBusyLabel(
|
||||
translate(
|
||||
'components.onboarding.flow.actions.openingAddProject',
|
||||
'Opening Add Project...'
|
||||
)
|
||||
)
|
||||
const closed = await closeWith('completed', ONBOARDING_FINAL_STEP, 'add_project_modal')
|
||||
if (closed) {
|
||||
openModal('add-repo')
|
||||
@@ -190,7 +195,9 @@ export function useOnboardingFlowActions({
|
||||
const stepId = currentStep.id
|
||||
const stepNumber = currentStep.stepNumber
|
||||
const valueKind = currentStep.valueKind
|
||||
setBusyLabel('Opening Add Project...')
|
||||
setBusyLabel(
|
||||
translate('components.onboarding.flow.actions.openingAddProject', 'Opening Add Project...')
|
||||
)
|
||||
try {
|
||||
const closed = await closeWith('completed', ONBOARDING_FINAL_STEP, 'add_project_modal')
|
||||
if (!closed) {
|
||||
|
||||
@@ -16820,6 +16820,41 @@
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"onboarding": {
|
||||
"flow": {
|
||||
"stepTooltip": {
|
||||
"agent": "Default Agent",
|
||||
"theme": "Appearance",
|
||||
"windowsTerminal": "Windows Terminal",
|
||||
"notifications": "Notifications",
|
||||
"integrations": "Integrations"
|
||||
},
|
||||
"actions": {
|
||||
"addFirstProject": "Add your first project",
|
||||
"continue": "Continue",
|
||||
"openingAddProject": "Opening Add Project..."
|
||||
}
|
||||
},
|
||||
"skipConfirmation": {
|
||||
"skip": "Skip",
|
||||
"keepGoing": "No, keep going"
|
||||
},
|
||||
"theme": {
|
||||
"hints": {
|
||||
"system": "Match OS",
|
||||
"dark": "Easy on the eyes",
|
||||
"light": "Bright & crisp"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"capabilities": {
|
||||
"startWorkspaceFromIssue": "Start a workspace from any GitHub issue or pull request, prefilled with its title and context",
|
||||
"browseIssues": "Browse GitHub issues and pull requests in the Tasks view without leaving Orca",
|
||||
"reviewStatus": "See issue state, review status, and CI checks on every worktree",
|
||||
"managePullRequests": "Read, comment on, and merge pull requests without leaving Orca"
|
||||
}
|
||||
}
|
||||
},
|
||||
"jiraUserPicker": {
|
||||
"select": "Select {{value0}}",
|
||||
"search": "Search users",
|
||||
|
||||
@@ -14616,6 +14616,41 @@
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"onboarding": {
|
||||
"flow": {
|
||||
"stepTooltip": {
|
||||
"agent": "기본 Agent",
|
||||
"theme": "테마",
|
||||
"windowsTerminal": "Windows 터미널",
|
||||
"notifications": "알림",
|
||||
"integrations": "연동"
|
||||
},
|
||||
"actions": {
|
||||
"addFirstProject": "첫 프로젝트 추가",
|
||||
"continue": "계속",
|
||||
"openingAddProject": "프로젝트 추가 화면을 여는 중…"
|
||||
}
|
||||
},
|
||||
"skipConfirmation": {
|
||||
"skip": "건너뛰기",
|
||||
"keepGoing": "아니요, 계속하기"
|
||||
},
|
||||
"theme": {
|
||||
"hints": {
|
||||
"system": "OS 설정에 맞춤",
|
||||
"dark": "눈이 편안한 화면",
|
||||
"light": "밝고 선명한 화면"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"capabilities": {
|
||||
"startWorkspaceFromIssue": "GitHub 이슈나 PR에서 제목과 컨텍스트가 미리 채워진 워크스페이스를 시작합니다",
|
||||
"browseIssues": "Orca를 떠나지 않고 작업 화면에서 GitHub 이슈와 PR을 탐색합니다",
|
||||
"reviewStatus": "모든 워크트리에서 이슈 상태, 리뷰 상태 및 CI 체크를 확인합니다",
|
||||
"managePullRequests": "Orca를 떠나지 않고 PR을 읽고, 댓글을 달고, 병합합니다"
|
||||
}
|
||||
}
|
||||
},
|
||||
"native-chat": {
|
||||
"composer": {
|
||||
"imageUnsupported": "이 에이전트는 이미지 붙여넣기를 지원하지 않습니다.",
|
||||
|
||||
Reference in New Issue
Block a user