Skip to content

I18n#11382

Open
ErshovDmitry wants to merge 28 commits into
warpdotdev:masterfrom
ErshovDmitry:i18n
Open

I18n#11382
ErshovDmitry wants to merge 28 commits into
warpdotdev:masterfrom
ErshovDmitry:i18n

Conversation

@ErshovDmitry
Copy link
Copy Markdown

Hello! My name is Dmitry.

I've been using Warp and love it. I wanted to add i18n support so the terminal could speak Russian (and other languages in the future). I'm not a developer myself — this was built with DeepSeek AI, but I reviewed everything personally.

I'd much rather this live in the official repo than a fork. If the team is interested in i18n, I'm happy to help however I can — and I'll gladly delete my fork once upstreamed.

Cheers,
Dmitry


What

Adds i18n (internationalization) support to Warp.

Changes

New crate: warp_i18n

  • t!() macro for translating UI strings
  • current_locale() / set_current_locale() for runtime language switching
  • init_from_json() for WASM compatibility
  • Build script for compile-time key validation
  • 21 tests

Feature flag

  • FeatureFlag::I18n in DOGFOOD_FLAGS

Settings

  • Locale enum (En, Ru)
  • Language dropdown in Settings → Appearance
  • Auto-detect system locale on first run

Migrated UI

  • 10 top-level menu labels
  • 14 settings section names
  • 11 settings category labels

Locales

  • en.json — 51 keys (mandatory fallback)
  • ru.json — 51 keys (Russian translation)

Built with DeepSeek AI — human-reviewed, all tests pass (cargo check --workspace, cargo test -p warp_i18n).

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 20, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Dmitry.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 20, 2026

@ErshovDmitry

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: none

  • Required readiness label: ready-to-implement

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 20, 2026
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

@ErshovDmitry

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: none

  • Required readiness label: ready-to-implement

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@ErshovDmitry
Copy link
Copy Markdown
Author

