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

Conversation

SebastianLF
Copy link

@SebastianLF SebastianLF commented Aug 23, 2021

Resolves this issue: brave/brave-browser#17377
Modify New Private window to New private window on menu for Windows and Linux.

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@@ -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 :)

@bsclifton
Copy link
Member

Thanks again for the attempt @SebastianLF - apologies for the complexity we ran into! But at least I was able to update the issue with more details and also I was able to update wiki capturing how the _override.grd files are created 😄

@bsclifton bsclifton closed this Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants