? ? Success

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
30 Jul 2016

Pull Request for Issue joomla-projects/accessibility#2
a redo of #11366

Summary of Changes

Support for <span lang="en" dir="ltr" xml:lang="en" depending on the language selected on the dropdown button.

Testing Instructions

Apply patch.
Make sure that you have more than one language installed in joomla, either wise you won't see something new :)

Select some text and then select the required language from the language button (it's a drop down)

Inspect the selected text to make sure that the text is wrapped with the span and the language tag.

Toggle the editor to inspect the actual html code, re toggle few more times to ensure that changes persist.

Save and see if changes are retained. Right now this seems to fail, it must be some weird php side filtering.

Preview

screen shot 2016-07-30 at 17 47 07
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2016
Category Language & Strings Administration Plugins Front End
avatar dgt41 dgt41 - open - 30 Jul 2016
avatar dgt41 dgt41 - change - 30 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2016
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2016
Labels Added: ? ?
avatar brianteeman brianteeman - test_item - 30 Jul 2016 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 30 Jul 2016

I have tested this item 🔴 unsuccessfully on d42c1fe

I installed hebrew language
Created a content item and pasted in some hebrew - highlighted it and the correct span was applied
But when I saved the content item none of the content was saved


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 30 Jul 2016

@brianteeman the tinymce needs to know that span is allowed element, but I think this also fails in php validation (setting valid elements to *[*] and toggling the editor seems to work, but saving still strips the span element)

avatar brianteeman
brianteeman - comment - 30 Jul 2016

span isnt the issue. you can enter a span with tinymce by default with no changes. I tested it with

< span class="b">test


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 30 Jul 2016

@brianteeman weird, for me <span class="b">test</span> gets trimmed (not in tinyMCE but in PHP side)

avatar dgt41 dgt41 - change - 30 Jul 2016
The description was changed
avatar brianteeman
brianteeman - comment - 30 Jul 2016

I should have said that I was testing the span without the patch


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar brianteeman
brianteeman - comment - 30 Jul 2016

I should have said that I was testing the span without the patch


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar brianteeman
brianteeman - comment - 30 Jul 2016

Still no good. Made a movie

tinymce

avatar MATsxm MATsxm - test_item - 30 Jul 2016 - Tested unsuccessfully
avatar MATsxm
MATsxm - comment - 30 Jul 2016

I have tested this item 🔴 unsuccessfully on 3f09c54

At this point and after applying the patch.

avatar dgt41
dgt41 - comment - 30 Jul 2016

@MATsxm now you should be able to see the button, my bad

avatar MATsxm
MATsxm - comment - 31 Jul 2016

@dgt41

Ok, the BTN is back BUT as soon as the patch is applied (com_patchtester), then I'm not abale to save any content.

Hom to reproduce:

  • Apply the patch
  • Create a new article
  • Add "test" in the content box (html or not)
  • Click 'SAVE'
  • The input "test" disappear and is not saved

Revert the patch, then it works as expected


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar brianteeman brianteeman - test_item - 31 Jul 2016 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 31 Jul 2016

I have tested this item 🔴 unsuccessfully on d90b9b1

Test on a new article - press save (with or without applying the langauage tag) nothing is saved
Test on an existing article - edit text (with or without applying the langauage tag) - press save content reverts to the saved version

Apply the language tag to some content and check the code created and it is
<p><span lang="xml" dir="ltr">dvdsvks</span></p>

Note the incorrect tags


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 31 Jul 2016

@MATsxm @brianteeman would be fine now

avatar dgt41
dgt41 - comment - 31 Jul 2016

One thing that I couldn;t figure out is the usage of the icon \e907 screen shot 2016-07-31 at 13 20 42

avatar brianteeman
brianteeman - comment - 31 Jul 2016

907

avatar MATsxm
MATsxm - comment - 31 Jul 2016

of course 907 would be the one

avatar brianteeman
brianteeman - comment - 31 Jul 2016

Sorry just re-read. The question wasn't which icon but how to use it?

avatar MATsxm
MATsxm - comment - 31 Jul 2016

On the JDoc (and AFAIR for other projects) we use it like it is with toolTips
sans titre
(note, the "lang" and "C" dropdowns are for other kind of purpose)
I guess @brianteeman is the one to find the perfect "caption".

avatar dgt41
dgt41 - comment - 31 Jul 2016

The conflict comes from .mce-ico which points to font-family: 'tinymce-small', Arial instead of font-family: 'tinymce', Arial. So it should be something with the small buttons logic.
Nope, there is a bug in skin.min.css:
.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}
should be
.mce-btn-small.mce-ico{font-family:'tinymce-small',Arial}
No space between the classes

avatar dgt41
dgt41 - comment - 31 Jul 2016

Issue on their repo: tinymce/tinymce#3095

avatar MATsxm
MATsxm - comment - 31 Jul 2016

Not talking about the icon.

Test1: creating a new article with content -> save (OK) -> using the "Language span" feature -> save then OK with: <p><span dir="ltr" lang="fr" xml:lang="fr">test</span></p>