Oh wow — I just noticed there are already several i18n PRs open (#10630, #10990, #9458, #9922). I should have checked first before opening mine. My apologies for the noise!

That said, I see none of them include Russian yet. If the team settles on one i18n approach (looks like #10630 / #10990 is the leading one?), I'd be happy to contribute Russian translations to that effort instead.

I'll close this PR if it's just adding clutter — just let me know.

Cheers,
Dmitry

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 20, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Dmitry.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

2 similar comments
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 20, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Dmitry.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 20, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Dmitry.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@ErshovDmitry
Copy link
Copy Markdown
Author

Update:** I've rewritten this PR to match @ZacharyZcR's YAML approach from #10630 / #10990:

The Russian ru.yml should be a drop-in addition to the framework once it's approved. Happy to rebase onto whichever PR lands first.

Dmitry

@ErshovDmitry
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 20, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 20, 2026

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

@ErshovDmitry
Copy link
Copy Markdown
Author

@oss-maintainers This PR now follows the same YAML-based approach as #10630 / #10990 by @ZacharyZcR — matching crates/i18n/ API, resources/bundled/locales/{en,ru}.yml, t!() / t_required!() macros, and WARP_LANG env var detection.

It's blocked by the issue-state enforcement check (needs a ready-to-implement issue). Could a maintainer please add ready-to-implement to #1194, or let me know if I should create a separate tracking issue?

Russian ru.yml (247 keys) is ready to drop into whichever i18n PR lands first. Happy to rebase.

Cheers,
Dmitry

@ZacharyZcR
Copy link
Copy Markdown

Hello! Maybe we can collaborate on a project! You can reach out to the Warp Slack channel.

@ErshovDmitry
Copy link
Copy Markdown
Author

@ZacharyZcR Thanks for reaching out! Happy to collaborate. We've matched your YAML approach — crates/i18n/, t!()/t_required!() macros, resources/bundled/locales/{en,ru}.yml (1080 keys, full Russian translation). Our ru.yml should be a drop-in addition.

We have some merge conflicts with master to fix first (3 files). Will resolve those and update the PR.

How can we help with #10630? Happy to contribute Russian translations in your format, or collaborate however makes sense.

Cheers,
Dmitry

@ZacharyZcR
Copy link
Copy Markdown

@ZacharyZcR Thanks for reaching out! Happy to collaborate. We've matched your YAML approach — crates/i18n/, t!()/t_required!() macros, resources/bundled/locales/{en,ru}.yml (1080 keys, full Russian translation). Our ru.yml should be a drop-in addition.

We have some merge conflicts with master to fix first (3 files). Will resolve those and update the PR.

How can we help with #10630? Happy to contribute Russian translations in your format, or collaborate however makes sense.

Cheers, Dmitry

Thank you very much! Perhaps we could reach out to Warp’s Slack channel together and let them decide how to proceed with development. Also, your PR needs to be linked to an issue with a specific tag; you can take a look at my PR and issue.

@ErshovDmitry
Copy link
Copy Markdown
Author

@ZacharyZcR Just to clarify — I don't speak English myself, I'm communicating through DeepSeek AI (which also built this PR). So I'm a bit nervous about posting in the Slack channel directly — I don't want to say something wrong.

If you could mention me (@ErshovDmitry) in the #oss-contributors Slack channel, I'd be happy to help! My AI assistant can handle the technical discussion, just need someone to bridge the intro.

Also — merge conflicts with master are now resolved. PR is clean: 0 warnings, 1191 i18n calls, 59 files covered.

Cheers,
Dmitry (via DeepSeek)

@ErshovDmitry
Copy link
Copy Markdown
Author

Ah, just realized — Slack doesn't work in Russia, and VPN isn't straightforward either. So I won't be able to join the Slack channel, sorry about that.

But I'm still here on GitHub and happy to collaborate! We can discuss anything here or on the PRs directly.

Dmitry (via DeepSeek)

@ZacharyZcR
Copy link
Copy Markdown

Ah, just realized — Slack doesn't work in Russia, and VPN isn't straightforward either. So I won't be able to join the Slack channel, sorry about that.

But I'm still here on GitHub and happy to collaborate! We can discuss anything here or on the PRs directly.

Dmitry (via DeepSeek)

Oh, no problem—I’m not an English major either.

- Replace warp_i18n (JSON) with i18n (YAML) crate matching warpdotdev#10630 API
- Locale files: resources/bundled/locales/{en,ru}.yml (247 keys each)
- t!() and t_required!() macros, TranslationLookup enum
- WARP_LANG → system locale → en fallback
- Remove FeatureFlag gating, LocaleSettings UI, I18N_READY guard
- Remove locale dropdown from settings
- 9 unit tests pass
C1: Replace all 23+ hardcoded English strings in app_menus.rs with
    crate::menu_label() calls, including debug-only menu item constants
    replaced at point-of-use (cannot call fn in const context).

I1: Fix inconsistent capitalization in YAML locale files:
    'Disable in-band generators' → 'Disable In-band Generators'.

I2: Fix dock_menu() — both 'New Window' labels now use menu_label.

W1: Rewrite menu_label() in lib.rs to use i18n::TranslationLookup
    instead of string comparison, avoiding edge case where translation
    coincidentally equals the lookup key.

W2: Add comment in set_locale() noting zh-CN locale file not yet shipped.

W3: Add 'Reserved for security-sensitive UI per i18n spec' comment on
    t_required! macro.
…nu_label()

- keybindings.rs: replace SEARCH_PLACEHOLDER, button text constants,
  and inline strings with crate::menu_label() calls
- features_page.rs: replace category labels, EXTRA_META_KEYS_*_TEXT,
  FixedBinding descriptions, QuakeMode pin positions,
  NewTabPlacement labels, Active Screen, and other inline strings
- keybindings_page.rs: update external reference to search_placeholder()
- appearance_page.rs, mod.rs: pre-existing i18n changes on branch
- en.yml, ru.yml: add settings.keybindings.*, settings.features.*,
  settings.category.*, and common.* translation keys
Replace hardcoded English strings in ai_page.rs with menu_label() calls
for section headers, toggle labels, dropdown options, button labels,
descriptions, placeholder text, and other user-visible text.

Affected widgets: ActiveAI, Agents, AIInput, MCPServers, AIFact,
Voice, OtherAI, CLIAgent, AgentAttribution, CloudAgentComputerUse,
CloudHandoff, ApiKeys, AwsBedrock.

Add ~50 new keys to en.yml and ru.yml (settings.ai.*).
- code_review_view.rs: ~119 user-facing strings converted to crate::menu_label()
  - Constants (View changes, diffs messages) → functions with i18n lookup
  - Button labels (Commit, Push, Publish, Create PR, etc.)
  - Toast messages (Comments sent, Diff removed, etc.)
  - Dialog titles/descriptions (Discard changes, etc.)
  - Menu items (Add diff set, Add comment, Discard all, Stash changes)
  - Placeholder/error state text (Loading, Error loading diffs, etc.)
- notebooks/editor/view.rs: ~136 user-facing strings
  - Tooltips (Copy link, Edit, Open file/folder)
  - Toast message (Link copied)
  - Button labels (Open in Warp)
- en.yml + ru.yml: added codereview.* and notebook.* sections
  - 43 new i18n keys with English + Russian translations
- display_chip.rs: updated CODE_REVIEW_TOOLTIP_TEXT const → fn call
- cargo check -p warp: passes (pre-existing errors in tab.rs, workspace/view.rs unrelated)
- Replace user-visible strings with crate::menu_label(key, fallback)
- Add translation keys to en.yml and ru.yml
- Fix pre-existing borrow/move errors in tab.rs and workspace/view.rs
- Add common keys to en.yml and ru.yml: copy, create, dismiss, done, edit,
  open, remove, restore, retry, search, send, undo, update, add, untitled
- Add dialog section keys: dont_save, close_pane, close_tab, close_tabs,
  close_window, quit_warp, save_changes
- Add auth section: log_out_title, log_out_confirm, show_running_processes,
  paste_token_placeholder, auth_token_placeholder, link_sso
- Add agent section: cloud_setup, notifications, footer, rewind, allow/refine/
  take_over/take_control, add/edit/delete rule/profile, and more
- Add code section: reject, accept_and_save, discard_this_version, overwrite,
  goto_line_placeholder, previous, next, select_all, replace_all, comment
- Add launch_configs, drive, notebook, settings, codereview keys
- Internationalize ModalButton::for_app in auth/mod.rs and quit_warning/mod.rs
- Internationalize ActionButton::new across agent, code, settings views
- Internationalize with_text_label calls across codebase
- Internationalize set_placeholder_text calls across codebase
- All strings use crate::menu_label(key, fallback) pattern

cargo check -p warp: passes
- Replace ~50 hardcoded English strings with crate::menu_label()
- Cover: placeholder texts, toast messages, ToastLink texts,
  tooltip strings, banner headings/descriptions/buttons,
  fallback titles, and misc UI strings
- Add 22 new keys to en.yml + ru.yml under workspace.*
- Fix key name mismatches to align with existing YAML entries
- Remove unused const SESSION_CONFIG_TAB_CONFIG_CHIP_TEXT
- Fix pre-existing type errors in terminal/view.rs for
  attempt_login_gated_feature (requires &'static str)
…, toasts

Add 88 YAML keys under terminal.* namespace for user-visible strings:
- terminal.notifications.* (discovery banners, permissions, error states)
- terminal.context_menu.* (all right-click/context menu items)
- terminal.tooltip.* (block filter, bookmark, scroll tooltips)
- terminal.block.* (show init block, more info links)
- terminal.shell.* (bootstrap slow, incompatible config banners)
- terminal.a11y.* (accessibility strings)
- terminal.agent.* (execute plan, fork from query)
- terminal.environment.* (cloud env creation)
- terminal.project.* (setup, file picker)
- terminal.skills.* (bundled skills, editing errors)

All keys use crate::menu_label(key, fallback) pattern.
Both en.yml and ru.yml updated with translations.
…ctions

6 duplicate keys silently shadowed by later occurrences (YAML last-key-wins).
Removed dead first-occurrence blocks: 5 in appearance, 1 in settings.features.
…shared_blocks

11 shared_blocks keys were incorrectly nested under settings.warpify.
Moved to their correct parent settings.shared_blocks.
…late remaining strings

Root cause: settings.warpify was a top-level YAML key (not nested under settings),
so all its children resolved as settings.warpify.* instead of settings.*.
Code looked up settings.warp_drive, YAML had settings.warpify.warp_drive → fallback to English.

Changes:
- Removed misplaced 'settings.warpify:' section header, children now correct at settings.* level
- Added 2 missing keys: agent.filter.personal, settings.code_page.code
- Translated 5 remaining untranslated strings (pull_request, aurora, push, oad_title, copyright)
- Fixed & before menu_label() in ai_page.rs
- Added .settings_schema_cache.json to .gitignore
- Updated AGENTS.md with AppImage build instructions

All 1055 menu_label() keys now present in en.yml.
cargo check -p warp: 0 warnings. cargo test -p i18n: 9/9 pass.
…atibility issues

- Added menu_label() calls for 37 hardcoded English strings across 18 files
  (zero_state blocks, conversation list, usage stats, notifications,
   resource center, MCP servers list, teams page, skills, SSH uploads, search)
- Added 37 new keys to en.yml and ru.yml with Russian translations
- Fixed 3 en.yml values to match ZacharyZcR/i18n-zh-cn canonical English
- Updated corresponding hardcoded fallbacks in Rust code
- Updated AGENTS.md with ZacharyZcR compatibility rules

cargo check -p warp: 0 warnings. cargo test -p i18n: 9/9 pass.
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.

2 participants