-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change most ruleset-accessible string types to Localisable strings #19695
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8cb2e11
Change most ruleset-accessible string types to Localisable strings
naoei 60dae70
Change mod description type to `LocalisableString`
naoei 1e356f6
Revert localisation for `GetDisplayNameForHitResult`
naoei 6e13cf8
Don't render statistic header if display string is null
naoei 3e38bac
Change ruleset mod description types
naoei a42b809
Change message type osu resume overlay
naoei 7cbe2fa
Enable localisation for `SettingSourceAttribute`
naoei 18ce784
Allow StatisticItem's name param to be nullable
naoei 45e9eda
Localise hit result name
naoei 784ce4d
Add test coverage for localisable setting source
naoei c940f5a
Merge branch 'master' into ruleset-localization
naoei d06959e
Update incorrect xmldoc
bdach 189a407
Merge branch 'master' into ruleset-localization
naoei 9386d35
Make StatisticItem.Name not nullable
naoei 29ef1c8
Check if StatisticItem.Name is null or empty
naoei d199b3b
Update `GetVariantName` to also support localisation
peppy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
using osu.Game.Rulesets.Mods; | ||
|
||
namespace osu.Game.Rulesets.Catch.Mods | ||
{ | ||
public class CatchModEasy : ModEasyWithExtraLives | ||
{ | ||
public override string Description => @"Larger fruits, more forgiving HP drain, less accuracy required, and three lives!"; | ||
public override LocalisableString Description => @"Larger fruits, more forgiving HP drain, less accuracy required, and three lives!"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
using osu.Game.Rulesets.Mods; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModEasy : ModEasyWithExtraLives | ||
{ | ||
public override string Description => @"More forgiving HP drain, less accuracy required, and three lives!"; | ||
public override LocalisableString Description => @"More forgiving HP drain, less accuracy required, and three lives!"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey1 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 1; | ||
public override string Name => "One Key"; | ||
public override string Acronym => "1K"; | ||
public override string Description => @"Play with one key."; | ||
public override LocalisableString Description => @"Play with one key."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey10 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 10; | ||
public override string Name => "Ten Keys"; | ||
public override string Acronym => "10K"; | ||
public override string Description => @"Play with ten keys."; | ||
public override LocalisableString Description => @"Play with ten keys."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey2 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 2; | ||
public override string Name => "Two Keys"; | ||
public override string Acronym => "2K"; | ||
public override string Description => @"Play with two keys."; | ||
public override LocalisableString Description => @"Play with two keys."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey3 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 3; | ||
public override string Name => "Three Keys"; | ||
public override string Acronym => "3K"; | ||
public override string Description => @"Play with three keys."; | ||
public override LocalisableString Description => @"Play with three keys."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey4 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 4; | ||
public override string Name => "Four Keys"; | ||
public override string Acronym => "4K"; | ||
public override string Description => @"Play with four keys."; | ||
public override LocalisableString Description => @"Play with four keys."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey5 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 5; | ||
public override string Name => "Five Keys"; | ||
public override string Acronym => "5K"; | ||
public override string Description => @"Play with five keys."; | ||
public override LocalisableString Description => @"Play with five keys."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey6 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 6; | ||
public override string Name => "Six Keys"; | ||
public override string Acronym => "6K"; | ||
public override string Description => @"Play with six keys."; | ||
public override LocalisableString Description => @"Play with six keys."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Rulesets.Mania.Mods | ||
{ | ||
public class ManiaModKey7 : ManiaKeyMod | ||
{ | ||
public override int KeyCount => 7; | ||
public override string Name => "Seven Keys"; | ||
public override string Acronym => "7K"; | ||
public override string Description => @"Play with seven keys."; | ||
public override LocalisableString Description => @"Play with seven keys."; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the reason why mod names aren't also being localised here is their widespread usage, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. I can change it into a localisable string if preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not in this diff. There are many concerns to figure out with regard to that, including but not limited to how to share translations with web, or how to adapt several dependent projects like osu-tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the issue there? I think we can still reference osu.Resources from the rulesets.
I think if we're going to break
Description
, we should also breakName
, otherwise we'll end up breaking rulesets twice over: https://github.com/taulazer/tau/blob/master/osu.Game.Rulesets.Tau/Mods/TauModDual.csThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should be localising mod names. They historically haven't been, as they are treated as proper nouns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you can transliterate proper nouns, as is done in Korean: https://osu.ppy.sh/wiki/ko/Gameplay/Game_modifier/Double_Time (lit. deobeul taim). I'm also seeing whisperings on the Japanese net about ハードロック and ダブルタイム.
Are you sure you want to keep these as latin characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a valid direction, but we need to decide and make sure everyone is on board with it. That shouldn't be in the PR, as I think there will be diverging opinions on it.
Currently they aren't translated in stable (or osu-web to my knowledge).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough.