mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
add support for en.json translation files (#976)
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user