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

[Android] Fix for branding in browser_ui component strings #26458

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

samartnik
Copy link
Contributor

@samartnik samartnik commented Nov 8, 2024

Resolves brave/brave-browser#42168

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • 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 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:

@samartnik samartnik added this to the 1.75.x - Nightly milestone Nov 8, 2024
@samartnik samartnik self-assigned this Nov 8, 2024
@samartnik samartnik requested review from a team as code owners November 8, 2024 20:51
<message name="IDS_PAGE_INFO_AD_PRIVACY_HEADER" desc="A label that represents the new ad-related settings. 1) Navigate to any site. 2) Click the icon (often a lock) to the left of the URL in the address bar. Information about the page you're viewing appears. The 'Ad privacy' label will appear above the 'Site settings' button.">
Ad privacy
</message>
<message name="IDS_PAGE_INFO_AD_PRIVACY_TOPICS_DESCRIPTION" desc="1 of 3 possible descriptions a user might see when they choose 'Ad privacy' from page info for a specific site. 1) Navigate to any site. 2) Click the icon (often a lock) to the left of the URL in the address bar. Information about the page you're viewing appears. The 'Ad privacy' label will appear above the 'Site settings' button. 3) Click on Ad privacy. This string describes the case that the site being viewed uses the Ad topics setting. What's the Ad topics setting? When on, Brave will estimate the user's topics of interest based on their recent browsing history and then show up to 3 of those topics with a site so that the site can better personalize ads (a privacy-preserving way to replicate some of the functionality of third-party cookies). In this case, we're informing the user that this site uses the Ad topics API and we're showing the user the ad topics Brave has shared with the site. A button 'Manage ad privacy' allows the user to turn 'Ad privacy' settings on/off or to block specific ad topics.">
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines 277 to 279
if grd_file_name == 'site_settings.grdp':
return os.path.join(src_root, 'components', 'browser_ui', 'strings',
'android', 'site_settings.grdp')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need to add grdp files here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right this one is not required, pushed the change without it

@samartnik samartnik force-pushed the android_browser_ui_strings_fix branch from d2a64d0 to 538b167 Compare November 11, 2024 14:42
Copy link
Contributor

[puLL-Merge] - brave/brave-core@26458

Description

This PR adds support for the browser_ui_strings.grd file in the build system and introduces new string resources for the Android browser UI. It also includes some overrides for existing strings.

Changes

Changes

  1. In build/commands/lib/l10nUtil.js:

    • Added paths for androidBrowserUiStringsPath and braveAndroidBrowserUiStringsPath
    • Updated getAutoGeneratedGrdMappings() to include the new browser UI strings
  2. Added new file components/browser_ui/strings/android/browser_ui_strings.grd:

    • Contains a large set of new string resources for various UI elements and settings in the Android browser
  3. Added new file components/browser_ui/strings/android/browser_ui_strings_override.grd:

    • Contains overrides for some existing string resources
  4. Added new file components/browser_ui/strings/android/site_settings.grdp:

    • Contains string resources specific to site settings
  5. Added new file components/browser_ui/strings/android/site_settings_override.grdp:

    • Contains overrides for some existing site settings string resources
  6. Updated script/lib/l10n/grd_utils.py:

    • Added support for browser_ui_strings.grd in the get_original_grd() function

Possible Issues

No major issues identified. However, careful testing should be done to ensure all new strings are properly integrated and displayed in the Android UI.

Security Hotspots

No significant security concerns identified in this change. The modifications are primarily related to string resources and build system updates.

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.

++

@samartnik samartnik merged commit ce42903 into master Nov 11, 2024
17 checks passed
@samartnik samartnik deleted the android_browser_ui_strings_fix branch November 11, 2024 18:07
@brave-builds
Copy link
Collaborator

Released in v1.75.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clear cookie data menu shows "Chrome" instead of "Brave" when 3p cookies are allowed
8 participants