add support for en.json translation files (#976)

This commit is contained in:
Jesse Plamondon-Willard
2025-05-19 17:45:36 -04:00
parent a30c0f666d
commit c7d4b88fd3
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -6,6 +6,9 @@
* Improved content load performance for non-English players.
* Fixed some community shortcuts breaking if a mod edited the map which contains them.
* For mod authors:
* You can now have an `en.json` translation file which overrides `default.json`.
* For the web UI:
* Improved JSON parser:
* You can now hover/click braces to highlight matching pairs.
+4
View File
@@ -165,6 +165,10 @@ internal class Translator
/// <param name="locale">The locale for which to find valid locales.</param>
private IEnumerable<string> GetRelevantLocales(string locale)
{
// special case: the game's locale code for English is an empty string, but we still want to allow 'en' as a locale
if (locale == string.Empty)
locale = "en";
// given locale
yield return locale;