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] [Java Service]Get 520 when requesting zh-Hant-alt-long language's display name with API /i18n/api/v2/locale/supportedLanguageList. #1364

Open
lyiyu66 opened this issue Nov 16, 2021 · 4 comments
Assignees

Comments

@lyiyu66
Copy link

lyiyu66 commented Nov 16, 2021

Describe the bug
commit: c7afc3b
Get 520 when requesting zh-Hant-alt-long language's display name with API /i18n/api/v2/locale/supportedLanguageList.

To Reproduce
Steps to reproduce the behavior:

  1. Put a json file with name: messages_zh-Hant-alt-long.json in VMwareVIPLocale&1.0.0 bundles.
  2. Request its displayname with "http://serviceip:8091/i18n/api/v2/locale/supportedLanguageList?displayLanguage=en&productName=VMwareVIPLocale&version=1.0.0"

Get response below:
{"response":{"code":520,"message":"11","serverTime":""},"signature":"","data":null}

Expected behavior
zh-Hant-alt-long is in languages.json file.
"zh-Hant-alt-long": "Traditional Mandarin Chinese"

Additional context
Same behavior with other similar locale:
"zh-alt-long": "Mandarin Chinese",
"zh-alt-menu": "Chinese, Mandarin",
"yue-alt-menu": "Chinese, Cantonese"...

@lyiyu66
Copy link
Author

lyiyu66 commented Dec 9, 2021

The issue happens when there is below kind name(region is named with low case) of file: pt-pt, fr-fr ...
Other languages can't be shown due to the issue, and locale should not be case sensitive, set the priority to high.

lyiyu66 added a commit to lyiyu66/singleton that referenced this issue Dec 10, 2021
lyiyu66 added a commit that referenced this issue Dec 10, 2021
delete messages_pt-pt.json due to service issue #1364 to avoid blocki…
@huihuiw01
Copy link
Contributor

No 'zh-Hans-alt-long' language in cldr-32.0.0 version, it should be new added data in cldr master branch, but this kind of issue has been fixed, you can verify the fix with 'en-US-alt-short'.

@lyiyu66
Copy link
Author

lyiyu66 commented Aug 29, 2023

@huihuiw01
the kinds of 'en-US-alt-short' and 'pt-pt' are fixed with commit 764529a.
But below data is returned for this kind 'zh-alt-long' language:

{
        "languageTag": "alt-Long",
        "displayName": "Southern Altai ()",
        "displayName_sentenceBeginning": "Southern Altai ()",
        "displayName_uiListOrMenu": "Southern Altai ()",
        "displayName_standalone": "Southern Altai ()"
      }

@lyiyu66
Copy link
Author

lyiyu66 commented Nov 27, 2023

For locale "zh-alt-long", its display name can be shown correctly with commit e768e13:
image

Communicated with dev @huihuiw01 , for the locales aren't supported in languages.json file, should use the combination of language+script+territory+variant for its display name.
locale: zh-Hant-alt-stand-alone should be: Chinese(Simplified Han)
In languages file: "zh": "Chinese"
In scripts file: "Hans-alt-stand-alone": "Simplified Han",
locale: cs-CZ-alt-variant should be: Czech(Czech Republic)
In languages file: "cs": "Czech",
In territories file: "CZ-alt-variant": "Czech Republic",

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