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

@W-12627096@ Translate en-US and en-GB by default #1574

Merged
merged 11 commits into from
Dec 4, 2023

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Nov 29, 2023

Description

With all of the small changes lately, remembering to extract to en-GB is annoying, when the script only does en-US by default. It's a trivial change to fix it, so I fixed it.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@wjhsf wjhsf requested a review from a team as a code owner November 29, 2023 18:54
alexvuong
alexvuong previously approved these changes Nov 29, 2023

try {
// example usage: node ./scripts/translations/extract-default-messages en-US en-GB
process.argv.slice(2).forEach(extract)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

@wjhsf is this opt-in? E.g. can a customer opt out of the behavior if it's not desired? I see in the package.json change that we are explicit about <command> en-US en-GB so that implies "yes" to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The customer can specify whatever locales they choose, if that's what you're asking about.

Signed-off-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
@wjhsf wjhsf requested review from vmarta and a team December 4, 2023 16:45
Copy link
Collaborator

@bfeister bfeister left a comment

Choose a reason for hiding this comment

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

Assuming it's opt-in (I believe it is from reading the code), LGTM

@wjhsf wjhsf merged commit 32e7827 into develop Dec 4, 2023
20 checks passed
@joeluong-sfcc joeluong-sfcc deleted the wjh/easier-translations branch December 4, 2023 17:16
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.

None yet

4 participants