Skip to content

I18n#11382

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

I18n#11382
ErshovDmitry wants to merge 51 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.
…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.
ErshovDmitry and others added 23 commits May 22, 2026 12:12
…pply_block_metadata_update, BlockWorkingDirectoryUpdated
…tdev#11611)

Closes warpdotdev#11497

## Summary
- Keep vertical-tab unread activity dots backed by notification state
even when in-app notification UI is hidden.
- Stop the configurable header toolbar from changing
`show_agent_notifications` when the Notifications mailbox button is
removed.
- Add unit coverage for notification unread tracking while in-app
notifications are disabled.

https://www.loom.com/share/c29bc7267e1b468d849feff52dfc3aea

## Validation
- `cargo fmt`
- `cargo test -p warp
ai::agent_management::agent_management_model::tests --lib`
- `cargo clippy -p warp --lib --tests -- -D warnings`

---------

Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: Zach Lloyd <zachlloyd@users.noreply.github.com>
## Summary
When a remote SSH session disconnects while a code editor or file
notebook pane is open, the pane silently becomes stale — save fails,
auto-reload stops, and there is no visual indication. This PR adds a
disconnection banner and save guard.

## Changes
- **Disconnection banner** — Shows "Remote host disconnected. You will
not be able to see updates and save changes." above the editor/notebook
content when the remote host loses connection. The banner auto-dismisses
on reconnection.
- **Save guard** — `save_local()` immediately returns
`ImmediateSaveError::RemoteDisconnected` when the host is disconnected,
with a specific toast message ("Cannot save — remote session
disconnected.").
- **On-the-fly state derivation** — No stored boolean;
`is_remote_disconnected()` checks
`RemoteServerManager::client_for_host()` each render, so it is always in
sync.
- **File notebook support** — `FileNotebookView` subscribes to
`HostDisconnected`/`HostConnected` events to trigger re-renders.
- **Loaded-only gating** — Banner only appears if the file was
successfully loaded; error/loading states handle the "never loaded"
case.

## Files Changed
- `app/src/code/mod.rs` — Added `ImmediateSaveError::RemoteDisconnected`
variant
- `app/src/code/local_code_editor.rs` — `is_remote_disconnected()`, save
guard, render banner, `render_remote_disconnected_banner()`
- `app/src/code/view.rs` — Specific toast + error handling for
`RemoteDisconnected`
- `app/src/notebooks/file/mod.rs` — `is_remote_disconnected()`, render
banner, subscribe to `RemoteServerManager` events

## Conversation

https://staging.warp.dev/conversation/bab4762c-633a-40a3-9258-4a0752b608e1

## Plan
https://staging.warp.dev/drive/notebook/VqsXi9GmQ7EW1TnCJ9jlOp

## Demo
https://www.loom.com/share/f0bab2f11c4047609bf1b318827af0ec
- Category headers (Subshells, SSH) and subtitles
- Placeholders (command/host) using existing YAML keys
- Dropdown options (SSH extension install modes)
- Page title + description + 'Learn more' link
- Toggle labels (Warpify SSH Sessions, Install SSH ext, Use Tmux)
- Build input list labels (Added/Denylisted commands, hosts)
- 4 new YAML keys: ssh_session_detection, ssh_extension.*
…key parity

Prevents drift: if a key is added to en.yml but forgotten in ru.yml
(or vice versa), the test fails with an explicit list of missing keys.
…nd_references_action

The flat string 'Find references' and the mapping {single, multiple, loading}
were both at code.find_references — YAML kept only the mapping, losing
the context menu string. Renamed the flat key to avoid collision.
…y overlaps

Catches bugs like code.find_references being both a flat string and a
mapping, where the string is silently overwritten by YAML parser.
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.

3 participants