Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#10382 closed defect (bug) (fixed)

plugins descriptions aren't localized

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by: nbachiyski's profile nbachiyski
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.8
Component: I18N Keywords: has-patch tested
Focuses: Cc:

Description

WP uses the wrong argument for load_plugin_textdomain().

Attachments (1)

plugin-localization.diff (938 bytes) - added by Denis-de-Bernardy 16 years ago.

Download all attachments as: .zip

Change History (19)

#1 @Denis-de-Bernardy
16 years ago

  • Keywords dev-feedback added

while we're on the topic, is there any reason for which theme descriptions aren't localizable?

#4 @Denis-de-Bernardy
16 years ago

try this: in load_plugin_textdomain(), add a var_dump($path). See it return a completely erroneous value. With or without a "Domain Path: /lang" header in the plugin.

#5 @Denis-de-Bernardy
16 years ago

that would be upon visiting the plugins page, of course.

#6 @Denis-de-Bernardy
16 years ago

oh, lol, I'm not making sense of the no. opened #10383 for translating theme descriptions then. :D

#7 @pavelevap
16 years ago

  • Cc pavelevap@… added

For me also translation does not work. You can test plugin Custom Field Images (version 2.0). It contains Czech translation file and also uses translated plugin description, but these are always displayed in original english...

#8 in reply to: ↑ 3 @nbachiyski
16 years ago

Replying to Denis-de-Bernardy:

no?

Sorry about my words frugality. As you correctly realized after that, my No meant there was no reason.

#9 @Denis-de-Bernardy
16 years ago

  • Keywords tested added; dev-feedback removed

Yeah. It initially sounded very scary. :-D

#10 @pavelevap
16 years ago

I tried attached patch, but it does not help to resolve my problem (description is not translated)....

#11 @Denis-de-Bernardy
16 years ago

Odd... It worked fine with my own tests... Try adding two lines at the beginning of the plugin file:

http://plugins.trac.wordpress.org/browser/custom-field-images/trunk/custom-field-images.php

Author: scribu
Author URI: http://scribu.net/
Plugin URI: http://scribu.net/wordpress/custom-field-images

Change that to:

Author: scribu
Author URI: http://scribu.net/
Plugin URI: http://scribu.net/wordpress/custom-field-images
Text Domain: custom-field-images
Domain Path: /lang

#12 @pavelevap
16 years ago

Yes, these two lines helped and it works now...

There are also other problems:

1) On plugins page - plugins are listed alphabetically - but when plugin name is translated, then plugins are listed alphabetically by original (and not translated) name.

2) I tried it also with 2.9-rare and there are some problems adding these two lines (there is NULL at the top of page) and activating plugin...

#13 @azaozz
16 years ago

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

(In [11716]) Fix plugins descriptions localization, props Denis-de-Bernardy, fixes #10382

#14 @azaozz
16 years ago

  • Milestone changed from 2.8.2 to 2.9

#15 @pavelevap
16 years ago

Does not work for me without adding these lines to plugin:

Text Domain: custom-field-images
Domain Path: /lang

So, it is problem of this plugin and author should add these lines or it problem of Wordpress?

#16 @dd32
16 years ago

So, it is problem of this plugin and author should add these lines or it problem of Wordpress?

If the plugin does not specify its Text Domain, and the path to the language files, theres nothing WordPress can do, it cant guess it very well.

#17 follow-up: @pavelevap
16 years ago

OK, but translated plugin description is displayed only when plugin was sometimes activated. When I download fresh plugin and do not activate it, then description is not translated...

#18 in reply to: ↑ 17 @johnbillion
13 years ago

Replying to pavelevap:

OK, but translated plugin description is displayed only when plugin was sometimes activated. When I download fresh plugin and do not activate it, then description is not translated...

See #20320.

Note: See TracTickets for help on using tickets.