#19597 closed task (blessed) (fixed)
Bundled plugins need a Text Domain header
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | |
Focuses: | Cc: | ||
PR Number: |
Description
Hello Dolly and Akismet both use the default text domain, but neither specify the appropriate header to allow the Description field to be translated.
The Japanese localization forcibly replaces the description fields of both plugins for the download zip. This is not ideal.
Hello Dolly can continue to use default, but to trigger it, it will need to specify Text Domain: default
. load_plugin_textdomain()
will end up getting unnecessarily called in _get_plugin_data_markup_translate()
but that's not the issue; it will allow the translate()
call to be fired.
Akismet should be shifted to its own Akismet header and textdomain.
Please no commentary on the virtues of Hello Dolly, Akismet, bundled plugins, core plugins.
Attachments (2)
Change History (15)
#2
@
8 years ago
- Cc pavelevap@… added
Also bundled themes need localization of header information, please see my old ticket: http://core.trac.wordpress.org/ticket/15858
There are long explaining sentences, but header information is not allowed to be translated even if these strings are in .pot files (and GlotPress).
#3
follow-up:
↓ 7
@
8 years ago
I am thinking that Text Domain: default should be implied. Then no Text Domain header will needed to be added to Hello Dolly. As long as the strings are in the po file, we'll end up with a translation.
My reasoning here is two-fold: One, it will set a bad example for other plugins. Two, there's the thought that for language packs, we can infer a Text Domain header based on the plugin slug.
#4
follow-up:
↓ 5
@
8 years ago
- Keywords 2nd-opinion added
Secondary thought:
Very few locales (two, I think) have taken pains to translate Akismet and Hello Dolly manually (and an upgrade kills them). It does create a better new user experience when they head to the Plugins screen for the first time. That said, since Hello Dolly contains English lyrics by an American musician, and Akismet needs to move to its own text domain, I'm considering a wontfix of this ticket.
#5
in reply to:
↑ 4
@
8 years ago
Replying to nacin:
That said, since Hello Dolly contains English lyrics by an American musician
It would still be good to be able to translate its description.
#6
@
8 years ago
19597.diff runs all headers through translate(), falling back to the 'default' text domain. Side effects should probably be minimal, and performance negligibly worse.
The only remaining step will be to ensure that Hello Dolly's Name and Description makes it into the pot file. This will require a modification to makepot.php.
#7
in reply to:
↑ 3
;
follow-up:
↓ 8
@
8 years ago
Replying to nacin:
My reasoning here is two-fold: One, it will set a bad example for other plugins.
Would it make sense to only imply Text Domain: default
for Hello Dolly, but not for other plugins?
#8
in reply to:
↑ 7
@
8 years ago
Replying to SergeyBiryukov:
Would it make sense to only imply
Text Domain: default
for Hello Dolly, but not for other plugins?
Yes, but I'm weary of putting in an exception for Hello Dolly somewhere in the code. It would eliminate side effects, though.
#9
@
8 years ago
19597.2.diff is an alternative that carves out an exception for Hello Dolly.
#10
@
8 years ago
Another option would probably be to add Hello Dolly to GlotPress, like importers (related: #16012).
#12
@
8 years ago
- Keywords 2nd-opinion removed
- Resolution set to fixed
- Status changed from new to closed
Akismet and Hello Dolly headers are now added to wordpress-admin.pot. (http://i18n.trac.wordpress.org/changeset/19320/)
Considering this fixed. In time, Akismet will end up in its own textdomain, though we'll probably continue to add its headers to the main POT file, to ensure completeness in the translation of the Plugins screen even before a language pack is separately downloaded.
Pancakes should be a core plugin!