Open vinhtrinh opened 7 months ago
Thanks for reporting this issue @vinhtrinh. I've validated that this is an issue, I'll take a look at your PR submission as well and see how we can get this fixed asap and a new bug fix release pushed out.
@vinhtrinh I've partially implemented a fix (for issue 1) and it's been merged here. I'll continue looking at issue 2, I want to discuss this with the dev that implemented that feature as I believe we had a conversation about similar limitations previously.
Hi @bendvc, thanks for the quick fix. I guess we can close the linked PR to this issue.
About the issue no.2, if we want to keep current behavior, I would like to suggest some options below
try ... catch ...
statement and restore them in the finally
block--extract-source-location
and --format
options from formatjs extract
command
--extract-source-location
option
{
"header.button.assistive_msg.my_account": {
"col": 55,
"defaultMessage": "My account ^^!",
"end": 5963,
"file": "overrides/app/components/header/index.jsx",
"line": 158,
"start": 5801
},
"header.button.assistive_msg.my_account__old": {
"col": 55,
"defaultMessage": "My account",
"end": 5964,
"file": "app/components/header/index.jsx",
"line": 158,
"start": 5801
}
}
Hi @vinhtrinh, thanks for opening this issue. I've tried to reproduce issue 2 based on the steps provided, but the script runs with no errors on my side. Could you provide some details about your environment?
@salesforce/pwa-kit-create-app
versionHi @joeluong-sfcc, this issue still happen with latest @salesforce/pwa-kit-create-app (v3.4.0)
and @salesforce/retail-react-app (v2.3.1)
npx @salesforce/pwa-kit-create-app@latest --preset retail-react-app-demo
cd ./retail-react-app-demo
cp -r ./node_modules/@salesforce/retail-react-app/app/components ./overrides/app/
npm run extract-default-translations
I guess this issue only happen on Windows with a smaller max command length limit.
This issue has been linked to a new work item: W-15020149
Summary
Unable to extract the translations
Steps To Reproduce
Base Setup: optional
npx @salesforce/pwa-kit-create-app --preset retail-react-app-demo
Issue 1: Unable extract the translations
npm run extract-default-translations
Issue 2: Command failed
components
folder from Retail React App tooverrides/app
foldernpm run extract-default-translations
-4064
, codeENAMETOOLONG
Expected result
The script should extract messages to translations folder