Test2: creating a new article with content -> using the "Language span" feature -> save then OK with: <p><span dir="ltr" lang="fr" xml:lang="fr">test2</span></p>

Test3: Edit an existing en-GB article with content -> using the "Language span" feature -> save then OK with: <span dir="ltr" lang="fr" xml:lang="fr">incorrupte definitionem</span>

Note: no other languages available than those installed.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 31 Jul 2016

@MATsxm so apart from the icon the rest works as expected?

avatar MATsxm
MATsxm - comment - 31 Jul 2016

IMHO Yup!

<span dir="ltr" lang="fr" xml:lang="fr">**MERCI!**</span>
😉

avatar brianteeman
brianteeman - comment - 31 Jul 2016

@dgt41 did you try with the 4.4.1 update #11367

avatar dgt41
dgt41 - comment - 31 Jul 2016

@brianteeman will try that. tinyMCE 4.4.1 solves the icon problem (theme.min.js)

For the next step here I will need some help. I got the list of all the known languages in the globe from here: http://stackoverflow.com/questions/3217492/list-of-language-codes-in-yaml-or-json
I added the missing direction (but is ltd for all of them) and now somehow we need to

  • Verify the language codes

  • Verify the Name

  • Verify the translated Name

  • Assign correct direction fro the RTL ones

The gist for the json data is here: https://gist.github.com/dgt41/c18160606be9ca963b54c5b91ecc9e9f

Once the data is verified the backend of tinyMCE will become like:
screen shot 2016-07-31 at 21 47 20

The admin could pre-select the available languages for the dropdown.
Help here would be greatly appreciated!

avatar brianteeman
brianteeman - comment - 31 Jul 2016

Looks like a good ui approach. BUT a better source would be to access the
IANA registry. https://www.w3.org/International/articles/language-tags/ .

If we're going to offer tags then they need to be correct

avatar dgt41
dgt41 - comment - 31 Jul 2016

I don't mind the source, the end point should be either an array or a JSON with code, name in English, name in local language and direction. (or at least this is my best guess)

avatar MATsxm
MATsxm - comment - 31 Jul 2016

@dgt41
I'm also working on a new list: https://github.com/MATsxm/l10n-list/blob/master/php.php
Still many things to do, but can be a good starting point

avatar brianteeman
brianteeman - comment - 31 Jul 2016
avatar MATsxm
MATsxm - comment - 31 Jul 2016

At this point, what do you exactly need as help?
Check your list: https://gist.github.com/dgt41/c18160606be9ca963b54c5b91ecc9e9f ?

avatar dgt41
dgt41 - comment - 31 Jul 2016

@MATsxm if you could add the direction this would be great!

@brianteeman still missing the direction and also we need a script to extract only the parts we want (from this we could have the language code and the english name of the language) And also have the language name translated in the local language (that's not actually needed but as we cannot translate each of those strings [can we?] for each of joomla's supported languages at least we could provide each language name to their native char code).
We could use this as a starting point as well or as a reference to cross check the other data.

avatar dgt41
dgt41 - comment - 31 Jul 2016

@MATsxm yup! check that the language code the english name and the translation are ok and also add RTL for the languages that are actually RTL (now all of them are LTR)

avatar ot2sen
ot2sen - comment - 31 Jul 2016

umpirsky is also maintaining various lists for languages, locales, TLD,
currency, all available in a wide range of formats.
If this could be of use you can find the repo(s) here:
https://github.com/umpirsky/country-list

On Sun, Jul 31, 2016 at 9:33 PM, Dimitri Grammatikogianni <
notifications@github.com> wrote:

@MATsxm https://github.com/MATsxm yup! check that the language code the
english name and the translation are ok and also add RTL for the languages
that are actually RTL (now all of them are LTR)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#11367 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAwPrThlBFYqK2DSy5fmFIP7mFYmg3Kqks5qbPiXgaJpZM4JY19j
.

avatar MATsxm
MATsxm - comment - 31 Jul 2016

[DISCUSSION]
Maybe the best would be to start from your list as there're the direction, start with the "official" Joomla! Packs only (+few other that some are working on - AFAIR Québec, Canada, Macedonian, Icelandic, Slovencina ) and then delete on your list those not useful (I guess we will have a Klingon version before the Latin one ;) )

  • Anyway, I have to work on other J! t9n projects right now and hope to start here tomorrow.
avatar dgt41
dgt41 - comment - 31 Jul 2016

@MATsxm Great!

@ot2sen 608 languages? https://github.com/umpirsky/language-list/blob/master/data/en/language.php this number is way too big I think

avatar Sandra97
Sandra97 - comment - 31 Jul 2016

@dgt41 I'm currently working on the file for the languages and I have a question...
Can we use for the code the language code + the country code as for some languages the language code is the same but the country code is different (ie. en-gb, en-us, en-ca)?

avatar dgt41
dgt41 - comment - 31 Jul 2016

@Sandra97 first of all thank you! 🙏
Using the country as well wouldn't be a problem although the specs expect only the language code (have to check that again)

avatar Sandra97
Sandra97 - comment - 31 Jul 2016

