A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
Simplified the process for contributing to translation (#53)
Etienne Baudouxf8227bfe7030
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 402676dda..03d855b6f 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -21,17 +21,12 @@ You can contribute to DevToys app by:# Internationalization and localization-* After following `How to Build and Run DevToys from source`, open `src/DevToys.sln` with Visual Studio.-* Copy the folder `dev/impl/DevToys/Strings/en` and rename the copied folder with the language indication of your choice. For example, "fr-FR" for French (France).-* Open each `.resw` files and translate the text.-* Open `dev/impl/DevToys/LanguageManager.tt`.-* [Copy the following block](https://github.com/veler/DevToys/blob/6c7e6ca48ea8fe2a313a917528e7751f6ec61be5/src/dev/impl/DevToys/LanguageManager.tt#L91-L96) and add it to the line below:-* Change the `Identifier`, `DisplayName` and `Culture` to match your language.-* Save the file. Visual Studio will ask you to confirm. Click Yes.+* After following `How to Build and Run DevToys from source`, close Visual Studio, if any instance is running.+* In File Explorer, copy the folder `dev/impl/DevToys/Strings/en-US` and rename the copied folder with the language indication of your choice. For example, "fr-FR" for French (France).+* Open `src/DevToys.sln` with Visual Studio.+* Open each `.resw` files from the language folder you created and translate the text.* Build and Run the app and test your changes.-// TODO: We should seriously consider a solution where contributors don't need to change LanguageManager.tt-# Coding## Main architecturediff --git a/src/dev/DevToys.Startup/DevToys.Startup.wapproj b/src/dev/DevToys.Startup/DevToys.Startup.wapprojindex a3bcead59..ed1af1840 100644--- a/src/dev/DevToys.Startup/DevToys.Startup.wapproj+++ b/src/dev/DevToys.Startup/DevToys.Startup.wapproj@@ -34,7 +34,7 @@<ProjectGuid>361db7bc-be7b-41a2-a29a-978a9e3b4aa7</ProjectGuid><TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion><TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>- <DefaultLanguage>en</DefaultLanguage>+ <DefaultLanguage>en-US</DefaultLanguage><GenerateAppInstallerFile>False</GenerateAppInstallerFile><AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision><AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>diff --git a/src/dev/impl/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj b/src/dev/impl/DevToys.MonacoEditor/DevToys.MonacoEditor.csprojindex 9de4185b1..af2ee5033 100644--- a/src/dev/impl/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj+++ b/src/dev/impl/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj@@ -7,7 +7,7 @@<AppDesignerFolder>Properties</AppDesignerFolder><RootNamespace>DevToys.MonacoEditor</RootNamespace><AssemblyName>DevToys.MonacoEditor</AssemblyName>- <DefaultLanguage>en</DefaultLanguage>+ <DefaultLanguage>en-US</DefaultLanguage><TargetPlatformIdentifier>UAP</TargetPlatformIdentifier><TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">$(Windows10SDKVersion)</TargetPlatformVersion><TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>diff --git a/src/dev/impl/DevToys/App.xaml.cs b/src/dev/impl/DevToys/App.xaml.csindex 978e3f433..1db529217 100644--- a/src/dev/impl/DevToys/App.xaml.cs+++ b/src/dev/impl/DevToys/App.xaml.cs@@ -44,7 +44,7 @@ namespace DevToys{// Set the language of the app for startup. By default, it's the same than Windows, or english.// The language defined by the user will be applied later, once MEF is loaded, but before the UI shows up.- LanguageManager.Instance.SetCurrentCulture(CultureInfo.InstalledUICulture);+ LanguageManager.Instance.SetCurrentCulture(LanguageManager.Instance.AvailableLanguages[0]);// Initialize MEF_mefComposer@@ -205,8 +205,10 @@ namespace DevToys// Set the user-defined language.string languageIdentifier = (await _mefComposer).ExportProvider.GetExport<ISettingsProvider>().GetSetting(PredefinedSettings.Language);- LanguageDefinition languageDefinition = LanguageManager.Instance.AvailableLanguages.First(l => string.Equals(l.Identifier, languageIdentifier));- LanguageManager.Instance.SetCurrentCulture(languageDefinition.Culture);+ LanguageDefinition languageDefinition+ = LanguageManager.Instance.AvailableLanguages.FirstOrDefault(l => string.Equals(l.InternalName, languageIdentifier))+ ?? LanguageManager.Instance.AvailableLanguages[0];+ LanguageManager.Instance.SetCurrentCulture(languageDefinition);// Apply the app color theme.(await _themeListener.Value).ApplyDesiredColorTheme();diff --git a/src/dev/impl/DevToys/DevToys.csproj b/src/dev/impl/DevToys/DevToys.csprojindex 044fbcde2..972d02bf1 100644--- a/src/dev/impl/DevToys/DevToys.csproj+++ b/src/dev/impl/DevToys/DevToys.csproj@@ -7,7 +7,7 @@<AppDesignerFolder>Properties</AppDesignerFolder><RootNamespace>DevToys</RootNamespace><AssemblyName>DevToys</AssemblyName>- <DefaultLanguage>en</DefaultLanguage>+ <DefaultLanguage>en-US</DefaultLanguage><TargetPlatformIdentifier>UAP</TargetPlatformIdentifier><TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">$(Windows10SDKVersion)</TargetPlatformVersion><TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>@@ -334,18 +334,6 @@<Link>Package.appxmanifest</Link><SubType>Designer</SubType></AppxManifest>- <PRIResource Include="Strings\cs\TextDiff.resw" />- <PRIResource Include="Strings\cs\StringUtilities.resw" />- <PRIResource Include="Strings\cs\Settings.resw" />- <PRIResource Include="Strings\cs\RegEx.resw" />- <PRIResource Include="Strings\cs\MarkdownPreview.resw" />- <PRIResource Include="Strings\cs\MainPage.resw" />- <PRIResource Include="Strings\cs\JwtDecoderEncoder.resw" />- <PRIResource Include="Strings\cs\JsonYaml.resw" />- <PRIResource Include="Strings\cs\JsonFormatter.resw" />- <PRIResource Include="Strings\cs\HashGenerator.resw" />- <PRIResource Include="Strings\cs\Common.resw" />- <PRIResource Include="Strings\cs\Base64EncoderDecoder.resw" /><Page Include="Themes\Custom.xaml"><Generator>MSBuild:Compile</Generator><SubType>Designer</SubType>diff --git a/src/dev/impl/DevToys/LanguageDefinition.cs b/src/dev/impl/DevToys/LanguageDefinition.csindex 13788a30d..96daf99a8 100644--- a/src/dev/impl/DevToys/LanguageDefinition.cs+++ b/src/dev/impl/DevToys/LanguageDefinition.cs@@ -7,21 +7,49 @@ namespace DevToys/// <summary>/// Represents un language supported by the app./// </summary>- public struct LanguageDefinition+ public class LanguageDefinition{+ /// <summary>+ /// Unique internal name.+ /// </summary>+ public string InternalName { get; }+/// <summary>/// Unique internal ID used to identify the language./// </summary>- public string Identifier { get; set; }+ public string Identifier { get; }/// <summary>/// The name of the language displayed to the user./// </summary>- public string DisplayName { get; set; }+ public string DisplayName { get; }/// <summary>/// The culture to apply./// </summary>- public CultureInfo Culture { get; set; }+ public CultureInfo Culture { get; }++ public LanguageDefinition()+ : this(null)+ {+ }++ public LanguageDefinition(string? identifier)+ {+ if (!string.IsNullOrEmpty(identifier))+ {+ Culture = new CultureInfo(identifier!);+ DisplayName = Culture.NativeName;+ InternalName = Culture.Name;+ }+ else+ {+ Culture = CultureInfo.InstalledUICulture;+ DisplayName = new SettingsStrings().DefaultLanguage;+ InternalName = "default";+ }++ Identifier = Culture.Name;+ }}}diff --git a/src/dev/impl/DevToys/LanguageManager.cs b/src/dev/impl/DevToys/LanguageManager.csindex 165a4a0c5..a5e1bc532 100644--- a/src/dev/impl/DevToys/LanguageManager.cs+++ b/src/dev/impl/DevToys/LanguageManager.cs@@ -110,40 +110,18 @@ namespace DevToys/// <summary>/// Gets the list of available languages in the app./// </summary>- public List<LanguageDefinition> AvailableLanguages- => new List<LanguageDefinition>+ public List<LanguageDefinition> AvailableLanguages { get; }++ public LanguageManager()+ {+ AvailableLanguages = new List<LanguageDefinition>();+ AvailableLanguages.Add(new LanguageDefinition()); // default language+ IReadOnlyList<string> supportedLanguageIdentifiers = ApplicationLanguages.ManifestLanguages;+ for (int i = 0; i < supportedLanguageIdentifiers.Count; i++){- new LanguageDefinition- {- Identifier = "default",- DisplayName = Settings.DefaultLanguage,- Culture = CultureInfo.InstalledUICulture- },- new LanguageDefinition- {- Identifier = "english",- DisplayName = "English",- Culture = new CultureInfo("en")- },- new LanguageDefinition- {- Identifier = "russian",- DisplayName = "Русский",- Culture = new CultureInfo("ru")- },- new LanguageDefinition- {- Identifier = "french",- DisplayName = "français",- Culture = new CultureInfo("fr")- },- new LanguageDefinition- {- Identifier = "czech",- DisplayName = "Czech",- Culture = new CultureInfo("cs")- }- };+ AvailableLanguages.Add(new LanguageDefinition(supportedLanguageIdentifiers[i]));+ }+ }/// <summary>/// Retrieves the current culture.@@ -156,13 +134,13 @@ namespace DevToys/// <summary>/// Change the current culture of the application/// </summary>- public void SetCurrentCulture(CultureInfo culture)+ public void SetCurrentCulture(LanguageDefinition language){- CultureInfo.DefaultThreadCurrentCulture = culture;- CultureInfo.DefaultThreadCurrentUICulture = culture;- ApplicationLanguages.PrimaryLanguageOverride = culture.TextInfo.CultureName;+ CultureInfo.DefaultThreadCurrentCulture = language.Culture;+ CultureInfo.DefaultThreadCurrentUICulture = language.Culture;+ ApplicationLanguages.PrimaryLanguageOverride = language.Identifier;- if (culture.TextInfo.IsRightToLeft)+ if (language.Culture.TextInfo.IsRightToLeft){FlowDirection = FlowDirection.RightToLeft;}diff --git a/src/dev/impl/DevToys/LanguageManager.tt b/src/dev/impl/DevToys/LanguageManager.ttindex 5f26d1beb..44a537fd9 100644--- a/src/dev/impl/DevToys/LanguageManager.tt+++ b/src/dev/impl/DevToys/LanguageManager.tt@@ -20,7 +20,7 @@<#@ import namespace="Microsoft.VisualStudio.TextTemplating" #><#- var stringsFolder = Host.ResolvePath(@"Strings/en");+ var stringsFolder = Host.ResolvePath(@"Strings/en-US");#>//------------------------------------------------------------------------------// <auto-generated>@@ -85,40 +85,18 @@ namespace DevToys/// <summary>/// Gets the list of available languages in the app./// </summary>- public List<LanguageDefinition> AvailableLanguages- => new List<LanguageDefinition>+ public List<LanguageDefinition> AvailableLanguages { get; }++ public LanguageManager()+ {+ AvailableLanguages = new List<LanguageDefinition>();+ AvailableLanguages.Add(new LanguageDefinition()); // default language+ IReadOnlyList<string> supportedLanguageIdentifiers = ApplicationLanguages.ManifestLanguages;+ for (int i = 0; i < supportedLanguageIdentifiers.Count; i++){- new LanguageDefinition- {- Identifier = "default",- DisplayName = Settings.DefaultLanguage,- Culture = CultureInfo.InstalledUICulture- },- new LanguageDefinition- {- Identifier = "english",- DisplayName = "English",- Culture = new CultureInfo("en")- },- new LanguageDefinition- {- Identifier = "russian",- DisplayName = "Русский",- Culture = new CultureInfo("ru")- },- new LanguageDefinition- {- Identifier = "french",- DisplayName = "français",- Culture = new CultureInfo("fr")- },- new LanguageDefinition- {- Identifier = "czech",- DisplayName = "Czech",- Culture = new CultureInfo("cs")- }- };+ AvailableLanguages.Add(new LanguageDefinition(supportedLanguageIdentifiers[i]));+ }+ }/// <summary>/// Retrieves the current culture.@@ -131,13 +109,13 @@ namespace DevToys/// <summary>/// Change the current culture of the application/// </summary>- public void SetCurrentCulture(CultureInfo culture)+ public void SetCurrentCulture(LanguageDefinition language){- CultureInfo.DefaultThreadCurrentCulture = culture;- CultureInfo.DefaultThreadCurrentUICulture = culture;- ApplicationLanguages.PrimaryLanguageOverride = culture.TextInfo.CultureName;+ CultureInfo.DefaultThreadCurrentCulture = language.Culture;+ CultureInfo.DefaultThreadCurrentUICulture = language.Culture;+ ApplicationLanguages.PrimaryLanguageOverride = language.Identifier;- if (culture.TextInfo.IsRightToLeft)+ if (language.Culture.TextInfo.IsRightToLeft){FlowDirection = FlowDirection.RightToLeft;}diff --git a/src/dev/impl/DevToys/Strings/cs/Base64EncoderDecoder.resw b/src/dev/impl/DevToys/Strings/cs-CZ/Base64EncoderDecoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/Base64EncoderDecoder.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/Base64EncoderDecoder.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/Common.resw b/src/dev/impl/DevToys/Strings/cs-CZ/Common.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/Common.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/Common.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/HashGenerator.resw b/src/dev/impl/DevToys/Strings/cs-CZ/HashGenerator.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/HashGenerator.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/HashGenerator.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/JsonFormatter.resw b/src/dev/impl/DevToys/Strings/cs-CZ/JsonFormatter.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/JsonFormatter.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/JsonFormatter.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/JsonYaml.resw b/src/dev/impl/DevToys/Strings/cs-CZ/JsonYaml.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/JsonYaml.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/JsonYaml.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/JwtDecoderEncoder.resw b/src/dev/impl/DevToys/Strings/cs-CZ/JwtDecoderEncoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/JwtDecoderEncoder.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/JwtDecoderEncoder.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/MainPage.resw b/src/dev/impl/DevToys/Strings/cs-CZ/MainPage.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/MainPage.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/MainPage.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/MarkdownPreview.resw b/src/dev/impl/DevToys/Strings/cs-CZ/MarkdownPreview.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/MarkdownPreview.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/MarkdownPreview.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/RegEx.resw b/src/dev/impl/DevToys/Strings/cs-CZ/RegEx.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/RegEx.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/RegEx.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/Settings.resw b/src/dev/impl/DevToys/Strings/cs-CZ/Settings.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/Settings.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/Settings.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/StringUtilities.resw b/src/dev/impl/DevToys/Strings/cs-CZ/StringUtilities.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/StringUtilities.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/StringUtilities.reswdiff --git a/src/dev/impl/DevToys/Strings/cs/TextDiff.resw b/src/dev/impl/DevToys/Strings/cs-CZ/TextDiff.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/cs/TextDiff.reswrename to src/dev/impl/DevToys/Strings/cs-CZ/TextDiff.reswdiff --git a/src/dev/impl/DevToys/Strings/en/Base64EncoderDecoder.resw b/src/dev/impl/DevToys/Strings/en-US/Base64EncoderDecoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/Base64EncoderDecoder.reswrename to src/dev/impl/DevToys/Strings/en-US/Base64EncoderDecoder.reswdiff --git a/src/dev/impl/DevToys/Strings/en/Common.resw b/src/dev/impl/DevToys/Strings/en-US/Common.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/Common.reswrename to src/dev/impl/DevToys/Strings/en-US/Common.reswdiff --git a/src/dev/impl/DevToys/Strings/en/HashGenerator.resw b/src/dev/impl/DevToys/Strings/en-US/HashGenerator.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/HashGenerator.reswrename to src/dev/impl/DevToys/Strings/en-US/HashGenerator.reswdiff --git a/src/dev/impl/DevToys/Strings/en/JsonFormatter.resw b/src/dev/impl/DevToys/Strings/en-US/JsonFormatter.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/JsonFormatter.reswrename to src/dev/impl/DevToys/Strings/en-US/JsonFormatter.reswdiff --git a/src/dev/impl/DevToys/Strings/en/JsonYaml.resw b/src/dev/impl/DevToys/Strings/en-US/JsonYaml.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/JsonYaml.reswrename to src/dev/impl/DevToys/Strings/en-US/JsonYaml.reswdiff --git a/src/dev/impl/DevToys/Strings/en/JwtDecoderEncoder.resw b/src/dev/impl/DevToys/Strings/en-US/JwtDecoderEncoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/JwtDecoderEncoder.reswrename to src/dev/impl/DevToys/Strings/en-US/JwtDecoderEncoder.reswdiff --git a/src/dev/impl/DevToys/Strings/en/MainPage.resw b/src/dev/impl/DevToys/Strings/en-US/MainPage.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/MainPage.reswrename to src/dev/impl/DevToys/Strings/en-US/MainPage.reswdiff --git a/src/dev/impl/DevToys/Strings/en/MarkdownPreview.resw b/src/dev/impl/DevToys/Strings/en-US/MarkdownPreview.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/MarkdownPreview.reswrename to src/dev/impl/DevToys/Strings/en-US/MarkdownPreview.reswdiff --git a/src/dev/impl/DevToys/Strings/en/RegEx.resw b/src/dev/impl/DevToys/Strings/en-US/RegEx.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/RegEx.reswrename to src/dev/impl/DevToys/Strings/en-US/RegEx.reswdiff --git a/src/dev/impl/DevToys/Strings/en/Settings.resw b/src/dev/impl/DevToys/Strings/en-US/Settings.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/Settings.reswrename to src/dev/impl/DevToys/Strings/en-US/Settings.reswdiff --git a/src/dev/impl/DevToys/Strings/en/StringUtilities.resw b/src/dev/impl/DevToys/Strings/en-US/StringUtilities.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/StringUtilities.reswrename to src/dev/impl/DevToys/Strings/en-US/StringUtilities.reswdiff --git a/src/dev/impl/DevToys/Strings/en/TextDiff.resw b/src/dev/impl/DevToys/Strings/en-US/TextDiff.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/en/TextDiff.reswrename to src/dev/impl/DevToys/Strings/en-US/TextDiff.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/Base64EncoderDecoder.resw b/src/dev/impl/DevToys/Strings/fr-FR/Base64EncoderDecoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/Base64EncoderDecoder.reswrename to src/dev/impl/DevToys/Strings/fr-FR/Base64EncoderDecoder.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/Common.resw b/src/dev/impl/DevToys/Strings/fr-FR/Common.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/Common.reswrename to src/dev/impl/DevToys/Strings/fr-FR/Common.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/HashGenerator.resw b/src/dev/impl/DevToys/Strings/fr-FR/HashGenerator.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/HashGenerator.reswrename to src/dev/impl/DevToys/Strings/fr-FR/HashGenerator.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/JsonFormatter.resw b/src/dev/impl/DevToys/Strings/fr-FR/JsonFormatter.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/JsonFormatter.reswrename to src/dev/impl/DevToys/Strings/fr-FR/JsonFormatter.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/JsonYaml.resw b/src/dev/impl/DevToys/Strings/fr-FR/JsonYaml.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/JsonYaml.reswrename to src/dev/impl/DevToys/Strings/fr-FR/JsonYaml.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/JwtDecoderEncoder.resw b/src/dev/impl/DevToys/Strings/fr-FR/JwtDecoderEncoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/JwtDecoderEncoder.reswrename to src/dev/impl/DevToys/Strings/fr-FR/JwtDecoderEncoder.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/MainPage.resw b/src/dev/impl/DevToys/Strings/fr-FR/MainPage.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/MainPage.reswrename to src/dev/impl/DevToys/Strings/fr-FR/MainPage.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/MarkdownPreview.resw b/src/dev/impl/DevToys/Strings/fr-FR/MarkdownPreview.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/MarkdownPreview.reswrename to src/dev/impl/DevToys/Strings/fr-FR/MarkdownPreview.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/RegEx.resw b/src/dev/impl/DevToys/Strings/fr-FR/RegEx.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/RegEx.reswrename to src/dev/impl/DevToys/Strings/fr-FR/RegEx.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/Settings.resw b/src/dev/impl/DevToys/Strings/fr-FR/Settings.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/Settings.reswrename to src/dev/impl/DevToys/Strings/fr-FR/Settings.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/StringUtilities.resw b/src/dev/impl/DevToys/Strings/fr-FR/StringUtilities.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/StringUtilities.reswrename to src/dev/impl/DevToys/Strings/fr-FR/StringUtilities.reswdiff --git a/src/dev/impl/DevToys/Strings/fr/TextDiff.resw b/src/dev/impl/DevToys/Strings/fr-FR/TextDiff.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/fr/TextDiff.reswrename to src/dev/impl/DevToys/Strings/fr-FR/TextDiff.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/Base64EncoderDecoder.resw b/src/dev/impl/DevToys/Strings/ru-RU/Base64EncoderDecoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/Base64EncoderDecoder.reswrename to src/dev/impl/DevToys/Strings/ru-RU/Base64EncoderDecoder.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/Common.resw b/src/dev/impl/DevToys/Strings/ru-RU/Common.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/Common.reswrename to src/dev/impl/DevToys/Strings/ru-RU/Common.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/HashGenerator.resw b/src/dev/impl/DevToys/Strings/ru-RU/HashGenerator.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/HashGenerator.reswrename to src/dev/impl/DevToys/Strings/ru-RU/HashGenerator.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/JsonFormatter.resw b/src/dev/impl/DevToys/Strings/ru-RU/JsonFormatter.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/JsonFormatter.reswrename to src/dev/impl/DevToys/Strings/ru-RU/JsonFormatter.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/JsonYaml.resw b/src/dev/impl/DevToys/Strings/ru-RU/JsonYaml.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/JsonYaml.reswrename to src/dev/impl/DevToys/Strings/ru-RU/JsonYaml.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/JwtDecoderEncoder.resw b/src/dev/impl/DevToys/Strings/ru-RU/JwtDecoderEncoder.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/JwtDecoderEncoder.reswrename to src/dev/impl/DevToys/Strings/ru-RU/JwtDecoderEncoder.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/MainPage.resw b/src/dev/impl/DevToys/Strings/ru-RU/MainPage.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/MainPage.reswrename to src/dev/impl/DevToys/Strings/ru-RU/MainPage.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/MarkdownPreview.resw b/src/dev/impl/DevToys/Strings/ru-RU/MarkdownPreview.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/MarkdownPreview.reswrename to src/dev/impl/DevToys/Strings/ru-RU/MarkdownPreview.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/RegEx.resw b/src/dev/impl/DevToys/Strings/ru-RU/RegEx.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/RegEx.reswrename to src/dev/impl/DevToys/Strings/ru-RU/RegEx.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/Settings.resw b/src/dev/impl/DevToys/Strings/ru-RU/Settings.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/Settings.reswrename to src/dev/impl/DevToys/Strings/ru-RU/Settings.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/StringUtilities.resw b/src/dev/impl/DevToys/Strings/ru-RU/StringUtilities.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/StringUtilities.reswrename to src/dev/impl/DevToys/Strings/ru-RU/StringUtilities.reswdiff --git a/src/dev/impl/DevToys/Strings/ru/TextDiff.resw b/src/dev/impl/DevToys/Strings/ru-RU/TextDiff.reswsimilarity index 100%rename from src/dev/impl/DevToys/Strings/ru/TextDiff.reswrename to src/dev/impl/DevToys/Strings/ru-RU/TextDiff.reswdiff --git a/src/dev/impl/DevToys/Views/Tools/Settings/SettingsToolPage.xaml b/src/dev/impl/DevToys/Views/Tools/Settings/SettingsToolPage.xamlindex d2404d7f8..e49f5d261 100644--- a/src/dev/impl/DevToys/Views/Tools/Settings/SettingsToolPage.xaml+++ b/src/dev/impl/DevToys/Views/Tools/Settings/SettingsToolPage.xaml@@ -28,7 +28,7 @@</controls:ExpandableSettingControl.Icon><ComboBoxDisplayMemberPath="DisplayName"- SelectedValuePath="Identifier"+ SelectedValuePath="InternalName"ItemsSource="{x:Bind ViewModel.AvailableLanguages}"SelectedValue="{x:Bind ViewModel.Language, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></ComboBox>diff --git a/src/tests/DevToys.Tests/MefBaseTest.cs b/src/tests/DevToys.Tests/MefBaseTest.csindex bef9965ec..9cf064022 100644--- a/src/tests/DevToys.Tests/MefBaseTest.cs+++ b/src/tests/DevToys.Tests/MefBaseTest.cs@@ -16,7 +16,7 @@ namespace DevToys.Testspublic MefBaseTest(){// Do all the tests in English.- LanguageManager.Instance.SetCurrentCulture(new CultureInfo("en"));+ LanguageManager.Instance.SetCurrentCulture(new LanguageDefinition("en-US"));_mefComposer= new MefComposer(