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="using:ClaudeDo.Ui.ViewModels.Modals"
|
||||
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:Class="ClaudeDo.Ui.Views.Modals.RepoImportModalView"
|
||||
x:DataType="vm:RepoImportModalViewModel"
|
||||
Title="Add repos as lists"
|
||||
Title="{loc:Tr modals.repoImport.windowTitle}"
|
||||
Width="560" Height="480" MinWidth="420" MinHeight="320"
|
||||
CanResize="True"
|
||||
WindowDecorations="BorderOnly"
|
||||
@@ -16,11 +17,11 @@
|
||||
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
||||
</Window.KeyBindings>
|
||||
|
||||
<ctl:ModalShell Title="ADD REPOS AS LISTS" CloseCommand="{Binding CancelCommand}">
|
||||
<ctl:ModalShell Title="{loc:Tr modals.repoImport.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 Classes="btn" Content="{loc:Tr modals.repoImport.cancel}" Command="{Binding CancelCommand}" MinWidth="90"/>
|
||||
<Button Content="{Binding CreateButtonText}" Command="{Binding CreateCommand}"
|
||||
IsEnabled="{Binding CanCreate}" MinWidth="120" Classes="primary"/>
|
||||
</StackPanel>
|
||||
@@ -31,10 +32,10 @@
|
||||
<!-- Toolbar: search + folder actions -->
|
||||
<StackPanel DockPanel.Dock="Top" Spacing="8" Margin="20,12,20,6">
|
||||
<TextBox Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
PlaceholderText="Search repos…"/>
|
||||
PlaceholderText="{loc:Tr modals.repoImport.searchPlaceholder}"/>
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<Button Classes="btn" Grid.Column="0" Content="Add folder…" Click="AddFolderClicked"/>
|
||||
<Button Classes="btn" Grid.Column="2" Content="Forget folders"
|
||||
<Button Classes="btn" Grid.Column="0" Content="{loc:Tr modals.repoImport.addFolder}" Click="AddFolderClicked"/>
|
||||
<Button Classes="btn" Grid.Column="2" Content="{loc:Tr modals.repoImport.forgetFolders}"
|
||||
Command="{Binding ForgetFoldersCommand}"
|
||||
IsVisible="{Binding HasFolders}"/>
|
||||
</Grid>
|
||||
@@ -55,7 +56,7 @@
|
||||
VerticalAlignment="Center" Margin="4,0,0,0"/>
|
||||
<TextBlock Classes="path-mono" Grid.Column="2" Text="{Binding FullPath}"
|
||||
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="meta" Grid.Column="3" Text="(already added)"
|
||||
<TextBlock Classes="meta" Grid.Column="3" Text="{loc:Tr modals.repoImport.alreadyAdded}"
|
||||
VerticalAlignment="Center" Margin="8,0,0,0"
|
||||
IsVisible="{Binding AlreadyAdded}"/>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user