Skip to content

Commit

Permalink
Add additional logic for zh-hans and zh-hant
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhao271 committed Oct 17, 2022
1 parent 76ff8f4 commit 4ac2ed6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ export class LocalizationWorkbenchContribution extends Disposable implements IWo

private checkAndInstall(): void {
const language = platform.language;
const locale = platform.locale; // might contain trailing country code
let locale = platform.locale ?? '';
if (locale.startsWith('zh-hans')) {
locale = 'zh-cn';
} else if (locale.startsWith('zh-hant')) {
locale = 'zh-tw';
}
const languagePackSuggestionIgnoreList = <string[]>JSON.parse(this.storageService.get(LANGUAGEPACK_SUGGESTION_IGNORE_STORAGE_KEY, StorageScope.APPLICATION, '[]'));

if (!this.galleryService.isEnabled()) {
Expand Down

0 comments on commit 4ac2ed6

Please sign in to comment.