Closed skyfrk closed 1 year ago
Hey @skyfrk, when providing a list of tags the request to fetch the locales is currently passing all provided tags. I agree it would be really useful if each file would only contain keys from one of the tags. There is one request for each tag happening anyway so it seems more helpful to have different sets of keys per file. We'll take a check at what it would take to properly separate the keys in different files by their tag and provide an update here when there is some news
Any word on this?
@skyfrk @FatalOz would you mind trying out the latest release?
That did not work for me, all the keys are updated in each file/tag
I also tried to remove the tags and add each tag as a file
And also specify the file_format
like below:
phrase:
access_token: 123
project_id: <projectId>
push:
sources:
- file: ./namespace1/en.json
params:
file_format: nested_json
locale_id: 1234
update_translations: true
autotranslate: true
- file: ./namespace2/en.json
params:
file_format: nested_json
locale_id: 1234
tags: namespace2
update_translations: true
autotranslate: true
pull:
targets:
- file: ./namespace1/en.json
params:
file_format: nested_json
locale_id: 1234
tags: namespace1
- file: ./namespace2/en.json
params:
file_format: nested_json
locale_id: 1234
tags: namespace2
.phrase.yml
Translations files before
phrase pull
:./namespace1/en.json
./namespace2/en.json
Translation files after
phrase pull
(actual)./namespace1/en.json
./namespace2/en.json
Translation files after
phrase pull
(expected)./namespace1/en.json
./namespace2/en.json
Workaround
.phrase.yml
This
.phrase.yml
yields the expected results but requires onefile
entry per tag (namespace).