WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#10382 closed defect (bug) (fixed)

plugins descriptions aren't localized

Reported by: Denis-de-Bernardy Owned by: 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 6 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 @Denis-de-Bernardy6 years ago

  • Keywords dev-feedback added

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

comment:4 @Denis-de-Bernardy6 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.

comment:5 @Denis-de-Bernardy6 years ago

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

comment:6 @Denis-de-Bernardy6 years ago

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

comment:7 @pavelevap6 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...

comment:8 in reply to: ↑ 3 @nbachiyski6 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.

comment:9 @Denis-de-Bernardy6 years ago

  • Keywords tested added; dev-feedback removed

Yeah. It initially sounded very scary. :-D

comment:10 @pavelevap6 years ago

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

comment:11 @Denis-de-Bernardy6 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

comment:12 @pavelevap6 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...

comment:13 @azaozz6 years ago

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

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

comment:14 @azaozz6 years ago

  • Milestone changed from 2.8.2 to 2.9

comment:15 @pavelevap6 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?

comment:16 @dd326 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.

comment:17 follow-up: @pavelevap6 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...

comment:18 in reply to: ↑ 17 @johnbillion3 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.