mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Always use LocalisableString
fallbacks when deploying debug and viewing english
This allows changes to `xxxStrings.cs` files to immediately reflect in the UI, which is (at least for me) an expectation.
This commit is contained in:
@ -11,6 +11,7 @@ using System.Linq;
|
|||||||
using System.Resources;
|
using System.Resources;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Localisation
|
namespace osu.Game.Localisation
|
||||||
@ -65,6 +66,11 @@ namespace osu.Game.Localisation
|
|||||||
if (manager == null)
|
if (manager == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
// When running a debug build and in viewing english culture, use the fallbacks rather than osu-resources baked strings.
|
||||||
|
// This is what a developer expects to see when making changes to `xxxStrings.cs` files.
|
||||||
|
if (DebugUtils.IsDebugBuild && EffectiveCulture.Name == @"en")
|
||||||
|
return null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return manager.GetString(key, EffectiveCulture);
|
return manager.GetString(key, EffectiveCulture);
|
||||||
|
Reference in New Issue
Block a user