Editor: Use different keys in array of translatable strings.

[59696] changed the 'Text' tab of the classic editor to 'Code' but Code was already used as a key in the array of translatable text. Since arrays keys need to be unique, this meant that it is possible for the wrong translation to appear in a locale. Using different keys fixes that.

Reviewed by joedolson.
Merges [60182] to the 6.8 branch.

Props joedolson, sabernhardt, justlevine, swissspidy, audrasjb.
Fixes #63269. See #38061.
Built from https://develop.svn.wordpress.org/branches/6.8@60187


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson
2025-04-25 18:28:30 +00:00
parent 403017b587
commit 690978a7d3
4 changed files with 4 additions and 4 deletions

View File

@@ -1293,7 +1293,7 @@ window.wp = window.wp || {};
.append( $button.attr({
id: id + '-html',
'class': 'wp-switch-editor switch-html'
}).text( window.tinymce.translate( 'Code' ) ) )
}).text( window.tinymce.translate( 'Code|tab' ) ) )
).append( $editorContainer )
);

File diff suppressed because one or more lines are too long