widgetfactory / jce

JCE - A Content Editor for Joomla
https://www.joomlacontenteditor.net
GNU General Public License v2.0
36 stars 13 forks source link

Tooltip for toolbar button "Insert new layer" does not translate. #21

Closed nvyush closed 7 years ago

nvyush commented 7 years ago

The tooltip for toolbar button "Insert new layer" does not translate. This is because of a little bug at the file /administrator/components/com_jce/classes/language.php (https://github.com/widgetfactory/jce/blob/master/administrator/components/com_jce/classes/language.php). When the key is processed, all section name substrings are removed from it. The key 'WF_LAYER_INSERTWF_LAYER_DESC' contains the section name twice, so it transforms to 'layer.insert_desc' instead of 'layer.insertlayer_desc'. Because the section substring is at the start of keys, I suggest to correct the line 252 $k = preg_replace('#'.$key.'(_dlg)?_#', '', $k); as $k = preg_replace('#^'.$key.'(_dlg)?_#', '', $k);

ryandemmer commented 7 years ago

Fixed in commits:

https://github.com/widgetfactory/jce/commit/8112075594b087f3dc0cdf74b27fb963cde6bcf0 https://github.com/widgetfactory/jce/commit/53db9c5fb6052bb1e10444e876ce3af60e4ffdc2