mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 20:47:25 +08: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:
parent
c0e60a0699
commit
72c5c9848f
@ -11,6 +11,7 @@ using System.Linq;
|
||||
using System.Resources;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Development;
|
||||
using osu.Framework.Localisation;
|
||||
|
||||
namespace osu.Game.Localisation
|
||||
@ -65,6 +66,11 @@ namespace osu.Game.Localisation
|
||||
if (manager == 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
|
||||
{
|
||||
return manager.GetString(key, EffectiveCulture);
|
||||
|
Loading…
x
Reference in New Issue
Block a user