Open bernawil opened 3 weeks ago
Hi @bernawil, uploads are processed in the background and it can take from a few seconds to a few minutes until the content is updated the project. What you could try is running phrase push --wait
. This will make the command wait until the uploads have been processed
Tried waiting more than 24 hours and it still comes outdated. Also, do note that the simple json format does bring updated values when yml does not suggesting it's a format specific bug.
El jue, 13 de jun de 2024, 03:45, Sönke Behrendt @.***> escribió:
Hi @bernawil https://github.com/bernawil, uploads are processed in the background and it can take from a few seconds to a few minutes until the content is updated the project. What you could try is running phrase push --wait. This will make the command wait until the uploads have been processed
— Reply to this email directly, view it on GitHub https://github.com/phrase/phrase-cli/issues/149#issuecomment-2164656874, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZJZEIICVJTJ2CZRO4TAQ3ZHE52JAVCNFSM6AAAAABJHDBUDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGY2TMOBXGQ . You are receiving this because you were mentioned.Message ID: @.***>
Could it be a pluralization problem? AFAIK, JSON exports show plurals as leaves (.one
, .zero
, .many
...) in the document tree, and it's indistinguishable from an actual key which contains .one
in its name. So, a pluralized key named foo
and a non-pluralized key named foo.one
would result with clashing JSON values.
@bernawil make sure you don't combine pluralized keys with keys named .one
etc.
Could it be a pluralization problem? AFAIK, JSON exports show plurals as leaves (
.one
,.zero
,.many
...) in the document tree, and it's indistinguishable from an actual key which contains.one
in its name. So, a pluralized key namedfoo
and a non-pluralized key namedfoo.one
would result with clashing JSON values.@bernawil make sure you don't combine pluralized keys with keys named
.one
etc.
I doubt it, I created that example to reproduce the issue, but I've seen it happen with keys named differently too. Anyway, if that was the case then the API should validate against such naming.
The naming itself isn't wrong. It just doesn't go well when combined with pluralization and nested export/import.
"first_key.value": {
"one": "one - THIS HAS BEEN UPDATED"
},
"first_key.value.one": "one",
There's the problem, you have two keys which result with the same part in the nested export/import file.
The naming itself isn't wrong. It just doesn't go well when combined with pluralization and nested export/import.
"first_key.value": { "one": "one - THIS HAS BEEN UPDATED" }, "first_key.value.one": "one",
There's the problem, you have two keys which result with the same part in the nested export/import file.
Again, I'm seeing the same with other keys, this was just a test to catch it. But then, this is obviously a bug in the API, it shouldn't let you push something that causes this, or at least throw a warning.
The naming itself isn't wrong. It just doesn't go well when combined with pluralization and nested export/import.
"first_key.value": { "one": "one - THIS HAS BEEN UPDATED" }, "first_key.value.one": "one",
There's the problem, you have two keys which result with the same part in the nested export/import file.
@jablan just noticed this: this is the original en.yml I push:
en:
first_key:
nest_2:
empty: text 3
value:
one: one - THIS HAS BEEN UPDATED
there's only one first_key.value.one. The simple json shows both a "first_key.value.one" and an object leaf with the same. One updated, the other not.
"first_key.value": {
"one": "one - THIS HAS BEEN UPDATED"
},
"first_key.value.one": "one",
There's obviously something wrong the yml parsing that makes duplicated keys.
I am seeing key values coming with outdated values after pulling yml files after a push.
To test this I created a test project
this is my .phraseapp
this is my en.yml
There, I update
first_key.value.one
Then push the changes:
Now, pull those changes and en.yml comes with the value outdated. To double, check I download the file directly.
phrase locales download --id en --project_id 1afcb9912f3e68c4777275e78cd18512 --file_format yml
Result: first_key.value.one still outdated
Now, try downloading simple_json.
phrase locales download --id en --project_id 1afcb9912f3e68c4777275e78cd18512 --file_format simple_json
first_key.value.one is now up to date!
This mirrors what happens in the Web UI: the editor shows updated values and downloading simple json format too. But downloading yml brings these outdated values.
This looks something wrong in the conversion between the data representation and yml format instead of the data persistence itself. For the record, I see similar outdated values in other formats like json (simple json is correct).