Skip to content

Commit

Permalink
split upload into verbs and nouns (#68227)
Browse files Browse the repository at this point in the history
* split upload

* split upload

* split upload

* split upload

* split upload

* Add missing imports for _x function

---------

Co-authored-by: timse201 <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
3 people authored Dec 23, 2024
1 parent 212144c commit 0fb8403
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
withFilters,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { __, _x } from '@wordpress/i18n';
import { useState, useEffect } from '@wordpress/element';
import { useSelect } from '@wordpress/data';
import { keyboardReturn } from '@wordpress/icons';
Expand Down Expand Up @@ -482,7 +482,7 @@ export function MediaPlaceholder( {
) }
onClick={ openFileDialog }
>
{ __( 'Upload' ) }
{ _x( 'Upload', 'verb' ) }
</Button>
{ uploadMediaLibraryButton }
{ renderUrlSelectionUI() }
Expand Down Expand Up @@ -512,7 +512,7 @@ export function MediaPlaceholder( {
'block-editor-media-placeholder__upload-button'
) }
>
{ __( 'Upload' ) }
{ _x( 'Upload', 'verb' ) }
</Button>
) }
onChange={ onUpload }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import clsx from 'clsx';
* WordPress dependencies
*/
import { useRef } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { __, _x } from '@wordpress/i18n';
import { speak } from '@wordpress/a11y';
import {
FormFileUpload,
Expand Down Expand Up @@ -188,7 +188,7 @@ const MediaReplaceFlow = ( {
openFileDialog();
} }
>
{ __( 'Upload' ) }
{ _x( 'Upload', 'verb' ) }
</MenuItem>
);
} }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/video/tracks-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export default function TracksEditor( { tracks = [], onChange } ) {
openFileDialog();
} }
>
{ __( 'Upload' ) }
{ _x( 'Upload', 'verb' ) }
</MenuItem>
);
} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DEFAULT_TAB = {

const UPLOAD_TAB = {
id: 'upload-fonts',
title: __( 'Upload' ),
title: _x( 'Upload', 'noun' ),
};

const tabsFromCollections = ( collections ) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
__unstableAnimatePresence as AnimatePresence,
} from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { __, _x } from '@wordpress/i18n';
import { store as blockEditorStore } from '@wordpress/block-editor';
import { useState } from '@wordpress/element';
import { isBlobURL } from '@wordpress/blob';
Expand Down Expand Up @@ -260,7 +260,7 @@ export default function MaybeUploadMediaPanel() {
variant="primary"
onClick={ uploadImages }
>
{ __( 'Upload' ) }
{ _x( 'Upload', 'verb' ) }
</Button>
) }
</div>
Expand Down

1 comment on commit 0fb8403

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 0fb8403.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12460844090
📝 Reported issues:

Please sign in to comment.