@dgt41 We're working with this kind of code on the Issue Tracker but MAT told me it's not the same file format (should be .po)

avatar brianteeman
brianteeman - comment - 31 Jul 2016

From what I just read you shouldn't use the country code unless it is
required.

Eg just use jp not jp-JP but do use en-CA en-GB

https://www.w3.org/International/articles/language-tags/

avatar dgt41
dgt41 - comment - 31 Jul 2016

I guess if you create in one format we could transform it to the other

avatar Sandra97
Sandra97 - comment - 31 Jul 2016

Ok, logical for jp and not jp-JP, but what should we do for Catalan? ca or ca-ES?

avatar brianteeman
brianteeman - comment - 31 Jul 2016

According to the link use the shortest possible so if there is no need for
the country don't use it. Not something I know.

avatar dgt41
dgt41 - comment - 31 Jul 2016

@Sandra97 I would stick to the 184 unique language codes for start, then enrich the list with culture/country codes (wherever that makes sense). Also the list shouldn't be enormous IMHO

avatar brianteeman
brianteeman - comment - 31 Jul 2016

Just a thought. Why not simply make it something the user adds.

avatar MATsxm
MATsxm - comment - 31 Jul 2016

@dgt41 also this one https://chronoplexsoftware.com/myfamilytree/localisation/languagecodes.htm

ISO 639-1 only (fr) or 639-2 (fra) are not a solution.
I really do think the good start is to use 639-1 when it's possible (bs) then also country code (fr-CA or ca-ES) when needed.
Then start with the "official" packs + few others.
That will be approximately 80.

@Sandra97 started to work on it and I will end I hope tomorrow if some leave me alone a bit.

avatar MATsxm
MATsxm - comment - 31 Jul 2016

@brianteeman
the way we create tags?
just adding the code?

avatar brianteeman
brianteeman - comment - 31 Jul 2016

It won't be quite as simple because you have to have an optional secondary
direction tag but basically yes. Especially if you assume LTR unless
specificied

avatar dgt41
dgt41 - comment - 31 Jul 2016

And then say good bye to ux. I am totally against this. Such things made joomla a hard entry for newcomers

avatar brianteeman
brianteeman - comment - 31 Jul 2016

Was just an idea to avoid a long list of mainly irrelevant options

avatar dgt41
dgt41 - comment - 31 Jul 2016

For me also would be an easy task to just add a text input. Actually is not only ux, the worst part is that people might enter bogus tags and then joomla will output crap. And then a reputation builds on that. Let's not allow that. I know it is a lot more work to have the list but let's do it right!

avatar brianteeman brianteeman - test_item - 1 Aug 2016 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 1 Aug 2016

I have tested this item 🔴 unsuccessfully on b3be294

It works on simple words but when you try it on anything more complex you either get nothing in the case of a paragraph or a duplicated element in the case of a headline

To replicate use the following html code and experiment adding the language attribute on various elements

<h1>HTML Ipsum Presents</h1>

<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>

<h2>Header Level 2</h2>

<ol>
   <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
   <li>Aliquam tincidunt mauris eu risus.</li>
</ol>

<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p></blockquote>

<h3>Header Level 3</h3>

<ul>
   <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
   <li>Aliquam tincidunt mauris eu risus.</li>
</ul>

