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

Fix error message: Brave needs Windows 10, not 7/8 #17234

Merged
merged 5 commits into from
Feb 17, 2023

Conversation

mherrmann
Copy link
Collaborator

Resolves brave/brave-browser#28511

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
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • 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 wiki
    • npm run lint, npm run presubmit wiki, 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:

Please see brave/brave-browser#28511.

@mherrmann mherrmann self-assigned this Feb 15, 2023
@mherrmann
Copy link
Collaborator Author

The PR seems to work. I'm now getting this instead of "requires Windows 7" on Windows 7:

image

@mherrmann
Copy link
Collaborator Author

mherrmann commented Feb 16, 2023

@mkarolin: @goodov said I should ask you for a review here. I hand-edited the files. @goodov pointed out that the header in brave_strings.grd says that the file should not be hand-edited. I did try npm run chromium_rebase_l10n but upstream still has "Windows 7" instead of "Windows 10" in those strings. Can you advise what the right approach is?

@emerick
Copy link
Contributor

emerick commented Feb 16, 2023

@mherrmann I think that brave_generated_resources.grd is the correct file to use.

https://github.com/brave/brave-browser/wiki/Strings-and-Localization may help to explain it a little.

@mherrmann
Copy link
Collaborator Author

@emerick thank you for the comment. Would you please explain in a little more detail? I could trial & error various approaches for hours but feel like you might be able to give the answer in minutes. Do I just add my override for IDS_INSTALL_OS_NOT_SUPPORTED to brave_generated_resources.grd? Running chromium_rebase_l10n after that seems to have no (visible) effect. It almost feels like adding the following to chromium-rebase-l10n.py is appropriate:

elem1 = xml_tree.xpath(
        '//message[@name="IDS_INSTALL_OS_NOT_SUPPORTED"]')[0]
elem1.text = elem1.text.replace('Windows 7', 'Windows 10')

@mkarolin
Copy link
Collaborator

@mherrmann typically with strings we'd use our own strings file (such as brave_generated_resources.grd as @emerick suggested) and then use chromium_src overrides to replace the IDS_ where the string is used. But in this case such an approach might not be the best because the string is used in python scripts to create installer and they'd have to get patched.
I think your suggestion to change chromium-rebase-l10n.py would work the best here.

One thing to note though, since you change the message content the translations id attribute won't match any more. With the new content the id should be 4378573854226202617 instead of 95624393026532554, I believe. Might be best to test this with a non-English version of the installer.

@mherrmann mherrmann force-pushed the update-win-7-8-compatibility-error-message branch from d8aa68f to 18fc0b6 Compare February 16, 2023 14:41
@mherrmann
Copy link
Collaborator Author

Thank you @mkarolin, I'll follow the approach you suggested.

This fixes `npm run presubmit`.
@mherrmann
Copy link
Collaborator Author

Still works and brave_strings.grd is now correctly produced by chromium-rebase-l10n.py.

image

@mkarolin can I ask for your review?

@mherrmann
Copy link
Collaborator Author

Nevermind @mkarolin, I still need to fix it for other languages. Sorry. Please hold off with the review.

Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

LGTM

@mherrmann
Copy link
Collaborator Author

Yup, works for other languages as well now. Thank you for the guidance @emerick @mkarolin !

image

@mherrmann mherrmann merged commit ea62951 into master Feb 17, 2023
@mherrmann mherrmann deleted the update-win-7-8-compatibility-error-message branch February 17, 2023 07:54
@github-actions github-actions bot added this to the 1.50.x - Nightly milestone Feb 17, 2023
@mherrmann
Copy link
Collaborator Author

@kjozwiak should this be uplifted?

@kjozwiak
Copy link
Member

@kjozwiak should this be uplifted?

Apologies for the late response. Just seeing this now, lets get it uplifted into 1.49.x 👍 Mind creating the uplift?

@mherrmann
Copy link
Collaborator Author

No problem; I'm on PTO this week and could only create the uplift next week, unfortunately.

@kjozwiak
Copy link
Member

kjozwiak commented Mar 2, 2023

No problem; I'm on PTO this week and could only create the uplift next week, unfortunately.

no worries 👍 We can leave this in either 1.50.x or can get it uplifted into the 1.49.x maintenance release which is scheduled for March 22, 2023 as per https://github.com/brave/brave-browser/wiki/Brave-Release-Schedule#release-channel-dates.

@kjozwiak
Copy link
Member

kjozwiak commented Mar 8, 2023

Verification PASSED on Win 8.1 x64 & Win 8.1 x86 using the following STR/Cases:

Using https://github.com/brave/brave-browser/releases/tag/v1.51.13, downloaded both BraveBrowserStandaloneNightlySetup.exe and BraveBrowserStandaloneNightlySetup32.exe and ensured the correct message was appearing via the modal. Also ensured that the strings were translated by spot checking two locales.

BraveBrowserStandaloneNightlySetup.exe

Example Example
Screenshot 2023-03-06 at 3 36 58 PM Screenshot 2023-03-06 at 4 05 50 PM

BraveBrowserStandaloneNightlySetup32.exe

Example Example
Screenshot 2023-03-07 at 10 12 49 PM Screenshot 2023-03-07 at 10 23 15 PM

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.

Installer warning mentions Win 7 or higher rather than the expected Win 10 or higher for C110
5 participants