(MAINT) Always rebuild for updated translations - #1711
Open
Mikey Lombardi (He/Him) (michaeltlombardi) wants to merge 1 commit into
Open
(MAINT) Always rebuild for updated translations#1711Mikey Lombardi (He/Him) (michaeltlombardi) wants to merge 1 commit into
Mikey Lombardi (He/Him) (michaeltlombardi) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Mikey Lombardi (He/Him) (michaeltlombardi)
September 8, 2026 15:46
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are low-risk and consistently ensure translation updates trigger rebuilds, with only a minor consistency tweak suggested for one build-script directive prefix.
Pull request overview
This PR improves the Rust i18n developer experience by ensuring crates with locales/ trigger rebuilds when translation files change, so updated translations are picked up immediately (including during unit/integration test workflows).
Changes:
- Added minimal
build.rsscripts to multiple crates to emitcargo:rerun-if-changed=locales. - Updated existing build scripts to also watch
locales/(e.g.,resources/registry,lib/dsc-lib-jsonschema,dsc-bicep-ext). - Standardized rebuild triggers around translation updates across the repo’s Rust crates that ship translations.
File summaries
| File | Description |
|---|---|
| xtask/build.rs | Adds a build script that reruns when xtask/locales/ changes. |
| resources/WindowsUpdate/build.rs | Adds a build script that reruns when locales/ changes. |
| resources/windows_service/build.rs | Adds a build script that reruns when locales/ changes. |
| resources/windows_firewall/build.rs | Adds a build script that reruns when locales/ changes. |
| resources/sshdconfig/build.rs | Adds a build script that reruns when locales/ changes. |
| resources/runcommandonset/build.rs | Adds a build script that reruns when locales/ changes. |
| resources/registry/build.rs | Extends existing build script to rerun when locales/ changes. |
| resources/dscecho/build.rs | Adds a build script that reruns when locales/ changes. |
| resources/dism_dsc/build.rs | Adds a build script that reruns when locales/ changes. |
| lib/dsc-lib/build.rs | Adds a build script that reruns when locales/ changes. |
| lib/dsc-lib-registry/build.rs | Adds a build script that reruns when locales/ changes. |
| lib/dsc-lib-jsonschema/build.rs | Extends existing build script to rerun when locales/ changes. |
| dsc/build.rs | Adds a build script that reruns when locales/ changes. |
| dsc-bicep-ext/build.rs | Extends existing build script to rerun when locales/ changes. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| println!("cargo::rerun-if-changed=.versions.json"); | ||
| println!("cargo::rerun-if-changed=.versions.ps1"); | ||
| // Always rebuild if translations are updated. | ||
| println!("cargo:rerun-if-changed=locales"); |
Prior to this change the Rust projects in the repository did not automatically rebuild when translation files in the `locales` directory are updated. This caused a frustrating developer experience where the developer was _required_ to update a Rust source code file to trigger a rebuild. If the contributor only needed to update the code to trigger a rebuild they were then required to change the code back afterward. This change ensures that: 1. Every Rust crate in the repository that has a `locales` folder also has a `build.rs` build script file. 1. Every build script for a Rust crate in the repository includes a cargo directive to rebuild the crate when any files in the `locales` directory are modified, including when a new file is created. 1. Changes to translations are picked up immediately, including when working through Rust unit and integration tests.
Mikey Lombardi (He/Him) (michaeltlombardi)
force-pushed
the
maint/main/rebuild-on-i18n-changes
branch
from
September 8, 2026 18:54
f868738 to
bd2e85e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
This change ensures that:
localesfolder also has abuild.rsbuild script file.localesdirectory are modified, including when a new file is created.PR Context
Prior to this change the Rust projects in the repository did not automatically rebuild when translation files in the
localesdirectory are updated.This caused a frustrating developer experience where the developer was required to update a Rust source code file to trigger a rebuild. If the contributor only needed to update the code to trigger a rebuild they were then required to change the code back afterward.