Skip to content

[SPEC] Incremental i18n and Simplified Chinese with Fluent - #14403

Open
buxiao02 wants to merge 2 commits into
warpdotdev:masterfrom
buxiao02:buxiao02/i18n-fluent-spec
Open

[SPEC] Incremental i18n and Simplified Chinese with Fluent#14403
buxiao02 wants to merge 2 commits into
warpdotdev:masterfrom
buxiao02:buxiao02/i18n-fluent-spec

Conversation

@buxiao02

@buxiao02 buxiao02 commented Jul 28, 2026

Copy link
Copy Markdown

Description

Adds product and technical specs for an incremental internationalization foundation, with Simplified Chinese (zh-CN) as the first additional locale.

The proposal uses Fluent instead of a custom YAML message format and deliberately limits the initial implementation to a small, low-risk set of UI surfaces. It directly addresses the maintainer questions in #10928: prior art, pluralization and interpolation, ongoing maintenance and enforcement, dynamic strings, developer friction, and implementation blast radius.

The proposed language choice is manual under Settings > Appearance. English remains the default and fallback language. Product and technical terms such as Warp, Warp Drive, Agent, Token, Workflow, MCP, API, CLI, Shell, and Block remain in English.

This PR is spec-only and does not change runtime behavior.

Linked Issue

Closes #10928

Related: #1194, #14397, #10990

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Screenshots or video are not applicable because this PR changes specs only.

Testing

  • ./script/format --check
  • cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings
  • cargo clippy -p warp --all-targets --tests -- -D warnings
  • cargo clippy -p warp_completer --all-targets --tests -- -D warnings
  • Markdown whitespace validation for both new spec files

No runtime behavior changed, so manual GUI testing is not applicable.

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Not applicable for a spec-only PR.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot

cla-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @buxiao02 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jul 28, 2026
@buxiao02

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jul 28, 2026
@cla-bot

cla-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@buxiao02
buxiao02 marked this pull request as ready for review July 28, 2026 09:02
@oz-for-oss

oz-for-oss Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@buxiao02

Every PR must be linked to a same-repo issue before Oz can review it.

Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-spec when it is ready. Once it is marked, comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

oz-for-oss[bot]
oz-for-oss Bot previously requested changes Jul 28, 2026

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@buxiao02

Every PR must be linked to a same-repo issue before Oz can review it.

Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-spec when it is ready. Once it is marked, comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@buxiao02

Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss

oz-for-oss Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@buxiao02

I'm re-reviewing this spec-only pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This spec PR proposes an incremental Fluent-based localization foundation, with Simplified Chinese as the first additional locale and a deliberately bounded phase-one surface area. The product and technical specs cover the major architecture choices, rollout constraints, validation plan, and several security-conscious boundaries such as embedded trusted resources and plain-text-only localized copy.

Concerns

  • The runtime fallback behavior does not define the final outcome when canonical English also cannot format because caller-provided Fluent arguments are missing or invalid.
  • Localization diagnostics should explicitly avoid logging dynamic argument values, since those values may include user, path, repository, command, or server-provided content.

Security

  • The security review found one logging hardening gap around rate-limited formatting diagnostics.

Verdict

Found: 0 critical, 1 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH10928/tech.md
Resolution is per message:

1. Format the selected-locale message.
2. If it is missing or produces a formatting error, record a rate-limited

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] The selected-locale formatting fallback stops at formatting canonical English, but the spec does not define behavior when canonical English also fails due to missing or invalid FluentArgs. Add required behavior and tests for this path so dynamic/plural messages still never render empty text, raw IDs, or unresolved Fluent placeholders.

Comment thread specs/GH10928/tech.md
Resolution is per message:

1. Format the selected-locale message.
2. If it is missing or produces a formatting error, record a rate-limited

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 [SUGGESTION] [SECURITY] The rate-limited diagnostic should explicitly avoid logging FluentArgs values because they may contain usernames, paths, repository names, commands, or server content; log only locale, message ID, and error category.

@buxiao02

Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss

oz-for-oss Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@buxiao02

I'm re-reviewing this spec-only pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @peicodes.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss
oz-for-oss Bot dismissed their stale review July 28, 2026 09:16

Oz no longer requests changes for this pull request after the latest automated review.

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This spec proposes an incremental i18n foundation using Fluent, with Simplified Chinese as the first additional locale and a deliberately bounded initial UI slice. The product and technical specs cover fallback behavior, device-local language selection, protected terminology, plain-text resource constraints, build/test validation, rollout, and follow-up migration strategy.

Concerns

No blocking completeness, clarity, feasibility, issue-alignment, or design-level security concerns were found in the attached spec diff. The spec keeps authentication, billing, sharing, permissions, and Agent consent/action surfaces in English until each surface receives separate translation and security review, and it avoids loading arbitrary production locale files from disk.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[i18n][Tracking Issue] Add Simplified Chinese (zh-CN) locale support

1 participant