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,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">
|
||||
<DockPanel LastChildFill="True">
|
||||
@@ -9,7 +10,7 @@
|
||||
<!-- ── Header ── -->
|
||||
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="heading" Text="Lists"/>
|
||||
<TextBlock Classes="heading" Text="{loc:Tr lists.heading}"/>
|
||||
|
||||
<!-- Search row -->
|
||||
<Border Classes="search-wrap" Margin="0,8,0,12">
|
||||
@@ -19,10 +20,10 @@
|
||||
Foreground="{DynamicResource TextFaintBrush}"
|
||||
Margin="2,0,0,0"/>
|
||||
<TextBox Grid.Column="1" x:Name="SearchBox" Classes="search-inner"
|
||||
PlaceholderText="Search tasks…"
|
||||
PlaceholderText="{loc:Tr lists.searchPlaceholder}"
|
||||
Text="{Binding SearchText, Mode=TwoWay}"/>
|
||||
<Border Grid.Column="2" Classes="kbd" Margin="0,0,2,0">
|
||||
<TextBlock Text="Ctrl K"/>
|
||||
<TextBlock Text="{loc:Tr lists.searchKbd}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -57,7 +58,7 @@
|
||||
<!-- More button -->
|
||||
<Button Grid.Column="2" Classes="icon-btn" VerticalAlignment="Center"
|
||||
Command="{Binding OpenSettingsCommand}"
|
||||
ToolTip.Tip="Settings">
|
||||
ToolTip.Tip="{loc:Tr lists.settingsTip}">
|
||||
<PathIcon Data="{StaticResource Icon.MoreHorizontal}"
|
||||
Width="14" Height="14"
|
||||
Foreground="{DynamicResource TextMuteBrush}"/>
|
||||
@@ -70,7 +71,7 @@
|
||||
<StackPanel Margin="6,0,6,4">
|
||||
|
||||
<!-- SMART LISTS section -->
|
||||
<TextBlock Classes="section-label" Text="SMART LISTS" Margin="10,10,10,4"/>
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr lists.smartListsLabel}" Margin="10,10,10,4"/>
|
||||
<ItemsControl ItemsSource="{Binding SmartLists}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:ListNavItemViewModel">
|
||||
@@ -109,7 +110,7 @@
|
||||
</ItemsControl>
|
||||
|
||||
<!-- MY LISTS section -->
|
||||
<TextBlock Classes="section-label" Text="MY LISTS" Margin="10,10,10,4"/>
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr lists.myListsLabel}" Margin="10,10,10,4"/>
|
||||
<ItemsControl ItemsSource="{Binding UserLists}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:ListNavItemViewModel">
|
||||
@@ -127,18 +128,18 @@
|
||||
DragDrop.Drop="OnListDrop">
|
||||
<Border.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Settings..."
|
||||
<MenuItem Header="{loc:Tr lists.contextSettings}"
|
||||
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenListSettingsCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
<MenuItem Header="Worktrees…"
|
||||
<MenuItem Header="{loc:Tr lists.contextWorktrees}"
|
||||
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenWorktreesOverviewCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
<Separator IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<MenuItem Header="Open in Explorer"
|
||||
<MenuItem Header="{loc:Tr lists.contextOpenExplorer}"
|
||||
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenInExplorerCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
<MenuItem Header="Open in Terminal"
|
||||
<MenuItem Header="{loc:Tr lists.contextOpenTerminal}"
|
||||
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenInTerminalCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
@@ -191,14 +192,14 @@
|
||||
Foreground="{DynamicResource TextMuteBrush}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Classes="body"
|
||||
Text="New list"
|
||||
Text="{loc:Tr lists.newList}"
|
||||
Foreground="{DynamicResource TextMuteBrush}"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Column="1" Classes="icon-btn" Margin="6,0,0,0"
|
||||
Command="{Binding OpenRepoImportCommand}"
|
||||
ToolTip.Tip="Add repos as lists">
|
||||
ToolTip.Tip="{loc:Tr lists.addReposTip}">
|
||||
<PathIcon Data="{StaticResource Icon.Folder}"
|
||||
Width="14" Height="14"
|
||||
Foreground="{DynamicResource TextMuteBrush}"/>
|
||||
|
||||
Reference in New Issue
Block a user