42 pointsStarting to get into this DEV thingI'm new here
blogspnte
Member
—
27th November 2010
I've been translating CustomPress to spanish. I've translated the custompress-es_ES.po file with PoEdit and then I've uploaded the custompress-es_ES.mo file to /cp-languages folder by FTP, but the main page of CustomPress plugin appears in english.
The same occurs with content_types-es_ES.po / content_types-es_ES.mo in /ct-languages folder. I've uploaded the .mo file (not yet complete), but all text strings translated appear in english.
Am I doing something wrong? All the plugins I've translated (and I've translated many of them) work. I don't understand why custom press translation don't.
I've been translating CustomPress to spanish. I've translated the custompress-es_ES.po file with PoEdit and then I've uploaded the custompress-es_ES.mo file to /cp-languages folder by FTP, but the main page of CustomPress plugin appears in english.
The same occurs with content_types-es_ES.po / content_types-es_ES.mo in /ct-languages folder. I've uploaded the .mo file (not yet complete), but all text strings translated appear in english.
Am I doing something wrong? All the plugins I've translated (and I've translated many of them) work. I don't understand why custom press translation don't.
@blogspnte Thank you for reporting this bug. The path variable used is pointing to the wrong location. Change the following lines in order to make the localization work. For CustomPress: open "custompress" directory and edit "cp-loader.php". On Line 61 change: load_plugin_textdomain( 'custompress', null, $plugin_dir ); To load_plugin_textdomain( 'custompress', null, 'custompress/cp-languages' );
For ContentTypes: open "custompress/cp-submodules/content-types" directory and edit "ct-loader.php". On line 47 change: load_plugin_textdomain( 'content_types', null, $plugin_dir ); To load_plugin_textdomain( 'content_types', null, 'custompress/cp-submodules/content-types/ct-languages' );
Make sure you have the ".mo" files in the right directories. Also if you are using MS setup make sure you have set the default language in the admin.
Thanks, Ivan, for the patch. Now, my spanish translations works fine.
If you want to add my translation to a new version of the plugin, please wait for some days, because I have to review my translation.
On the other hand, there are some strings in the code which should be localized for better results in translations:
1. Lines 38, 41, 44, 57 and 84 in cp-admin-ui-settings.php.
2. In ct-admin-ui-add-taxonomy.php, line 38; in ct-admin-ui-edit-post-type.php, line 23; and in ct-admin-ui-edit-taxonomy.php, lines 25 and 40, there's no localization function in the "required" string.
3. In ct-admin-ui-add-custom-fields.php and ct-admin-ui-edit-custom-field.php, there are no localization functions in the strings related to field types (42-47 and 44-49).
4. In ct-admin-ui-add-custom-field.php and ct-admin-ui-custom-fields.php, there are no localization functions in the button "Add Custom Field".
If I find other non localized strings, I'll tell you.
@blogspnte Thank you for taking the time to track them down. Some of them are non-translatable like "post", "page" and "attachment" since these are the actual values used for the post types. Other strings like "required" are for translation though. I will make sure to add localization where necessary.
Responses (7)
Sales & Support Lead — 28th November 2010 #
Hiya blogspnte,
That's no fun. Translation should definitely be working. I'll ask a few folks to take a look and see if we can get ya some help here.
Thanks for posting!
Member — 28th November 2010 #
Thanks for your quick reply, masonjames.
I'm looking forward to hearing from you.
Member — 29th November 2010 #
Here you have the two .po files of the spanish translation. I have to review the translation, but it's quite difficult without the backend in english.
Member — 29th November 2010 #
As my .po files have been rejected by the forum tool, here you have the .po files in TXT format.
Developer — 29th November 2010 #
@blogspnte Thank you for reporting this bug. The path variable used is pointing to the wrong location. Change the following lines in order to make the localization work. For CustomPress: open "custompress" directory and edit "cp-loader.php". On Line 61 change:
load_plugin_textdomain( 'custompress', null, $plugin_dir );Toload_plugin_textdomain( 'custompress', null, 'custompress/cp-languages' );For ContentTypes: open "custompress/cp-submodules/content-types" directory and edit "ct-loader.php". On line 47 change:
load_plugin_textdomain( 'content_types', null, $plugin_dir );Toload_plugin_textdomain( 'content_types', null, 'custompress/cp-submodules/content-types/ct-languages' );Make sure you have the ".mo" files in the right directories. Also if you are using MS setup make sure you have set the default language in the admin.
Member — 29th November 2010 #
Thanks, Ivan, for the patch. Now, my spanish translations works fine.
If you want to add my translation to a new version of the plugin, please wait for some days, because I have to review my translation.
On the other hand, there are some strings in the code which should be localized for better results in translations:
1. Lines 38, 41, 44, 57 and 84 in cp-admin-ui-settings.php.
2. In ct-admin-ui-add-taxonomy.php, line 38; in ct-admin-ui-edit-post-type.php, line 23; and in ct-admin-ui-edit-taxonomy.php, lines 25 and 40, there's no localization function in the "required" string.
3. In ct-admin-ui-add-custom-fields.php and ct-admin-ui-edit-custom-field.php, there are no localization functions in the strings related to field types (42-47 and 44-49).
4. In ct-admin-ui-add-custom-field.php and ct-admin-ui-custom-fields.php, there are no localization functions in the button "Add Custom Field".
If I find other non localized strings, I'll tell you.
Developer — 29th November 2010 #
@blogspnte Thank you for taking the time to track them down. Some of them are non-translatable like "post", "page" and "attachment" since these are the actual values used for the post types. Other strings like "required" are for translation though. I will make sure to add localization where necessary.
Become a member