Browse Source

More setting keys

Krzysztof Krysiński 2 years ago
parent
commit
cdea9da83c

+ 13 - 1
src/PixiEditor/Data/Localization/Languages/en.json

@@ -30,5 +30,17 @@
   "ENABLED": "Enabled",
   "ENABLED": "Enabled",
   "SHOW_IMAGE_NAME": "Show image name",
   "SHOW_IMAGE_NAME": "Show image name",
   "SHOW_IMAGE_SIZE": "Show image size",
   "SHOW_IMAGE_SIZE": "Show image size",
-  "SHOW_LAYER_COUNT": "Show layer count"
+  "SHOW_LAYER_COUNT": "Show layer count",
+  
+  "ABOUT_ME": "ABOUT ME",
+  "BOT_DESCRIPTION": "Use me to display your .pixi files in Discord.\nStart by sending a file in any appropriate channel",
+  "MEMBER_SINCE": "DISCORD MEMBER SINCE",
+  "DISCORD_PLAYING": "PLAYING A \"GAME\"",
+  "DISCORD_ELAPSED": "00:00 elapsed",
+  
+  "NOTHING_FOUND": "Nothing found",
+  "EXPORT": "Export",
+  "IMPORT": "Import",
+  "SHORTCUT_TEMPLATES": "Shortcut templates",
+  "RESET_ALL": "Reset all"
 }
 }

+ 2 - 1
src/PixiEditor/Views/Dialogs/SettingGroups/ShortcutsBinder.xaml

@@ -5,6 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:PixiEditor.Views.Dialogs.SettingGroups"
              xmlns:local="clr-namespace:PixiEditor.Views.Dialogs.SettingGroups"
              xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
              xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
+             xmlns:views="clr-namespace:PixiEditor.Views"
              xmlns:userControls="clr-namespace:PixiEditor.Views.UserControls"
              xmlns:userControls="clr-namespace:PixiEditor.Views.UserControls"
              mc:Ignorable="d"
              mc:Ignorable="d"
              d:DesignHeight="600" d:DesignWidth="400">
              d:DesignHeight="600" d:DesignWidth="400">
@@ -30,7 +31,7 @@
                     <Grid>
                     <Grid>
                         <TextBlock Foreground="LightGray" HorizontalAlignment="Center" TextAlignment="Center"
                         <TextBlock Foreground="LightGray" HorizontalAlignment="Center" TextAlignment="Center"
                                    Visibility="{Binding VisibleGroups, ConverterParameter=0, Mode=OneWay, Converter={converters:EqualityBoolToVisibilityConverter}}"
                                    Visibility="{Binding VisibleGroups, ConverterParameter=0, Mode=OneWay, Converter={converters:EqualityBoolToVisibilityConverter}}"
-                                   Text="Nothing found"/>
+                                   views:Translator.Key="NOTHING_FOUND"  d:Text="Nothing found."/>
                         <ItemsControl ItemsSource="{Binding Commands}" Foreground="White" Focusable="False">
                         <ItemsControl ItemsSource="{Binding Commands}" Foreground="White" Focusable="False">
                             <ItemsControl.ItemTemplate>
                             <ItemsControl.ItemTemplate>
                                 <DataTemplate>
                                 <DataTemplate>

+ 4 - 4
src/PixiEditor/Views/Dialogs/SettingsWindow.xaml

@@ -237,13 +237,13 @@
                         </Style>
                         </Style>
                     </StackPanel.Resources>
                     </StackPanel.Resources>
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.Export}"
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.Export}"
-                            Content="Export"/>
+                            d:Content="Export" views:Translator.Key="EXPORT"/>
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.Import}"
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.Import}"
-                            Content="Import"/>
+                            d:Content="Import" views:Translator.Key="IMPORT"/>
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.OpenTemplatePopup}"
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.OpenTemplatePopup}"
-                            Content="Shortcut Templates"/>
+                            d:Content="Shortcut Templates" views:Translator.Key="SHORTCUT_TEMPLATES"/>
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.Reset}"
                     <Button Command="{cmds:Command PixiEditor.Shortcuts.Reset}"
