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:
@@ -2,9 +2,10 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:ClaudeDo.Ui.ViewModels.Modals"
|
||||
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:Class="ClaudeDo.Ui.Views.Modals.MergeModalView"
|
||||
x:DataType="vm:MergeModalViewModel"
|
||||
Title="Merge worktree"
|
||||
Title="{loc:Tr modals.merge.windowTitle}"
|
||||
Width="560" Height="460" MinWidth="460" MinHeight="360"
|
||||
CanResize="True"
|
||||
WindowDecorations="BorderOnly"
|
||||
@@ -17,12 +18,12 @@
|
||||
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
||||
</Window.KeyBindings>
|
||||
|
||||
<ctl:ModalShell Title="MERGE WORKTREE" CloseCommand="{Binding CancelCommand}">
|
||||
<ctl:ModalShell Title="{loc:Tr modals.merge.title}" CloseCommand="{Binding CancelCommand}">
|
||||
<ctl:ModalShell.Footer>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Button Classes="btn" Content="Cancel" Command="{Binding CancelCommand}" MinWidth="90"/>
|
||||
<Button Content="Merge" Classes="primary"
|
||||
<Button Classes="btn" Content="{loc:Tr modals.merge.cancel}" Command="{Binding CancelCommand}" MinWidth="90"/>
|
||||
<Button Content="{loc:Tr modals.merge.merge}" Classes="primary"
|
||||
Command="{Binding SubmitCommand}"
|
||||
IsDefault="True" MinWidth="90"/>
|
||||
</StackPanel>
|
||||
@@ -35,19 +36,19 @@
|
||||
<TextBlock Classes="title" Text="{Binding TaskTitle, StringFormat='Merging: {0}'}" />
|
||||
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="field-label" Text="Target branch"/>
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr modals.merge.targetBranch}"/>
|
||||
<ComboBox ItemsSource="{Binding Branches}"
|
||||
SelectedItem="{Binding SelectedBranch}"
|
||||
HorizontalAlignment="Stretch"
|
||||
IsEnabled="{Binding !IsBusy}" />
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Content="Remove worktree after merge"
|
||||
<CheckBox Content="{loc:Tr modals.merge.removeWorktree}"
|
||||
IsChecked="{Binding RemoveWorktree}"
|
||||
IsEnabled="{Binding !IsBusy}" />
|
||||
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="field-label" Text="Commit message"/>
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr modals.merge.commitMessage}"/>
|
||||
<TextBox Text="{Binding CommitMessage}"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
@@ -63,7 +64,7 @@
|
||||
<Border Classes="danger-box"
|
||||
IsVisible="{Binding HasConflict}">
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="title" Text="Conflicted files:" />
|
||||
<TextBlock Classes="title" Text="{loc:Tr modals.merge.conflictedFiles}" />
|
||||
<ItemsControl ItemsSource="{Binding ConflictFiles}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
Reference in New Issue
Block a user