-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fix for tinymce tests #853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, now I got a little deeper into this fix.
I've made some changes to this pull request #854 which fixes the tiny tests too (this is all due to broken JS loading from tinymce-builded/js/tinymce/langs/ folder)
But all in all I'm not sure if this - very TinyMCE specific - language code pattern should be the pattern of the i18n.currentLanguage. I'm more into creating a new var like tinymceLanguageCode
which later can be used by the tinymce-pattern here:
mockup/mockup/patterns/tinymce/pattern.js
Line 292 in c84018d
var lang = i18n.currentLanguage; |
@@ -21,7 +21,7 @@ define([ | |||
self.currentLanguage = $('html').attr('lang') || 'en-us'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend using the non country specific fallback language "en" and remove the extra check below
@lyralemos @thet @agitator @frapell your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
If the changes you mentioned in #854 fixes tinymce tests I see no reason why not to discard this PR. What you said about i18n.currentLanguage being TinyMCE specific, actually the changes introduced in #849 fixes both tinyMCE and Folder Contents. This happens because all country specific languages codes in plone.app.locales are like pt_BR, for instance, and not like pt-br (which is the standard for html languages codes). For that reason I see no problem with transforming the language code. |
@lyralemos thanks for clarification. Then it's ok for me to transform the language code here. I wasn't aware of plone.app.locales country-language code pattern. So we actually can merge #854 and discard this PR. |
#854 with test fix is merged .... closing this |
@lyralemos, I think the web standard is IETF ('pt-BR'):
That's also the format you get when you visit one of Google or Mozilla websites so I suggest we should stick to it. And change our There's also POSIX ('pt_BR') to use for filenames, which TinyMCE does (but in a folder misnamed In any case it'd be useful to have attributes in
What do you think? I came to this because I didn't want to re-parse and treat defaults while manually getting to implement locale lazy loading for Moment.js. I preferred to delegate to mockup-i18n however after #849 I had to reformat the string which now comes as POSIX: |
This PR fix tinymce tests falling since #849.