Translating content-dock

Hello theme.co team,

i wanted to translate the content-dock plugin with poedit. i created a pot-file from the plugins folder with poedit-pro functionality and also created the translation files .po and .mo in my case “tco-content-dock-de_De”. then i uploaded the files to /wp-content/languages/plugins. but the no translation happens, the wordpress is set to german, what else could be the issue?

Hi,

Thanks for writing in!

Please refer to our translation guide.

Hope that helps

No, i know all the articles and would not create a topic if could solve it. it’s not my first plugin or theme i have been translated, and it worked every time!

Hi there,

We could take a look into it but the admin login you have provided has limited access. Kindly set it as an admin account and provide us with your FTP details as well.

Thank you.

If corrected the login and see secure note for ftp

Hello There,

Thanks for providing the information. I have checked it and you have upload the file in the correct folder.

wp-content/languages/plugins/

It is just that you are using the wrong text domain. It should be:

__tco__-de_De.po
__tco__-de_De.mo

Please let us know how it goes.

Ok, thanks for that info, it is a little bit confusing for me, because all other plugins and themes i know are using the folder name as you called “text domain”.
It seems that everything ist translated in the backend now, but the important string “Do not show again” in frontend is still not translated. This string was only one time in the .pot file and is translated!

Hi there,

It must be something related to the cache maybe. Would you please kindly clear your browser cache or any other plugin you may have. In most cases that is the cause of the issue.

Thank you.

Cache is the first thing i deactivate while i’m made websites! But i found some other interesting thing!!

You are using this code, for example, in the ‘admin/options-page-main.php’ file

<?php _e( 'Click to toggle', '__tco__' ); ?>

But in the ‘site/content-dock.php’ you are using a different text domain!!

<?php _e( 'Do not show again', '__e__' ); ?>

May be that this could be the issue?

Hi there,

Yes, it should be __tco__ and I can confirm that. Please change __e__ to __tco__, then I’ll add this to our issue tracker as a bug,

Thanks!

After changing to __tco__ everything works fine.

By the way, if you already have to fix it, why not using the correct plugin name as the text domain? Doesn’t it bring you in trouble if a second plugin from theme.co use the same text domain?

Hi there,

It’s to put things in order and make it faster. If we put all plugins string in single textdomain then translation files will be bigger. And even if you disable the extensions, the translations are still present from that file ( as defined in translation template -pot files) .

Since cornerstone is a required plugin for the theme, then it’s just okay to use the same textdomain. As both theme and cornerstone are always loaded at the same time.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.