turnermm / ckgedit

CKEditor integrated into Dokuwiki
https://www.dokuwiki.org/plugin:ckgedit
GNU General Public License v2.0
60 stars 49 forks source link

Buttom "CKG Edit" does not show custom translation in Chrome #678

Open mschlenstedt opened 2 years ago

mschlenstedt commented 2 years ago

When setting a custom translation the button isn't translated in Chrome correctly. Only the title (which is a popup in Chrome) will be translated:

conf/plugin_lang/ckgedit/de/lang.php:

$lang['btn_fck_edit']          = 'WYSIWYG Editor';

image

Changing line /lib/plugins/ckgedit/action/meta.php:430 in my installation, which is https://github.com/turnermm/ckgedit/blob/c6b47a9d53c592b152d328fa8d48a8dcf6bdcaa3/action/meta.php#L421 here in the sources, does the trick:

$button = '&nbsp;<button name="do[cancel]" type="submit" class="button" title="' . $title .'" id="edbtn__edit" value="CKG Edit" ' . $disabled. ' style = "' .$dwedit_only.'" onclick="return setDWEditCookie(1, this);"/>' . $title .'</button>&nbsp;';
turnermm commented 2 years ago

This is the name of the plugin in the same way that Dokuwiki is the name of the wiki

mschlenstedt commented 2 years ago

But why don't make it configurable via user translation as shown above?! Using a fix string is not very clever in my point of view.

I just replaced the fix string with $title. No big deal.

turnermm commented 2 years ago

Then make a pull request.