Merge pull request #403 from mirumee/ref/use-icu
Use structurized JSON files instead of PO
This commit is contained in:
commit
70c679c335
71 changed files with 205764 additions and 10400 deletions
|
@ -1,10 +1,10 @@
|
||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
|
||||||
[saleor-1.dashboard-20]
|
[saleor-1.dashboard-20-json]
|
||||||
file_filter = locale/<lang>.po
|
file_filter = locale/<lang>.json
|
||||||
minimum_perc = 1
|
minimum_perc = 1
|
||||||
source_file = locale/messages.pot
|
source_file = locale/defaultMessages.json
|
||||||
source_lang = en
|
source_lang = en
|
||||||
type = PO
|
type = STRUCTURED_JSON
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Improve product update form error handling - #392 by @dominik-zeglen
|
- Improve product update form error handling - #392 by @dominik-zeglen
|
||||||
- Fix column picker errors - #393 by @dominik-zeglen
|
- Fix column picker errors - #393 by @dominik-zeglen
|
||||||
- Improve order filters - #396 by @dominik-zeglen
|
- Improve order filters - #396 by @dominik-zeglen
|
||||||
|
- Use structurized JSON files instead of PO - #403 by @dominik-zeglen
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ module.exports = api => {
|
||||||
plugins.push("macros");
|
plugins.push("macros");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
presets,
|
ignore,
|
||||||
plugins,
|
plugins,
|
||||||
ignore
|
presets,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
4897
locale/ar.json
4897
locale/ar.json
File diff suppressed because one or more lines are too long
4897
locale/az.json
4897
locale/az.json
File diff suppressed because one or more lines are too long
4897
locale/bg.json
4897
locale/bg.json
File diff suppressed because one or more lines are too long
4897
locale/bn.json
4897
locale/bn.json
File diff suppressed because one or more lines are too long
4897
locale/ca.json
4897
locale/ca.json
File diff suppressed because one or more lines are too long
4897
locale/cs.json
4897
locale/cs.json
File diff suppressed because one or more lines are too long
4897
locale/da.json
4897
locale/da.json
File diff suppressed because one or more lines are too long
4897
locale/de.json
4897
locale/de.json
File diff suppressed because one or more lines are too long
4900
locale/defaultMessages.json
Normal file
4900
locale/defaultMessages.json
Normal file
File diff suppressed because it is too large
Load diff
4897
locale/el.json
4897
locale/el.json
File diff suppressed because one or more lines are too long
4897
locale/es.json
4897
locale/es.json
File diff suppressed because one or more lines are too long
4897
locale/es_CO.json
4897
locale/es_CO.json
File diff suppressed because one or more lines are too long
4897
locale/et.json
4897
locale/et.json
File diff suppressed because one or more lines are too long
4897
locale/fa.json
4897
locale/fa.json
File diff suppressed because one or more lines are too long
4897
locale/fr.json
4897
locale/fr.json
File diff suppressed because one or more lines are too long
4897
locale/hi.json
4897
locale/hi.json
File diff suppressed because one or more lines are too long
4897
locale/hu.json
4897
locale/hu.json
File diff suppressed because one or more lines are too long
4897
locale/hy.json
4897
locale/hy.json
File diff suppressed because one or more lines are too long
4897
locale/id.json
4897
locale/id.json
File diff suppressed because one or more lines are too long
4897
locale/is.json
4897
locale/is.json
File diff suppressed because one or more lines are too long
4897
locale/it.json
4897
locale/it.json
File diff suppressed because one or more lines are too long
4897
locale/ja.json
4897
locale/ja.json
File diff suppressed because one or more lines are too long
4897
locale/ko.json
4897
locale/ko.json
File diff suppressed because one or more lines are too long
10216
locale/messages.pot
10216
locale/messages.pot
File diff suppressed because it is too large
Load diff
4897
locale/mn.json
4897
locale/mn.json
File diff suppressed because one or more lines are too long
4897
locale/nb.json
4897
locale/nb.json
File diff suppressed because one or more lines are too long
4897
locale/nl.json
4897
locale/nl.json
File diff suppressed because one or more lines are too long
4897
locale/pl.json
4897
locale/pl.json
File diff suppressed because one or more lines are too long
4897
locale/pt.json
4897
locale/pt.json
File diff suppressed because one or more lines are too long
4897
locale/pt_BR.json
4897
locale/pt_BR.json
File diff suppressed because one or more lines are too long
4897
locale/ro.json
4897
locale/ro.json
File diff suppressed because one or more lines are too long
4897
locale/ru.json
4897
locale/ru.json
File diff suppressed because one or more lines are too long
4897
locale/sk.json
4897
locale/sk.json
File diff suppressed because one or more lines are too long
4897
locale/sl.json
4897
locale/sl.json
File diff suppressed because one or more lines are too long
4897
locale/sq.json
4897
locale/sq.json
File diff suppressed because one or more lines are too long
4897
locale/sr.json
4897
locale/sr.json
File diff suppressed because one or more lines are too long
4897
locale/sv.json
4897
locale/sv.json
File diff suppressed because one or more lines are too long
4897
locale/th.json
4897
locale/th.json
File diff suppressed because one or more lines are too long
4897
locale/tr.json
4897
locale/tr.json
File diff suppressed because one or more lines are too long
4897
locale/uk.json
4897
locale/uk.json
File diff suppressed because one or more lines are too long
4897
locale/vi.json
4897
locale/vi.json
File diff suppressed because one or more lines are too long
4897
locale/zh-Hans.json
4897
locale/zh-Hans.json
File diff suppressed because one or more lines are too long
4897
locale/zh-Hant.json
4897
locale/zh-Hant.json
File diff suppressed because one or more lines are too long
103
package-lock.json
generated
103
package-lock.json
generated
|
@ -12367,15 +12367,6 @@
|
||||||
"assert-plus": "^1.0.0"
|
"assert-plus": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gettext-parser": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.1.0.tgz",
|
|
||||||
"integrity": "sha1-LFpmONiTk0ubVQN9CtgstwBLJnk=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"encoding": "^0.1.11"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"git-parse": {
|
"git-parse": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/git-parse/-/git-parse-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/git-parse/-/git-parse-1.0.3.tgz",
|
||||||
|
@ -12688,12 +12679,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-color": {
|
|
||||||
"version": "0.1.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
|
|
||||||
"integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
|
@ -14721,6 +14706,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
||||||
},
|
},
|
||||||
|
"json-stable-stringify": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"jsonify": "~0.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"json-stable-stringify-without-jsonify": {
|
"json-stable-stringify-without-jsonify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
||||||
|
@ -14756,6 +14750,12 @@
|
||||||
"graceful-fs": "^4.1.6"
|
"graceful-fs": "^4.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"jsonify": {
|
||||||
|
"version": "0.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
|
||||||
|
"integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"jsprim": {
|
"jsprim": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
||||||
|
@ -16786,41 +16786,6 @@
|
||||||
"integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ==",
|
"integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"nomnom": {
|
|
||||||
"version": "1.8.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz",
|
|
||||||
"integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"chalk": "~0.4.0",
|
|
||||||
"underscore": "~1.6.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"chalk": {
|
|
||||||
"version": "0.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
|
|
||||||
"integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-styles": "~1.0.0",
|
|
||||||
"has-color": "~0.1.0",
|
|
||||||
"strip-ansi": "~0.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strip-ansi": {
|
|
||||||
"version": "0.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
|
|
||||||
"integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"normalize-package-data": {
|
"normalize-package-data": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
||||||
|
@ -17808,16 +17773,6 @@
|
||||||
"ts-pnp": "^1.1.2"
|
"ts-pnp": "^1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"po2json": {
|
|
||||||
"version": "0.4.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/po2json/-/po2json-0.4.5.tgz",
|
|
||||||
"integrity": "sha1-R7spUtoy1Yob4vJWpZjuvAt0URg=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"gettext-parser": "1.1.0",
|
|
||||||
"nomnom": "1.8.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"polished": {
|
"polished": {
|
||||||
"version": "3.4.2",
|
"version": "3.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/polished/-/polished-3.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/polished/-/polished-3.4.2.tgz",
|
||||||
|
@ -18730,26 +18685,16 @@
|
||||||
"shallow-equal": "^1.1.0"
|
"shallow-equal": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-intl-po": {
|
"react-intl-translations-manager": {
|
||||||
"version": "2.2.2",
|
"version": "5.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/react-intl-po/-/react-intl-po-2.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/react-intl-translations-manager/-/react-intl-translations-manager-5.0.3.tgz",
|
||||||
"integrity": "sha512-BvW4gyohm4Ac0sSN6dBJB3+PeIjsns+IE9JqT/7NolBRGNc+fCKzWa5e1eZdhu9nY+7W1t0sWqhrt+LXgXb6Iw==",
|
"integrity": "sha512-EfBeugnOGFcdUbQyY9TqBMbuauQ8wm73ZqFr0UqCljhbXl7YDHQcVzclWFRkVmlUffzxitLQFhAZEVVeRNQSwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^2.3.2",
|
"chalk": "^2.3.2",
|
||||||
"commander": "^2.15.1",
|
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"mkdirp": "^0.5.1",
|
"json-stable-stringify": "^1.0.1",
|
||||||
"po2json": "^0.4.5",
|
"mkdirp": "^0.5.1"
|
||||||
"ramda": "^0.25.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ramda": {
|
|
||||||
"version": "0.25.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz",
|
|
||||||
"integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-is": {
|
"react-is": {
|
||||||
|
@ -22244,12 +22189,6 @@
|
||||||
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
|
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"underscore": {
|
|
||||||
"version": "1.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
|
|
||||||
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"unfetch": {
|
"unfetch": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.1.0.tgz",
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
"lint-staged": "^9.4.2",
|
"lint-staged": "^9.4.2",
|
||||||
"plop": "^2.4.0",
|
"plop": "^2.4.0",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"react-intl-po": "^2.2.2",
|
"react-intl-translations-manager": "^5.0.3",
|
||||||
"react-test-renderer": "^16.12.0",
|
"react-test-renderer": "^16.12.0",
|
||||||
"regenerator-runtime": "^0.11.1",
|
"regenerator-runtime": "^0.11.1",
|
||||||
"require-context.macro": "^1.1.1",
|
"require-context.macro": "^1.1.1",
|
||||||
|
@ -184,9 +184,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack -p",
|
"build": "webpack -p",
|
||||||
"extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js",
|
"extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js",
|
||||||
"extract-pot-messages": "rip json2pot \"build/locale/**/*.json\" -c description -o locale/messages.pot",
|
"transpile-messages": "node scripts/transpile-tx.js",
|
||||||
"extract-messages": "npm run extract-json-messages && npm run extract-pot-messages",
|
"extract-messages": "npm run extract-json-messages && npm run transpile-messages",
|
||||||
"build-messages": "rip po2json 'locale/**/*.po' -m 'build/locale/**/*.json' -o 'locale' -c 'description'",
|
|
||||||
"build-types": "apollo client:codegen --target=typescript types --globalTypesFile=src/types/globalTypes.ts",
|
"build-types": "apollo client:codegen --target=typescript types --globalTypesFile=src/types/globalTypes.ts",
|
||||||
"check-types": "tsc --noEmit",
|
"check-types": "tsc --noEmit",
|
||||||
"generate-component": "plop --plopfile .plop/plopfile.js",
|
"generate-component": "plop --plopfile .plop/plopfile.js",
|
||||||
|
|
43
scripts/transpile-tx.js
Normal file
43
scripts/transpile-tx.js
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
|
const {
|
||||||
|
createSingleMessagesFile,
|
||||||
|
default: manageTranslations
|
||||||
|
} = require("react-intl-translations-manager");
|
||||||
|
|
||||||
|
const dotSeparator = "_dot_";
|
||||||
|
const sortKeys = true;
|
||||||
|
const translationsDirectory = "locale";
|
||||||
|
|
||||||
|
manageTranslations({
|
||||||
|
messagesDirectory: "build/locale/src",
|
||||||
|
overrideCoreMethods: {
|
||||||
|
outputSingleFile: combinedFiles => {
|
||||||
|
const msgDescriptors = combinedFiles.reduce(
|
||||||
|
(acc, messages) => [...acc, ...messages.descriptors],
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
const structuredJsonFormat = msgDescriptors.reduce((msgs, msg) => {
|
||||||
|
const key = msg.id.replace(/\./g, dotSeparator);
|
||||||
|
if (msgs[key] && msgs[key].context === undefined) {
|
||||||
|
msgs[key].context = msg.description;
|
||||||
|
} else {
|
||||||
|
msgs[key] = {
|
||||||
|
context: msg.description,
|
||||||
|
string: msg.defaultMessage
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return msgs;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
createSingleMessagesFile({
|
||||||
|
directory: translationsDirectory,
|
||||||
|
messages: structuredJsonFormat,
|
||||||
|
sortKeys
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
singleMessagesFile: true,
|
||||||
|
sortKeys,
|
||||||
|
translationsDirectory
|
||||||
|
});
|
|
@ -36,7 +36,7 @@ const AttributeBulkDeleteDialog: React.FC<AttributeBulkDeleteDialogProps> = ({
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this attribute} other{{displayQuantity} attributes}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this attribute?} other{Are you sure you want to delete {displayQuantity} attributes?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: quantity,
|
counter: quantity,
|
||||||
|
|
|
@ -298,7 +298,7 @@ export const CategoryDetails: React.FC<CategoryDetailsProps> = ({
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this category?} other{Are you sure you want to delete {displayQuantity} categories?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
@ -328,7 +328,7 @@ export const CategoryDetails: React.FC<CategoryDetailsProps> = ({
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this product?} other{Are you sure you want to delete {displayQuantity} products?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
|
|
@ -210,7 +210,7 @@ export const CategoryList: React.FC<CategoryListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this category?} other{Are you sure you want to delete {displayQuantity} categories?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: <strong>{maybe(() => params.ids.length)}</strong>
|
displayQuantity: <strong>{maybe(() => params.ids.length)}</strong>
|
||||||
|
|
|
@ -309,7 +309,7 @@ export const CollectionDetails: React.FC<CollectionDetailsProps> = ({
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
|
|
@ -260,7 +260,7 @@ export const CollectionList: React.FC<CollectionListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to publish {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to publish this collection?} other{Are you sure you want to publish {displayQuantity} collections?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
@ -293,7 +293,7 @@ export const CollectionList: React.FC<CollectionListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unpublish {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unpublish this collection?} other{Are you sure you want to unpublish {displayQuantity} collections?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
@ -325,7 +325,7 @@ export const CollectionList: React.FC<CollectionListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this collection?} other{Are you sure you want to delete {displayQuantity} collections?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
|
|
@ -89,7 +89,11 @@ export enum Locale {
|
||||||
ZH_HANT = "zh-hant"
|
ZH_HANT = "zh-hant"
|
||||||
}
|
}
|
||||||
|
|
||||||
type LocaleMessages = Record<string, string>;
|
interface StructuredMessage {
|
||||||
|
context?: string;
|
||||||
|
string: string;
|
||||||
|
}
|
||||||
|
type LocaleMessages = Record<string, StructuredMessage>;
|
||||||
const localeData: Record<Locale, LocaleMessages> = {
|
const localeData: Record<Locale, LocaleMessages> = {
|
||||||
[Locale.AR]: locale_AR,
|
[Locale.AR]: locale_AR,
|
||||||
[Locale.AZ]: locale_AZ,
|
[Locale.AZ]: locale_AZ,
|
||||||
|
@ -181,6 +185,19 @@ export const localeNames: Record<Locale, string> = {
|
||||||
[Locale.ZH_HANT]: "繁體中文"
|
[Locale.ZH_HANT]: "繁體中文"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const dotSeparator = "_dot_";
|
||||||
|
const sepRegExp = new RegExp(dotSeparator, "g");
|
||||||
|
|
||||||
|
function getKeyValueJson(messages: LocaleMessages): Record<string, string> {
|
||||||
|
if (messages) {
|
||||||
|
const keyValueMessages: Record<string, string> = {};
|
||||||
|
return Object.entries(messages).reduce((acc, [id, msg]) => {
|
||||||
|
acc[id.replace(sepRegExp, ".")] = msg.string;
|
||||||
|
return acc;
|
||||||
|
}, keyValueMessages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function getMatchingLocale(languages: readonly string[]): Locale {
|
export function getMatchingLocale(languages: readonly string[]): Locale {
|
||||||
const localeEntries = Object.entries(Locale);
|
const localeEntries = Object.entries(Locale);
|
||||||
|
|
||||||
|
@ -218,7 +235,7 @@ const LocaleProvider: React.FC = ({ children }) => {
|
||||||
<IntlProvider
|
<IntlProvider
|
||||||
defaultLocale={defaultLocale}
|
defaultLocale={defaultLocale}
|
||||||
locale={locale}
|
locale={locale}
|
||||||
messages={localeData[locale]}
|
messages={getKeyValueJson(localeData[locale])}
|
||||||
onError={err => {
|
onError={err => {
|
||||||
if (!err.includes("[React Intl] Missing message: ")) {
|
if (!err.includes("[React Intl] Missing message: ")) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
|
@ -210,7 +210,7 @@ export const CustomerList: React.FC<CustomerListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this customer} other{{displayQuantity} customers}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this customer?} other{Are you sure you want to delete {displayQuantity} customers?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
displayQuantity: (
|
displayQuantity: (
|
||||||
|
|
|
@ -422,7 +422,7 @@ export const SaleDetails: React.FC<SaleDetailsProps> = ({ id, params }) => {
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this category?} other{Are you sure you want to unassign {displayQuantity} categories?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
@ -455,7 +455,7 @@ export const SaleDetails: React.FC<SaleDetailsProps> = ({ id, params }) => {
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this collection?} other{Are you sure you want to unassign {displayQuantity} collections?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
@ -487,7 +487,7 @@ export const SaleDetails: React.FC<SaleDetailsProps> = ({ id, params }) => {
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
|
|
@ -216,7 +216,7 @@ export const SaleList: React.FC<SaleListProps> = ({ params }) => {
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this sale} other{{displayQuantity} sales}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this sale?} other{Are you sure you want to delete {displayQuantity} sales?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
|
|
@ -528,7 +528,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this category?} other{Are you sure you want to unassign {displayQuantity} categories?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
@ -561,7 +561,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this collection?} other{Are you sure you want to unassign {displayQuantity} collections?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
@ -594,7 +594,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
|
|
@ -216,7 +216,7 @@ export const VoucherList: React.FC<VoucherListProps> = ({ params }) => {
|
||||||
{canOpenBulkActionDialog && (
|
{canOpenBulkActionDialog && (
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this voucher} other{{displayQuantity} vouchers}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this voucher?} other{Are you sure you want to delete {displayQuantity} vouchers?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: params.ids.length,
|
counter: params.ids.length,
|
||||||
|
|
|
@ -70,10 +70,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
||||||
) : (
|
) : (
|
||||||
<Typography>
|
<Typography>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="{amount, plural,
|
defaultMessage="{amount, plural,one {One order is ready to fulfill} other {{amount} Orders are ready to fulfill}}"
|
||||||
one {One order}
|
|
||||||
other {{amount} Orders}
|
|
||||||
} are ready to fulfill"
|
|
||||||
id="homeNotificationTableOrders"
|
id="homeNotificationTableOrders"
|
||||||
values={{
|
values={{
|
||||||
amount: <strong>{ordersToFulfill}</strong>
|
amount: <strong>{ordersToFulfill}</strong>
|
||||||
|
@ -100,10 +97,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
||||||
) : (
|
) : (
|
||||||
<Typography>
|
<Typography>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="{amount, plural,
|
defaultMessage="{amount, plural,one {One payment to capture}other {{amount} Payments to capture}}"
|
||||||
one {One payment}
|
|
||||||
other {{amount} Payments}
|
|
||||||
} to capture"
|
|
||||||
id="homeNotificationTablePayments"
|
id="homeNotificationTablePayments"
|
||||||
values={{
|
values={{
|
||||||
amount: <strong>{ordersToCapture}</strong>
|
amount: <strong>{ordersToCapture}</strong>
|
||||||
|
@ -135,10 +129,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
||||||
) : (
|
) : (
|
||||||
<Typography>
|
<Typography>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="{amount, plural,
|
defaultMessage="{amount, plural,one {One product out of stock}other {{amount} Products out of stock}}"
|
||||||
one {One product}
|
|
||||||
other {{amount} Products}
|
|
||||||
} out of stock"
|
|
||||||
id="homeNotificationTableProducts"
|
id="homeNotificationTableProducts"
|
||||||
values={{
|
values={{
|
||||||
amount: <strong>{productsOutOfStock}</strong>
|
amount: <strong>{productsOutOfStock}</strong>
|
||||||
|
|
|
@ -99,10 +99,7 @@ export const HomeProductList: React.FC<HomeProductListProps> = props => {
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography color={"textSecondary"}>
|
<Typography color={"textSecondary"}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="{amount, plural,
|
defaultMessage="{amount, plural,one {One ordered}other {{amount} Ordered}}"
|
||||||
one {One ordered}
|
|
||||||
other {{amount} Ordered}
|
|
||||||
}"
|
|
||||||
description="number of ordered products"
|
description="number of ordered products"
|
||||||
id="homeProductListCardOrders"
|
id="homeProductListCardOrders"
|
||||||
values={{
|
values={{
|
||||||
|
|
|
@ -238,7 +238,7 @@ const MenuList: React.FC<MenuListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this menu} other{{displayQuantity} menus}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this menu?} other{Are you sure you want to delete {displayQuantity} menus?}}"
|
||||||
id="menuListDeleteMenusContent"
|
id="menuListDeleteMenusContent"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(
|
counter: maybe(
|
||||||
|
|
|
@ -38,7 +38,7 @@ const OrderBulkCancelDialog: React.FC<OrderBulkCancelDialogProps> = ({
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to cancel {counter,plural,one{this order} other{{displayQuantity} orders}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to cancel this order?} other{Are you sure you want to cancel {displayQuantity} orders?}}"
|
||||||
values={{
|
values={{
|
||||||
counter: numberOfOrders,
|
counter: numberOfOrders,
|
||||||
displayQuantity: <strong>{numberOfOrders}</strong>
|
displayQuantity: <strong>{numberOfOrders}</strong>
|
||||||
|
|
|
@ -229,7 +229,7 @@ export const OrderDraftList: React.FC<OrderDraftListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this order draft} other{{displayQuantity} orderDrafts}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this order draft?} other{Are you sure you want to delete {displayQuantity} order drafts?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
|
|
@ -186,7 +186,7 @@ export const PageList: React.FC<PageListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to publish {counter,plural,one{this page} other{{displayQuantity} pages}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to publish this page?} other{Are you sure you want to publish {displayQuantity} pages?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
@ -215,7 +215,7 @@ export const PageList: React.FC<PageListProps> = ({ params }) => {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unpublish {counter,plural,one{this page} other{{displayQuantity} pages}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unpublish this page?} other{Are you sure you want to unpublish {displayQuantity} pages?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
@ -243,7 +243,7 @@ export const PageList: React.FC<PageListProps> = ({ params }) => {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this page} other{{displayQuantity} pages}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this page?} other{Are you sure you want to delete {displayQuantity} pages?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
|
|
@ -14,9 +14,7 @@ export interface ProductTypeBulkAttributeUnassignDialogProps {
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProductTypeBulkAttributeUnassignDialog: React.FC<
|
const ProductTypeBulkAttributeUnassignDialog: React.FC<ProductTypeBulkAttributeUnassignDialogProps> = ({
|
||||||
ProductTypeBulkAttributeUnassignDialogProps
|
|
||||||
> = ({
|
|
||||||
attributeQuantity,
|
attributeQuantity,
|
||||||
confirmButtonState,
|
confirmButtonState,
|
||||||
open,
|
open,
|
||||||
|
@ -39,7 +37,7 @@ const ProductTypeBulkAttributeUnassignDialog: React.FC<
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this attribute} other{{attributeQuantity} attributes}} from {productTypeName}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unassign this attribute from {productTypeName}?} other{Are you sure you want to unassign {attributeQuantity} attributes from {productTypeName}?}}"
|
||||||
description="unassign multiple attributes from product type"
|
description="unassign multiple attributes from product type"
|
||||||
values={{
|
values={{
|
||||||
attributeQuantity: <strong>{attributeQuantity}</strong>,
|
attributeQuantity: <strong>{attributeQuantity}</strong>,
|
||||||
|
|
|
@ -218,7 +218,7 @@ export const ProductTypeList: React.FC<ProductTypeListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this product type} other{{displayQuantity} product types}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this product type?} other{Are you sure you want to delete {displayQuantity} product types?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
|
|
@ -403,7 +403,7 @@ export const ProductList: React.FC<ProductListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this product?} other{Are you sure you want to delete {displayQuantity} products?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
@ -435,7 +435,7 @@ export const ProductList: React.FC<ProductListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to publish {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to publish this product?} other{Are you sure you want to publish {displayQuantity} products?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
@ -467,7 +467,7 @@ export const ProductList: React.FC<ProductListProps> = ({ params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to unpublish {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to unpublish this product?} other{Are you sure you want to unpublish {displayQuantity} products?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
|
|
@ -322,7 +322,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this variant} other{{displayQuantity} variants}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this variant?} other{Are you sure you want to delete {displayQuantity} variants?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
|
|
@ -233,7 +233,7 @@ export const ShippingZonesList: React.FC<ShippingZonesListProps> = ({
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this shipping zone} other{{displayQuantity} shipping zones}}?"
|
defaultMessage="{counter,plural,one{Are you sure you want to delete this shipping zone?} other{Are you sure you want to delete {displayQuantity} shipping zones?}}"
|
||||||
description="dialog content"
|
description="dialog content"
|
||||||
values={{
|
values={{
|
||||||
counter: maybe(() => params.ids.length),
|
counter: maybe(() => params.ids.length),
|
||||||
|
|
Loading…
Reference in a new issue