@wordpress/edit-site 6.8.12 → 6.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/add-new-post/index.js +1 -1
- package/build/components/add-new-post/index.js.map +1 -1
- package/build/components/add-new-template/index.js +1 -1
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +8 -8
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/editor/index.js +1 -1
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +2 -2
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +2 -2
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.js +3 -3
- package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build/components/pagination/index.js +1 -1
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/post-fields/index.js +2 -2
- package/build/components/post-fields/index.js.map +1 -1
- package/build/components/save-panel/index.js +1 -1
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +2 -1
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -3
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +3 -3
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/add-new-post/index.js +1 -1
- package/build-module/components/add-new-post/index.js.map +1 -1
- package/build-module/components/add-new-template/index.js +1 -1
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +9 -9
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/editor/index.js +1 -1
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +3 -3
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +3 -3
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.js +4 -4
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build-module/components/pagination/index.js +1 -1
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/post-fields/index.js +2 -2
- package/build-module/components/post-fields/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +1 -1
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +4 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/package.json +15 -15
- package/src/components/add-new-post/index.js +1 -1
- package/src/components/add-new-template/index.js +1 -1
- package/src/components/add-new-template/utils.js +12 -9
- package/src/components/editor/index.js +1 -1
- package/src/components/editor/use-editor-title.js +3 -3
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
- package/src/components/global-styles/variations/variation.js +3 -3
- package/src/components/page-patterns/delete-category-menu-item.js +4 -4
- package/src/components/pagination/index.js +1 -1
- package/src/components/post-fields/index.js +2 -2
- package/src/components/save-panel/index.js +1 -1
- package/src/components/sidebar-navigation-screen/index.js +2 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
- package/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +4 -4
|
@@ -6,7 +6,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
6
6
|
import { store as editorStore } from '@wordpress/editor';
|
|
7
7
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
8
8
|
import { useMemo, useCallback } from '@wordpress/element';
|
|
9
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
9
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
10
10
|
import { blockMeta, post, archive } from '@wordpress/icons';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -246,14 +246,17 @@ export const usePostTypeMenuItems = ( onClickMenuItem ) => {
|
|
|
246
246
|
if ( _needsUniqueIdentifier ) {
|
|
247
247
|
menuItemTitle = labels.template_name
|
|
248
248
|
? sprintf(
|
|
249
|
-
// translators:
|
|
250
|
-
|
|
249
|
+
// translators: 1: Name of the template e.g: "Single Item: Post". 2: Slug of the post type e.g: "book".
|
|
250
|
+
_x( '%1$s (%2$s)', 'post type menu label' ),
|
|
251
251
|
labels.template_name,
|
|
252
252
|
slug
|
|
253
253
|
)
|
|
254
254
|
: sprintf(
|
|
255
|
-
// translators:
|
|
256
|
-
|
|
255
|
+
// translators: 1: Name of the post type e.g: "Post". 2: Slug of the post type e.g: "book".
|
|
256
|
+
_x(
|
|
257
|
+
'Single item: %1$s (%2$s)',
|
|
258
|
+
'post type menu label'
|
|
259
|
+
),
|
|
257
260
|
labels.singular_name,
|
|
258
261
|
slug
|
|
259
262
|
);
|
|
@@ -410,14 +413,14 @@ export const useTaxonomiesMenuItems = ( onClickMenuItem ) => {
|
|
|
410
413
|
if ( _needsUniqueIdentifier ) {
|
|
411
414
|
menuItemTitle = labels.template_name
|
|
412
415
|
? sprintf(
|
|
413
|
-
// translators:
|
|
414
|
-
|
|
416
|
+
// translators: 1: Name of the template e.g: "Products by Category". 2s: Slug of the taxonomy e.g: "product_cat".
|
|
417
|
+
_x( '%1$s (%2$s)', 'taxonomy template menu label' ),
|
|
415
418
|
labels.template_name,
|
|
416
419
|
slug
|
|
417
420
|
)
|
|
418
421
|
: sprintf(
|
|
419
|
-
// translators:
|
|
420
|
-
|
|
422
|
+
// translators: 1: Name of the taxonomy e.g: "Category". 2: Slug of the taxonomy e.g: "product_cat".
|
|
423
|
+
_x( '%1$s (%2$s)', 'taxonomy menu label' ),
|
|
421
424
|
labels.singular_name,
|
|
422
425
|
slug
|
|
423
426
|
);
|
|
@@ -179,7 +179,7 @@ export default function EditSiteEditor( { isPostsList = false } ) {
|
|
|
179
179
|
: newItem.title?.rendered;
|
|
180
180
|
createSuccessNotice(
|
|
181
181
|
sprintf(
|
|
182
|
-
// translators: %s: Title of the created post e.g: "
|
|
182
|
+
// translators: %s: Title of the created post or template, e.g: "Hello world".
|
|
183
183
|
__( '"%s" successfully created.' ),
|
|
184
184
|
decodeEntities( _title )
|
|
185
185
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { _x, sprintf } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -19,8 +19,8 @@ function useEditorTitle() {
|
|
|
19
19
|
let title;
|
|
20
20
|
if ( hasLoadedPost ) {
|
|
21
21
|
title = sprintf(
|
|
22
|
-
// translators: A breadcrumb trail for the Admin document title.
|
|
23
|
-
|
|
22
|
+
// translators: A breadcrumb trail for the Admin document title. 1: title of template being edited, 2: type of template (Template or Template Part).
|
|
23
|
+
_x( '%1$s ‹ %2$s', 'breadcrumb trail' ),
|
|
24
24
|
getTitle(),
|
|
25
25
|
POST_TYPE_LABELS[ editedPost.type ] ??
|
|
26
26
|
POST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]
|
|
@@ -71,7 +71,7 @@ function getRevisionLabel(
|
|
|
71
71
|
|
|
72
72
|
return areStylesEqual
|
|
73
73
|
? sprintf(
|
|
74
|
-
// translators:
|
|
74
|
+
// translators: 1: author display name. 2: revision creation date.
|
|
75
75
|
__(
|
|
76
76
|
'Changes saved by %1$s on %2$s. This revision matches current editor styles.'
|
|
77
77
|
),
|
|
@@ -79,7 +79,7 @@ function getRevisionLabel(
|
|
|
79
79
|
formattedModifiedDate
|
|
80
80
|
)
|
|
81
81
|
: sprintf(
|
|
82
|
-
// translators:
|
|
82
|
+
// translators: 1: author display name. 2: revision creation date.
|
|
83
83
|
__( 'Changes saved by %1$s on %2$s' ),
|
|
84
84
|
authorDisplayName,
|
|
85
85
|
formattedModifiedDate
|
|
@@ -9,7 +9,7 @@ import clsx from 'clsx';
|
|
|
9
9
|
import { Tooltip } from '@wordpress/components';
|
|
10
10
|
import { useMemo, useContext, useState } from '@wordpress/element';
|
|
11
11
|
import { ENTER } from '@wordpress/keycodes';
|
|
12
|
-
import {
|
|
12
|
+
import { _x, sprintf } from '@wordpress/i18n';
|
|
13
13
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
14
14
|
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
15
15
|
|
|
@@ -64,8 +64,8 @@ export default function Variation( {
|
|
|
64
64
|
let label = variation?.title;
|
|
65
65
|
if ( variation?.description ) {
|
|
66
66
|
label = sprintf(
|
|
67
|
-
/* translators:
|
|
68
|
-
|
|
67
|
+
/* translators: 1: variation title. 2: variation description. */
|
|
68
|
+
_x( '%1$s (%2$s)', 'variation label' ),
|
|
69
69
|
variation?.title,
|
|
70
70
|
variation?.description
|
|
71
71
|
);
|
|
@@ -9,7 +9,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
9
9
|
import { useDispatch } from '@wordpress/data';
|
|
10
10
|
import { useState } from '@wordpress/element';
|
|
11
11
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
12
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
12
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
13
13
|
import { store as noticesStore } from '@wordpress/notices';
|
|
14
14
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
15
15
|
|
|
@@ -51,8 +51,8 @@ export default function DeleteCategoryMenuItem( { category, onClose } ) {
|
|
|
51
51
|
|
|
52
52
|
createSuccessNotice(
|
|
53
53
|
sprintf(
|
|
54
|
-
/* translators: The pattern category's name */
|
|
55
|
-
|
|
54
|
+
/* translators: %s: The pattern category's name */
|
|
55
|
+
_x( '"%s" deleted.', 'pattern category' ),
|
|
56
56
|
category.label
|
|
57
57
|
),
|
|
58
58
|
{ type: 'snackbar', id: 'pattern-category-delete' }
|
|
@@ -91,7 +91,7 @@ export default function DeleteCategoryMenuItem( { category, onClose } ) {
|
|
|
91
91
|
className="edit-site-patterns__delete-modal"
|
|
92
92
|
title={ sprintf(
|
|
93
93
|
// translators: %s: The pattern category's name.
|
|
94
|
-
|
|
94
|
+
_x( 'Delete "%s"?', 'pattern category' ),
|
|
95
95
|
decodeEntities( category.label )
|
|
96
96
|
) }
|
|
97
97
|
size="medium"
|
|
@@ -65,7 +65,7 @@ export default function Pagination( {
|
|
|
65
65
|
</HStack>
|
|
66
66
|
<Text variant="muted">
|
|
67
67
|
{ sprintf(
|
|
68
|
-
// translators:
|
|
68
|
+
// translators: 1: Current page number. 2: Total number of pages.
|
|
69
69
|
_x( '%1$s of %2$s', 'paging' ),
|
|
70
70
|
currentPage,
|
|
71
71
|
numPages
|
|
@@ -303,7 +303,7 @@ function usePostFields( viewType ) {
|
|
|
303
303
|
if ( isDraftOrPrivate ) {
|
|
304
304
|
return createInterpolateElement(
|
|
305
305
|
sprintf(
|
|
306
|
-
/* translators: %s: page creation date */
|
|
306
|
+
/* translators: %s: page creation or modification date. */
|
|
307
307
|
__( '<span>Modified: <time>%s</time></span>' ),
|
|
308
308
|
getFormattedDate( item.date )
|
|
309
309
|
),
|
|
@@ -354,7 +354,7 @@ function usePostFields( viewType ) {
|
|
|
354
354
|
if ( isPending ) {
|
|
355
355
|
return createInterpolateElement(
|
|
356
356
|
sprintf(
|
|
357
|
-
/* translators: %s:
|
|
357
|
+
/* translators: %s: page creation or modification date. */
|
|
358
358
|
__( '<span>Modified: <time>%s</time></span>' ),
|
|
359
359
|
getFormattedDate( dateToDisplay )
|
|
360
360
|
),
|
|
@@ -47,7 +47,7 @@ const EntitiesSavedStatesForPreview = ( { onClose } ) => {
|
|
|
47
47
|
const additionalPrompt = (
|
|
48
48
|
<p>
|
|
49
49
|
{ sprintf(
|
|
50
|
-
/* translators:
|
|
50
|
+
/* translators: 1: The name of active theme, 2: The name of theme to be activated. */
|
|
51
51
|
__(
|
|
52
52
|
'Saving your changes will change your active theme from %1$s to %2$s.'
|
|
53
53
|
),
|
|
@@ -109,7 +109,8 @@ export default function SidebarNavigationScreen( {
|
|
|
109
109
|
{ ! isPreviewingTheme()
|
|
110
110
|
? title
|
|
111
111
|
: sprintf(
|
|
112
|
-
|
|
112
|
+
/* translators: 1: theme name. 2: title */
|
|
113
|
+
__( 'Previewing %1$s: %2$s' ),
|
|
113
114
|
previewingThemeName,
|
|
114
115
|
title
|
|
115
116
|
) }
|
package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { store as coreStore } from '@wordpress/core-data';
|
|
5
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
5
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
6
6
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
7
7
|
import { store as noticesStore } from '@wordpress/notices';
|
|
8
8
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
@@ -150,7 +150,7 @@ function useDuplicateNavigationMenu() {
|
|
|
150
150
|
{
|
|
151
151
|
title: sprintf(
|
|
152
152
|
/* translators: %s: Navigation menu title */
|
|
153
|
-
|
|
153
|
+
_x( '%s (Copy)', 'navigation menu' ),
|
|
154
154
|
menuTitle
|
|
155
155
|
),
|
|
156
156
|
content: navigationMenu?.content?.raw,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
4
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
5
5
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
6
6
|
|
|
7
7
|
// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.
|
|
8
8
|
export default function buildNavigationLabel( title, id, status ) {
|
|
9
9
|
if ( ! title?.rendered ) {
|
|
10
|
-
/* translators: %s
|
|
10
|
+
/* translators: %s: the index of the menu in the list of menus. */
|
|
11
11
|
return sprintf( __( '(no title %s)' ), id );
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -16,8 +16,8 @@ export default function buildNavigationLabel( title, id, status ) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
return sprintf(
|
|
19
|
-
// translators:
|
|
20
|
-
|
|
19
|
+
// translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
|
|
20
|
+
_x( '%1$s (%2$s)', 'menu label' ),
|
|
21
21
|
decodeEntities( title?.rendered ),
|
|
22
22
|
status
|
|
23
23
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
4
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
5
5
|
import { useEntityRecords, store as coreStore } from '@wordpress/core-data';
|
|
6
6
|
import { useSelect } from '@wordpress/data';
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ import { NAVIGATION_POST_TYPE } from '../../utils/constants';
|
|
|
27
27
|
// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.
|
|
28
28
|
function buildMenuLabel( title, id, status ) {
|
|
29
29
|
if ( ! title ) {
|
|
30
|
-
/* translators: %s
|
|
30
|
+
/* translators: %s: the index of the menu in the list of menus. */
|
|
31
31
|
return sprintf( __( '(no title %s)' ), id );
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -36,8 +36,8 @@ function buildMenuLabel( title, id, status ) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
return sprintf(
|
|
39
|
-
// translators:
|
|
40
|
-
|
|
39
|
+
// translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
|
|
40
|
+
_x( '%1$s (%2$s)', 'menu label' ),
|
|
41
41
|
decodeEntities( title ),
|
|
42
42
|
status
|
|
43
43
|
);
|