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

When we have no js localisation for current language, initialization fail #13

Closed
tdesvenain opened this issue Aug 27, 2013 · 3 comments
Closed
Labels

Comments

@tdesvenain
Copy link
Member

If we have no locale for site language in javascript, initialization of chat fail
this.i18n.translate(str) call stops silentely
so, chat doesn't work

this should work with english language as fallback

@jcbrand
Copy link
Member

jcbrand commented Aug 27, 2013

Looking at the code, the only way I see this happening is if plone_portal_state.language() returns something like None or an empty string.

See line 23 in collective.xmpp.chat.browser.viewlet.py.

Can you please double-check this?

@jcbrand
Copy link
Member

jcbrand commented Aug 27, 2013

Oh, after reading this 70816ea#commitcomment-3954727 I think I better understand what you meant.

Sounds like you are referring to the fact that the Javascript code doesn't have a French localisation, but you then pass in 'fr' as the localisation which it doesn't handle gracefully (e.g. by defaulting to English).

This is a bug to be fixed in the converse.js code: https://github.com/jcbrand/converse.js

Also, I assume you're going to add French translations for the chat UI? The PO file for those translations are in the converse.js repo. One then has to jump through some hoops to get it into JSON format and then read by the JS code. See here: http://conversejs.org/docs/html/index.html#translations

@jcbrand
Copy link
Member

jcbrand commented Aug 28, 2013

Sounds like you are referring to the fact that the Javascript code doesn't have a French localisation, but you then > pass in 'fr' as the localisation which it doesn't handle gracefully (e.g. by defaulting to English).

This is a bug to be fixed in the converse.js code: https://github.com/jcbrand/converse.js

This has now been fixed in converse 0.6.1. We just need to copy that release over to collective.xmpp.chat

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