Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion installer/macos/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key><string>en</string>
<key>CFBundleLocalizations</key><array><string>en</string><string>ko</string><string>zh-Hans</string><string>zh-Hant</string><string>pt-PT</string><string>pt-BR</string><string>de</string><string>it</string><string>id</string><string>vi</string><string>fa</string></array>
<key>CFBundleLocalizations</key><array><string>en</string><string>mn</string><string>ko</string><string>zh-Hans</string><string>zh-Hant</string><string>pt-PT</string><string>pt-BR</string><string>de</string><string>it</string><string>id</string><string>vi</string><string>fa</string></array>
<key>CFBundleIdentifier</key><string>com.filee.app</string>
<key>CFBundleName</key><string>Filee</string>
<key>CFBundleDisplayName</key><string>Filee</string>
Expand Down
2 changes: 2 additions & 0 deletions installer/macos/mn.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"NSAppleEventsUsageDescription" = "Filee хөрвүүлэх товчлол ашиглах үед Finder-д сонгосон файлуудыг уншина.";
"NSInputMonitoringUsageDescription" = "Filee хөрвүүлэх цэсийг харуулахын тулд товчлол болон чирэх үйлдлийг танина.";
1 change: 1 addition & 0 deletions installer/macos/mn.lproj/ServicesMenu.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"Convert with Filee" = "Filee-ээр хөрвүүлэх";
1,829 changes: 1,829 additions & 0 deletions src/Filee.App/Assets/i18n/mn.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Filee.App/Services/AppLanguages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ internal static class AppLanguages
("id", "Bahasa Indonesia"),
("vi", "Tiếng Việt"),
("bn-BD", "বাংলা (বাংলাদেশ)"),
("mn", "Монгол"),
];

/// <summary>Shared Portuguese region policy for the app and Setup, including legacy Inno language codes.</summary>
Expand Down
5 changes: 5 additions & 0 deletions src/Filee.App/Services/LocalizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ internal static string Resolve(string setting, Func<string> osLanguage)
return Languages.First(l => l.Code.Equals(setting, StringComparison.OrdinalIgnoreCase)).Code;

var ui = osLanguage();
// Mongolian in Cyrillic ("mn", "mn-MN", "mn-Cyrl"); the traditional script ("mn-Mong", Inner Mongolia) reads
// differently, so it keeps the fallback.
if (ui.Equals("mn", StringComparison.OrdinalIgnoreCase)
|| ui.StartsWith("mn-", StringComparison.OrdinalIgnoreCase) && !ui.Contains("Mong", StringComparison.OrdinalIgnoreCase))
return "mn";
if (ui.Equals("de", StringComparison.OrdinalIgnoreCase) || ui.StartsWith("de-", StringComparison.OrdinalIgnoreCase))
return "de";
// "it" and every region ("it-IT", "it-CH", …), but not Itelmen "itl".
Expand Down
2 changes: 1 addition & 1 deletion src/Filee.Setup/SetupOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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-PT, pt-BR, fr, ne, th, tr, de, it, id, vi, fa, bn-BD
// zh-TW, pl, hi, ru, ar, pt-PT, pt-BR, fr, ne, th, tr, de, it, id, vi, fa, bn-BD, mn
// /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
Expand Down
5 changes: 5 additions & 0 deletions tests/Filee.App.Tests/LocalizationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ public void Russian_is_offered_under_its_own_name()
[InlineData("zh-Hant-HK", "zh-TW")]
[InlineData("zh-MO", "zh-TW")]
[InlineData("fr-FR", "fr")]
[InlineData("mn", "mn")]
[InlineData("mn-MN", "mn")]
[InlineData("mn-Cyrl-MN", "mn")]
[InlineData("mn-Mong-CN", "en")] // the traditional script isn't this Cyrillic translation
[InlineData("mni", "en")]
[InlineData("fr-CA", "fr")]
[InlineData("frr-DE", "en")]
[InlineData("ne-NP", "ne")]
Expand Down
3 changes: 3 additions & 0 deletions tests/Filee.Setup.Tests/SetupTextsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public void Setup_offers_every_language_filee_has()

[Theory]
[InlineData("tr", "en-US", "tr")]
[InlineData("mn", "en-US", "mn")]
[InlineData("auto", "mn-MN", "mn")]
[InlineData(null, "mni", "en")]
[InlineData("TR", "en-US", "tr")]
[InlineData("auto", "tr-TR", "tr")]
[InlineData(null, "tr-CY", "tr")]
Expand Down