Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Merge main into German translation

KnifeLemon769e522e7e84
diff --cc src/Filee.App/Services/LocalizationService.cs
index 2f8b5a36,50ab77c1..809f650f
--- a/src/Filee.App/Services/LocalizationService.cs
+++ b/src/Filee.App/Services/LocalizationService.cs
@@@ -106,8 -106,8 +106,10 @@@ public sealed class LocalizationServic
return Languages.First(l => l.Code.Equals(setting, StringComparison.OrdinalIgnoreCase)).Code;
var ui = osLanguage();
+ if (ui.Equals("de", StringComparison.OrdinalIgnoreCase) || ui.StartsWith("de-", StringComparison.OrdinalIgnoreCase))
+ return "de";
+ if (AppLanguages.PortugueseVariant(ui) is { } portuguese)
+ return portuguese;
if (ui.Equals("tr", StringComparison.OrdinalIgnoreCase) || ui.StartsWith("tr-", StringComparison.OrdinalIgnoreCase))
return "tr";
if (ui.StartsWith("ja", StringComparison.OrdinalIgnoreCase))
diff --cc src/Filee.Setup/SetupOptions.cs
index 0204139f,bf55be80..21ce8f6e
--- a/src/Filee.Setup/SetupOptions.cs
+++ b/src/Filee.Setup/SetupOptions.cs
@@@ -10,7 -10,7 +10,7 @@@
// /NOCLOSEAPPLICATIONS don't force-close programs that still run from the install folder after "Filee --quit"
// /DIR="folder" install folder (environment variables are expanded)
// /LANG=ko language of Setup (and of a newly installed Filee): en, es, ja, ko, zh-CN (Inno: zhcn),
- // zh-TW, pl, hi, ru, ar, pt-BR, fr, ne, th, tr, de
-// zh-TW, pl, hi, ru, ar, pt-PT, pt-BR, fr, ne, th, tr
++// zh-TW, pl, hi, ru, ar, pt-PT, pt-BR, fr, ne, th, tr, de
// /TASKS="a,b" exactly these options; /MERGETASKS="a,!b" changes the defaults. "!" unticks, "*" ticks
// the children too. Names: contextmenu, contextmenu\top, startup, cli, desktopicon
// /NOICONS no Start menu and desktop shortcuts
diff --cc tests/Filee.Setup.Tests/SetupTextsTests.cs
index 702069f4,6cec4ecb..7abf0ff6
--- a/tests/Filee.Setup.Tests/SetupTextsTests.cs
+++ b/tests/Filee.Setup.Tests/SetupTextsTests.cs
@@@ -64,12 -64,26 +64,30 @@@ public partial class SetupTextsTest
[InlineData(null, "ne-NP", "ne")]
[InlineData(null, "th-TH", "th")]
[InlineData(null, "ja-JP", "ja")]
- [InlineData("xx", "de-DE", "en")]
+ [InlineData("xx", "de-DE", "de")]
+ [InlineData("de", "en-US", "de")]
+ [InlineData("auto", "de-AT", "de")]
+ [InlineData("auto", "de-CH", "de")]
+ [InlineData("xx", "it-IT", "en")]
[InlineData("klingon", "pl-PL", "pl")]
+ [InlineData("auto", "pt-BR", "pt-BR")]
+ [InlineData("auto", "pt-PT", "pt-PT")]
+ [InlineData("auto", "pt-Latn-BR", "pt-BR")]
+ [InlineData("auto", "pt_BR", "pt-BR")]
+ [InlineData("auto", "pt-PT-x-br", "pt-PT")]
+ [InlineData("auto", "pt-x-br", "pt-PT")]
+ [InlineData("auto", "pt-Latn-PT-x-br", "pt-PT")]
+ [InlineData("auto", "pt-PT-u-ca-gregory-x-br", "pt-PT")]
+ [InlineData("auto", "pt-BR-x-pt", "pt-BR")]
+ [InlineData("auto", "pt-Latn-BR-u-ca-gregory", "pt-BR")]
+ [InlineData("auto", "pt-u-rg-brzzzz", "pt-PT")]
+ [InlineData("auto", "pt", "pt-PT")]
+ [InlineData("auto", "pt-AO", "pt-PT")]
+ [InlineData("pt-PT", "pt-BR", "pt-PT")]
+ [InlineData("PT-br", "pt-PT", "pt-BR")]
+ [InlineData("pt_BR", "en-US", "pt-BR")]
+ [InlineData("ptbr", "en-US", "pt-BR")]
+ [InlineData("ptpt", "en-US", "pt-PT")]
public void Languages_resolve_like_the_app_and_like_inno_setup(string? setting, string windows, string expected) =>
Assert.Equal(expected, SetupTexts.Resolve(setting, () => windows));