Making WordPress.org

Opened 9 years ago

Closed 8 years ago

#1675 closed enhancement (fixed)

Provide more information when plugin is "not prepared properly for translation"

Reported by: leewillis77's profile leewillis77 Owned by: ocean90's profile ocean90
Milestone: Priority: low
Component: Translate Site & Plugins Keywords:
Cc:

Description

I'm receiving the following message against a couple of my plugins:

"This plugin is not properly prepared for localization. If you would like to translate this plugin, please contact the author."

Example: https://translate.wordpress.org/locale/en-gb/default/wp-plugins/cart-recovery

As far as I'm aware, this plugins *is* translatable. I've been through the linked article, but it's still not clear exactly why translate.wordpress.org is failing to pick things up.

I'm sure that the problem is ultimately mine - however there's currently no way of telling precisely what the issue is, making it difficult for plugin authors to "fix" things.

It would be nice if there was a way to determine the precise reasons that the plugin was being flagged as not properly prepared.

After a conversation on Slack with @ocean90 it appears that there is an additional FAQ here:

https://make.wordpress.org/meta/handbook/documentation/translations/#this-plugin-is-not-properly-prepared-for-localization-%e2%80%93-help

It would be great if either:
a) The information posted to slack was available on the plugin page on translate.wordpress.org
or
b) A link to that FAQ was in the error message

Change History (5)

This ticket was mentioned in Slack in #meta-i18n by leewillis77. View the logs.


9 years ago

#2 @Otto42
9 years ago

For reference, that plugin is not properly prepared for translation because:

a) It's using the wrong text domain.

https://plugins.svn.wordpress.org/cart-recovery/tags/1.7/cart-recovery-for-wordpress.php

This file has "Text Domain: crfw" in it, when the actual text-domain for this plugin is "cart-recovery".

Similarly, the function calls are using the wrong text-domains:

https://plugins.svn.wordpress.org/cart-recovery/tags/1.7/classes/CartTemplate.php

return _x( 'friend', 'Used as a first name if none is available.', 'crfw' );

The 'crfw' should be 'cart-recovery'.

b) Lots of the translation functions calls in the plugin are simply wholly missing the text-domains as well:

https://plugins.svn.wordpress.org/cart-recovery/tags/1.7/templates/admin-status-page.php

<?php _e( 'Pending' ); ?>

That should be:

<?php _e( 'Pending', 'cart-recovery' ); ?>

However, back to the original point: that line that you're referring to on translate.w.org points to this URL:
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/

..which gives all this information about text-domains, how to use the translation functions properly, etc.

Last edited 9 years ago by Otto42 (previous) (diff)

#3 @leewillis77
9 years ago

Hi Otto;

Yep - totally sure I'd done something wrong (and I'll get it fixed), but this ticket is still valid.

It's about exposing the detailed "You've got item X wrong" to plugin devs to make it easier to fix, rather than just the full list of things they need to check which isn't actually that helpful when you *think* you've done it right anyway ...

#4 @ocean90
8 years ago

  • Priority changed from normal to low

#5 @ocean90
8 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 4513:

Translate: Add a hint for the Slack channel when a plugin isn't prepared for localization.

Fixes #1675.

Note: See TracTickets for help on using tickets.