User tests: Successful: 0 Unsuccessful: 0
Pull Request for Issue joomla-projects/accessibility#2
a redo of #11366
Support for <span lang="en" dir="ltr" xml:lang="en"
depending on the language selected on the dropdown button.
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.
Category | ⇒ | Language & Strings Administration Plugins Front End |
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Labels |
Added:
?
?
|
@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)
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.
@brianteeman weird, for me <span class="b">test</span>
gets trimmed (not in tinyMCE but in PHP side)
I should have said that I was testing the span without the patch
I should have said that I was testing the span without the patch
I have tested this item
At this point and after applying the patch.
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:
Revert the patch, then it works as expected
I have tested this item
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
@MATsxm @brianteeman would be fine now
907
of course 907 would be the one
Sorry just re-read. The question wasn't which icon but how to use it?
On the JDoc (and AFAIR for other projects) we use it like it is with toolTips
(note, the "lang" and "C" dropdowns are for other kind of purpose)
I guess @brianteeman is the one to find the perfect "caption".
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
Issue on their repo: tinymce/tinymce#3095
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.
IMHO Yup!
<span dir="ltr" lang="fr" xml:lang="fr">**MERCI!**</span>
@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:
The admin could pre-select the available languages for the dropdown.
Help here would be greatly appreciated!
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
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)
@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
Is this any good.
At this point, what do you exactly need as help?
Check your list: https://gist.github.com/dgt41/c18160606be9ca963b54c5b91ecc9e9f ?
@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.
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
.
[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 ;) )
@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
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
I guess if you create in one format we could transform it to the other
Ok, logical for jp and not jp-JP, but what should we do for Catalan? ca or ca-ES?
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.
From Microsoft dev: https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx
Just a thought. Why not simply make it something the user adds.
@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.
@brianteeman
the way we create tags?
just adding the code?
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
And then say good bye to ux. I am totally against this. Such things made joomla a hard entry for newcomers
Was just an idea to avoid a long list of mainly irrelevant options
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!
I have tested this item
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>
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
@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:
(second is http://fontawesome.io/icon/language/ and then becomes a kind of "standard")
[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
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!
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 headlineBut 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/
will check that later on today
I have tested this item
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>
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"},
]
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
it's within quotes so there won't be problem
At least, for consistency, should be
"Greek (Modern)"
My bad
Agree with @brianteeman we don't even need it
If you remove it from Greek please remove it from Hebrew as well
I added (modern), should I just leave Greek and Hebrew?
As a Greek do you think it's needed?
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!
@brianteeman shouldn't this one have a new feature tag?
Category | Language & Strings Administration Plugins Front End | ⇒ | Administration Feature Request Front End Language & Strings Plugins |
Labels |
Added:
?
|
Labels |
Still nothing on the toolbar although there is no error in the logs this time
@brianteeman which mode are you using, i thing this is available only in advanced and expert
I tried all three ;(
Same as @brianteeman here and all modes
@brianteeman @MATsxm that's strange, did you enabled this in the plugin options and selected some languages? (Extensions->Plugins->Editor - TinyMCE)
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/
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
Nope the file exists http://i.tee.mn/DXT0.png
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?
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/
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").
Also the data for hebrew is wrong as it should be RTL
{"code":"he","name":"Hebrew (modern)","nativeName":"עברית","dir":"ltr"},
If you can see where the prob is:
https://github.com/MATsxm/l10n-list/blob/master/tinymce_languages.json
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?
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
Wooohoooo
First step looks great.
<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!
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
@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?
@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.
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">
I have tested this item
Hello!
I did an extended test (not done just to be a PITA but because we had to face this situation several times).
Everything works as expected (h2
)
Everything works as expected (p
)
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).
A p
, it works as expected
A ul
, does not work, the language tag is not applied.
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!!!
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...
Which ones are you waiting on being merged?
This is now rebased to 3.7, still need the code for complex elements....
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-14 11:42:04 |
Closed_By | ⇒ | dgt41 |
Category | Language & Strings Administration Plugins Front End Feature Request | ⇒ | Administration Language & Strings JavaScript External Library Front End Plugins Feature Request |
Status | Closed | ⇒ | Pending |
Closed_Date | 2016-11-14 11:42:00 | ⇒ | |
Closed_By | dgt41 | ⇒ |
All known and reported issues should be fixed now. Please test!
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)
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
.
Another simple test of a hebrew RTL phrase inside an english article
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
@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!
I will reopen this one as soon as I get some free time...
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-30 01:20:59 |
Closed_By | ⇒ | dgt41 |
@dgrammatiko I think I have a solution for this if you are able to assist
@brianteeman sure, just FYI I rechecked the code here and it's missing a bit of logic to work as it was expected
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.
@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...
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
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
great - thanks
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.