Skip to content

Code Quality: Improved display of plural strings in Status Center #17300

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

Merged
merged 2 commits into from
Jul 24, 2025

Conversation

SilverGreen93
Copy link
Contributor

@SilverGreen93 SilverGreen93 commented Jul 23, 2025

Changes

Update Status Center strings to include plural forms for item(s) and font(s).
Use the GetLocalizedFormatResource instead of GetLocalizedResource and move the headerString and subHeaderString initialization to each corresponding case.
Also removed the redundant if (headerString is not null) checks, as the string cannot be null at that point.

Resolved / Related Issues

Steps used to test these changes

Tested the changed strings in file operations.

image

@yaira2
Copy link
Member

yaira2 commented Jul 23, 2025

This looks very good. Did you confirm that each operation state is displaying correctly? This status center is prone to crashing if a string is configured wrong 🙂

Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

As far as it shows well, lgtm. Code wise lgtm.

@SilverGreen93
Copy link
Contributor Author

This looks very good. Did you confirm that each operation state is displaying correctly? This status center is prone to crashing if a string is configured wrong 🙂

Tested all except for failure cases. They all seem to work.

@yaira2 yaira2 merged commit 80c9b43 into files-community:main Jul 24, 2025
6 checks passed
@yaira2
Copy link
Member

yaira2 commented Jul 24, 2025

@SilverGreen93 thank you!

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Jul 24, 2025
@SilverGreen93 SilverGreen93 deleted the mihai_plural_status branch July 24, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: No plural forms in Status Center actions
3 participants