Skip to content

Commit

Permalink
fix: delete Greek(Cyprus) and fix chinese languages
Browse files Browse the repository at this point in the history
  • Loading branch information
mikasackermn committed Nov 2, 2024
1 parent 675bb72 commit dd8c0bf
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 50 deletions.
37 changes: 18 additions & 19 deletions lingui.config.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
/** @type {import('@lingui/conf').LinguiConfig} */
module.exports = {
locales: [
'en',
'es',
'ja',
'fr',
'pt',
'zh',
'ru',
'de',
'uk',
'sv',
'fi',
'nl',
'el',
'it',
'pl',
'af',
'ar',
'bn',
'ca',
'da',
'de',
'el',
'en',
'es',
'fi',
'fil',
'fr',
'hi',
'hu',
'id',
'it',
'ja',
'ko',
'lt',
'fil',
'sr',
'ms',
'nl',
'pl',
'pt',
'ru',
'sk',
'sr',
'sv',
'sw',
'th',
'tr',
'uk',
'ur',
'vi',
'ms',
'el-CY',
'zh-CN',
'zh-TW',
],
sourceLocale: 'en',
Expand Down
2 changes: 2 additions & 0 deletions scripts/crowdin/command.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PROJECT_ID, TOKEN } from "./constants.mjs";
import { CrowdinError } from "../common/errors.mjs";
import {
checkPreTranslateStatus,
getLanguageIds,
Expand All @@ -7,6 +8,7 @@ import {
sendPreTranslateRequest
} from "./pretranslate.mjs";


const preTranslationOption = {
method: 'mt',
autoApproveOption: 'all',
Expand Down
1 change: 1 addition & 0 deletions scripts/crowdin/utils.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {TOKEN } from "./constants.mjs";
import { CrowdinError } from "../common/errors.mjs";

// Reusable function to handle fetch requests with authorization headers
export const fetchDataWithAuthorization = async (url, method = 'GET', body = null) => {
Expand Down
9 changes: 1 addition & 8 deletions widget/embedded/src/constants/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Bengali,
Catalonia,
Chinese,
Cyprus,
Denmark,
English,
Finland,
Expand Down Expand Up @@ -53,7 +52,7 @@ export const LANGUAGES: LanguageItem[] = [
{
title: 'Chinese (Simplified)',
label: '简体中文',
local: 'zh',
local: 'zh-CN',
SVGFlag: Chinese,
},
{
Expand All @@ -70,12 +69,6 @@ export const LANGUAGES: LanguageItem[] = [
{ title: 'French', label: 'Français', local: 'fr', SVGFlag: French },
{ title: 'German', label: 'Deutsch', local: 'de', SVGFlag: German },
{ title: 'Greek', label: 'ελληνικά', local: 'el', SVGFlag: Greece },
{
title: 'Greek(Cyprus)',
label: 'Ελληνικά(Κύπρος)',
local: 'el-CY',
SVGFlag: Cyprus,
},
{ title: 'Hindi', label: 'हिंदी', local: 'hi', SVGFlag: India },
{ title: 'Hungarian', label: 'Magyar', local: 'hu', SVGFlag: Hungary },
{ title: 'Indonesian', label: 'Indonesia', local: 'id', SVGFlag: Indonesian },
Expand Down
4 changes: 1 addition & 3 deletions widget/playground/src/constants/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
Bengali,
Catalonia,
Chinese,
Cyprus,
Denmark,
English,
Finland,
Expand Down Expand Up @@ -41,7 +40,7 @@ export const LANGUAGES = [
{ name: 'Arabic', value: 'ar', Icon: SaudiArabia },
{ name: 'Bengali', value: 'bn', Icon: Bengali },
{ name: 'Catalan', value: 'ca', Icon: Catalonia },
{ name: 'Chinese (Simplified)', value: 'zh', Icon: Chinese },
{ name: 'Chinese (Simplified)', value: 'zh-CN', Icon: Chinese },
{ name: 'Chinese (Traditional)', value: 'zh-TW', Icon: Chinese },
{ name: 'Danish', value: 'da', Icon: Denmark },
{ name: 'Dutch', value: 'nl', Icon: Netherlands },
Expand All @@ -51,7 +50,6 @@ export const LANGUAGES = [
{ name: 'French', value: 'fr', Icon: French },
{ name: 'German', value: 'de', Icon: German },
{ name: 'Greek', value: 'el', Icon: Greece },
{ name: 'Greek (Cyprus)', value: 'el-CY', Icon: Cyprus },
{ name: 'Hindi', value: 'hi', Icon: India },
{ name: 'Hungarian', value: 'hu', Icon: Hungary },
{ name: 'Indonesian', value: 'id', Icon: Indonesian },
Expand Down
38 changes: 18 additions & 20 deletions widget/ui/src/components/I18nManager/I18nManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { messages as bnMessages } from '../../../../../translations/bn.js';
import { messages as caMessages } from '../../../../../translations/ca.js';
import { messages as daMessages } from '../../../../../translations/da.js';
import { messages as deMessages } from '../../../../../translations/de.js';
import { messages as el_CYMessages } from '../../../../../translations/el-CY.js';
import { messages as elMessages } from '../../../../../translations/el.js';
import { messages as enMessages } from '../../../../../translations/en.js';
import { messages as esMessages } from '../../../../../translations/es.js';
Expand Down Expand Up @@ -45,45 +44,44 @@ import { messages as trMessages } from '../../../../../translations/tr.js';
import { messages as ukMessages } from '../../../../../translations/uk.js';
import { messages as urMessages } from '../../../../../translations/ur.js';
import { messages as viMessages } from '../../../../../translations/vi.js';
import { messages as zh_CNMessages } from '../../../../../translations/zh-CN.js';
import { messages as zh_TWMessages } from '../../../../../translations/zh-TW.js';
import { messages as zhMessages } from '../../../../../translations/zh.js';

const messages = {
en: enMessages,
es: esMessages,
ja: jaMessages,
fr: frMessages,
pt: ptMessages,
zh: zhMessages,
ru: ruMessages,
de: deMessages,
uk: ukMessages,
sv: svMessages,
fi: fiMessages,
nl: nlMessages,
el: elMessages,
it: itMessages,
pl: plMessages,
af: afMessages,
ar: arMessages,
bn: bnMessages,
ca: caMessages,
da: daMessages,
de: deMessages,
el: elMessages,
en: enMessages,
es: esMessages,
fi: fiMessages,
fil: filMessages,
fr: frMessages,
hi: hiMessages,
hu: huMessages,
id: idMessages,
it: itMessages,
ja: jaMessages,
ko: koMessages,
lt: ltMessages,
ms: msMessages,
fil: filMessages,
sr: srMessages,
nl: nlMessages,
pl: plMessages,
pt: ptMessages,
ru: ruMessages,
sk: skMessages,
sr: srMessages,
sv: svMessages,
sw: swMessages,
th: thMessages,
tr: trMessages,
uk: ukMessages,
ur: urMessages,
vi: viMessages,
'el-CY': el_CYMessages,
'zh-CN': zh_CNMessages,
'zh-TW': zh_TWMessages,
};

Expand Down

0 comments on commit dd8c0bf

Please sign in to comment.