mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Merge pull request #13572 from bdach/fix-unsupported-locales
Fix game crashes due to attempting localisation load for unsupported locales
This commit is contained in:
commit
b6e07ff59c
@ -86,8 +86,10 @@ namespace osu.Game.Localisation
|
||||
[Description(@"ไทย")]
|
||||
th,
|
||||
|
||||
[Description(@"Tagalog")]
|
||||
tl,
|
||||
// Tagalog has no associated localisations yet, and is not supported on Xamarin platforms or Windows versions <10.
|
||||
// Can be revisited if localisations ever arrive.
|
||||
//[Description(@"Tagalog")]
|
||||
//tl,
|
||||
|
||||
[Description(@"Türkçe")]
|
||||
tr,
|
||||
|
@ -585,7 +585,15 @@ namespace osu.Game
|
||||
foreach (var language in Enum.GetValues(typeof(Language)).OfType<Language>())
|
||||
{
|
||||
var cultureCode = language.ToCultureCode();
|
||||
Localisation.AddLanguage(cultureCode, new ResourceManagerLocalisationStore(cultureCode));
|
||||
|
||||
try
|
||||
{
|
||||
Localisation.AddLanguage(cultureCode, new ResourceManagerLocalisationStore(cultureCode));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex, $"Could not load localisations for language \"{cultureCode}\"");
|
||||
}
|
||||
}
|
||||
|
||||
// The next time this is updated is in UpdateAfterChildren, which occurs too late and results
|
||||
|
Loading…
Reference in New Issue
Block a user