? Failure

User tests: Successful: 0 Unsuccessful: 0

avatar dgt41
dgt41
30 Jul 2016

Pull Request for Issue joomla-projects/accessibility#2

Summary of Changes

Support for <span language="en-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.

Save and see if changes are retained

Preview

screen shot 2016-07-30 at 17 47 07

43c5685 30 Jul 2016 avatar dgt41 init
e7b487a 30 Jul 2016 avatar dgt41 α
9eedf8b 30 Jul 2016 avatar dgt41 yup
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
Category Plugins Front End
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 30 Jul 2016

Would it not be better to be adding an icon instead of text for the button?

avatar brianteeman
brianteeman - comment - 30 Jul 2016

If not an icon how is the text string translatable

avatar brianteeman brianteeman - change - 30 Jul 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-07-30 14:56:05
Closed_By brianteeman
avatar brianteeman brianteeman - close - 30 Jul 2016
avatar infograf768
infograf768 - comment - 30 Jul 2016

hmm
$langs = JFactory::getLanguage()->getKnownLanguages();
needs a path. I guess it could be site.

Also, this is restricting the span to Joomla installed languages which means that if you don't need a specific language in admin or site but need a span in your text, you still need to install these languages...

avatar brianteeman
brianteeman - comment - 30 Jul 2016

What is the use case for setting a language for a span different to the
language of the page?

avatar dgt41
dgt41 - comment - 30 Jul 2016

@brianteeman follow the links from joomla-projects/accessibility#2 Both wp and drupal got this

avatar MATsxm
MATsxm - comment - 30 Jul 2016

@brianteeman WCAG 2.0 + SEO in a near future
In some cases, you need a single page with paragraphs in different languages, without having a specific multilingual site. See: https://www.drupal.org/node/1993928

avatar wilsonge
wilsonge - comment - 30 Jul 2016

Just looking around at what others are doing I think this probably is needed

avatar brianteeman
brianteeman - comment - 30 Jul 2016

Ok so I followed that link and you can immediately see that this pr is missing the important direction

avatar brianteeman
brianteeman - comment - 30 Jul 2016

@infograf768 is correct. This approach of relying on a content language
being installed is a nice idea but it is flawed. From the examples on the
link provided I would not be able to put an Arabic language tag on a single
sentence unless I have installed Arabic as a joomla content language.

avatar dgt41
dgt41 - comment - 30 Jul 2016

fixed the string and added xml:lang and dir:
screen shot 2016-07-30 at 18 30 57

About the list of languages: my approach was with installed languages but can be done with a list of preselected ones on the plugin's options page, and probably this is a better approach

avatar brianteeman
brianteeman - comment - 30 Jul 2016

Oops looks like I hit the close and comment button by accident. But it won't let me reopen

avatar brianteeman
brianteeman - comment - 30 Jul 2016

Says its something to do with you doing a forced reset on your branch.

avatar brianteeman
brianteeman - comment - 30 Jul 2016

A final thought - now that we have the xtd-buttons in the toolbar would it be better to do additions to tinymce that way instead of adding them directly into tinymce.

avatar dgt41
dgt41 - comment - 30 Jul 2016

Honestly I don't know if that can be achieved with xtd-button, but I would investigate also this option.

avatar brianteeman
brianteeman - comment - 30 Jul 2016

I think it might allow for easier customisation eg select which languages are available.

The other thing is as a tinymce button it would have to be either always displayed on the advanced toolbar or as an option on the extended toolbar. as an xtd-editor button it can be displayed on any of the toolbars or not at all

avatar ot2sen
ot2sen - comment - 30 Jul 2016

Concerning relying on installed languages vs a predefined list in plugin
settings, wouldn´t it then be simpler to rely on the content languages the
site admin decided to add?
No installation needed to add a content language, meaning you could have
for example inline da/de/fr/se/ru available for inline tags while your site
still only have en-GB as only installed language.

On Sat, Jul 30, 2016 at 6:41 PM, Brian Teeman notifications@github.com
wrote:

I think it might allow for easier customisation eg select which languages
are available.

The other thing is as a tinymce button it would have to be either always
displayed on the advanced toolbar or as an option on the extended toolbar.
as an xtd-editor button it can be displayed on any of the toolbars or not
at all


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

avatar dgt41
dgt41 - comment - 30 Jul 2016

The hard part with the XTD button is that it needs to be universal e.g. work with code mirror and other editors because it will also be available there. So, yes the implementation should be generic and I think this would be quite a trip wit extensive use of reg exs...
There is another PR from @Fedik for better initialisation of tinyMCE so, probably we could get away with a couple switches in the tiny's options page.
@ot2sen spot on!

Add a Comment

Login with GitHub to post a comment