I have a source file that has existing translations managed by the GitLab integration which needs to be split up.
Example:
Source file:
en/foo.json
{
"label": "example",
"entries": {
"one": {
"name": "one",
"description": "one description"
},
"two": {
"name": "two",
"description": "two description"
},
"three": {
"name": "three",
"description": "three description"
}
}
This needs to then be split into three files.
en/foo_one.json
{
"label": "example1",
"entries": {
"one": {
"name": "one",
"description": "one description"
}
}
en/foo_two.json
{
"label": "example2",
"entries": {
"two": {
"name": "two",
"description": "two description"
}
}
en/foo_three
{
"label": "example3",
"entries": {
"three": {
"name": "three",
"description": "three description"
}
}
The requirement here is that we split this file out without losing any of the translations. All the keys/values will remain with the same name ({"three": "name": "three", "description", "three description"
etc.) in the split out files with only the label
field changing once split out.
My initial thought was:
- Stop Gitlab Integration
- Split the source file as needed into separate files
- Split each output/language file
- Re-enable Gitlab integration
Will Crowdin be smart enough to understand this change and handle it gracefully?
Another thought was:
- Stop Gitlab integration
- Split the source file as needed into separate files
- Delete old output/language files
- Re-enable Gitlab integration
Will Crowdin keep the translations from foo.json
and keep the translations across the split files (foo_one.json
etc.)?
Or is there a “blessed” way of doing this I’m not aware of?
Our config if helpful:
base_path: .
base_url: "https://api.crowdin.com"
pull_request_title: Localization update
pull_request_labels:
- Localization
commit_message: "[ci skip]"
preserve_hierarchy: true
files:
- source: /src/babele/en/*.json
translation: /src/babele/%locale%/%original_file_name%
type: json
translation_replace:
_: "-"