Git Product home page Git Product logo

Comments (3)

bendvc avatar bendvc commented on July 25, 2024 1

@syunyama

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.

bendvc avatar bendvc commented on July 25, 2024

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.

syunyama avatar syunyama commented on July 25, 2024

@bendvc
Thank you.
Please attach PR to this thread and close after merge.

from pwa-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.