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

zh-CN and zh-Hant locales no longer work #53275

Closed
rebornix opened this issue Jun 28, 2018 · 2 comments
Closed

zh-CN and zh-Hant locales no longer work #53275

rebornix opened this issue Jun 28, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Jun 28, 2018

Issue Type: Bug

Changing the display language to zh-CN or zh-Hant doesn't show display language in Chinese and no prompt for language pack installation suggestion.

zh-CN and zh-Hant works in latest Stable.

VS Code version: Code - Insiders 1.25.0-insider (07d89ab, 2018-06-28T05:19:16.448Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.92GB (21.20GB free)
Process Argv C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe --enable-proposed-api Microsoft.vscode-pull-request-github
Screen Reader no
VM 0%
Extensions (6)
Extension Author (truncated) Version
vscode-eslint dba 1.4.12
gitlens eam 8.4.1
tslint eg2 1.0.33
vscode-pull-request-github Mic 0.0.3
theme-monokai-pro-vscode mon 1.1.8
debugger-for-chrome msj 4.7.0

(1 theme extensions excluded)

@rebornix rebornix added the important Issue identified as high-priority label Jun 28, 2018
@rebornix rebornix added this to the June 2018 milestone Jun 28, 2018
@ramya-rao-a ramya-rao-a added the bug Issue identified by VS Code Team member as probable bug label Jun 28, 2018
@RMacfarlane RMacfarlane added the verified Verification succeeded label Jun 29, 2018
@dbaeumer
Copy link
Member

dbaeumer commented Jul 2, 2018

@ramya-rao-a just to make sure this will work correctly in all cases:

  • there is no problem of having zh-hans or zh-hant in the extension name
  • the language id must always be zh-cn or zh-tw. These ids are API (extension might rely on it) and we can't change them. These are also the value returned from the Electron OS call to get the app locale.

This means that these two statements

const languageName = loc ? (loc.languageName || currentLocale) : currentLocale;
const languageDisplayName = loc ? (loc.localizedLanguageName || loc.languageName || currentLocale) : currentLocale;

are OK iff the language pack defined a id. If not (which we could argue should not happen) the code might not work since we should use the locale and not the currentLocale.

@sandy081
Copy link
Member

sandy081 commented Jul 3, 2018

@ramya-rao-a This broke the recommendation prompts as the change is using the mapped locale id for getting minimal translations.

As @dbaeumer mentioned, we should use zh-hans or zh-hant only for extension names and locales should be always zh-cn and zh-tw. Pushed a fix for this here - 3962b54

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants