Pending

User tests: Successful: Unsuccessful:

avatar ghost
ghost
26 Jun 2013

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31260

This PR fixes the issue of lstrings that have already been passed through the JText class to be translated again, on tooltips.

icon

This has been done by adding a $translate parameter to the JHtml::tooltipText method.
To prevent the method from translating the strings, you can add a 0/false as 3rd parameter, like:
JHtml::tooltipText(JText::_('TOOLTIP_TITLE'), $some_translated_string, 0)

The default use is to just pass the untranslated strings to the tooltipText method, like:
JHtml::tooltipText('TOOLTIP_TITLE', 'TOOLTIP_CONTENT')

This PR also fixes some syntax and if statements on the disabled ordering icons in list views (that code was part of fixing the tooltips).

Prevent useless translation in JText::_()

It also adds a check in the JText::_() method to prevent translation of the string if it is empty or if the string starts with a '<', like for icons <i class="icon-menu-2"></i>.

icon

Testing Instructions

Switch the language debugging on and see if there are any '??' characters in any of the tooltips.
If so, report back :)

avatar nonumber nonumber - open - 26 Jun 2013
avatar beat
beat - comment - 26 Jun 2013

tested: works. Thanks.

avatar nonumber
nonumber - comment - 27 Jun 2013

Closing because of: #1365

avatar nonumber nonumber - close - 27 Jun 2013

Add a Comment

Login with GitHub to post a comment