Currently, it is not possible to translate only a specific portion of a file. If a translation file contains multiple keys, the current lara.yaml configuration lacks the granularity to target just a subset of those keys for translation.
I propose adding an includeKeys property to the file configuration block in lara.yaml. This would allow developers to explicitly state which keys should be translated, while ignoring the rest of the file.
Example
Given the following source file:
{
"first": "First",
"second": "Second"
}
If I only want to translate the "second" key, the proposed lara.yaml configuration would look something like this:
version: "1.0.0"
project:
instruction: "Project-wide translation instruction"
locales:
source: en
target:
- es
- fr
memories:
- mem_abc123
glossaries:
- gls_xyz789
files:
json:
include:
- "src/i18n/[locale].json"
exclude: []
lockedKeys: []
ignoredKeys: []
includeKeys:
- "second" # <-- Proposed feature
Currently, it is not possible to translate only a specific portion of a file. If a translation file contains multiple keys, the current
lara.yamlconfiguration lacks the granularity to target just a subset of those keys for translation.I propose adding an
includeKeysproperty to the file configuration block inlara.yaml. This would allow developers to explicitly state which keys should be translated, while ignoring the rest of the file.Example
Given the following source file:
{ "first": "First", "second": "Second" }If I only want to translate the
"second"key, the proposedlara.yamlconfiguration would look something like this: