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.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.AgentStripView"
|
||||
x:DataType="vm:DetailsIslandViewModel">
|
||||
<Border Classes="agent-strip"
|
||||
@@ -34,7 +35,7 @@
|
||||
Classes="icon-btn"
|
||||
Command="{Binding StopCommand}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
ToolTip.Tip="Stop agent"
|
||||
ToolTip.Tip="{loc:Tr agent.stopTip}"
|
||||
VerticalAlignment="Center">
|
||||
<PathIcon Data="{StaticResource Icon.X}" Width="12" Height="12"
|
||||
Foreground="{DynamicResource BloodBrush}"/>
|
||||
@@ -42,19 +43,19 @@
|
||||
<!-- Send to queue — only when idle -->
|
||||
<Button Grid.Column="3"
|
||||
Classes="btn accent"
|
||||
Content="Send to queue"
|
||||
Content="{loc:Tr agent.sendToQueue}"
|
||||
Command="{Binding EnqueueCommand}"
|
||||
IsVisible="{Binding IsIdle}"
|
||||
ToolTip.Tip="Queue this task for the worker to pick up"
|
||||
ToolTip.Tip="{loc:Tr agent.sendToQueueTip}"
|
||||
VerticalAlignment="Center"
|
||||
Padding="10,4"/>
|
||||
<!-- Remove from queue — only when queued -->
|
||||
<Button Grid.Column="3"
|
||||
Classes="btn"
|
||||
Content="Remove from queue"
|
||||
Content="{loc:Tr agent.removeFromQueue}"
|
||||
Command="{Binding DequeueCommand}"
|
||||
IsVisible="{Binding IsQueued}"
|
||||
ToolTip.Tip="Take this task back out of the queue"
|
||||
ToolTip.Tip="{loc:Tr agent.removeFromQueueTip}"
|
||||
VerticalAlignment="Center"
|
||||
Padding="10,4"/>
|
||||
</Grid>
|
||||
@@ -64,7 +65,7 @@
|
||||
IsVisible="{Binding WorktreePath, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<TextBlock Grid.Column="0"
|
||||
Classes="eyebrow"
|
||||
Text="WORKTREE"
|
||||
Text="{loc:Tr agent.worktreeLabel}"
|
||||
Foreground="{DynamicResource TextFaintBrush}"
|
||||
LetterSpacing="1.2"
|
||||
VerticalAlignment="Center"
|
||||
@@ -76,7 +77,7 @@
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="2"
|
||||
Classes="icon-btn"
|
||||
ToolTip.Tip="Copy path"
|
||||
ToolTip.Tip="{loc:Tr agent.copyPathTip}"
|
||||
Click="OnCopyWorktreePathClick"
|
||||
VerticalAlignment="Center">
|
||||
<PathIcon Data="{StaticResource Icon.Copy}" Width="11" Height="11"/>
|
||||
@@ -105,7 +106,7 @@
|
||||
<Grid ColumnDefinitions="Auto,Auto,Auto,*">
|
||||
<TextBlock Grid.Column="0"
|
||||
Classes="eyebrow"
|
||||
Text="DIFF"
|
||||
Text="{loc:Tr agent.diffLabel}"
|
||||
Foreground="{DynamicResource TextFaintBrush}"
|
||||
LetterSpacing="1.2"
|
||||
VerticalAlignment="Center"
|
||||
@@ -136,27 +137,27 @@
|
||||
|
||||
<!-- Action buttons -->
|
||||
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,4,0,0">
|
||||
<Button Classes="btn" Content="Open diff" Command="{Binding OpenDiffCommand}"/>
|
||||
<Button Classes="btn" Content="{loc:Tr agent.openDiff}" Command="{Binding OpenDiffCommand}"/>
|
||||
<Button Classes="btn" Command="{Binding OpenWorktreeCommand}"
|
||||
ToolTip.Tip="Open worktree in file explorer">
|
||||
ToolTip.Tip="{loc:Tr agent.openWorktreeTip}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
|
||||
<PathIcon Data="{StaticResource Icon.ArrowOut}"
|
||||
Width="11" Height="11"
|
||||
Foreground="{DynamicResource TextDimBrush}"/>
|
||||
<TextBlock Text="Worktree" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{loc:Tr agent.worktreeBtn}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Classes="btn accent"
|
||||
Content="Continue"
|
||||
Content="{loc:Tr agent.continue}"
|
||||
Command="{Binding ContinueCommand}"
|
||||
IsVisible="{Binding ShowContinue}"
|
||||
ToolTip.Tip="Resume the last session and keep going"
|
||||
ToolTip.Tip="{loc:Tr agent.continueTip}"
|
||||
Padding="10,4"/>
|
||||
<Button Classes="btn"
|
||||
Content="Reset & retry"
|
||||
Content="{loc:Tr agent.resetAndRetry}"
|
||||
Command="{Binding ResetAndRetryCommand}"
|
||||
IsVisible="{Binding ShowResetAndRetry}"
|
||||
ToolTip.Tip="Discard the worktree and re-queue the task to run from scratch"
|
||||
ToolTip.Tip="{loc:Tr agent.resetAndRetryTip}"
|
||||
Padding="10,4"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user