Skip to content

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

@nannany00

Description

@nannany00

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions