mirror of
https://github.com/osukey/osukey.git
synced 2025-06-19 02:07:55 +09: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(@"ไทย")]
|
[Description(@"ไทย")]
|
||||||
th,
|
th,
|
||||||
|
|
||||||
[Description(@"Tagalog")]
|
// Tagalog has no associated localisations yet, and is not supported on Xamarin platforms or Windows versions <10.
|
||||||
tl,
|
// Can be revisited if localisations ever arrive.
|
||||||
|
//[Description(@"Tagalog")]
|
||||||
|
//tl,
|
||||||
|
|
||||||
[Description(@"Türkçe")]
|
[Description(@"Türkçe")]
|
||||||
tr,
|
tr,
|
||||||
|
@ -585,8 +585,16 @@ namespace osu.Game
|
|||||||
foreach (var language in Enum.GetValues(typeof(Language)).OfType<Language>())
|
foreach (var language in Enum.GetValues(typeof(Language)).OfType<Language>())
|
||||||
{
|
{
|
||||||
var cultureCode = language.ToCultureCode();
|
var cultureCode = language.ToCultureCode();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
Localisation.AddLanguage(cultureCode, new ResourceManagerLocalisationStore(cultureCode));
|
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
|
// The next time this is updated is in UpdateAfterChildren, which occurs too late and results
|
||||||
// in the cursor being shown for a few frames during the intro.
|
// in the cursor being shown for a few frames during the intro.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user