Skip to content

Commit 3d94bb3

Browse files
committed
i18n: sync with upstream master + restore i18n infrastructure
- Sync with origin/master (28 commits behind) - Restore i18n crate, menu_label(), init_locale() - Re-apply menu_label() to ai_page, features_page, agent_management, workspace/view, workspace/mod, local_code_editor - Convert 11 const strings to fn() -> &'static str for runtime i18n - Add 4 menu_label tests in app/src/lib.rs - 0 errors, 0 warnings (cargo check -p warp) - 11/11 tests pass (cargo test -p i18n)
1 parent ce73fe0 commit 3d94bb3

310 files changed

Lines changed: 18894 additions & 5219 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/promote-feature/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub const PREVIEW_FLAGS: &[FeatureFlag] = &[
8181
### Validate
8282

8383
```bash
84-
cargo fmt
84+
./script/format
8585
cargo clippy --workspace --all-targets --all-features --tests -- -D warnings
8686
```
8787

.agents/skills/remove-feature-flag/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ After removing the flag:
116116

117117
```bash
118118
# Format and lint
119-
cargo fmt
119+
./script/format
120120
cargo clippy --workspace --all-targets --all-features --tests -- -D warnings
121121

122122
# Run tests

.agents/skills/rust-unit-tests/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ cargo test --doc
106106
## Linting and formatting
107107
Run before submitting changes:
108108
```bash
109-
cargo fmt
109+
./script/format
110110
cargo clippy --workspace --all-targets --all-features --tests -- -D warnings
111111
```
112112

.github/workflows/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,9 @@ jobs:
613613
run:
614614
cargo metadata --locked --format-version=1 > ${{ matrix.null_device }} || (echo "::error::Cargo.lock is out-of-date with Cargo.toml. Run 'cargo check' to update." && exit 1)
615615

616-
- name: Run cargo fmt
617-
run: cargo fmt --check
616+
- name: Run ./script/format
617+
shell: bash
618+
run: ./script/format --check
618619

619620
- name: Run cargo clippy
620621
shell: bash
@@ -724,8 +725,15 @@ jobs:
724725
run:
725726
cargo metadata --locked --format-version=1 >/dev/null || (echo "::error::Cargo.lock is out-of-date with Cargo.toml. Run 'cargo check' to update." && exit 1)
726727

727-
- name: Run cargo fmt
728-
run: cargo fmt --check
728+
- name: Check Rust formatting
729+
shell: bash
730+
run: |
731+
# TODO(vorporeal): Once people have gotten used to ./script/format, in a week or so,
732+
# we can have CI enforce the new formatting.
733+
#./script/format --check
734+
735+
# Until then, we'll keep running the traditional formatting check.
736+
cargo fmt --check
729737
730738
- name: Run cargo clippy
731739
run: |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Run unit tests with `cargo nextest run`.
171171

172172
## Code Style
173173

174-
- `cargo fmt` and `cargo clippy --workspace --all-targets --all-features --tests -- -D warnings` must pass.
174+
- `./script/format --check` and `cargo clippy --workspace --all-targets --all-features --tests -- -D warnings` must pass.
175175
- Prefer imports over path qualifiers, inline format args (`println!("{x}")`), and exhaustive `match` over `_` wildcards.
176176
- See [WARP.md](WARP.md) for the full style guide, including WarpUI patterns and terminal model locking rules.
177177

Cargo.lock

Lines changed: 51 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ channel_versions = { path = "crates/channel_versions", default-features = false
3737
command = { path = "crates/command" }
3838
command-signatures-v2 = { path = "crates/command-signatures-v2" }
3939
cloud_objects = { path = "crates/cloud_objects" }
40+
cloud_object_client = { path = "crates/cloud_object_client" }
41+
cloud_object_models = { path = "crates/cloud_object_models" }
4042
computer_use = { path = "crates/computer_use" }
4143
field_mask = { path = "crates/field_mask" }
4244
firebase = { path = "crates/firebase" }
@@ -197,6 +199,7 @@ openh264 = "0.8"
197199
static_assertions = "1.1.0"
198200
url = "2.5.4"
199201
urlocator = "0.1.4"
202+
mockall = "0.13.1"
200203
objc = "0.2"
201204
objc2 = "0.6.3"
202205
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["NSScreen", "objc2-core-foundation"] }

FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ No. Contributing by hand or with your own agent is free. Oz runs on Warp's credi
8080

8181
### Are agent-generated PRs held to the same bar as human ones?
8282

83-
Yes. The same Oz + SME review, the same tests, and the same `cargo fmt` / `cargo clippy` / presubmit checks apply regardless of who (or what) wrote the code. Whether a PR is hand-written or agent-written doesn't change the quality bar — it changes how quickly you can iterate to meet it.
83+
Yes. The same Oz + SME review, the same tests, and the same `./script/format` / `cargo clippy` / presubmit checks apply regardless of who (or what) wrote the code. Whether a PR is hand-written or agent-written doesn't change the quality bar — it changes how quickly you can iterate to meet it.
8484

8585
### Will my issues, comments, or code be used to train models?
8686

WARP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Environment variables:
3131

3232
### Linting and Formatting
3333
- `./script/presubmit` - Run all presubmit checks (fmt, clippy, tests)
34-
- `cargo fmt` - Format code
34+
- `./script/format` - Format code
3535
- `cargo clippy --workspace --all-targets --all-features --tests -- -D warnings` - Run clippy
3636
- `./script/run-clang-format.py -r --extensions 'c,h,cpp,m' ./crates/warpui/src/ ./app/src/` - Format C/C++/Obj-C code
3737
- `find . -name "*.wgsl" -exec wgslfmt --check {} +` - Check WGSL shader formatting
@@ -129,9 +129,9 @@ This is a Rust-based terminal emulator with a custom UI framework called **WarpU
129129
```
130130

131131
**Pull Request Workflow**:
132-
- **ALWAYS** run cargo fmt and cargo clippy (the versions specified in ./script/presubmit) before opening a PR or pushing updates to an existing PR branch
132+
- **ALWAYS** run `./script/format` and `cargo clippy` (the versions specified in ./script/presubmit) before opening a PR or pushing updates to an existing PR branch
133133
- Those commands must pass completely before creating or updating a pull request
134-
- Specifically, ensure `cargo fmt` and `cargo clippy` checks pass
134+
- Specifically, ensure `./script/format` and `cargo clippy` checks pass
135135
- If they fail, fix all issues before proceeding with the PR
136136
- This applies to:
137137
- Opening new pull requests

app/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ cfg-if.workspace = true
8181
channel_versions.workspace = true
8282
chrono.workspace = true
8383
clap.workspace = true
84+
cloud_object_client.workspace = true
85+
cloud_object_models.workspace = true
8486
cloud_objects.workspace = true
8587
command = { workspace = true }
8688
command-corrections.workspace = true
@@ -412,8 +414,9 @@ jsonschema = { workspace = true, default-features = false }
412414
async-executor = "1.5.1"
413415
command = { workspace = true, features = ["test-util"] }
414416
ctor = "0.1.18"
417+
cloud_object_client = { workspace = true, features = ["test-util"] }
415418
http_client = { workspace = true, features = ["test-util"] }
416-
mockall = "0.13.1"
419+
mockall.workspace = true
417420
mockito.workspace = true
418421
serial_test = "0.8.0"
419422
sum_tree = { workspace = true, features = ["test-util"] }
@@ -814,6 +817,7 @@ voice_input = ["dep:voice_input"]
814817
system_theme = []
815818
tab_close_button_on_left = []
816819
team_features_override = []
820+
test-util = ["cloud_object_client/test-util"]
817821
team_workflows = ["team_features_override"]
818822
toggle_bootstrap_block = []
819823
# Feature enabled only when app is compiled for integration tests.

0 commit comments

Comments
 (0)