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.AboutModalView"
|
||||
x:DataType="vm:AboutModalViewModel"
|
||||
Title="About ClaudeDo"
|
||||
Title="{loc:Tr modals.about.title}"
|
||||
Width="620" Height="280"
|
||||
WindowDecorations="None"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
@@ -14,21 +15,21 @@
|
||||
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
|
||||
</Window.KeyBindings>
|
||||
|
||||
<ctl:ModalShell Title="ABOUT" CloseCommand="{Binding CloseCommand}">
|
||||
<ctl:ModalShell Title="{loc:Tr modals.about.title}" CloseCommand="{Binding CloseCommand}">
|
||||
<!-- Body -->
|
||||
<ScrollViewer Padding="20,16" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="90,*,Auto" RowSpacing="10" ColumnSpacing="8">
|
||||
<TextBlock Classes="meta" Grid.Row="0" Grid.Column="0" Text="Version" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="meta" Grid.Row="0" Grid.Column="0" Text="{loc:Tr modals.about.version}" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="meta" Grid.Row="0" Grid.Column="1" Text="{Binding AppVersion}" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="meta" Grid.Row="1" Grid.Column="0" Text="Data" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="meta" Grid.Row="1" Grid.Column="0" Text="{loc:Tr modals.about.data}" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="path-mono" Grid.Row="1" Grid.Column="1" Text="{Binding DataFolderPath}" VerticalAlignment="Center"/>
|
||||
<Button Classes="btn" Grid.Row="1" Grid.Column="2" Content="Open" Command="{Binding OpenPathCommand}" CommandParameter="{Binding DataFolderPath}"/>
|
||||
<TextBlock Classes="meta" Grid.Row="2" Grid.Column="0" Text="Logs" VerticalAlignment="Center"/>
|
||||
<Button Classes="btn" Grid.Row="1" Grid.Column="2" Content="{loc:Tr modals.about.open}" Command="{Binding OpenPathCommand}" CommandParameter="{Binding DataFolderPath}"/>
|
||||
<TextBlock Classes="meta" Grid.Row="2" Grid.Column="0" Text="{loc:Tr modals.about.logs}" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="path-mono" Grid.Row="2" Grid.Column="1" Text="{Binding LogsFolderPath}" VerticalAlignment="Center"/>
|
||||
<Button Classes="btn" Grid.Row="2" Grid.Column="2" Content="Open" Command="{Binding OpenPathCommand}" CommandParameter="{Binding LogsFolderPath}"/>
|
||||
<TextBlock Classes="meta" Grid.Row="3" Grid.Column="0" Text="Config" VerticalAlignment="Center"/>
|
||||
<Button Classes="btn" Grid.Row="2" Grid.Column="2" Content="{loc:Tr modals.about.open}" Command="{Binding OpenPathCommand}" CommandParameter="{Binding LogsFolderPath}"/>
|
||||
<TextBlock Classes="meta" Grid.Row="3" Grid.Column="0" Text="{loc:Tr modals.about.config}" VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="path-mono" Grid.Row="3" Grid.Column="1" Text="{Binding WorkerConfigPath}" VerticalAlignment="Center"/>
|
||||
<Button Classes="btn" Grid.Row="3" Grid.Column="2" Content="Open" Command="{Binding OpenPathCommand}" CommandParameter="{Binding WorkerConfigPath}"/>
|
||||
<Button Classes="btn" Grid.Row="3" Grid.Column="2" Content="{loc:Tr modals.about.open}" Command="{Binding OpenPathCommand}" CommandParameter="{Binding WorkerConfigPath}"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user