Skip to content
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

modify title case for win and linux on menu #9821

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/generated_resources_override.grd
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ are declared in tools/grit/grit_rule.gni.
<if expr="is_macosx">
</if>
<if expr="is_win or desktop_linux">
<message name="IDS_NEW_INCOGNITO_WINDOW" desc="The text label of a menu item for opening a new Private window">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sadly, this will not work. _override.grd files are auto-generated by running npm run rebase_chromium_l10n. The strings in the _override files are based on automatic generic substitutions that are mapped in https://github.com/brave/brave-core/blob/master/script/lib/grd_string_replacements.py
There is no mapping for Incognito -> private (maybe it's safe to add one if we adjust regex to make sure it's not the first word in the phrase? cc: @bsclifton). Barring that, I think the best option for this is to add a new string into app/brave_generated_resources.grd and then replace IDS_NEW_INCOGNITO_WINDOW with our string ID in code via a chromium_src override.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for clarification @mkarolin 😄 I updated https://github.com/brave/brave-browser/wiki/Strings-and-Localization#chromium-strings to capture that detail (I had forgotten myself where the _override.grd comes from - just remembering I had asked here a while back brave/brave-browser#17377 (comment))

I like the suggestion of using a chromium_src override (versus trying to hack regex). This unfortunately takes it out of the good first issue category

Copy link
Author

Choose a reason for hiding this comment

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

I'll let you take it from here :)

New &amp;private window
</message>
</if>
<if expr="not is_android">
</if>
Expand Down