Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Changed share l10n string to use a generic template for each share menu items. #12445

Merged
merged 2 commits into from
Jan 2, 2018

Conversation

sergio-rojasa
Copy link

Fix #8604

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

  1. Build from the source: npm run watch
  2. Run Brave: npm run start
  3. In the URL bar type: https://www.brave.com/
  4. On the menu bar click on File.
  5. Under File look for Share.
  6. Under Share click on one item with share page.

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

return {
label: locale.translation(l10nId),
label: locale.translation(l10nId).replace(/{{\s*siteName\s*}}/, siteName),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this one to locale.translation(l10nId, {siteName: siteName})? We already have a mechanism for variables in the translations.

Copy link
Author

@sergio-rojasa sergio-rojasa Dec 30, 2017

Choose a reason for hiding this comment

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

I tried your suggestion and I tried other way using ${locale.translation(l10nId)} ${siteName} but it also didn't work. when I lookup locale.translation, I found out that it only accepted one argument.

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure that I follow, this change is not working for you?

Copy link
Author

Choose a reason for hiding this comment

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

The change is not working for me.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, let me try it

Copy link
Contributor

Choose a reason for hiding this comment

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

ok I see what's going on, will fix it, so that this will work as well

Copy link
Contributor

Choose a reason for hiding this comment

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

@sergiorojasa ok this should be working now, can you please check out if everything is ok now? I pushed my fix commit to your PR

Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

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

++ thank you for this 👍

@NejcZdovc NejcZdovc added this to the 0.22.x (Nightly Channel) milestone Dec 31, 2017
Copy link
Collaborator

@srirambv srirambv left a comment

Choose a reason for hiding this comment

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

++ Manually test looks good. 👍

@bsclifton bsclifton merged commit 36ab754 into brave:master Jan 2, 2018
@bsclifton
Copy link
Member

@sergiorojasa congrats on your first merged PR! 😄 👍 Thanks!

@sergio-rojasa sergio-rojasa deleted the fixedCleanupShareL10nStrings branch January 11, 2018 18:03
@bbondy bbondy modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants