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

Option to provide non translated strings in a fallback locale #1659

Merged

Conversation

thebigrick
Copy link
Contributor

What/Why?

If a new string is added, the translation must be available in any language. If not, the dotted path notation will be displayed in its place. I introduced the capability of using a fallback language for the missing strings.

Testing

  • Add a new string to the messages/en.json file
  • Reference the string from any component
  • Switch to a locale different from en
  • The string should appear in English
  • Add the string to the correct locale
  • The string should appear in the correct locale

@thebigrick thebigrick requested a review from a team as a code owner November 19, 2024 11:08
Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: cc35708

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 19, 2024

@thebigrick is attempting to deploy a commit to the BigCommerce Platform Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview Nov 19, 2024 7:57pm

.env.example Outdated Show resolved Hide resolved
core/i18n/request.ts Show resolved Hide resolved
@deini
Copy link
Member

deini commented Nov 20, 2024

Looks good, can we add a changeset please?

@thebigrick
Copy link
Contributor Author

Looks good, can we add a changeset please?

I just provided one. I opted for a minor change rather than a patch since I do not consider the previous behavior a bug.
Is this correct?

@chanceaclark chanceaclark changed the base branch from main to external-pr November 21, 2024 17:31
@chanceaclark chanceaclark merged commit f4a94b5 into bigcommerce:external-pr Nov 21, 2024
0 of 5 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Nov 21, 2024
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.

5 participants