Skip to content

Commit

Permalink
I18n: Add translator context for various occurrences of "upload".
Browse files Browse the repository at this point in the history
This changeset adds a `noun` or `verb` context to the various occurrences of "upload" in the admin, to make it easier for translators to differenciate these strings depending on the context.

Props timse201, wpgerd.
Fixes #62732.




git-svn-id: https://develop.svn.wordpress.org/trunk@59554 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
audrasjb committed Dec 22, 2024
1 parent 71eaaad commit de76b6e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-custom-background.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function admin_page() {
<input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
<?php submit_button( _x( 'Upload', 'verb' ), '', 'submit', false ); ?>
</p>
<p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-custom-image-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ public function step_1() {
<input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
<?php submit_button( _x( 'Upload', 'verb' ), '', 'submit', false ); ?>
</p>
<?php
$modal_update_href = add_query_arg(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function prepare_items() {
if ( 'search' === $tab ) {
$tabs['search'] = __( 'Search Results' );
}
$tabs['upload'] = __( 'Upload' );
$tabs['upload'] = _x( 'Upload', 'noun' );
$tabs['featured'] = _x( 'Featured', 'themes' );
//$tabs['popular'] = _x( 'Popular', 'themes' );
$tabs['new'] = _x( 'Latest', 'themes' );
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -2277,11 +2277,11 @@ function media_upload_form( $errors = null ) {
<label class="screen-reader-text" for="async-upload">
<?php
/* translators: Hidden accessibility text. */
_e( 'Upload' );
_ex( 'Upload', 'verb' );
?>
</label>
<input type="file" name="async-upload" id="async-upload" />
<?php submit_button( __( 'Upload' ), 'primary', 'html-upload', false ); ?>
<?php submit_button( _x( 'Upload', 'verb' ), 'primary', 'html-upload', false ); ?>
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
</p>
<div class="clear"></div>
Expand Down

0 comments on commit de76b6e

Please sign in to comment.