-                            Content="Reset all"/>
+                            d:Content="Reset all" views:Translator.Key="RESET_ALL"/>
                 </StackPanel>
                 </StackPanel>
                 <TextBox Grid.Row="1" Style="{StaticResource DarkTextBoxStyle}" Margin="0,10"
                 <TextBox Grid.Row="1" Style="{StaticResource DarkTextBoxStyle}" Margin="0,10"
                          Text="{Binding SearchTerm, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                          Text="{Binding SearchTerm, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">

+ 14 - 9
src/PixiEditor/Views/UserControls/DiscordRPPreview.xaml

@@ -4,7 +4,9 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PixiEditor.Views.UserControls" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
+             xmlns:local="clr-namespace:PixiEditor.Views.UserControls" 
+             xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
+             xmlns:views="clr-namespace:PixiEditor.Views"
              mc:Ignorable="d" 
              mc:Ignorable="d" 
              d:DesignWidth="300"
              d:DesignWidth="300"
              x:Name="uc">
              x:Name="uc">
@@ -45,26 +47,29 @@
                         <Grid Margin="0,5">
                         <Grid Margin="0,5">
                             <StackPanel Orientation="Vertical">
                             <StackPanel Orientation="Vertical">
                                 <Grid Margin="0,15" Background="#262729" Height="1"/>
                                 <Grid Margin="0,15" Background="#262729" Height="1"/>
-                                <TextBlock FontWeight="Black" FontSize="12" Foreground="White" Margin="0,0,0,10">ABOUT ME</TextBlock>
-                                <TextBlock Foreground="White" Text="Use me to display your .pixi files in Discord.&#x0a;Start by sending a file in any appropriate channel"></TextBlock>
+                                <TextBlock FontWeight="Black" FontSize="12" Foreground="White" Margin="0,0,0,10" views:Translator.Key="ABOUT_ME" d:Text="ABOUT ME"/>
+                                <TextBlock Foreground="White" d:Text="Use me to display your .pixi files in Discord. &#10;Start by sending a file in any appropriate channel" 
+                                           views:Translator.Key="BOT_DESCRIPTION"/>
                             </StackPanel>
                             </StackPanel>
                         </Grid>
                         </Grid>
                         <Grid Margin="0,5">
                         <Grid Margin="0,5">
                             <StackPanel Orientation="Vertical">
                             <StackPanel Orientation="Vertical">
-                                <TextBlock FontWeight="Black" FontSize="12" Foreground="White" Margin="0,0,0,10">DISCORD MEMBER SINCE</TextBlock>
-                                <TextBlock Foreground="White" Text="Oct 09, 2020"></TextBlock>
+                                <TextBlock FontWeight="Black" FontSize="12" Foreground="White" Margin="0,0,0,10" views:Translator.Key="MEMBER_SINCE" d:Text="DISCORD MEMBER SINCE"/>
+                                <TextBlock Foreground="White" Text="Mar 24, 2023"></TextBlock>
                             </StackPanel>
                             </StackPanel>
                         </Grid>
                         </Grid>
                         <Grid Visibility="{Binding ElementName=uc, Path=IsPlaying, Converter={BoolToVisibilityConverter}}" Margin="0,5, 0, 0">
                         <Grid Visibility="{Binding ElementName=uc, Path=IsPlaying, Converter={BoolToVisibilityConverter}}" Margin="0,5, 0, 0">
                             <StackPanel Orientation="Vertical">
                             <StackPanel Orientation="Vertical">
-                                <TextBlock FontWeight="Black" FontSize="12" Foreground="White" Margin="0,0,0,10">PLAYING A "GAME"</TextBlock>
+                                <TextBlock FontWeight="Black" FontSize="12" Foreground="White" Margin="0,0,0,10" views:Translator.Key="DISCORD_PLAYING" d:Text="PLAYING A GAME"/>
                                 <StackPanel Orientation="Horizontal">
                                 <StackPanel Orientation="Horizontal">
                                     <Image Source="../../Images/PixiEditorLogo.png" Height="70"/>
                                     <Image Source="../../Images/PixiEditorLogo.png" Height="70"/>
                                     <StackPanel Margin="15,0,0,0" VerticalAlignment="Center">
                                     <StackPanel Margin="15,0,0,0" VerticalAlignment="Center">
                                         <TextBlock Foreground="White" FontSize="12" FontWeight="SemiBold">PixiEditor</TextBlock>
                                         <TextBlock Foreground="White" FontSize="12" FontWeight="SemiBold">PixiEditor</TextBlock>
-                                        <TextBlock Foreground="White" FontSize="12" Text="{Binding ElementName=uc, Path=Detail}" Visibility="{Binding ElementName=uc, Path=Detail, Converter={converters:EmptyStringToVisibilityConverter}}"/>
-                                        <TextBlock Foreground="White" FontSize="12" Text="{Binding ElementName=uc, Path=State}" Visibility="{Binding ElementName=uc, Path=State, Converter={converters:EmptyStringToVisibilityConverter}}"/>
-                                        <TextBlock Foreground="White" FontSize="12">00:00 elapsed</TextBlock>
+                                        <TextBlock Foreground="White" FontSize="12" Text="{Binding ElementName=uc, Path=Detail}" Visibility="{Binding ElementName=uc, 
+                                        Path=Detail, Converter={converters:EmptyStringToVisibilityConverter}}"/>
+                                        <TextBlock Foreground="White" FontSize="12" Text="{Binding ElementName=uc, Path=State}" Visibility="{Binding ElementName=uc, 
+                                        Path=State, Converter={converters:EmptyStringToVisibilityConverter}}"/>
+                                        <TextBlock Foreground="White" FontSize="12" views:Translator.Key="DISCORD_ELAPSED" d:Text="00:00 elapsed"/>
                                     </StackPanel>
                                     </StackPanel>
                                 </StackPanel>
                                 </StackPanel>
                             </StackPanel>
                             </StackPanel>