Title: Localization issues (?)
Last modified: December 9, 2019

---

# Localization issues (?)

 *  Resolved [Norske](https://wordpress.org/support/users/norske/)
 * (@norske)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/localization-issues-3/)
 * Hello, Jordy!
 * I’ve spent some time translating your wonderful plugin into Russian this weekend.(
   Actually, I’ve processed all untranslated/fuzzy strings and approved them). But,
   unfortunately, the result is still not perfect as those localized strings cover
   just about 30-40% of the current interface of Media Cleaner.
 * So, I had to make some kind of a small research and I’ve (probably) found some
   issues, which cause this situation.
 * First of all, there are 2 different text domains in source files: `'meowapps'`(
   11 strings from `common\admin.php`) and `'media-cleaner'` (60+ strings from others).
   All these pieces are available for translation and properly included into po/
   mo files. But WP loads [only one text-domain](https://make.wordpress.org/meta/handbook/documentation/translations/#for-better-performance-i-use-multiple-load_plugin_textdomain-calls-to-enable-only-the-strings-i-need-when-i-need-them-how-do-i-do-this-with-language-packs-and-translate-wordpress-org)
   per a plugin (‘media-cleaner’ in this case). So, the admin screen is still shown
   in English although a huge part of it is properly translated.
 * Second point is that there are also at least 80+ strings in the plugin interface
   which are shown to the end user but not yet prepared for localization (not gettexted
   with `__()`), so they are not available through the translators’ tools. The main
   issue here is that already localized strings mention field names and other texts
   which are not yet ready. For example, an intro paragrpah tells about scanning
   methods, but method names (fields and labels) are still in English.
 * I took the liberty of looking through your code files and gettexting the most
   needed strings (to my mind) with a temporary text domain to collect them into
   a separate *.pot and to test if the rest localization breaks anything. The result
   looked good enougth to me 🙂
 * Screenshots:
    [https://habrastorage.org/webt/58/qh/ul/58qhulgmtka7nhkqiiqogeitzrg.jpeg](https://habrastorage.org/webt/58/qh/ul/58qhulgmtka7nhkqiiqogeitzrg.jpeg)
   [https://habrastorage.org/webt/58/qh/ul/58qhulgmtka7nhkqiiqogeitzrg.jpeg](https://habrastorage.org/webt/58/qh/ul/58qhulgmtka7nhkqiiqogeitzrg.jpeg)
   [https://habrastorage.org/webt/58/qh/ul/58qhulgmtka7nhkqiiqogeitzrg.jpeg](https://habrastorage.org/webt/58/qh/ul/58qhulgmtka7nhkqiiqogeitzrg.jpeg)
 * Certainly, I don’t plan to use modified files without your permission. This was
   just a research to support this post (didn’t want to criticize your hard work
   without any effort on my part). I’ll be happy to send you those drafts if this
   will help you to save some time in future.
 * And one more tiny thing. Not even sure (forgive me, since I’m not skilled enough
   in PHP), but this line in `api.php` seems to have a variable inside a translated
   string:
    `'message' => __( "No files for this path ($path).", 'media-cleaner')`
   Maybe it should be something like this (?): `'message' => sprintf( __( "No files
   for this path (%s).", 'media-cleaner' ), $path )`
 * I didn’t touched hardcoded strings passed through the `error_log()` and `$this-
   >log()` functions, since some of them are used in conditional statements. There
   is also [i18n support for the JavaScript files](https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/)
   since WP 5.0 (to translate dialogs and ajax messages), but I didn’t used it yet.
 * Anyway, thank you very much for your nice plugin!
    Please feel free to contact
   me if I can help you with localization (via GitHub PR or somehow else).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/localization-issues-3/#post-12278779)
 * Hello 🙂
 * Could you contact me through my website? Here: [http://meowapps.com/contact](http://meowapps.com/contact)
 * Definitely, I would like to integrate those changes 🙂 For the admin, I could
   also fix it. However, it’s fine to use a variable when double quotes are used
   in PHP.
 * JS i18n support is also possible but slightly more tricky (and the translations
   could be served by PHP).
 * I’ll wait for your message 🙂 Thanks a ton for doing this!

Viewing 1 replies (of 1 total)

The topic ‘Localization issues (?)’ is closed to new replies.

 * ![](https://ps.w.org/media-cleaner/assets/icon-256x256.png?rev=2791576)
 * [Media Cleaner: Clean your WordPress!](https://wordpress.org/plugins/media-cleaner/)
 * [Support Threads](https://wordpress.org/support/plugin/media-cleaner/)
 * [Active Topics](https://wordpress.org/support/plugin/media-cleaner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-cleaner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-cleaner/reviews/)

## Tags

 * [i18n](https://wordpress.org/support/topic-tag/i18n/)
 * [Localization](https://wordpress.org/support/topic-tag/localization/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/localization-issues-3/#post-12278779)
 * Status: resolved