mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix usage of culture local ToUpper causing incorrect display on Turkish machines
Closes #3098.
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
@ -23,7 +24,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
if (value == status) return;
|
if (value == status) return;
|
||||||
status = value;
|
status = value;
|
||||||
|
|
||||||
statusText.Text = Enum.GetName(typeof(BeatmapSetOnlineStatus), Status)?.ToUpper();
|
statusText.Text = Enum.GetName(typeof(BeatmapSetOnlineStatus), Status)?.ToUpper(CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -30,7 +31,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
public string Header
|
public string Header
|
||||||
{
|
{
|
||||||
get { return header.Text; }
|
get { return header.Text; }
|
||||||
set { header.Text = value.ToUpper(); }
|
set { header.Text = value.ToUpper(CultureInfo.InvariantCulture); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Channel> Channels
|
public IEnumerable<Channel> Channels
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -62,7 +63,7 @@ namespace osu.Game.Overlays.MedalSplash
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Text = "Medal Unlocked".ToUpper(),
|
Text = "Medal Unlocked".ToUpper(CultureInfo.InvariantCulture),
|
||||||
TextSize = 24,
|
TextSize = 24,
|
||||||
Font = @"Exo2.0-Light",
|
Font = @"Exo2.0-Light",
|
||||||
Alpha = 0f,
|
Alpha = 0f,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
@ -55,7 +56,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
title = value;
|
title = value;
|
||||||
if (titleText != null) titleText.Text = title.ToUpper();
|
if (titleText != null) titleText.Text = title.ToUpper(CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
{
|
{
|
||||||
titleText = new OsuSpriteText
|
titleText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = title.ToUpper(),
|
Text = title.ToUpper(CultureInfo.InvariantCulture),
|
||||||
Font = @"Exo2.0-Black",
|
Font = @"Exo2.0-Black",
|
||||||
},
|
},
|
||||||
countText = new OsuSpriteText
|
countText = new OsuSpriteText
|
||||||
@ -154,7 +155,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
public string Text
|
public string Text
|
||||||
{
|
{
|
||||||
get { return text.Text; }
|
get { return text.Text; }
|
||||||
set { text.Text = value.ToUpper(); }
|
set { text.Text = value.ToUpper(CultureInfo.InvariantCulture); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Configuration.Tracking;
|
using osu.Framework.Configuration.Tracking;
|
||||||
@ -176,9 +177,9 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
textLine1.Text = description.Name.ToUpper();
|
textLine1.Text = description.Name.ToUpper(CultureInfo.InvariantCulture);
|
||||||
textLine2.Text = description.Value;
|
textLine2.Text = description.Value;
|
||||||
textLine3.Text = description.Shortcut.ToUpper();
|
textLine3.Text = description.Shortcut.ToUpper(CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(textLine3.Text))
|
if (string.IsNullOrEmpty(textLine3.Text))
|
||||||
textLine3.Text = "NO KEY BOUND";
|
textLine3.Text = "NO KEY BOUND";
|
||||||
|
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = Header.ToUpper(),
|
Text = Header.ToUpper(CultureInfo.InvariantCulture),
|
||||||
Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS },
|
Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS },
|
||||||
Font = @"Exo2.0-Black",
|
Font = @"Exo2.0-Black",
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Globalization;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
@ -51,7 +52,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
|
|
||||||
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
|
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = Judgement.Result.GetDescription().ToUpper(),
|
Text = Judgement.Result.GetDescription().ToUpper(CultureInfo.InvariantCulture),
|
||||||
Font = @"Venera",
|
Font = @"Venera",
|
||||||
Colour = judgementColour(Judgement.Result),
|
Colour = judgementColour(Judgement.Result),
|
||||||
Scale = new Vector2(0.85f, 1),
|
Scale = new Vector2(0.85f, 1),
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Globalization;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -28,7 +29,7 @@ namespace osu.Game.Screens.Play.Break
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Text = "current progress".ToUpper(),
|
Text = "current progress".ToUpper(CultureInfo.InvariantCulture),
|
||||||
TextSize = 15,
|
TextSize = 15,
|
||||||
Font = "Exo2.0-Black",
|
Font = "Exo2.0-Black",
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Globalization;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -94,7 +95,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
{
|
{
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Text = Title.ToUpper(),
|
Text = Title.ToUpper(CultureInfo.InvariantCulture),
|
||||||
TextSize = 17,
|
TextSize = 17,
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
Margin = new MarginPadding { Left = 10 },
|
Margin = new MarginPadding { Left = 10 },
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -323,7 +324,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
if (string.IsNullOrEmpty(line))
|
if (string.IsNullOrEmpty(line))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (line.ToUpper().StartsWith("GROUP"))
|
if (line.ToUpper(CultureInfo.InvariantCulture).StartsWith("GROUP"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// ReSharper disable once AccessToModifiedClosure
|
// ReSharper disable once AccessToModifiedClosure
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -51,7 +52,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
|
|
||||||
Position = new Vector2(0, 7f),
|
Position = new Vector2(0, 7f),
|
||||||
|
|
||||||
Text = $"GROUP {name.ToUpper()}",
|
Text = $"GROUP {name.ToUpper(CultureInfo.InvariantCulture)}",
|
||||||
TextSize = 8f,
|
TextSize = 8f,
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
Colour = new Color4(255, 204, 34, 255),
|
Colour = new Color4(255, 204, 34, 255),
|
||||||
@ -161,7 +162,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
|
||||||
Text = team.Acronym.ToUpper(),
|
Text = team.Acronym.ToUpper(CultureInfo.InvariantCulture),
|
||||||
TextSize = 10f,
|
TextSize = 10f,
|
||||||
Font = @"Exo2.0-Bold"
|
Font = @"Exo2.0-Bold"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user