Open thilonel opened 7 years ago
@thilonel please don't like private repos, include public details needed here instead please.
@ZenCocoon sorry, I have slipped over this public / private problem...
@thilonel Don't be so selfish, share more details so I can play with it 😃
@StoneFrog there's not much to add.
Say there's a model with translated attributes, we're syncing them in two languages, en
and fr
. Then that locale gets removed somehow, - meaning the API won't return it anymore - but the translations won't be removed from the app. I think they should be.
Hm?
@thilonel The thing is that it should work that way right now - attributes for locales not returned by api default to nil. And I'm not able to reproduce this issue, so unless you try to fetch locales with sth like translations.translated_locales
I can't see what could go wrong here.
@StoneFrog so it won't appear under model_name.translations
?
it will, just all attributes will be nil
That's pretty annoying don't you think? When you try to iterate over all the translations and you find empty ones, that were deleted, then you have to handle that as well.
I usally preselect locales to make sure that specific attribute is present anyway, but I can see your point. I see no downsides of such approach (like performane drop or backward incompatibility), so you can expect a PR soon, unless someone else will have objections
... found a translation for a rental that was totally empty. Re-syncing it did not help. The core API was not returning that locale, but it was not deleted. I think it should be synced's responsibility to remove deleted locales.