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

fix(toolkit): language tag check should be case insensitive #7164

Merged

Conversation

charIeszhao
Copy link
Member

Summary

Language tag check should be case insensitive. Our language tags in phrases and phrases-experience are in lowercase, such as pt-br and zh-cn. However, the language tag is case sensitive in toolkit, e.g., pt-BR and zh-CN.

This causes a bug that some language tags that contain regional variation suffixes will not be picked up by the translate CLI, and thus lots of phrases end up untranslated.

Testing

Locally

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@charIeszhao charIeszhao self-assigned this Mar 20, 2025
Copy link

github-actions bot commented Mar 20, 2025

COMPARE TO master

Total Size Diff 📈 +632 Bytes

Diff by File
Name Diff
.changeset/tame-snails-fold.md 📈 +588 Bytes
packages/toolkit/language-kit/src/utility.ts 📈 +78 Bytes
packages/translate/src/prompts.ts 📈 +34 Bytes

@charIeszhao charIeszhao requested a review from gao-sun as a code owner March 20, 2025 10:07
@github-actions github-actions bot added size/s and removed size/xs labels Mar 20, 2025
@charIeszhao charIeszhao enabled auto-merge March 25, 2025 00:36
@charIeszhao charIeszhao disabled auto-merge March 25, 2025 00:37
@charIeszhao charIeszhao enabled auto-merge (squash) March 25, 2025 00:37
@charIeszhao charIeszhao disabled auto-merge March 25, 2025 00:37
@charIeszhao charIeszhao enabled auto-merge (squash) March 25, 2025 00:38
@charIeszhao charIeszhao merged commit 5da01bc into master Mar 25, 2025
35 checks passed
@charIeszhao charIeszhao deleted the charles-language-tag-check-should-be-case-insensitive branch March 25, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants