vmware / vmware/singleton

[BUG] [JS Client]Number Format in Plurals usage doesn't follow region when getTranslation API's response is null from Singleton service.

Open
#365 0 comments 0 reactions 1 assignee View on GitHub

@wangyi-e is already working on this.

Since Jan 14, 2020.

area/js-client kind/bug priority/medium
Dominant language
Java
Stars
72
Forks
69
Avg merge
23h 32m
Merged PRs (30d)
4

Description

Describe the bug
Number Format in Plurals usage doesn't follow region when getTranslation API's response is null from Singleton service.
The behavior is inconsistent with getTranslation API's response has corresponding translation.
e.g.
response has related translation:
fr/IT or fr-IT: translation displays as fr translation and number format is IT format.
response is null:
it/IT or it-IT: translation displays as local source and number format is EN format.

To Reproduce
Steps to reproduce the behavior:

  1. Using get multiple component with combineRequest option is true.
  2. Request one language/region or language that doesn't has corresponding translation in Singleton service. (e.g. it-IT or it/IT and there isn't it translation - messages_it.json in Singleton service.)
  3. Request the translation and plurals and numbers patterns that mentioned in step 2.

Actual behavior
Since no it translation in Singleton service, the response from service is null. And the plurals behavior as below:
it/IT or it-IT: translation displays as local source and number format is EN format.

Expected behavior
The behavior should be consistent. Number format should follow provided region.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.