Opened 10 years ago
Closed 10 years ago
#30293 closed enhancement (fixed)
Enable direct calls to _WP_Editors::wp_mce_translation()
Reported by: | azaozz | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.1 | Priority: | low |
Severity: | minor | Version: | 3.9 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
When a plugin loads TinyMCE directly (without using wp_editor()) it is quite hard to include the translation. The plugin would have to include and maintain 50-60 JS files and load them "by hand". Enabling direct calls to _WP_Editors::wp_mce_translation() makes translating TinyMCE much easier.
Attachments (1)
Change History (5)
#2
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I like the intention of this, but I'm not sure we should keep it in. _WP_Editors
is by its nature private, and desperately need a rewrite. Does this block us from changing it? Should we actually be encouraging/supporting direct TinyMCE usage without wp_editor()? If you don't use wp_editor(), do you deserve to piggyback off on the API to get translations? Is there a valid use case here I am missing?
#3
@
10 years ago
Right, _WP_Editors
is just a wrapper for the 10 or so functions used to output all that is needed for the default editor.
The way TinyMCE translations work changed in 3.9. Before that they were in a separate file in langs
subdirectory that was loaded independently.
It is still possible to use _WP_Editors::wp_mce_translation()
directly, the changes here only make it a bit more convenient.
In 30296: