From d5a1537ea67382ad83ee327d3231c44c1b4ac027 Mon Sep 17 00:00:00 2001 From: Rowe Wilson Frederisk Holme Date: Tue, 21 Dec 2021 15:37:40 +0800 Subject: [PATCH] Update i18n --- README.md | 2 +- src/index.ts | 47 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ac745d3..b795110 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A Mediawiki Gadget for Wikitext Extension based on MediaWiki. To allow users to ## Usage -### For ordinary users(such as WikiMedia Sister Project editors) +### For ordinary users (such as WikiMedia Sister Project editors) First make sure that your [VSCode](https://code.visualstudio.com/) has installed the [Wikitext Extension for VSCode](https://marketplace.visualstudio.com/items?itemName=RoweWilsonFrederiskHolme.wikitext) v3.4.0 or upper. Then you only need to log in to your site, open the User Preferences, Appearance, and add a new line of code for Custom JavaScript: diff --git a/src/index.ts b/src/index.ts index 41a8e91..605b83c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,23 +29,50 @@ jQuery.when(window.mw.loader.using('mediawiki.util'), $.ready).then((): void => }, cantonese: { text: '開啟於 VSCode', - tooltip: '開啟此頁於 Visual Studio Code', + tooltip: '喺 Visual Studio Code 開呢個頁面', }, simplified_chinese: { text: '在 VSCode 中打开', - tooltip: '在 Visual Studio Code 中打开此页', + tooltip: '在 Visual Studio Code 中打开此页面', }, traditional_chinese: { - text: '在 VSCode 中打開', - tooltip: '在 Visual Studio Code 中打開此頁', + text: '使用 VSCode 開啟', + tooltip: '以 Visual Studio Code 開啟此頁面', }, korean: { text: 'VSCode 에서 열기', tooltip: '이 페이지를 Visual Studio Code 에서 열기', }, + thai: { + text: 'เปิดใน VSCode', + tooltip: 'เปิดหน้านี้ใน Visual Studio Code', + }, + vietnamese: { + text: 'Mở trong VSCode', + tooltip: 'Mở trang này trong Visual Studio Code', + }, + indonesian: { + text: 'Buka di VSCode', + tooltip: 'Buka halaman ini di Visual Studio Code', + }, + polish: { + text: 'Otwórz w VSCode', + tooltip: 'Otwórz tę stronę w Visual Studio Code', + }, + dutch: { + text: 'Open in VSCode', + tooltip: 'Open deze pagina in Visual Studio Code', + }, + french: { + text: 'Ouvrir dans VSCode', + tooltip: 'Ouvrir cette page dans Visual Studio Code', + }, + german: { + text: 'Öffnen in VSCode', + tooltip: 'Öffne diese Seite in Visual Studio Code', + }, }; const i18n: Record = { - // English: default 'en': i18nSource['english'], 'ru': i18nSource['russian'], 'ja': i18nSource['japanese'], @@ -61,6 +88,13 @@ jQuery.when(window.mw.loader.using('mediawiki.util'), $.ready).then((): void => 'zh-tw': i18nSource['traditional_chinese'], 'zh-hk': i18nSource['traditional_chinese'], 'zh-mo': i18nSource['traditional_chinese'], + 'th': i18nSource['thai'], + 'vi': i18nSource['vietnamese'], + 'id': i18nSource['indonesian'], + 'pl': i18nSource['polish'], + 'nl': i18nSource['dutch'], + 'fr': i18nSource['french'], + 'de': i18nSource['german'], }; const lang: string = window.mw.config.get('wgUserLanguage'); const displayInfo: DisplayInfo = { @@ -94,5 +128,6 @@ jQuery.when(window.mw.loader.using('mediawiki.util'), $.ready).then((): void => 'wikitext-extension-gadget', displayInfo['tooltip'], undefined, - isMinerva ? undefined : '#ca-history'); + isMinerva ? undefined : '#ca-history' + ); });