[Localization] Move PowerToys Run string resources from xaml files to resx (#6165)

* Removed xaml files, added resx file and removed references for PowerLauncher project

* Added resx file for wox.plugin

* Moved Calculator resources to resx

* Migrated resources for Folder and Indexer plugins

* Migrated resources for Program and Shell plugin

* Migrated resources for URI and Window Walker

* Removed GetTranslation, tests need to be refactored

* Removed internationalization classes

* Removed Wox.Core.Resource references

* Fixed Programs plugin tests

* Fixed tests

* Removed language xaml files from installer

* Added locProject.json files

* Fixed resource not found error

* Reverted addition of resx file for Wox.Plugin
This commit is contained in:
Arjun Balgovind
2020-09-02 15:24:59 -07:00
committed by GitHub
parent c9f536c635
commit 1b598ad87e
130 changed files with 3978 additions and 5390 deletions

View File

@@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:p="clr-namespace:PowerLauncher.Properties"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="720">
@@ -161,7 +162,7 @@
SelectionMode="Single"
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
ItemContainerStyle="{StaticResource ResultsListViewItemContainerStyle}"
AutomationProperties.Name="{DynamicResource Results}">
AutomationProperties.Name="{x:Static p:Resources.Results}">
<!--AllowFocusOnInteraction="False"
IsItemClickEnabled="True"-->
@@ -210,11 +211,11 @@
</StackPanel>
</ToolTip>
</Grid.ToolTip>
<Image AutomationProperties.Name="{DynamicResource AppIcon}" x:Name="AppIcon" Height="36" MaxWidth="56" Grid.RowSpan="2" Margin="-6,-2,0,0" HorizontalAlignment="Center" Source="{Binding Image}" />
<TextBlock AutomationProperties.Name="{DynamicResource Title}" x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" Margin="0,0,0,-2" VerticalAlignment="Bottom" RenderOptions.ClearTypeHint="Enabled"/>
<TextBlock AutomationProperties.Name="{DynamicResource Subtitle}" x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Foreground="{DynamicResource SecondaryTextForeground}" Margin="0,2,0,0" VerticalAlignment="Top" RenderOptions.ClearTypeHint="Enabled"/>
<Image AutomationProperties.Name="{x:Static p:Resources.AppIcon}" x:Name="AppIcon" Height="36" MaxWidth="56" Grid.RowSpan="2" Margin="-6,-2,0,0" HorizontalAlignment="Center" Source="{Binding Image}" />
<TextBlock AutomationProperties.Name="{x:Static p:Resources.Title}" x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" Margin="0,0,0,-2" VerticalAlignment="Bottom" RenderOptions.ClearTypeHint="Enabled"/>
<TextBlock AutomationProperties.Name="{x:Static p:Resources.Subtitle}" x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Foreground="{DynamicResource SecondaryTextForeground}" Margin="0,2,0,0" VerticalAlignment="Top" RenderOptions.ClearTypeHint="Enabled"/>
<ListView
AutomationProperties.Name="{DynamicResource ContextMenuItemsCollection}"
AutomationProperties.Name="{x:Static p:Resources.ContextMenuItemsCollection}"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="Transparent"
@@ -238,14 +239,14 @@
</ItemsControl.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Button AutomationProperties.Name="{DynamicResource ContextMenuItem}" Style="{StaticResource IconButtonStyle}" Command="{Binding Command}" VerticalAlignment="Center" Height="42" Width="42" BorderThickness="1" >
<Button AutomationProperties.Name="{x:Static p:Resources.ContextMenuItem}" Style="{StaticResource IconButtonStyle}" Command="{Binding Command}" VerticalAlignment="Center" Height="42" Width="42" BorderThickness="1" >
<ToolTipService.ToolTip>
<ToolTip >
<TextBlock AutomationProperties.Name="{DynamicResource ContextMenuItemAdditionalInformation}" Text="{Binding Title}" Foreground="{DynamicResource ToolTipForegroundBrushKey}" Margin="8,5" FontSize="12" RenderOptions.ClearTypeHint="Enabled"/>
<TextBlock AutomationProperties.Name="{x:Static p:Resources.ContextMenuItemAdditionalInformation}" Text="{Binding Title}" Foreground="{DynamicResource ToolTipForegroundBrushKey}" Margin="8,5" FontSize="12" RenderOptions.ClearTypeHint="Enabled"/>
</ToolTip>
</ToolTipService.ToolTip>
<Button.Content>
<TextBlock AutomationProperties.Name="{DynamicResource ContextMenuIcon}" FontFamily="{Binding FontFamily}" FontSize="16" Text="{Binding Glyph}" RenderOptions.ClearTypeHint="Enabled"/>
<TextBlock AutomationProperties.Name="{x:Static p:Resources.ContextMenuIcon}" FontFamily="{Binding FontFamily}" FontSize="16" Text="{Binding Glyph}" RenderOptions.ClearTypeHint="Enabled"/>
</Button.Content>
</Button>
</DataTemplate>