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

Localization loading randomly breaks when using requirejs #509

Closed
davhdavh opened this issue Jan 19, 2015 · 14 comments · Fixed by #517
Closed

Localization loading randomly breaks when using requirejs #509

davhdavh opened this issue Jan 19, 2015 · 14 comments · Fixed by #517
Assignees
Milestone

Comments

@davhdavh
Copy link
Contributor

It is not currently possible to configure a general requirejs dependency rule that covers all current and future localizations, and since the localization only tells requirejs it depends on knockout, the loading randomly breaks.

@crissdev
Copy link
Member

Can you provide more information about your use case? Consider usin http://plnkr.co/ to create an example - to better explain your issue.

@viceice
Copy link

viceice commented Jan 23, 2015

I found the error!

The localization files should require knockout.validaion not knockout.

That's why requirejs sometimes initialize the localization before knockout.validation.

Regards,
Michael

@crissdev
Copy link
Member

Thanks Michael.

Great to see the module ID you sugget is knockout.validation and not with a hyphen. This is something that will be implemented in a future version of the library.

@crissdev crissdev added this to the 2.x milestone Jan 23, 2015
@crissdev
Copy link
Member

@viceice do you want to submit a PR for this?

@viceice
Copy link

viceice commented Jan 23, 2015

If you want, i can do this.

@crissdev
Copy link
Member

Sure, go ahead. Thanks.

@viceice
Copy link

viceice commented Jan 23, 2015

Ok, give me some minutes. :-)

@crissdev crissdev modified the milestones: 2.x, 2.0.1 Jan 23, 2015
@crissdev crissdev reopened this Jan 26, 2015
@crissdev crissdev self-assigned this Jan 26, 2015
@crissdev crissdev modified the milestones: 2.0.1, 2.0.2 Jan 26, 2015
@crissdev
Copy link
Member

Reopening this issue because some localization files were not refactored.

@viceice
Copy link

viceice commented Jan 26, 2015

Which files?

@viceice
Copy link

viceice commented Jan 26, 2015

Oh. I see it. eg: localization/pl-PL.js#L6

I missed the the globals. I will check this

@crissdev
Copy link
Member

Thanks @viceice for your interest on this. It seems there's more to fix than some AMD loading - somehow I missed that localization messages are not exported for nodejs when I first worked on it.

@viceice
Copy link

viceice commented Jan 26, 2015

Ok, haven't used it with node. Maybe some tests are required.

Anything i can do?

@crissdev
Copy link
Member

No worrries, I already started on this - there's only the fix for nodejs left. But thanks.

@viceice
Copy link

viceice commented Jan 26, 2015

Ok, no problem. 👍

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

Successfully merging a pull request may close this issue.

3 participants