-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow more localisation in skin editor #30231
Conversation
If you use VSCode and similarly other IDEs, you can use the "quick fix" feature where the raw string is underlined with three dots: Code_I8UCLueMpr.mp4I saw the documenting how to localise discussion. Might get the time to document this for you and others. |
Oh thank you, I knew to use that method to add new strings, but I added them manually for this PR because adding translations to I will add them now and commit. |
What you did is right (putting the strings in |
You would have to change these lines: osu/osu.Game/Skinning/GlobalSkinnableContainerLookup.cs Lines 34 to 36 in 3a8ed88
to use |
Yes, I figured, thank you. I think this is now fine, the only other thing that would be left to do is to localise the |
@@ -31,9 +31,9 @@ public GlobalSkinnableContainerLookup(GlobalSkinnableContainers lookup, RulesetI | |||
|
|||
public override string ToString() | |||
{ | |||
if (Ruleset == null) return Lookup.GetDescription(); | |||
if (Ruleset == null) return Lookup.GetLocalisableDescription().ToString(); |
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.
This will always fallback to English. Unsure how to restructure this to not use ToString()
.
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 will harken back to my ruleset skinning configuration PR which added the target to the ISkinComponentLookup
interface:
I still believe this is a valid path.
Otherwise, expose a Name
property. There were other reasons why I moved Target
into the base interface in my PR, but that would be enough for this one particular use in the interim.
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 just saw this, I don't really know how this would be implemented as I don't fully understand the code flow.
I was planning to open another PR to localise the gameplay overlay (during autoplay and replays), but I will wait for this in case there's the need for GetLocalisableDescription
.
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 think both the special dropdown path from here as well as adding a name property sound fine, but maybe for simplicity let's just revert this specific change for now so that this doesn't get blocked on it?
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'm fine with reverting the dropdown localisation for now. I think of reverting fc1ebfd and 9cd7f2b, as without the former the dropdown entries look confusing (#30231 (comment))
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.
Sure.
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.
Ok, reverted.
This PR allows for more strings in the skin editor to be localised.
As a note, I wanted to localise the dropdown below as well, but the strings it uses come from
Description
attributes which expect a constant, so they cannot be passed aLocalisableString
(or its value), so not sure how to proceed with that.