#54586 closed defect (bug) (fixed)
Avoid translating empty plugin headers
Reported by: | Chouby | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | trivial | Version: | 3.4 |
Component: | I18N | Keywords: | has-patch commit assigned-for-commit |
Focuses: | Cc: |
Description
WPCS recommends not to translate empty strings. On the other hand, plugin headers may not all be filled, but since #19597, _get_plugin_data_markup_translate()
translates them all whether they are empty or not.
I propose to check that the string is not empty before attempting to translate it.
Attachments (1)
Change History (9)
#2
@
3 years ago
- Keywords reporter-feedback removed
There are quite many, generally due to empty AuthorURI
or PluginURI
. Here are a few examples:
This ticket was mentioned in PR #2589 on WordPress/wordpress-develop by audrasjb.
3 years ago
#4
Trac ticket: https://core.trac.wordpress.org/ticket/54586
#5
@
3 years ago
- Keywords commit assigned-for-commit added
Looks good to me. I added a PR to run the unit tests, and then it should be good to go.
3 years ago
#8
committed in https://core.trac.wordpress.org/changeset/53181
Note: See
TracTickets for help on using
tickets.
@Chouby Could you provide an example of a plugin header that results in empty strings being translated? Thanks!