Comments (3)
This is a long PR that is implementing multi-site support for the retail react app. I've linked the file directly were we are fixing the scripts that previously result in having a translation file with the wrong language in it (if you are to change you default locale).
We are currently working on releasing this code. So keep an eye out.
from pwa-kit.
Hi Shumpei Yamada
Thank you for pointing this out. This is a problem that is already on our radar and we have a PR that will be merged shortly that will stop this kind of error from happening.
The change is essentially locking down the locale used in the compile and extract scripts in the package.json file like below:
"compile-translations:pseudo": "formatjs compile --ast app/translations/en-US.json --out-file app/translations/compiled/en-XB.json --pseudo-locale en-XB",
"extract-default-translations": "formatjs extract 'app/**/*.{js,jsx}' --out-file app/translations/en-US.json --id-interpolation-pattern [sha512:contenthash:base64:6]",
The reason why this makes sense is because the default locale in this sense is the locale in which the code's "default messages" are written in. In the future we are going to look into being able to generate projects with defaultMessages in the users selected locale.
If you have any more questions please let me know.
Ben
from pwa-kit.
@bendvc
Thank you.
Please attach PR to this thread and close after merge.
from pwa-kit.
Related Issues (20)
- [BUG] Custom SFRA session attributes are lost by PWA in phased launch setup HOT 1
- [BUG] local dev js memory heap issue HOT 12
- [BUG] Generated projects don't include README
- [FEATURE] Extract out list of country codes into a separate file to allow overriding
- [BUG] Upgrading to v3.0 has broken Contentful Live Preview HOT 2
- [BUG] Merge basket functionality not successful HOT 5
- [BUG] Improve errors when logging in with invalid credentials HOT 1
- [BUG] `pwa-kit-dev` start command error HOT 2
- [Feature request] route matching by hostname HOT 6
- [BUG] Adding product to wishlist as guest does not happen automatically after logging in HOT 1
- [BUG] PWA KIT API is giving 401 in respose HOT 2
- [BUG] Duplicate product line item for option product HOT 2
- [FEATURE] Integrating Storybook HOT 3
- [FEATURE] Improve behavior of keepPreviousData PLP/PDP HOT 2
- [BUG] denying access to localstorage / sessionstorage / cookies breaks the site HOT 3
- [FEATURE] new hook / feature: useManyProducts HOT 2
- [BUG] / [FEATURE] Improve checkout error handling HOT 3
- [FEATURE] Allow custom parameters in commerce-sdk-react HOT 6
- [BUG] Basket default shipping method not being updated on currency change HOT 2
- [BUG] 401 error after register a customer using an login different from the email. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwa-kit.