<pre><code>
#header h1 a { 
    display: block; 
    width: 300px; 
    height: 80px; 
}
</code></pre>
```<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/11367">issues.joomla.org/joomla-cms/11367</a>.</sub>
avatar MATsxm MATsxm - reference | ac1e050 - 1 Aug 16
avatar brianteeman
brianteeman - comment - 1 Aug 2016

Just realised we use icon-comments-2 for languages elsewhere in joomla so maybe it would be more consistent to use that instead of \e907


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar MATsxm
MATsxm - comment - 1 Aug 2016

@brianteeman maybe icon-comments-2 IS the wrong one to use... at least, this is what I think.

The most commonly used currently on other projects/sites are:
t9n jpg

(second is http://fontawesome.io/icon/language/ and then becomes a kind of "standard")

avatar MATsxm
MATsxm - comment - 1 Aug 2016

[IN PROGRESS] and still lots of work to be done but I think it's a good start.
I don't think we need more at this point and even think that we will be able to delete some but my eyes at this point are dead 😉
I will still have many thing to check/edit on it

https://github.com/MATsxm/l10n-list/blob/master/tinymce_languages.php

avatar dgt41
dgt41 - comment - 2 Aug 2016

It works on simple words but when you try it on anything more complex you either get nothing in the case of a paragraph or a duplicated element in the case of a headline

But that's what is supposed to do: mark simple words as another language. Same approach followed in the other cms's. To get a full blown tag aware system you need to parse the selection and then do some pretty cool regex and iterate and append the span in the correct place. I am really bad on regex so maybe someone else could help here if we want to have such functionality

@brianteeman @MATsxm about the icon: unfortunately we can't use font awesome or any other icon without some custom css: the class for the button is .mce-i-translate and that needs to be specified in some inline css (probably with !important). The point is that tinyMCE is wrongly configured that's why the icon doesn't come up. So in those lines:

        /**
         * Shrink the buttons if not on a mobile or if mobile view is off.
         * If mobile view is on force into simple mode and enlarge the buttons
         **/
        if (!$this->app->client->mobile)
        {
            $smallButtons = 'toolbar_items_size: "small",';
        }
        elseif ($mobileVersion == false)
        {
            $smallButtons = '';
        }
        else
        {
            $smallButtons = '';
            $mode         = 0;
        }

if we replace $smallButtons = 'toolbar_items_size: "small",'; with $smallButtons = ''; the icon shows up correctly. Also this is wrong IMHO because the small font is supposed to be used in mobile because it's smaller size and less icons. That's why I said this is probably wrongly configured!

avatar brianteeman
brianteeman - comment - 2 Aug 2016

Even if it is just to work on simple words (which I find makes it useless)
it should work on an H3 tag and even if it isnt supposed to work on an H3
tag it shouldnt result in an extra H3 tag set which is what happens now

On 2 August 2016 at 08:40, Dimitri Grammatikogianni <
notifications@github.com> wrote:

It works on simple words but when you try it on anything more complex you
either get nothing in the case of a paragraph or a duplicated element in
the case of a headline

But that's what is supposed to do: mark simple words as another language.
Same approach followed in the other cms's. To get a full blown tag aware
system you need to parse the selection and then do some pretty cool regex
and iterate and append the span in the correct place. I am really bad on
regex so maybe someone else could help here if we want to have such
functionality

@brianteeman https://github.com/brianteeman @MATsxm
https://github.com/MATsxm about the icon: unfortunately we can't use
font awesome or any other icon without some custom css: the class for the
button is .mce-i-translate and that needs to be specified in some inline
css (probably with !important). The point is that tinyMCE is wrongly
configured that's why the icon doesn't come up. So in those lines:

    /**         * Shrink the buttons if not on a mobile or if mobile view is off.         * If mobile view is on force into simple mode and enlarge the buttons         **/        if (!$this->app->client->mobile)        {            $smallButtons = 'toolbar_items_size: "small",';        }        elseif ($mobileVersion == false)        {            $smallButtons = '';        }        else        {            $smallButtons = '';            $mode         = 0;        }

if we replace $smallButtons = 'toolbar_items_size: "small",'; with $smallButtons
= ''; the icon shows up correctly. Also this is wrong IMHO because the
small font is supposed to be used in mobile because it's smaller size and
less icons. That's why I said this is probably wrongly configured!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11367 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ZcxfMi13-hvbxCqO4rr1rf_Os6yks5qbvR2gaJpZM4JY19j
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar dgt41
dgt41 - comment - 2 Aug 2016

will check that later on today

avatar MATsxm
MATsxm - comment - 2 Aug 2016

@dgt41
About the icon. I know, this is why I keep on thinking 907 IS the best choice instead of using an icon not related to the topic and even if it is used elsewhere in a wrong way.

avatar MATsxm
MATsxm - comment - 4 Aug 2016

@dgt41 I'm still on the .json list...
hope I will have enough time tomorrow

avatar brianteeman brianteeman - test_item - 4 Aug 2016 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 4 Aug 2016

I have tested this item 🔴 unsuccessfully on 012fb12

Nothing appears in the toolbar

[04-Aug-2016 21:25:22 Europe/London] PHP Notice:  Undefined variable: langsConstructor in /Applications/MAMP/htdocs/github-joomla-cms/plugins/editors/tinymce/tinymce.php on line 926

````<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/11367">issues.joomla.org/joomla-cms/11367</a>.</sub>
avatar MATsxm
MATsxm - comment - 5 Aug 2016

here is the checked list for:
plugins/editors/tinymce/languages.json

You can also find it here: https://github.com/MATsxm/l10n-list/blob/master/tinymce_languages.json

Based on: gist.github.com/dgt41/c18160606be9ca963b54c5b91ecc9e9f
and: https://github.com/MATsxm/l10n-list/blob/master/tinymce_languages.php
"cleaned".

[
      {"code":"af-ZA","name":"Afrikaans","nativeName":"Afrikaans","dir":"ltr"},
      {"code":"ar","name":"Arabic","nativeName":"عربي","dir":"rtl"},
      {"code":"hy-AM","name":"Armenian","nativeName":"Հայերեն","dir":"ltr"},
      {"code":"eu-ES","name":"Basque","nativeName":"euskara","dir":"ltr"},
      {"code":"bn-BD","name":"Bengali (Bangladesh)","nativeName":"বাংলা","dir":"ltr"},
      {"code":"bs-BA","name":"Bosnian (Latin)","nativeName":"bosanski","dir":"ltr"},
      {"code":"bg","name":"Bulgarian","nativeName":"български","dir":"ltr"},
      {"code":"ca-ES","name":"Catalan","nativeName":"Català","dir":"ltr"},
      {"code":"zh-CN","name":"Chinese (Simplified)","nativeName":"中文 (简体)","dir":"ltr"},
      {"code":"zh-TW","name":"Chinese (Traditional)","nativeName":"正體中文 (繁體)","dir":"ltr"},
      {"code":"hr","name":"Croatian","nativeName":"Hrvatski","dir":"ltr"},
      {"code":"cs","name":"Czech","nativeName":"Čeština","dir":"ltr"},
      {"code":"da","name":"Danish","nativeName":"dansk","dir":"ltr"},
      {"code":"nl","name":"Dutch","nativeName":"Nederlands","dir":"ltr"},
      {"code":"nl-BE","name":"Dutch (Belgium)","nativeName":"Flemish","dir":"ltr"},
      {"code":"en-AU","name":"English (Australian)","nativeName":"English (Australian)","dir":"ltr"},
      {"code":"en-GB","name":"English (British)","nativeName":"English (British)","dir":"ltr"},
      {"code":"en-US","name":"English (American)","nativeName":"English (American)","dir":"ltr"},
      {"code":"eo","name":"Esperanto","nativeName":"Esperanto","dir":"ltr"},
      {"code":"et","name":"Estonian","nativeName":"Eesti keel","dir":"ltr"},
      {"code":"fi","name":"Finnish","nativeName":"suomi","dir":"ltr"},
      {"code":"fr","name":"French","nativeName":"français","dir":"ltr"},
      {"code":"fr-CA","name":"French (Canadian)","nativeName":"français (canadien)","dir":"ltr"},
      {"code":"de","name":"German","nativeName":"Deutsch","dir":"ltr"},
      {"code":"el","name":"Greek, Modern","nativeName":"Ελληνικά","dir":"ltr"},
      {"code":"he","name":"Hebrew (modern)","nativeName":"עברית","dir":"rtl"},
      {"code":"hu","name":"Hungarian","nativeName":"Magyar","dir":"ltr"},
      {"code":"id","name":"Indonesian","nativeName":"Bahasa Indonesia","dir":"ltr"},
      {"code":"ga-IE","name":"Irish","nativeName":"Gaeilge","dir":"ltr"},
      {"code":"it","name":"Italian","nativeName":"Italiano","dir":"ltr"},
      {"code":"ja-JP","name":"Japanese","nativeName":"日本語","dir":"ltr"},
      {"code":"km-KH","name":"Khmer","nativeName":"ភាសាខ្មែរ","dir":"ltr"},
      {"code":"ko-KR","name":"Korean","nativeName":"한국어","dir":"ltr"}, 
      {"code":"lv","name":"Latvian","nativeName":"Latviešu","dir":"ltr"}, 
      {"code":"lt","name":"Lithuanian","nativeName":"lietuvių kalba","dir":"ltr"}, 
      {"code":"mk","name":"Macedonian","nativeName":"Македонски","dir":"ltr"}, 
      {"code":"ms-MY","name":"Malay","nativeName":"bahasa Melayu, بهاس ملايو‎","dir":"ltr"}, 
      {"code":"nb-NO","name":"Norwegian Bokmål","nativeName":"Norsk bokmål","dir":"ltr"}, 
      {"code":"nn-NO","name":"Norwegian Nynorsk","nativeName":"Norsk nynorsk","dir":"ltr"}, 
      {"code":"fa","name":"Persian","nativeName":"فارسی","dir":"rtl"}, 
      {"code":"pl","name":"Polish","nativeName":"polski","dir":"ltr"}, 
      {"code":"pt","name":"Portuguese","nativeName":"Português","dir":"ltr"}, 
      {"code":"pt-BR","name":"Portuguese (Brazilian)","nativeName":"Português do Brasil","dir":"ltr"}, 
      {"code":"ro","name":"Romanian","nativeName":"română","dir":"ltr"}, 
      {"code":"ru","name":"Russian","nativeName":"Русский","dir":"ltr"}, 
      {"code":"sr-RS","name":"Serbian","nativeName":"српски","dir":"ltr"}, 
      {"code":"sr-YU","name":"Serbian","nativeName":"Srpski","dir":"ltr"}, 
      {"code":"sk","name":"Slovak","nativeName":"slovenčina","dir":"ltr"}, 
      {"code":"sl-SI","name":"Slovenian","nativeName":"slovensko","dir":"ltr"}, 
      {"code":"es","name":"Spanish","nativeName":"Español","dir":"ltr"}, 
      {"code":"es-CO","name":"Spanish (Colombia)","nativeName":"Español de Colombia","dir":"ltr"}, 
      {"code":"sw-KE","name":"Swahili","nativeName":"Kiswahili","dir":"ltr"}, 
      {"code":"sv-SE","name":"Swedish","nativeName":"svenska","dir":"ltr"}, 
      {"code":"ta-IN","name":"Tamil","nativeName":"தமிழ்","dir":"ltr"}, 
      {"code":"th","name":"Thai","nativeName":"ไทย","dir":"ltr"}, 
      {"code":"tr","name":"Turkish","nativeName":"Türkçe","dir":"ltr"}, 
      {"code":"uk-UA","name":"Ukrainian","nativeName":"Українська","dir":"ltr"}, 
]
avatar brianteeman
brianteeman - comment - 5 Aug 2016

Greek , modern - will that comma cause a problem
Should it perhaps be in brackets like Hebrew is

In fact do either of those need the modern. We only have de and not de
formal for example

avatar dgt41
dgt41 - comment - 5 Aug 2016

it's within quotes so there won't be problem

avatar MATsxm
MATsxm - comment - 5 Aug 2016

At least, for consistency, should be
"Greek (Modern)"
My bad

Agree with @brianteeman we don't even need it

avatar MATsxm
MATsxm - comment - 5 Aug 2016

@dgt41 😄
naaa c'mon... this is the less I can do...
ok, ok, I admit the only part I'm able to help with 😉

avatar brianteeman
brianteeman - comment - 5 Aug 2016

If you remove it from Greek please remove it from Hebrew as well

avatar dgt41
dgt41 - comment - 5 Aug 2016

I added (modern), should I just leave Greek and Hebrew?

avatar brianteeman
brianteeman - comment - 5 Aug 2016

As a Greek do you think it's needed?

avatar MATsxm
MATsxm - comment - 5 Aug 2016

@dgt41
I guess so.... sorry
like Brian said for both Greek and Hebrew.

avatar dgt41
dgt41 - comment - 5 Aug 2016

Nope, and if for any reason ever the ancient Greek will be needed I guess that entry could have a (ancient) part or something similar...

@MATsxm @brianteeman Done!

avatar dgt41
dgt41 - comment - 5 Aug 2016

@brianteeman shouldn't this one have a new feature tag?

avatar brianteeman brianteeman - change - 5 Aug 2016
Category Language & Strings Administration Plugins Front End Administration Feature Request Front End Language & Strings Plugins
avatar brianteeman brianteeman - change - 5 Aug 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 5 Aug 2016
Labels
avatar brianteeman
brianteeman - comment - 5 Aug 2016

Still nothing on the toolbar although there is no error in the logs this time

avatar dgt41
dgt41 - comment - 5 Aug 2016

@brianteeman which mode are you using, i thing this is available only in advanced and expert

avatar brianteeman
brianteeman - comment - 5 Aug 2016

I tried all three ;(

avatar MATsxm
MATsxm - comment - 7 Aug 2016

Same as @brianteeman here and all modes

avatar dgt41
dgt41 - comment - 7 Aug 2016

@brianteeman @MATsxm that's strange, did you enabled this in the plugin options and selected some languages? (Extensions->Plugins->Editor - TinyMCE)
screen shot 2016-08-07 at 19 25 02

avatar MATsxm
MATsxm - comment - 7 Aug 2016

I just can't select any language... or do I miss something?
wcag2

avatar brianteeman
brianteeman - comment - 7 Aug 2016

Same as Mat

On 7 August 2016 at 18:00, Marc-Antoine Thevenet notifications@github.com
wrote:

I just can't select any language... or do I miss something?
[image: wcag2]
https://cloud.githubusercontent.com/assets/1972717/17463858/d3a6d04a-5c9e-11e6-946e-b3f679739d75.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11367 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8Uttz46CAWAhHTbU_4jjryW3jt6Kks5qdg8TgaJpZM4JY19j
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar dgt41
dgt41 - comment - 7 Aug 2016

OK this is a com_patchtester limitation, you don't have the file:/plugins/editors/tinymce/languages.json and that needs to be downloaded directly from github

avatar brianteeman
brianteeman - comment - 7 Aug 2016

Nope the file exists http://i.tee.mn/DXT0.png

avatar MATsxm
MATsxm - comment - 7 Aug 2016

Able to select languages in the plg_ and the selector appears in the toolbar
The file is the previous one and not the one I worked on then I guess there's a problem wit it?

avatar brianteeman
brianteeman - comment - 7 Aug 2016

This is not the correct json file
it has the Hebrew, modern Greek (Modern) thing that you fixed

On 7 August 2016 at 19:48, Marc-Antoine Thevenet notifications@github.com
wrote:

Able to select languages in the plg_ and the selector appears in the
toolbar
The file is the previous one and not the one I worked on then I guess
there's a problem wit it?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11367 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8S1IiQ0mppKYHc36BUrXBU962L1cks5qdiiMgaJpZM4JY19j
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar MATsxm
MATsxm - comment - 7 Aug 2016

This is not the correct json file
it has the Hebrew, modern Greek (Modern) thing that you fixed

This is what I mean (there are languages we will never use and not languages that we will need).
Sorry for not being clear, I just want to know if the .json is the cause of the "issue" then if I have to work on it again? (not sure looking at the "fix").

avatar brianteeman
brianteeman - comment - 7 Aug 2016

Also the data for hebrew is wrong as it should be RTL

   {"code":"he","name":"Hebrew (modern)","nativeName":"עברית","dir":"ltr"},
avatar MATsxm
MATsxm - comment - 7 Aug 2016
avatar dgt41
dgt41 - comment - 7 Aug 2016

@MATsxm I guess copy paste went wrong. I can't do even that right 😂

avatar MATsxm
MATsxm - comment - 7 Aug 2016

Then we are back again to:
#11367 (comment)
😡 😡 😡

Does the way we deal with the iso + language code (eg. fr-CA) could be the explaination?

avatar dgt41
dgt41 - comment - 7 Aug 2016

@MATsxm weird it works for me. Did you save the plugin's options ( you need to reselect languages)?
screen shot 2016-08-07 at 23 07 18

screen shot 2016-08-07 at 23 07 07

screen shot 2016-08-07 at 23 11 33

avatar MATsxm
MATsxm - comment - 7 Aug 2016

Nope, the thing is I can't save the language in the plg settings as they don't appear in the field.
I checked, the .json in plg -> editors -> tinymce -> languages.json is the good one...
weird

avatar MATsxm
MATsxm - comment - 7 Aug 2016

Wooohoooo 🎉
First step looks great.

  • Able to set up the .plg adding languages (those of the list expected).
  • Able to add & Save some languages <span> (fr + de that are defined as language content) + fr-CA that is not a language installed.

Need more tests but at this point, the only "wrong" thing I see is if I want to "span" a whole paragraph, what is often the case (having one paragraphe for a language + another one for another language etc.), it doesnt work.

For exemple, no way to "span" this "block".

<p>How to test</p>
<ul>
<li>First, do the things you normally do and see if you spot any problems.</li>
<li>Look at all of the front <span dir="ltr" lang="de" xml:lang="de">end views and record </span>any problems</li>
<li>Look at all the back end views and report any problems</li>
<li>See more ideas below</li>
</ul>

Already really great!
Thanks!

avatar brianteeman
brianteeman - comment - 7 Aug 2016

Re-tested and its present on the toolbar now with the correct languages

Now back to the same problem as mentioned here https://issues.joomla.org/tracker/joomla-cms/11367#event-186167 that if you apply a language thing to an h1 it works but is lost on save and you end up with an extra h1


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 8 Aug 2016

@brianteeman I cannot replicate this, I am using p for new lines and H save correctly with spans.
Can you provide the steps to reproduce this and the settings for tinyMCE that you have?

@MATsxm @brianteeman I think I might have a simple solution for nested tags, can you provide a list with possible tags that might need to be covered?

avatar brianteeman
brianteeman - comment - 8 Aug 2016

@dgt41 I see now the problem i described does NOT happen with an LTR language like french but it does happen with an RTL language like hebrew

avatar MATsxm
MATsxm - comment - 9 Aug 2016

@dgt41

@MATsxm @brianteeman I think I might have a simple solution for nested tags, can you provide a list with possible tags that might need to be covered?

I would say ALL the tags.
In fact, it was before a deprecated practice, but things will go in changing in this area.
Users will increasingly use a page, declared in a language, with a block in a language and then various other blocks that are translation of the source bloc, but on the same page.
These blocks can contain all that can contain a normal text. All tags, pictures, videos etc...
I hope being clear enough.

avatar dgt41
dgt41 - comment - 9 Aug 2016

@MATsxm but how can this be useful to an image or video tag? Maybe I am missing something here

avatar MATsxm
MATsxm - comment - 9 Aug 2016

What I want to say is that it should be possible to "include" what ever we want in this language declaration.

See:
http://www.teledom.fr/st-martin/urgences-saintmartin.html
This is a simple one (no img or vid inside blocks but it could be), you will see at the end what I call "fr-FR blocks no need as the page is <html lang="fr-fr" dir="ltr"> " AND " a translated block that should be include in the <span dir="ltr" lang="en-GB" xml:lang="en-GB">

avatar Sandra97 Sandra97 - test_item - 13 Aug 2016 - Tested unsuccessfully
avatar Sandra97
Sandra97 - comment - 13 Aug 2016

I have tested this item 🔴 unsuccessfully on e17e53d

Hello!

I did an extended test (not done just to be a PITA but because we had to face this situation several times).

screen shot 2016-08-13 at 09 56 44

  1. Everything works as expected (h2)

  2. Everything works as expected (p)

  3. Just 3 blocks using span4. I tried to apply the language to the whole <div class="span4"> but it's not applied (note that in the div, I have figure, figcaption, p, ul/li +a a href and a link with a button class).

  4. A p, it works as expected

  5. A ul, does not work, the language tag is not applied.

  6. Simple button with a class, works as expected.

I hope my explanation is quite understandable. Do not hesitate if you need more information.

Thank you!!!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 3 Sep 2016

UPDATE: I haven't forgot this one, just waiting someone to merge all the other tinyMCE PRs so I don't have to resync every few days...

avatar MATsxm
MATsxm - comment - 3 Sep 2016

Thanks @dgt41

avatar brianteeman
brianteeman - comment - 6 Sep 2016

Which ones are you waiting on being merged?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 4 Oct 2016

This is now rebased to 3.7, still need the code for complex elements....

avatar MATsxm
MATsxm - comment - 4 Oct 2016

Thanks @dgt41

7e123e6 27 Oct 2016 avatar dgrammatiko cs
avatar dgt41 dgt41 - change - 14 Nov 2016
The description was changed
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-11-14 11:42:04
Closed_By dgt41
avatar dgt41 dgt41 - close - 14 Nov 2016
avatar dgt41 dgt41 - close - 14 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 14 Nov 2016
Category Language & Strings Administration Plugins Front End Feature Request Administration Language & Strings JavaScript External Library Front End Plugins Feature Request
avatar dgt41 dgt41 - change - 21 Nov 2016
The description was changed
Status Closed Pending
Closed_Date 2016-11-14 11:42:00
Closed_By dgt41
avatar dgt41 dgt41 - change - 21 Nov 2016
The description was changed
avatar dgt41 dgt41 - edited - 21 Nov 2016
avatar dgt41 dgt41 - reopen - 21 Nov 2016
avatar dgt41 dgt41 - reopen - 21 Nov 2016
avatar dgt41
dgt41 - comment - 21 Nov 2016

All known and reported issues should be fixed now. Please test!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11367.

avatar brianteeman
brianteeman - comment - 21 Nov 2016

Just applied the PR but no languages button on the toolbar
Checked the plugin and its set to enabled
Then I saw the field to select the language and once I had selected some the languages button appeared.
So
1. Can you update the test instructions in the first post with that info
2. Do you think it would be more user friendly if by default all installed content languages are available (and you can add others if needed in the plugin)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11367.

avatar brianteeman
brianteeman - comment - 21 Nov 2016

Sorry to say but it is still not correctly applying the tag to the correct
In this video I simulated selecting a phrase inside a paragraph and setting the lang on that phrase as french.
As you can see that didnt work as intended

screen shot 2016-11-21 at 16 35 45

.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11367.

avatar brianteeman
brianteeman - comment - 21 Nov 2016

Another simple test of a hebrew RTL phrase inside an english article
screen shot 2016-11-21 at 16 41 45


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11367.

avatar brianteeman
brianteeman - comment - 21 Nov 2016

For reference it is expected according to the spec to have a pharse in language B inside a paragraph written in language A https://www.w3.org/International/questions/qa-html-language-declarations#usingspan


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11367.

avatar dgt41
dgt41 - comment - 21 Nov 2016

@brianteeman thanks! So this is a tough one, as solving one problem creates problems for other cases...

Please don't test yet, WAIT for an update here!

avatar dgt41
dgt41 - comment - 30 Nov 2016

I will reopen this one as soon as I get some free time...

avatar dgt41 dgt41 - close - 30 Nov 2016
avatar dgt41 dgt41 - change - 30 Nov 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-11-30 01:20:59
Closed_By dgt41
avatar brianteeman
brianteeman - comment - 5 Oct 2020

@dgrammatiko I think I have a solution for this if you are able to assist

avatar dgrammatiko
dgrammatiko - comment - 5 Oct 2020

@brianteeman sure, just FYI I rechecked the code here and it's missing a bit of logic to work as it was expected

avatar brianteeman
brianteeman - comment - 5 Oct 2020

This is part of the EU funded research project for improving the process of creating accessible content by authors https://accessibilitycluster.com/about .I am representing JandBeyond EV on this project (politics prevented it saying joomla or joomla promoting it)

The aim of the project is mainly in researching and identifying key needs and areas where all cms can benefit. The project might eventually produce some code examples but that's not the main aim.

The research conducted in stage one of the project identified numerous needs by content authors and we are working on testing and evaluating the possibilities for improving each one of those. Not all of them apply to Joomla or we already address those issues.

I am currently reviewing the identified needs to see how they fit with Joomla. I think I have the basis of a solution to this one and then saw your PR from the stone ages ;)

Tinmyce natively has buttons now to se the direction of the language but it still doesnt have anything to mark the language. This is essential to satisfy the "language of parts" accessibility rule. WCAG 2.0: Understanding 3.1.2 Language of Parts: http://www.w3.org/WAI/GL/UNDERSTANDING-WCAG20/meaning-other-lang-id.html

Most other CMS already have a solution for this - just not joomla

I came across this native tinymce solution provided by a third party https://github.com/edx/tinymce-language-selector/

Would you be able to see about integrating that. JS is beyond me ;)

Hope that clarifies things a little.

avatar dgrammatiko
dgrammatiko - comment - 5 Oct 2020

@brianteeman the code of that plugin needs transpilling, here's a version that will work with the current Joomla's tinyMCE: https://gist.github.com/dgrammatiko/8631faa0ea083e139a7e36e41690b1b6

About reviving this PR: I was looking on that plugin and it seems that quite a lot of what we did here is useless (everything is done in the js land with that plugin). I guess you can open a PR with the switch and the needed changes in the allowed tags and I will push the JS changes there. I mean there's not much that we can take from this one...

avatar brianteeman
brianteeman - comment - 5 Oct 2020

Thanks. I didnt expect there would be much if anything we could take from here as its so old and for an earlier version.

Is the transpiling something we can automate?

Will check more closely abd create a draft Pr hopefully tomorrow

avatar dgrammatiko
dgrammatiko - comment - 5 Oct 2020

Is the transpiling something we can automate?

The J4 build tools supposed to do that (I haven't tried if any imports are actually resolved). But anyways it's something that is patchable

avatar brianteeman
brianteeman - comment - 5 Oct 2020

great - thanks

Add a Comment

Login with GitHub to post a comment