[wp-trac] [WordPress Trac] #63269: Duplicate array key `Code` in `_WP_Editors::get_translation()`

WordPress Trac noreply at wordpress.org
Mon Apr 14 13:33:24 UTC 2025


#63269: Duplicate array key `Code` in `_WP_Editors::get_translation()`
--------------------------+------------------------
 Reporter:  justlevine    |       Owner:  joedolson
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  6.8.1
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------

Comment (by sabernhardt):

 I found the first 'Code' string in the TinyMCE Code button. Core does not
 activate that in a Classic block or with Classic Editor, but it can be
 added with a plugin such as Advanced Editor Tools.
 - If the newer string is not translated in the user's language, the
 tooltip shows "Code" (in English).
 - Now the tooltip does not give the keyboard shortcut in any language.

 [https://docs.google.com/spreadsheets/d/1QkSRruJCtrGvy9AoqSkYPpiJMfj-
 Kyvd8PrVFEAalk0/edit?usp=sharing 5 out of 38 translations] do not match
 the previous "Code" string perfectly, but the differences seem minor (to
 someone who cannot read them).

 The "Text" patch could have one small advantage: **if** someone replaced
 the old string using the `wp_mce_translation` filter, the replacement
 would continue to work. However, I did not find any
 [https://wpdirectory.net/search/01JRSWFPKZA97V90N6G0C0GEGY directory
 plugins] that edited the "Text" tab, and most plugins in the search
 results just add strings for their own elements (very few replace a
 string).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63269#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list