Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset in key preview on homepage. #128

Open
cadesalaberry opened this issue Jul 7, 2016 · 11 comments
Open

Offset in key preview on homepage. #128

cadesalaberry opened this issue Jul 7, 2016 · 11 comments
Labels
Milestone

Comments

@cadesalaberry
Copy link
Contributor

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 key AWARDS__CARD__SCORE__UNIT displays

AWARDS__CARD__SCORE__UNIT | Swipe left to continue

Instead of

AWARDS__CARD__SCORE__UNIT | PTS

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 ?

screenshot from 2016-07-07 12 00 42

screenshot from 2016-07-07 12 00 59

screenshot from 2016-07-07 12 01 21

@tinganho
Copy link
Owner

tinganho commented Jul 7, 2016

@cadesalaberry could you share the project or an example project with me?

@cadesalaberry
Copy link
Contributor Author

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

@cadesalaberry
Copy link
Contributor Author

@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 ?

@tinganho
Copy link
Owner

tinganho commented Oct 4, 2016

@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?

@tinganho
Copy link
Owner

tinganho commented Oct 4, 2016

You could probably manually try to correct those files. By adding one entry into the other and see what happens.

@cadesalaberry
Copy link
Contributor Author

cadesalaberry commented Oct 4, 2016

I updated the files, but the offset is still present:

screenshot from 2016-10-04 14-50-34

screenshot from 2016-10-04 14-50-58

@tinganho
Copy link
Owner

tinganho commented Oct 4, 2016

@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?

@cadesalaberry
Copy link
Contributor Author

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.

@tinganho
Copy link
Owner

tinganho commented Oct 7, 2016

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.

@cadesalaberry
Copy link
Contributor Author

Alright, sounds good !

Are you talking about the v3 ?

@tinganho
Copy link
Owner

Yes, though I'm afraid it won't be happening soon.

@tinganho tinganho added the Bug label Oct 12, 2016
@tinganho tinganho added this to the 3.0 milestone Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants