From 086c6f6c45a6881c629d07daefc9996329d8ef56 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Wed, 3 Jun 2026 12:05:08 +0200 Subject: [PATCH] feat(i18n): localize Avalonia view strings via loc:Tr markup Extract ~165 hardcoded UI strings across islands, modals, planning and shell views into en.json; replace with {loc:Tr} bindings. --- src/ClaudeDo.Localization/locales/en.json | 295 +++++++++++++++++- .../Views/Controls/ThemedDatePicker.axaml | 13 +- .../Views/Islands/AgentStripView.axaml | 31 +- .../Views/Islands/DetailsIslandView.axaml | 45 +-- .../Views/Islands/ListsIslandView.axaml | 25 +- .../Views/Islands/NotesEditorView.axaml | 11 +- .../Views/Islands/SessionTerminalView.axaml | 7 +- .../Views/Islands/TaskRowView.axaml | 67 ++-- .../Views/Islands/TasksIslandView.axaml | 19 +- src/ClaudeDo.Ui/Views/MainWindow.axaml | 21 +- .../Views/Modals/AboutModalView.axaml | 19 +- .../Views/Modals/DiffModalView.axaml | 7 +- .../Views/Modals/ListSettingsModalView.axaml | 35 ++- .../Views/Modals/MergeModalView.axaml | 17 +- .../Views/Modals/RepoImportModalView.axaml | 15 +- .../Views/Modals/SettingsModalView.axaml | 104 +++--- .../Modals/UnfinishedPlanningModalView.axaml | 13 +- .../Views/Modals/WeeklyReportModalView.axaml | 15 +- .../Modals/WorkerConnectionModalView.axaml | 13 +- .../Views/Modals/WorktreeModalView.axaml | 5 +- .../Modals/WorktreesOverviewModalView.axaml | 35 ++- .../Planning/ConflictResolutionView.axaml | 11 +- .../Views/Planning/PlanningDiffView.axaml | 9 +- 23 files changed, 573 insertions(+), 259 deletions(-) diff --git a/src/ClaudeDo.Localization/locales/en.json b/src/ClaudeDo.Localization/locales/en.json index b61f536..28acb73 100644 --- a/src/ClaudeDo.Localization/locales/en.json +++ b/src/ClaudeDo.Localization/locales/en.json @@ -8,6 +8,299 @@ "tabGeneral": "General", "tabWorktrees": "Worktrees", "tabFiles": "Files", - "tabPrime": "Prime Claude" + "tabPrime": "Prime Claude", + "general": { + "defaultInstructions": "Default instructions", + "defaultInstructionsPlaceholder": "Baseline instructions applied to every task", + "model": "Model", + "maxTurns": "Max turns", + "permission": "Permission", + "maxParallelExecutions": "Max parallel executions", + "maxParallelExecutionsHint": "How many queued tasks the worker runs at once.", + "reportExcludedPaths": "Report: excluded paths (one per line)", + "standupWeekday": "Standup weekday", + "weekdaySunday": "Sunday", + "weekdayMonday": "Monday", + "weekdayTuesday": "Tuesday", + "weekdayWednesday": "Wednesday", + "weekdayThursday": "Thursday", + "weekdayFriday": "Friday", + "weekdaySaturday": "Saturday" + }, + "worktrees": { + "strategy": "Strategy", + "centralWorktreeRoot": "Central worktree root", + "autoCleanup": "Auto-cleanup finished worktrees after", + "days": "days", + "cleanupFinished": "Cleanup finished worktrees", + "forceRemoveAll": "Force-remove all worktrees", + "confirmRemoveAll": "Remove ALL worktrees? Uncommitted work will be lost.", + "removeAll": "Remove All" + }, + "files": { + "agentsSection": "AGENTS", + "agentsHint": "Restore bundled default agents. Existing files are not overwritten.", + "restoreDefaultAgents": "Restore default agents", + "promptsSection": "PROMPTS", + "systemPrompt": "System", + "planningPrompt": "Planning", + "agentPrompt": "Agent", + "openInEditor": "Open in editor" + }, + "prime": { + "description": "Prime your Claude usage window by firing a single non-interactive ping on the days you choose, at a chosen time. Only runs while ClaudeDo is open. If the app starts within 30 minutes of the target time, the ping fires immediately.", + "addSchedule": "+ Add schedule", + "dayMo": "Mo", + "dayTu": "Tu", + "dayWe": "We", + "dayTh": "Th", + "dayFr": "Fr", + "daySa": "Sa", + "daySu": "Su" + } + }, + "tasks": { + "sortTip": "Sort", + "showCompletedTip": "Show completed", + "listSettingsTip": "List settings", + "addPlaceholder": "Add a task…", + "enterKey": "ENTER", + "notesPinnedRow": "Notes (daily notes)", + "overdue": "OVERDUE", + "tasks": "TASKS", + "clearCompletedTip": "Clear all completed", + "ctxSendToQueue": "Send to queue", + "ctxRemoveFromQueue": "Remove from queue", + "ctxCancelExecution": "Cancel execution", + "ctxMarkAs": "Mark as", + "ctxMarkDone": "Done", + "ctxMarkCancelled": "Cancelled", + "ctxRunInteractively": "Run interactively", + "ctxOpenPlanningSession": "Open planning Session", + "ctxResumePlanningSession": "Resume planning Session", + "ctxDiscardPlanningSession": "Discard planning session", + "ctxQueueSubtasks": "Queue subtasks sequentially", + "ctxScheduleFor": "Schedule for...", + "ctxClearSchedule": "Clear schedule", + "badgeDraft": "DRAFT", + "badgePlanned": "PLANNED", + "approve": "Approve", + "approveTip": "Approve — mark Done", + "reject": "Reject", + "rejectTip": "Reject with feedback and re-run", + "park": "Park", + "parkTip": "Send back to Idle for manual editing", + "cancel": "Cancel", + "cancelTip": "Cancel this task", + "removeFromQueueTip": "Remove from queue", + "scheduleTitle": "Schedule task", + "scheduleWhen": "WHEN", + "scheduleConfirm": "Schedule", + "rejectRerunTitle": "Reject & re-run", + "feedbackLabel": "FEEDBACK FOR THE AGENT", + "feedbackPlaceholder": "What should the agent fix?", + "rerun": "Re-run" + }, + "lists": { + "heading": "Lists", + "searchPlaceholder": "Search tasks…", + "searchKbd": "Ctrl K", + "settingsTip": "Settings", + "smartListsLabel": "SMART LISTS", + "myListsLabel": "MY LISTS", + "contextSettings": "Settings...", + "contextWorktrees": "Worktrees…", + "contextOpenExplorer": "Open in Explorer", + "contextOpenTerminal": "Open in Terminal", + "newList": "New list", + "addReposTip": "Add repos as lists" + }, + "details": { + "deleteTaskTip": "Delete task", + "closeTip": "Close", + "copyTaskIdTip": "Copy task ID", + "starTip": "Star", + "agentSettingsTip": "Agent settings", + "agentSettingsHeading": "Agent settings (overrides)", + "modelLabel": "Model", + "systemPromptLabel": "System prompt (appended)", + "agentFileLabel": "Agent file", + "mergeLabel": "MERGE", + "mergeTargetLabel": "Merge target", + "reviewCombinedDiff": "Review combined diff", + "mergeAllSubtasks": "Merge all subtasks", + "stepsLabel": "STEPS", + "addStepPlaceholder": "Add a step...", + "detailsLabel": "DETAILS", + "copyDescriptionTip": "Copy description to clipboard", + "toggleEditPreviewTip": "Toggle edit/preview", + "previewBtn": "Preview", + "editBtn": "Edit", + "descriptionPlaceholder": "Add task details (markdown supported)..." + }, + "agent": { + "stopTip": "Stop agent", + "sendToQueue": "Send to queue", + "sendToQueueTip": "Queue this task for the worker to pick up", + "removeFromQueue": "Remove from queue", + "removeFromQueueTip": "Take this task back out of the queue", + "worktreeLabel": "WORKTREE", + "copyPathTip": "Copy path", + "diffLabel": "DIFF", + "openDiff": "Open diff", + "worktreeBtn": "Worktree", + "openWorktreeTip": "Open worktree in file explorer", + "continue": "Continue", + "continueTip": "Resume the last session and keep going", + "resetAndRetry": "Reset & retry", + "resetAndRetryTip": "Discard the worktree and re-queue the task to run from scratch" + }, + "notes": { + "today": "Today", + "add": "Add", + "newNotePlaceholder": "New note…", + "save": "Save", + "delete": "Delete" + }, + "session": { + "chipLive": "LIVE", + "chipDone": "DONE", + "chipFailed": "FAILED" + }, + "modals": { + "about": { + "title": "ABOUT", + "version": "Version", + "data": "Data", + "logs": "Logs", + "config": "Config", + "open": "Open" + }, + "workerConnection": { + "title": "WORKER NOT REACHABLE", + "body": "ClaudeDo can't reach the background worker. It is normally started automatically at logon. You can start it now, or reinstall if the problem persists.", + "dismiss": "Dismiss", + "rerunInstaller": "Rerun Installer", + "startWorker": "Start Worker" + }, + "listSettings": { + "title": "LIST SETTINGS", + "deleteList": "Delete list", + "sectionGeneral": "GENERAL", + "name": "Name", + "workingDirectory": "Working directory", + "workingDirectoryPlaceholder": "(none)", + "browse": "Browse...", + "defaultCommitType": "Default commit type", + "sectionAgent": "AGENT", + "resetAgentSettings": "Reset agent settings", + "model": "Model", + "systemPrompt": "System prompt (appended)", + "agentFile": "Agent file" + }, + "merge": { + "title": "MERGE WORKTREE", + "windowTitle": "Merge worktree", + "cancel": "Cancel", + "merge": "Merge", + "targetBranch": "Target branch", + "removeWorktree": "Remove worktree after merge", + "commitMessage": "Commit message", + "conflictedFiles": "Conflicted files:" + }, + "diff": { + "title": "DIFF", + "windowTitle": "Diff", + "merge": "Merge…" + }, + "worktree": { + "title": "Worktree" + }, + "worktreesOverview": { + "refresh": "Refresh", + "cleanupFinished": "Cleanup finished", + "columnTask": "TASK", + "columnState": "STATE", + "columnDiff": "DIFF", + "columnAge": "AGE", + "phantom": "phantom", + "phantomTooltip": "Directory missing on disk", + "ctxShowDiff": "Show diff", + "ctxOpenInExplorer": "Open in Explorer", + "ctxJumpToTask": "Jump to task", + "ctxMerge": "Merge…", + "ctxDiscard": "Discard", + "ctxKeep": "Keep", + "ctxCopyBranch": "Copy branch", + "ctxCopyPath": "Copy path", + "ctxForceRemove": "Force remove" + }, + "repoImport": { + "title": "ADD REPOS AS LISTS", + "windowTitle": "Add repos as lists", + "cancel": "Cancel", + "searchPlaceholder": "Search repos…", + "addFolder": "Add folder…", + "forgetFolders": "Forget folders", + "alreadyAdded": "(already added)" + }, + "unfinishedPlanning": { + "title": "UNFINISHED PLANNING SESSION", + "windowTitle": "Unfinished planning session", + "discard": "Discard", + "finalize": "Finalize", + "resume": "Resume", + "draftTasksSuffix": " draft task(s) waiting to be finalized." + }, + "weeklyReport": { + "title": "WEEKLY REPORT", + "windowTitle": "Weekly Report", + "from": "From", + "to": "To", + "generate": "Generate", + "regenerate": "Regenerate", + "emptyStateHint": "No report for this range yet. Click “Generate”." + } + }, + "planning": { + "conflict": { + "windowTitle": "Merge conflict", + "modalTitle": "MERGE CONFLICT", + "openInVsCode": "Open all in VS Code", + "resolved": "I've resolved — continue", + "abort": "Abort this merge" + }, + "diff": { + "windowTitle": "Planning — Combined diff", + "modalTitle": "PLANNING — COMBINED DIFF", + "previewCombined": "Preview combined", + "loading": "Loading…" + } + }, + "controls": { + "datePicker": { + "today": "Today", + "tomorrow": "Tomorrow", + "nextMon": "Next Mon", + "clear": "Clear", + "time": "Time", + "done": "Done" + } + }, + "shell": { + "menu": { + "help": "Help", + "checkForUpdates": "Check for updates", + "restartWorker": "Restart worker", + "worktrees": "Worktrees…", + "weeklyReport": "Weekly Report…", + "about": "About…", + "addRepos": "Add repos as lists…" + }, + "update": { + "available": "Update available: v", + "updateNow": "Update now", + "dismiss": "Dismiss" + } } } diff --git a/src/ClaudeDo.Ui/Views/Controls/ThemedDatePicker.axaml b/src/ClaudeDo.Ui/Views/Controls/ThemedDatePicker.axaml index 00a7957..61805a4 100644 --- a/src/ClaudeDo.Ui/Views/Controls/ThemedDatePicker.axaml +++ b/src/ClaudeDo.Ui/Views/Controls/ThemedDatePicker.axaml @@ -1,5 +1,6 @@ @@ -125,10 +126,10 @@ MinWidth="300"> - @@ -52,7 +53,7 @@ Text="{Binding TaskIdBadge}" Margin="0,0,0,4" Cursor="Hand" - ToolTip.Tip="Copy task ID" + ToolTip.Tip="{loc:Tr details.copyTaskIdTip}" Tapped="OnTaskIdTapped"/> @@ -275,7 +276,7 @@ TextWrapping="Wrap" MinHeight="80" MaxHeight="320" - PlaceholderText="Add task details (markdown supported)..." + PlaceholderText="{loc:Tr details.descriptionPlaceholder}" Padding="8" FontFamily="{DynamicResource MonoFont}" FontSize="{StaticResource FontSizeBody}" diff --git a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml index 7f1296f..937584d 100644 --- a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml @@ -2,6 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands" xmlns:converters="using:ClaudeDo.Ui.Converters" + xmlns:loc="using:ClaudeDo.Ui.Localization" x:Class="ClaudeDo.Ui.Views.Islands.ListsIslandView" x:DataType="vm:ListsIslandViewModel"> @@ -9,7 +10,7 @@ - + @@ -19,10 +20,10 @@ Foreground="{DynamicResource TextFaintBrush}" Margin="2,0,0,0"/> - + @@ -57,7 +58,7 @@ - @@ -50,7 +51,7 @@ Foreground="{DynamicResource TextFaintBrush}"/> @@ -60,7 +61,7 @@ - + @@ -71,7 +72,7 @@ Margin="16,0,16,8" IsVisible="{Binding ShowNotesRow}" Command="{Binding OpenNotesCommand}" - Content="Notes (daily notes)"/> + Content="{loc:Tr tasks.notesPinnedRow}"/> @@ -80,7 +81,7 @@ + Text="{loc:Tr tasks.overdue}" Margin="14,14,14,6"/> @@ -104,7 +105,7 @@ @@ -139,7 +140,7 @@ Text="{Binding CompletedHeader}" VerticalAlignment="Center"/>