Skip to content

Commit

Permalink
Do the compile of .po files to JSON with vite
Browse files Browse the repository at this point in the history
  • Loading branch information
benbucksch committed Jun 29, 2024
1 parent 60010a4 commit 9d9ad62
Show file tree
Hide file tree
Showing 24 changed files with 29 additions and 43 deletions.
40 changes: 20 additions & 20 deletions app/l10n/l10n.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { locale } from 'svelte-i18n-lingui';
import { sourceLocale } from './list';

import { messages as en } from './locales/en/messages';
import { messages as de } from './locales/de/messages';
import { messages as fr } from './locales/fr/messages';
import { messages as it } from './locales/it/messages';
import { messages as es } from './locales/es/messages';
import { messages as pt } from './locales/pt/messages';
import { messages as pl } from './locales/pl/messages';
import { messages as ja } from './locales/ja/messages';
import { messages as zh } from './locales/zh/messages';
import { messages as en } from './locales/en/messages.po';
import { messages as de } from './locales/de/messages.po';
import { messages as fr } from './locales/fr/messages.po';
import { messages as it } from './locales/it/messages.po';
import { messages as es } from './locales/es/messages.po';
import { messages as pt } from './locales/pt/messages.po';
import { messages as pl } from './locales/pl/messages.po';
import { messages as ja } from './locales/ja/messages.po';
import { messages as zh } from './locales/zh/messages.po';

import { messages as ar } from './locales/ar/messages';
import { messages as cs } from './locales/cs/messages';
import { messages as da } from './locales/da/messages';
import { messages as el } from './locales/el/messages';
import { messages as fi } from './locales/fi/messages';
import { messages as nl } from './locales/nl/messages';
import { messages as no } from './locales/no/messages';
import { messages as ro } from './locales/ro/messages';
import { messages as ru } from './locales/ru/messages';
import { messages as sv } from './locales/sv/messages';
import { messages as uk } from './locales/uk/messages';
import { messages as ar } from './locales/ar/messages.po';
import { messages as cs } from './locales/cs/messages.po';
import { messages as da } from './locales/da/messages.po';
import { messages as el } from './locales/el/messages.po';
import { messages as fi } from './locales/fi/messages.po';
import { messages as nl } from './locales/nl/messages.po';
import { messages as no } from './locales/no/messages.po';
import { messages as ro } from './locales/ro/messages.po';
import { messages as ru } from './locales/ru/messages.po';
import { messages as sv } from './locales/sv/messages.po';
import { messages as uk } from './locales/uk/messages.po';

/** Map of lang code to messages.
* Lang codes: <https://www.wikiwand.com/en/List_of_ISO_639_language_codes> */
Expand Down
1 change: 0 additions & 1 deletion app/l10n/locales/ar/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/cs/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/da/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/de/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/el/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/en/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/es/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/fi/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/fr/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/it/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/ja/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/nl/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/no/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/pl/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/pt/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/ro/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/ru/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/sv/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/uk/messages.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/l10n/locales/zh/messages.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/lingui.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export default {
]
}
],
extractors: [jstsExtractor, svelteExtractor]
extractors: [jstsExtractor, svelteExtractor],
};
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"check": "svelte-check --tsconfig ./tsconfig.json",
"l10n:extract": "lingui extract",
"l10n:extract:template": "lingui extract-template",
"l10n:compile": "lingui compile --typescript",
"l10n:crowdin": "cd l10n && crowdin",
"l10n:sync": "cd l10n && crowdin push && crowdin pull",
"l10n:sync:sources": "cd l10n && crowdin push",
Expand All @@ -20,6 +19,7 @@
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@lingui/core": "^4.11.1",
"@lingui/vite-plugin": "^4.11.1",
"@popperjs/core": "^2.11.8",
"@svelteuidev/composables": "^0.14.0",
"@svelteuidev/core": "^0.14.0",
Expand Down
8 changes: 7 additions & 1 deletion app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'vite'
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { lingui } from '@lingui/vite-plugin';
import { olm } from './build/olm';

// https://vitejs.dev/config/
Expand All @@ -9,5 +10,10 @@ export default defineConfig({
port: 5454,
strictPort: true,
},
plugins: [nodePolyfills({include: ['buffer'], globals: {global: false, process: false}}), svelte(), olm],
plugins: [
nodePolyfills({ include: ['buffer'], globals: { global: false, process: false } }),
svelte(),
olm,
lingui(),
],
});

0 comments on commit 9d9ad62

Please sign in to comment.