Skip to content

File selector localisation and root dir name change#36352

Closed
linusgenz wants to merge 1 commit intoppy:masterfrom
linusgenz:36340-root-dir-localization-and-name-change
Closed

File selector localisation and root dir name change#36352
linusgenz wants to merge 1 commit intoppy:masterfrom
linusgenz:36340-root-dir-localization-and-name-change

Conversation

@linusgenz
Copy link
Copy Markdown
Contributor

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.

image

Signed-off-by: Linus Genz <linuslinuxgenz@gmail.com>
public OsuBreadcrumbDisplayComputer()
: base(null, "Computer")
public OsuBreadcrumbDisplayDevice()
: base(null, UserInterfaceStrings.Device.ToString())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using ToString() will always return English. The parameter would need to be changed to LocalisableString, and that requires osu!framework changes.

Copy link
Copy Markdown
Contributor Author

@linusgenz linusgenz Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Joehuu Joehuu added the area:localisation Deals with localisation and regional display issues. label Jan 15, 2026
@peppy peppy closed this in #36371 Jan 29, 2026
pull bot pushed a commit to Alexa-RR/osu that referenced this pull request Jan 29, 2026
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:localisation Deals with localisation and regional display issues. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor: file selector's root directory name still display "Computer" on mobile devices

2 participants