Change extensions naming (#1885)
* Change extensions to apps * Update translations * Use explicit translation, bump macaw to latest release
This commit is contained in:
parent
4661a93c0f
commit
5850644742
6 changed files with 22 additions and 18 deletions
|
@ -507,6 +507,10 @@
|
|||
"context": "button",
|
||||
"string": "Accept"
|
||||
},
|
||||
"src_dot_appExtensions": {
|
||||
"context": "app extensions subsection",
|
||||
"string": "Apps"
|
||||
},
|
||||
"src_dot_approve": {
|
||||
"context": "button",
|
||||
"string": "Approve"
|
||||
|
@ -3523,9 +3527,6 @@
|
|||
"context": "Manage and Update your warehouse information",
|
||||
"string": "Exchange Rates"
|
||||
},
|
||||
"src_dot_extensions": {
|
||||
"string": "Extensions"
|
||||
},
|
||||
"src_dot_firstName": {
|
||||
"string": "First Name"
|
||||
},
|
||||
|
|
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -4358,8 +4358,9 @@
|
|||
}
|
||||
},
|
||||
"@saleor/macaw-ui": {
|
||||
"version": "github:saleor/macaw-ui#bdb34e1b7ec1e73cb8b188aef651e599b8b8b35f",
|
||||
"from": "github:saleor/macaw-ui#SALEOR-5970-mini-pill-variant",
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.3.1.tgz",
|
||||
"integrity": "sha512-2sGPfMLszKb2Zejd9/hs5MNLhvcIW+bQj+6CTnq8+BbKNt/zqg6t1YQrucb72otUUTJMC6VIjnvtMITmpsgLsQ==",
|
||||
"requires": {
|
||||
"clsx": "^1.1.1",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"@material-ui/icons": "^4.11.2",
|
||||
"@material-ui/lab": "^4.0.0-alpha.58",
|
||||
"@material-ui/styles": "^4.11.4",
|
||||
"@saleor/macaw-ui": "github:saleor/macaw-ui#SALEOR-5970-mini-pill-variant",
|
||||
"@saleor/macaw-ui": "^0.3.1",
|
||||
"@saleor/sdk": "^0.4.2",
|
||||
"@sentry/react": "^6.0.0",
|
||||
"@types/faker": "^5.1.6",
|
||||
|
|
|
@ -53,9 +53,10 @@ function useMenuStructure(
|
|||
navigate(menuItem.url, { resetScroll: true });
|
||||
};
|
||||
|
||||
const extenstionHeaderItem = {
|
||||
const appExtensionsHeaderItem = {
|
||||
id: "extensions",
|
||||
label: intl.formatMessage(commonMessages.extensions)
|
||||
ariaLabel: "apps",
|
||||
label: intl.formatMessage(sectionNames.appExtensions)
|
||||
};
|
||||
|
||||
const menuItems: FilterableMenuItem[] = [
|
||||
|
@ -99,7 +100,7 @@ function useMenuStructure(
|
|||
},
|
||||
...mapToExtensionsItems(
|
||||
extensions.NAVIGATION_CATALOG,
|
||||
extenstionHeaderItem
|
||||
appExtensionsHeaderItem
|
||||
)
|
||||
],
|
||||
iconSrc: catalogIcon,
|
||||
|
@ -129,7 +130,7 @@ function useMenuStructure(
|
|||
},
|
||||
...mapToExtensionsItems(
|
||||
extensions.NAVIGATION_ORDERS,
|
||||
extenstionHeaderItem
|
||||
appExtensionsHeaderItem
|
||||
)
|
||||
],
|
||||
iconSrc: ordersIcon,
|
||||
|
@ -149,7 +150,7 @@ function useMenuStructure(
|
|||
},
|
||||
...mapToExtensionsItems(
|
||||
extensions.NAVIGATION_CUSTOMERS,
|
||||
extenstionHeaderItem
|
||||
appExtensionsHeaderItem
|
||||
)
|
||||
],
|
||||
iconSrc: customerIcon,
|
||||
|
@ -176,7 +177,7 @@ function useMenuStructure(
|
|||
},
|
||||
...mapToExtensionsItems(
|
||||
extensions.NAVIGATION_DISCOUNTS,
|
||||
extenstionHeaderItem
|
||||
appExtensionsHeaderItem
|
||||
)
|
||||
],
|
||||
iconSrc: discountsIcon,
|
||||
|
@ -196,7 +197,7 @@ function useMenuStructure(
|
|||
},
|
||||
...mapToExtensionsItems(
|
||||
extensions.NAVIGATION_PAGES,
|
||||
extenstionHeaderItem
|
||||
appExtensionsHeaderItem
|
||||
)
|
||||
],
|
||||
iconSrc: pagesIcon,
|
||||
|
@ -225,7 +226,7 @@ function useMenuStructure(
|
|||
},
|
||||
...mapToExtensionsItems(
|
||||
extensions.NAVIGATION_TRANSLATIONS,
|
||||
extenstionHeaderItem
|
||||
appExtensionsHeaderItem
|
||||
)
|
||||
],
|
||||
iconSrc: translationIcon,
|
||||
|
|
|
@ -45,7 +45,7 @@ export const mapToExtensionsItems = (
|
|||
) => {
|
||||
const items: FilterableMenuItem[] = extensions.map(
|
||||
({ label, id, app, url, permissions, open }) => ({
|
||||
ariaLabel: id,
|
||||
ariaLabel: `app-${label}`,
|
||||
id: `extension-${id}`,
|
||||
label,
|
||||
url: getDashboardUrFromAppCompleteUrl(url, app.appUrl, app.id),
|
||||
|
|
|
@ -49,9 +49,6 @@ export const commonMessages = defineMessages({
|
|||
error: {
|
||||
defaultMessage: "Error"
|
||||
},
|
||||
extensions: {
|
||||
defaultMessage: "Extensions"
|
||||
},
|
||||
firstName: {
|
||||
defaultMessage: "First Name"
|
||||
},
|
||||
|
@ -246,6 +243,10 @@ export const sectionNames = defineMessages({
|
|||
defaultMessage: "Apps",
|
||||
description: "apps section name"
|
||||
},
|
||||
appExtensions: {
|
||||
defaultMessage: "Apps",
|
||||
description: "app extensions subsection"
|
||||
},
|
||||
attributes: {
|
||||
defaultMessage: "Attributes",
|
||||
description: "attributes section name"
|
||||
|
|
Loading…
Reference in a new issue