--- name: installer-localization description: Add or change Windows installer (MSI) strings or languages for Devolutions Gateway or Devolutions Agent. Use whenever touching Strings_*.json, *.wxl, Strings.g.tt, Strings.g.cs, or adding a translation to package/WindowsManaged or package/AgentWindowsManaged, including contributor translation PRs. --- # Installer localization Installer strings are authored in `Strings_.json` and generated by the T4 template `Strings.g.tt` into `_.wxl` and `Strings.g.cs`. Never hand-edit `*.wxl` or `Strings.g.cs`. A contributor PR that adds or edits a `.wxl` directly must be converted to JSON first. Projects: `package/WindowsManaged` (Gateway, product `DevolutionsGateway`) and `package/AgentWindowsManaged` (Agent, product `DevolutionsAgent`). ## Change strings 1. Edit `Resources/Strings_.json` in the project. Add new keys to `Strings_en-US.json` first, in the matching section. Keep `{0}` and `[Property]` tokens identical to English. Use `\n` for line breaks. 2. Run `package\Update-InstallerLocalization.ps1` (`-Product agent|gateway`). It needs Visual Studio's `TextTransform.exe` (found through `vswhere`, or pass `-TextTransformPath`). 3. Rerun the script and confirm `git status` shows no new changes. ## Add a language Use `sv-SE` (LCID 1053) in the Agent as the model. 1. Create `Strings_.json` with the same structure as `Strings_en-US.json`, and set the `Language` entry to the decimal LCID. 2. Add the culture to the `cultures` array in `Strings.g.tt`. 3. Add the culture to the `Languages` dictionary and to the language selection in `Project_UIInitialized` (`Program.cs`). 4. Add `None Remove` and `EmbeddedResource` entries for the new `.wxl` in the `.csproj`. 5. Add the language and LCID to `Get-PackageLanguages` or `Get-GatewayPackageLanguages` in `ci/Build/Build.psm1`, and to `PackageLanguages` or `GatewayPackageLanguages` in `ci/tlk.ps1`. 6. Add `.*` to the project's `.gitignore`. 7. Run the generator. 8. Translate the `dialogs.firewall` strings, as in `Strings_fr-FR.json`. WiX 3 ships them for only a few cultures, and `light` fails without them. 9. Build every language, either through the `build-agent-msi` skill or with source-only builds, then run `ci/package-assembled.ps1` to confirm each transform embeds. `ci/package-assembled.ps1` and `ci/tlk.ps1` read the language lists above; do not hardcode languages elsewhere.