Translation replacement engine. Applies extracted i18n keys to source files with backup and rollback support.
- Source
Methods
(async, inner) applyFindings(findings, optsopt) → {Promise.<ApplyResult>}
Applies translation replacements from findings array
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
findings | Array.<Finding> | ||
opts | ApplyOptions | <optional> |
- Source
Returns:
- Type:
- Promise.<ApplyResult>
(inner) applyTranslations(reportPath, optsopt) → {Promise.<ApplyResult>}
Applies translations from a JSON report file
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
reportPath | string | Path to extracted-keys.json | |
opts | ApplyOptions | <optional> |
- Source
Returns:
- Type:
- Promise.<ApplyResult>
Example
await applyTranslations('./extracted-keys.json', { srcDir: './src', adapter });