File selector localisation and root dir name change#36352
File selector localisation and root dir name change#36352linusgenz wants to merge 1 commit intoppy:masterfrom
Conversation
Signed-off-by: Linus Genz <linuslinuxgenz@gmail.com>
| public OsuBreadcrumbDisplayComputer() | ||
| : base(null, "Computer") | ||
| public OsuBreadcrumbDisplayDevice() | ||
| : base(null, UserInterfaceStrings.Device.ToString()) |
There was a problem hiding this comment.
Using ToString() will always return English. The parameter would need to be changed to LocalisableString, and that requires osu!framework changes.
There was a problem hiding this comment.
It feelt akward to use ToString, but I thought changing the parameter type to LocalisableString does not make sense either, because directory names do not need to be translated either. I guess thats the reason why its not localised.. Should I just remove the localisation on "Device" so this can get approved or how should we proceed here?
There was a problem hiding this comment.
Removing it for now would be easiest, yes.
But eventually it would have to be localised, as you've wanted.
Another way is changing the return type of CreateRootDirectoryItem() to a separate drawable class, and copy-pasting the drawable styling and essentials of the directory item. But that would break existing framework consumers using the directory selector.
- depends on ppy/osu-framework#6700 - closes ppy#36340 - supersedes and closes ppy#36352 <img width="676" height="451" alt="image" src="https://github.com/user-attachments/assets/4f11c761-175b-495a-8b24-16fb6c481a15" /> --------- Co-authored-by: Dean Herbert <pe@ppy.sh>
Resolves #36340
As discussed in this issue, the root name is now localisable and has been changed from ‘Computer’ to ‘Device’. The ‘Show hidden’ option in the file selection field is now localisable as well.
I added the strings to UserInterfaceStrings.cs because I didn't think it was necessary to create a new file for two strings, especially since there are no other strings in the file selector interface that could potentially be added.