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] Missing onContextChange callback for version 2.8 HOT 1
- [FEATURE] Allow multiple MRT environments to share a single domain
- [FEATURE] Support Maintenance Mode 🚧 HOT 1
- [BUG] Custom parameters not taking into account for cache invalidation HOT 2
- [FEATURE] Identify traffic coming from MRT HOT 1
- [FEATURE] withReactQuery - add an option to seed the queryClient or to prefetch query HOT 3
- [BUG] Duplicated request for async/defer scripts using react-helmet HOT 3
- [BUG] Unsupported engine on NodeJS 22, NPM 10 HOT 1
- [DOCS] Examples of extending webpack configuration HOT 1
- [FEATURE] Support multiple `siteAliases` for a B2C Commerce Site HOT 1
- [FEATURE] Harden token handling
- [FEATURE] Support Agent Login 👔
- [BUG] Enabled attribute not working for the registerCustomer (Shopper Customers) endpoint HOT 1
- [BUG] Profile edit deletes addreses from useCurrentCustomer response HOT 2
- [BUG] Concurrent request issue when registering a disabled customer HOT 3
- [FEATURE] Ability to have private proxy URL by default in useCommerceApi HOT 8
- [BUG] Not getting correct secret key in callback controller trigerred by SLAS HOT 6
- [BUG] Cannot proceed when Logging in during checkout HOT 1
- [BUG] getTrustedAgentAccessToken don't work with private custom proxy. HOT 1
- [BUG] PWA fetches SCAPI data during hydration HOT 2
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.