[wp-trac] [WordPress Trac] #34213: Change priority for loading theme/plugin translations
WordPress Trac
noreply at wordpress.org
Tue May 10 21:54:07 UTC 2016
#34213: Change priority for loading theme/plugin translations
------------------------------+-------------------------
Reporter: sebastian.pisula | Owner: swissspidy
Type: enhancement | Status: closed
Priority: high | Milestone: 4.6
Component: I18N | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-------------------------
Comment (by jrf):
I foresee problems due to this commit.
There are thousands of (commercial) themes hosted elsewhere and the
chances that some of these will use the same text-domain as a theme hosted
on wordpress.org are quite large.
Similarly, lots of plugins have a free (hosted on wordpress.org) version
and a commercial version hosted elsewhere often using the same text-
domain.
Loading translations downloaded from translate.wordpress.org first,
disregarding the load location preference of the theme/plugin author, will
in that case result in:
- for the theme example: text strings from another theme with the same
name being loaded
- for the plugin example: only the text strings for the free version being
loaded
Both would break localization for the affected themes/plugins.
I realize that theme/plugin authors can still filter the file path with
the `load_textdomain_mofile` filter to overrule the location, but the net
effect in that case would be that any potential additional translations in
`wp-content/languages` would be disregarded completely.
Similarly, they could `unload_textdomain()` an incorrectly loaded text-
domain from `languages` and re-load the correct file using a direct call
to `load_textdomain()`, but again, this seems like a work-around which
would be needed because this commit breaks existing and expected
functionality.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34213#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list