mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 00:46:12 +02:00
Add localization strings and improve resource management
This commit is contained in:
@@ -6,10 +6,11 @@
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Resources\StringResources.en.xaml" />
|
||||
<ResourceDictionary Source="Resources\Strings\StringResources.en.xaml" />
|
||||
<materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="Grey" SecondaryColor="LightBlue" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/BusyIndicator;component/Theme/Default.xaml" />
|
||||
<ResourceDictionary Source="Resources\Images\ImageResources.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Thickness x:Key="DefaultMargin" Top="6" Left="6" Right="6" Bottom ="6"></Thickness>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
<None Remove="icon.ico" />
|
||||
<None Remove="icons8_volunteering_26_85L_icon.ico" />
|
||||
<None Remove="icon_Dark.ico" />
|
||||
<None Remove="Resources\Images\modio-cog-blue.png" />
|
||||
<None Remove="Resources\Images\modio-logo-bluedark.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Images\modio-cog-blue.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -49,5 +57,6 @@
|
||||
<Resource Include="icon.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\Images\modio-logo-bluedark.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -116,11 +116,11 @@ public partial class ColorDialog : Window
|
||||
|
||||
if (currentCulture.Contains("de"))
|
||||
{
|
||||
dict.Source = new Uri("..\\Resources\\StringResources.de.xaml", UriKind.Relative);
|
||||
dict.Source = new Uri("..\\Resources\\Strings\\StringResources.de.xaml", UriKind.Relative);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.Source = new Uri("..\\Resources\\StringResources.en.xaml", UriKind.Relative);
|
||||
dict.Source = new Uri("..\\Resources\\Strings\\StringResources.en.xaml", UriKind.Relative);
|
||||
}
|
||||
Resources.MergedDictionaries.Add(dict);
|
||||
}
|
||||
|
||||
@@ -37,11 +37,11 @@ public partial class InputDialog : Window
|
||||
|
||||
if (currentCulture.Contains("de"))
|
||||
{
|
||||
dict.Source = new Uri("..\\Resources\\StringResources.de.xaml", UriKind.Relative);
|
||||
dict.Source = new Uri("..\\Resources\\Strings\\StringResources.de.xaml", UriKind.Relative);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.Source = new Uri("..\\Resources\\StringResources.en.xaml", UriKind.Relative);
|
||||
dict.Source = new Uri("..\\Resources\\Strings\\StringResources.en.xaml", UriKind.Relative);
|
||||
}
|
||||
Resources.MergedDictionaries.Add(dict);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Closing="Window_Closing"
|
||||
Closed="Window_Closed"
|
||||
ShowInTaskbar="True"
|
||||
Icon="icon.ico"
|
||||
Icon="{StaticResource Icon}"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
FontFamily="{DynamicResource MaterialDesignFont}"
|
||||
Height="520"
|
||||
|
||||
@@ -669,11 +669,11 @@ namespace DesktopMagic
|
||||
|
||||
if (currentCulture.Contains("de"))
|
||||
{
|
||||
dict.Source = new Uri("..\\Resources\\StringResources.de.xaml", UriKind.Relative);
|
||||
dict.Source = new Uri("..\\Resources\\Strings\\StringResources.de.xaml", UriKind.Relative);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.Source = new Uri("..\\Resources\\StringResources.en.xaml", UriKind.Relative);
|
||||
dict.Source = new Uri("..\\Resources\\Strings\\StringResources.en.xaml", UriKind.Relative);
|
||||
}
|
||||
Resources.MergedDictionaries.Add(dict);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border HorizontalAlignment="Left" Width="100" Height="100" BorderThickness="1" BorderBrush="LightGray">
|
||||
<Image Source="{Binding Logo}" Width="100" Height="100" />
|
||||
<Image Source="{Binding Logo, FallbackValue={StaticResource ModioCogBlue}, TargetNullValue={StaticResource ModioCogBlue}}" Width="100" Height="100" />
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Stretch">
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
@@ -57,6 +58,10 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<DockPanel Grid.Row="3" Grid.ColumnSpan="2">
|
||||
<Image Source="{StaticResource ModioLogoBlueDark}" Height="30" HorizontalAlignment="Left" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</busyIndicator:BusyMask>
|
||||
</Window>
|
||||
@@ -0,0 +1,6 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<BitmapImage x:Key="Icon" UriSource="/icon.ico" />
|
||||
<BitmapImage x:Key="ModioCogBlue" UriSource="modio-cog-blue.png" />
|
||||
<BitmapImage x:Key="ModioLogoBlueDark" UriSource="modio-logo-bluedark.png" />
|
||||
</ResourceDictionary>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
+4
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
<system:String x:Key="lineMode">Linie</system:String>
|
||||
<system:String x:Key="mirrorMode">Spiegeln</system:String>
|
||||
<system:String x:Key="updatePlugins">Plugins Neu Laden</system:String>
|
||||
<system:String x:Key="updatePlugins">Neu Laden</system:String>
|
||||
<system:String x:Key="openPluginsFolder">Plugins Ordner Öffnen</system:String>
|
||||
<system:String x:Key="pluginManager">Plugin Manager</system:String>
|
||||
<system:String x:Key="color">Farbe:</system:String>
|
||||
@@ -25,7 +25,9 @@
|
||||
<system:String x:Key="ok">Ok</system:String>
|
||||
<system:String x:Key="cancel">Abbrechen</system:String>
|
||||
<system:String x:Key="enterLayoutName">Layoutnamen eingeben:</system:String>
|
||||
<system:String x:Key="layoutAlreadyExists">Layout exestiert bereits!</system:String>
|
||||
<system:String x:Key="layoutAlreadyExists">Layout existiert bereits!</system:String>
|
||||
<system:String x:Key="install">Installieren</system:String>
|
||||
<system:String x:Key="remove">Entfernen</system:String>
|
||||
<col:ArrayList x:Key="musicVisualizerOptionsComboboxItems">
|
||||
<system:String>Unten</system:String>
|
||||
<system:String>Mitte</system:String>
|
||||
+3
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
<system:String x:Key="lineMode">Line</system:String>
|
||||
<system:String x:Key="mirrorMode">Mirror</system:String>
|
||||
<system:String x:Key="updatePlugins">Reload Plugins</system:String>
|
||||
<system:String x:Key="updatePlugins">Reload</system:String>
|
||||
<system:String x:Key="openPluginsFolder">Open Plugins Folder</system:String>
|
||||
<system:String x:Key="pluginManager">Plugin Manager</system:String>
|
||||
<system:String x:Key="color">Color:</system:String>
|
||||
@@ -26,6 +26,8 @@
|
||||
<system:String x:Key="cancel">Cancel</system:String>
|
||||
<system:String x:Key="enterLayoutName">Enter layout name</system:String>
|
||||
<system:String x:Key="layoutAlreadyExists">Layout already exists!</system:String>
|
||||
<system:String x:Key="install">Install</system:String>
|
||||
<system:String x:Key="remove">Remove</system:String>
|
||||
<col:ArrayList x:Key="musicVisualizerOptionsComboboxItems">
|
||||
<system:String>Bottom</system:String>
|
||||
<system:String>Middle</system:String>
|
||||
Reference in New Issue
Block a user