Add or fix localisation
hoi4.localisation_writeAdd localisation keys or repair Hearts of Iron IV localisation files by fixing BOM, broken quotes, and missing languages, with a diff preview before writing changes.
Instructions
Add localisation keys (mode add: key and text; language, file, replace) or repair localisation files (mode fix: BOM, broken quotes, keys missing from supported languages). Game keys are overridden from a replace folder. apply false returns the diff and writes nothing; apply true writes it. Returns up to 10 files with diffs. Example: {"mode":"add","entries":[{"key":"my_focus","text":"My focus"}]}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "hoi4.localisation_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| mode | Yes | ||
| apply | No | false returns the diff and writes nothing; true makes the same change. | |
| fixes | No | ||
| paths | No | ||
| entries | No | ||
| replace | No | ||
| language | No | english | |
| requestKey | No | ||
| workspaceId | No | current |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| data | Yes | ||
| status | Yes | ||
| blockers | No | ||
| artifacts | No | ||
| validation | Yes | ||
| diagnostics | No | ||
| workspaceId | Yes | ||
| changedFiles | No | ||
| filesScanned | No | ||
| proposedFiles | No |