Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Singleton Service] Wrong localeID display when combination is valid while the pattern result is from different locale #311

Closed
nannany00 opened this issue Nov 25, 2019 · 1 comment
Assignees
Milestone

Comments

@nannany00
Copy link
Contributor

Describe the bug
Currently, Singleton Service below APIs, provides the pattern data for "dates, numbers, currencies, plurals, measurements, dateFields":
When combination of language and region is valid,
"dates, numbers, currencies, measurements" following the valid combined locale; however,
"plurals,dateFields" always following language.

GET /i18n/api/v2/formatting/patterns Get pattern from CLDR
POST /i18n/api/v2/combination/translationsAndPattern Get translations and patterns

Therefore, it will be different localeID when to get the pattern for "dates,plurals" etc.
so Singleton should return "" for this scenario.

To Reproduce
Steps to reproduce the behavior:

  1. Start the latest Singleton Service build
  2. Find the APIs to get pattern by language and region
  3. Check the Response body
  4. Example data:
    language: es
    region: US
    scope: dates,dateFields
    in Response:
"data": {
    "localeID": "es-US",
    "language": "es",
    "region": "US",
....

Expected behavior
"localeID" should be "", as "dates" is from "es-US", "dateFields" is from "es".

Screenshots
NA

Desktop (please complete the following information):
NA

Additional context
NA

@nannany00
Copy link
Contributor Author

nannany00 commented Nov 25, 2019

The "localeID" always display as the combined locale even if just request "plurals" or "dateFields".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants