The problem with translation
-
_e('Activate Quicktags for comments', 'basic-comment-quicktags')Line is translatable. That just means no one’s submitted a complete one for your language.
Yes, I already checked the php file. Do not understand why this is so, therefore and asked a question. I did a full translation on the basis of your default file, then generated a new pot file and completed the second version. Anyway, this string is still untranslated. Everything else is translated normally.
The plugins page. As you can see, everything translated.
https://img-fotki.yandex.ru/get/4104/32047366.95/0_d2c50_2f93cf78_orig
basic-comment-quicktags-ru_RU.po
https://yadi.sk/d/aOMxO-MYmb3CVbasic-comment-quicktags-ru_RU.mo
https://yadi.sk/d/RA9v56HOh7HQsSo it should be this:
#: quicktags.php:123 msgid "Activate Quicktags for comments" msgstr "Активировать Quicktags для комментариев"And that matches line 123 – https://plugins.trac.ww.wp.xz.cn/browser/basic-comment-quicktags/trunk/quicktags.php#L123
I don’t know why it’s not picking up. I wonder if you changed
_e(to__(if it’d behave…I tried to do it. The phrase “Activate Quicktags for comments” is not displayed at all.
Oh right, stupid PHP…
echo __(But that’s literally what https://codex.ww.wp.xz.cn/Function_Reference/_e should do!
echo __( … also gives nothing. The line was in English – and stayed.
SIGH.
I have no idea. Have you tried rebuilding/resaving the po and mo files?
At first I left the word “Quicktags” (line 110) in the original version, without translation. Now for the sake of experiment tried to translate:
#: quicktags.php:110 msgid "Quicktags" msgstr "Кнопки редактирования"Also not working. It turns out that doesn’t work all that relates to the settings page.
I wonder if it’s failing because it’s not on it’s own page?
Did this ever work?
I found.
Filequicktags.php, line61-63$this->internationalization(); add_action( 'admin_init', array( $this, 'admin_init')); //add_action( 'init', array( $this, 'internationalization' ));So everything works.
Solid. I’m yanking that from the plugin since it’s not needed anymore as of WP 4.6!
You’re amazing @natali_z!!!
Yes? Why? I have version 4.7.5, but if the plugin is disabled, no buttons yet.
Sorry, I mean that WordPress itself changed how it handles translations in general, so all that code isn’t needed at all. If the code is not needed and caused you a problem, its best for me to remove it. So I did.
The topic ‘The problem with translation’ is closed to new replies.