singleton icon indicating copy to clipboard operation
singleton copied to clipboard

[BUG] [Java Service]Get 520 when requesting zh-Hant-alt-long language's display name with API /i18n/api/v2/locale/supportedLanguageList.

Open lyiyu66 opened this issue 3 years ago • 4 comments

Describe the bug commit: c7afc3bee93563af3c7073adfdd5cbd9b584ca0e 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 avatar Nov 16 '21 02:11 lyiyu66

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 avatar Dec 09 '21 10:12 lyiyu66

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'.

huihuiw01 avatar Aug 16 '23 11:08 huihuiw01

@huihuiw01 the kinds of 'en-US-alt-short' and 'pt-pt' are fixed with commit 764529a5503cf3183c300c0e86ade72bc8eb3f2c. 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 avatar Aug 29 '23 13:08 lyiyu66

For locale "zh-alt-long", its display name can be shown correctly with commit e768e131422a9494f1d04a82a4f33a7d65a6981c: 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",

lyiyu66 avatar Nov 27 '23 10:11 lyiyu66