Skip to content

Commit

Permalink
Removed languages
Browse files Browse the repository at this point in the history
Also moved resource files to Properties
  • Loading branch information
Timthreetwelve committed Aug 21, 2023
1 parent 38c12e2 commit 44eabe2
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 468 deletions.
10 changes: 5 additions & 5 deletions WUView/Dialogs/ExcludesEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:WUView.Models"
xmlns:strings="clr-namespace:WUView.Strings"
xmlns:props="clr-namespace:WUView.Properties"
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Width="Auto" Height="300"
Expand Down Expand Up @@ -46,9 +46,9 @@
HorizontalAlignment="Center"
Margin="7,0"
FontSize="16" FontWeight="Regular">
<Run Text="{x:Static strings:Resource.ExcludesEditorTextLine1}" />
<Run Text="{x:Static props:Strings.ExcludesEditorTextLine1}" />
<LineBreak />
<Run Text="{x:Static strings:Resource.ExcludesEditorTextLine2}" />
<Run Text="{x:Static props:Strings.ExcludesEditorTextLine2}" />
</TextBlock>

<TextBox x:Name="tb1"
Expand Down Expand Up @@ -80,7 +80,7 @@
<Button x:Name="btnOK"
Width="90"
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
Content="{x:Static strings:Resource.ButtonOK}"
Content="{x:Static props:Strings.ButtonOK}"
Style="{StaticResource PlainOutlinedButton}">
<Button.CommandParameter>
<system:Boolean>True</system:Boolean>
Expand All @@ -90,7 +90,7 @@
<Button x:Name="btnCancel"
Width="90"
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
Content="{x:Static strings:Resource.ButtonCancel}"
Content="{x:Static props:Strings.ButtonCancel}"
Style="{StaticResource PlainOutlinedButton}">
<Button.CommandParameter>
<system:Boolean>False</system:Boolean>
Expand Down
2 changes: 1 addition & 1 deletion WUView/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
global using WUView.Dialogs;
global using WUView.Helpers;
global using WUView.Models;
global using WUView.Strings;
global using WUView.Properties;
global using WUView.ViewModels;
global using WUView.Views;
4 changes: 2 additions & 2 deletions WUView/Helpers/FileHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static async void SaveToCSV()
string fname = "WUView_" + DateTime.Now.Date.ToString("yyyy-MM-dd") + ".csv";
SaveFileDialog dialog = new()
{
Title = Resource.MenuItemSaveCSV,
Title = Strings.MenuItemSaveCSV,
Filter = "CSV File|*.csv",
InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
FileName = fname
Expand All @@ -107,7 +107,7 @@ public static async void SaveToFile()
string fname = "WUView_" + DateTime.Now.Date.ToString("yyyy-MM-dd") + ".txt";
SaveFileDialog dialog = new()
{
Title = Resource.MenuItemSaveTXT,
Title = Strings.MenuItemSaveTXT,
Filter = "Text File|*.txt",
InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
FileName = fname
Expand Down
4 changes: 2 additions & 2 deletions WUView/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:helpers="clr-namespace:WUView.Helpers"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:strings="clr-namespace:WUView.Strings"
xmlns:props="clr-namespace:WUView.Properties"
xmlns:viewmodels="clr-namespace:WUView.ViewModels"
mc:Ignorable="d"
d:DesignHeight="350" d:DesignWidth="800"
Expand Down Expand Up @@ -132,7 +132,7 @@
Background="{DynamicResource MaterialDesignDivider}" />
<Button Height="35"
Padding="15,1,0,22"
Content="{x:Static strings:Resource.ButtonCancel}"/>
Content="{x:Static props:Strings.ButtonCancel}"/>
</StackPanel>
</Grid>
</Border>
Expand Down
2 changes: 0 additions & 2 deletions WUView/Models/UILanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,5 @@ public override string ToString()
public static List<UILanguage> DefinedLanguages { get; set; } = new()
{
new UILanguage {Language = "English (en-US)", LanguageCode = "en-US"},
new UILanguage {Language = "English (en-GB)", LanguageCode = "en-GB"},
new UILanguage {Language = "Spanish (es-ES)", LanguageCode = "es-ES"},
};
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 30 additions & 30 deletions WUView/Strings/Resource.resx → WUView/Properties/Strings.resx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
Expand Down Expand Up @@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DGColDate" xml:space="preserve">
<data name="DGColDate" xml:space="preserve">
<value>Date</value>
<comment>DataGrid Column</comment>
</data>
Expand Down Expand Up @@ -353,7 +353,7 @@
<value>View the ReadMe file</value>
<comment>About Page</comment>
</data>
<data name="AboutDocumentionText" xml:space="preserve">
<data name="AboutDocumentationText" xml:space="preserve">
<value>Open the ReadMe file</value>
<comment>About Page</comment>
</data>
Expand Down Expand Up @@ -403,6 +403,6 @@
</data>
<data name="ButtonOK" xml:space="preserve">
<value>OK</value>
<comment>Button</comment>
<comment>Button@Invariant</comment>
</data>
</root>

0 comments on commit 44eabe2

Please sign in to comment.