Skip to content

Lack of complete Intl.NumberFormat()/toLocaleString() support in NodeJs #3836

@cewald

Description

@cewald

Current behavior

This might be connected to #3553

If you use a Node version which not yet contains the full-icu package by default like v10-LTS, the numbers aren't formatted correctly on server-side which leads into a flickering of prices on initial page-load.

With version v13.2.0 of node they start to implement --with-intl=full-icu as default, which contains all languages for nodes server-side localization. Before that version its only --with-intl=small-icu.
See here: https://nodejs.org/api/intl.html#

Maybe it would be a good idea to use some kind of polyfill for that like this Intl polyfill to handle it just in case.

Expected behavior

Show the prices also on SSR correctly.

Steps to reproduce the issue

  • Use Node 10 LTS
  • Setup a german store-view
  • Load a product in german store-view
  • You should see a flickering before the browser is rendering the number using price.js – first it is 10.99 €, then 10,99 €
  • If you log it, you will see that the format is always in US on server-side – like: 10.99 €

Repository

Latest develop and release/v1.11

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser: Chrome
  • OS: OSX
  • Node: 10 LTS
  • Code Version: release/v1.11 and develop

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: ImportantPriority mark - still high ;)bugBug reports

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions