mirror of https://github.com/ppy/osu
Don't bail if the underlying localisation resourced is not embedded
This commit is contained in:
parent
60acd824cb
commit
5c8f562472
|
@ -34,7 +34,16 @@ public string Get(string lookup)
|
|||
if (!resourceManagers.TryGetValue(ns, out var manager))
|
||||
resourceManagers[ns] = manager = new ResourceManager(ns, GetType().Assembly);
|
||||
|
||||
return manager.GetString(key, EffectiveCulture);
|
||||
try
|
||||
{
|
||||
return manager.GetString(key, EffectiveCulture);
|
||||
}
|
||||
catch (MissingManifestResourceException)
|
||||
{
|
||||
// in the case the manifest is missing, it is likely that the user is adding code-first implementations of new localisation namespaces.
|
||||
// it's fine to ignore this as localisation will fallback to default values.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Task<string> GetAsync(string lookup)
|
||||
|
|
Loading…
Reference in New Issue