Open cadesalaberry opened 8 years ago
@cadesalaberry could you share the project or an example project with me?
Sorry, it took me some time to generate the files, and strip the unnecessary content.
I uploaded the pertinent files on https://github.com/cadesalaberry/l10ns-offset if you care to have a look.
Cheers
@tinganho did you have time to checkout the issue ?
As I understood it, the json
localization files is ordered by timestamp.
if you add a language to the localization (fr-FR
), the new localization file (fr-FR.json
) will be ordered by key because they will all have the same timestamp.
You will then have two files with the keys in different orders.
Do you think that is where it comes from ?
@cadesalaberry I looked into the example project. Seems like the project doesn't have the key AWARDS__CARD__SCORE__UNIT
in en-US? The file en-US
and es-ES
seem misaligned?
You could probably manually try to correct those files. By adding one entry into the other and see what happens.
I updated the files, but the offset is still present:
@cadesalaberry the timestamps and orders in the shared project is very misaligned. The mentioned entry is just one case, but I can find many more.
Do you happen to know how they became misaligned?
That's because I added es-ES
after creating my en-US
file.
I think ordering the json
file by key, would help avoid that bug.
I think I will just use the order of the default language. And remove the timestamp entries on non-default languages. Though I think this change is quite big and more suitable for a future release.
Alright, sounds good !
Are you talking about the v3 ?
Yes, though I'm afraid it won't be happening soon.
On the first page, everything is fine, but when I load the second page, the previews start to get mixed up.
In my example here,
SIGNUP__LOCALIZATION_EMPTY
is correct. However when I load more content, the keyAWARDS__CARD__SCORE__UNIT
displaysInstead of
I started investigating, but haven't found out from where it was coming yet.
I suspect it might be related to key ordering in the json files but can't confirm as of now.
@tinganho Could you give me a hand on this issue ?