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

View File

@@ -1396,7 +1396,7 @@ final class _WP_Editors {
'Apply' => __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog.
'Link options' => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog.
'Visual' => _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label.
'Code' => _x( 'Code', 'Name for the Code editor tab (formerly Text)' ), // Editor switch tab label.
'Code|tab' => _x( 'Code', 'Name for the Code editor tab (formerly Text)' ), // Editor switch tab label.
'Add Media' => array( __( 'Add Media' ), 'accessM' ), // Tooltip for the 'Add Media' button in the block editor Classic block.
// Shortcuts help modal.

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8.1-alpha-60184';
$wp_version = '6.8.1-alpha-60187';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.