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

postMissing is always posted with fallback language #22

Closed
esamattis opened this issue Jul 12, 2012 · 5 comments
Closed

postMissing is always posted with fallback language #22

esamattis opened this issue Jul 12, 2012 · 5 comments

Comments

@esamattis
Copy link

Shouldn't line 561 in i18next.js be

var url = applyReplacement(o.resPostPath, { lng: o.lng, ns: ns });

instead of

var url = applyReplacement(o.resPostPath, { lng: o.fallbackLng, ns: ns });

so that the correct language will get the addition?

@esamattis
Copy link
Author

It seems that I miss understood this feature. i18next does not seem to send missing keys if they are found from the fallback language.

But I think this feature would be more useful if it would just ignore the fallback language and always send the missing keys to the current language file. So think this as a feature request.

@jamuhl
Copy link
Member

jamuhl commented Jul 12, 2012

Right. i18next tries to resolve key first in 'en-US' than in 'en' and finally in the defined fallback language.

Problem i see: What is the current language file, eg. 'en-US' or 'en'.

As i used this only during development i was happy to see all the resource keys needed in my fallback languages file. But i see the use of sending it to current language for checking after translations are done, before going into production.

Think best would be to have it configurable:

sendMissingTo: fallback | current

What you think?

@esamattis
Copy link
Author

Thanks for the fast reply.

That would be better indeed, but shouldn't the keys be present in every file? At least that's was what I initially though it would do. Then it would be harder for the translators to miss anything.

So what if the post would just add the missing key to every locale where it is missing?

@jamuhl
Copy link
Member

jamuhl commented Jul 13, 2012

ok sendMissingTo: fallback | current | all should cover this.

Will try to schedule this feature for next week.

@jamuhl
Copy link
Member

jamuhl commented Jul 24, 2012

feature done for version 1.3.5 - yet avaiable only as pre version i18next-1.3.5_pre.

option: sendMissingTo: fallback | current | all

@jamuhl jamuhl closed this as completed Jul 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants