-
Notifications
You must be signed in to change notification settings - Fork 965
Fix detection of Google Chrome Beta/Dev as default browsers (in non-English locales) #17414
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
Conversation
8500e02
to
e224254
Compare
cc40f59
to
efbff8a
Compare
script/chromium-rebase-l10n.py
Outdated
'IDS_SHORTCUT_NAME_BETA': 'IDS_BRAVE_SHORTCUT_NAME_BETA', | ||
'IDS_SHORTCUT_NAME_DEV': 'IDS_BRAVE_SHORTCUT_NAME_DEV' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we name them IDS_CHROME_SHORTCUT_NAME_BETA/DEV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
script/chromium-rebase-l10n.py
Outdated
transformed_content = etree.tostring(xml_tree, | ||
pretty_print=True, | ||
xml_declaration=True, | ||
encoding='UTF-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everywhere else with XTBs we use
xtb_content = (b'\n' + lxml.etree.tostring(xtb_tree, pretty_print=True, xml_declaration=False, encoding='utf-8')
We should probably do the same here so the xml declaration doesn't get changed all the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks xtb because inserts empty line at top also removes declaration on the first line, it doesnt look correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the Github formatting hid the actual code:
xtb_content = (b'<?xml version="1.0" ?>\n' + lxml.etree.tostring(xtb_tree, pretty_print=True, xml_declaration=False, encoding='utf-8')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works, done, thanks
Unfortunately, this currently causes a problem with pulling translations from Transifex due to extra items in the GRD. I am looking into how to fix it. |
I think this should fix pulling: efebe82, please feel free to cherry-pick. |
done |
-Removes google_chrome_strings additions to brave_strings on the fly to pull l10n correctly. -Readds google_chrome_strings additional translations to XTBs. (cherry picked from commit efebe82)
c8f5851
to
e258da9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves brave/brave-browser#28717
Chrome Beta and Dev have translated default browser identifiers and they are living inside
google_chrome_strings.grd
as discussed with @mkarolin added code tobrave/script/chromium-rebase-l10n.py
to pull strings fromgoogle_chrome_strings.grd
and adding them tobrave_strings.grd
with a modified IDS_, then pulling the translations fromgoogle_chrome_strings_*.xtb
and adding them tobrave_strings_*.xtb
with a new matching id attribute.Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: