From 1012ab03226b32eab0e1752b9c18a03063521886 Mon Sep 17 00:00:00 2001
From: Kushagra Goyal
Date: Fri, 5 Sep 2025 21:32:51 +0530
Subject: [PATCH] refactor: update language strings for consistency: change
"Link URL" to "Link To", "Alternative Text" to "Alt Text", and adjust related
messages for clarity.
---
src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js | 6 +++---
src/wp-admin/includes/class-custom-background.php | 2 +-
src/wp-admin/includes/class-custom-image-header.php | 4 ++--
src/wp-admin/includes/media.php | 8 ++++----
src/wp-includes/class-wp-customize-nav-menus.php | 2 +-
src/wp-includes/media-template.php | 6 +++---
.../endpoints/class-wp-rest-attachments-controller.php | 2 +-
src/wp-includes/widgets/class-wp-widget-media-image.php | 2 +-
tests/qunit/fixtures/customize-menus.js | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js b/src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js
index c3ddbb3332344..d027074644ca9 100644
--- a/src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js
+++ b/src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js
@@ -343,7 +343,7 @@
image_align_left: "Left",
image_align_right: "Right",
link_title: "Insert/edit link",
- link_url: "Link URL",
+ link_url: "Link To",
link_target: "Target",
link_target_same: "Open link in the same window",
link_target_blank: "Open link in a new window",
@@ -473,7 +473,7 @@
wp_more_alt: "More...",
wp_page_alt: "Next page...",
add_media: "Add Media",
- add_image: "Add an Image",
+ add_image: "Add Image",
add_video: "Add Video",
add_audio: "Add Audio",
editgallery: "Edit Gallery",
@@ -511,6 +511,6 @@
s130: "130%",
img_title: "Title",
caption: "Caption",
- alt: "Alternative Text"
+ alt: "Alt Text"
});
}());
diff --git a/src/wp-admin/includes/class-custom-background.php b/src/wp-admin/includes/class-custom-background.php
index 8027c6a2ce95e..a1781439adf0c 100644
--- a/src/wp-admin/includes/class-custom-background.php
+++ b/src/wp-admin/includes/class-custom-background.php
@@ -101,7 +101,7 @@ public function admin_load() {
'
' . __( 'You can customize the look of your site without touching any of your theme’s code by using a custom background. Your background can be an image or a color.' ) . '
' .
'
' . __( 'To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the “Choose Image” button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.' ) . '
' .
'
' . __( 'You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '
' .
- '
' . __( 'Do not forget to click on the Save Changes button when you are finished.' ) . '
',
+ '
' . __( 'Do not forget to use the Save Changes button when you are finished.' ) . '
',
)
);
diff --git a/src/wp-admin/includes/class-custom-image-header.php b/src/wp-admin/includes/class-custom-image-header.php
index 3716b55909245..c48090e7e63ac 100644
--- a/src/wp-admin/includes/class-custom-image-header.php
+++ b/src/wp-admin/includes/class-custom-image-header.php
@@ -136,7 +136,7 @@ public function help() {
) .
'
' .
'
' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '
' .
- '
' . __( 'Do not forget to click “Save Changes” when you are done!' ) . '
',
+ '
' . __( 'Do not forget to use the “Save Changes” button when you are done!' ) . '
',
)
);
@@ -764,7 +764,7 @@ public function step_1() {
-
+
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 5fda1d9de2733..de51216162118 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -1412,7 +1412,7 @@ function get_attachment_fields_to_edit( $post, $errors = null ) {
'input' => 'textarea',
),
'url' => array(
- 'label' => __( 'Link URL' ),
+ 'label' => __( 'Link To' ),
'input' => 'html',
'html' => image_link_input_fields( $post, get_option( 'image_default_link_type' ) ),
'helps' => __( 'Enter a link URL or click above for presets.' ),
@@ -1482,7 +1482,7 @@ function get_attachment_fields_to_edit( $post, $errors = null ) {
$form_fields['image_alt'] = array(
'value' => $alt,
- 'label' => __( 'Alternative Text' ),
+ 'label' => __( 'Alt Text' ),
'helps' => __( 'Alt text for the image, e.g. “The Mona Lisa”' ),
);
@@ -2979,7 +2979,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) {
-
+
' . __( 'Alt text for the image, e.g. “The Mona Lisa”' ) . '
@@ -3236,7 +3236,7 @@ function edit_form_image_editor( $post ) {
post_mime_type, 'image' ) ) : ?>
-
+
diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php
index 3650146241f50..ae863c4bdf20c 100644
--- a/src/wp-includes/class-wp-customize-nav-menus.php
+++ b/src/wp-includes/class-wp-customize-nav-menus.php
@@ -530,7 +530,7 @@ public function enqueue_scripts() {
'itemsFound' => __( 'Number of items found: %d' ),
/* translators: %d: Number of additional menu items found. */
'itemsFoundMore' => __( 'Additional items found: %d' ),
- 'itemsLoadingMore' => __( 'Loading more results... please wait.' ),
+ 'itemsLoadingMore' => __( 'Loading more results… please wait.' ),
'reorderModeOn' => __( 'Reorder mode enabled' ),
'reorderModeOff' => __( 'Reorder mode closed' ),
'reorderLabelOn' => esc_attr__( 'Reorder menu items' ),
diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index 4e7592bd74d06..a79bd8b6e8087 100644
--- a/src/wp-includes/media-template.php
+++ b/src/wp-includes/media-template.php
@@ -513,7 +513,7 @@ function wp_print_media_templates() {
<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
<# if ( 'image' === data.type ) { #>
-
+
@@ -1071,7 +1071,7 @@ function wp_print_media_templates() {
-
+
@@ -1134,7 +1134,7 @@ function wp_print_media_templates() {
-
+
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 589e0e2ccec17..1d26ec9c8249d 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
@@ -985,7 +985,7 @@ public function get_item_schema() {
$schema = parent::get_item_schema();
$schema['properties']['alt_text'] = array(
- 'description' => __( 'Alternative text to display when attachment is not displayed.' ),
+ 'description' => __( 'Alt text to display when attachment is not displayed.' ),
'type' => 'string',
'context' => array( 'view', 'edit', 'embed' ),
'arg_options' => array(
diff --git a/src/wp-includes/widgets/class-wp-widget-media-image.php b/src/wp-includes/widgets/class-wp-widget-media-image.php
index 5977eb347c731..e3c8587a1aa2b 100644
--- a/src/wp-includes/widgets/class-wp-widget-media-image.php
+++ b/src/wp-includes/widgets/class-wp-widget-media-image.php
@@ -95,7 +95,7 @@ public function get_instance_schema() {
'type' => 'string',
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
- 'description' => __( 'Alternative Text' ),
+ 'description' => __( 'Alt Text' ),
),
'link_type' => array(
'type' => 'string',
diff --git a/tests/qunit/fixtures/customize-menus.js b/tests/qunit/fixtures/customize-menus.js
index 7ce6d6db7b1df..a30082875d214 100644
--- a/tests/qunit/fixtures/customize-menus.js
+++ b/tests/qunit/fixtures/customize-menus.js
@@ -84,7 +84,7 @@ window._wpCustomizeNavMenusSettings = {
'itemDeleted': 'Menu item deleted',
'itemsFound': 'Number of items found: %d',
'itemsFoundMore': 'Additional items found: %d',
- 'itemsLoadingMore': 'Loading more results... please wait.',
+ 'itemsLoadingMore': 'Loading more results… please wait.',
'menuAdded': 'Menu created',
'menuDeleted': 'Menu deleted',
'menuLocation': '(Currently set to: %s)',