forked from Archives/Athou_commafeed
migrate to lingui.config.ts to benefit from typing
This commit is contained in:
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"locales": [
|
|
||||||
"ar",
|
|
||||||
"ca",
|
|
||||||
"cs",
|
|
||||||
"cy",
|
|
||||||
"da",
|
|
||||||
"de",
|
|
||||||
"en",
|
|
||||||
"es",
|
|
||||||
"fa",
|
|
||||||
"fi",
|
|
||||||
"fr",
|
|
||||||
"gl",
|
|
||||||
"hu",
|
|
||||||
"id",
|
|
||||||
"it",
|
|
||||||
"ja",
|
|
||||||
"ko",
|
|
||||||
"ms",
|
|
||||||
"nb",
|
|
||||||
"nl",
|
|
||||||
"nn",
|
|
||||||
"pl",
|
|
||||||
"pt",
|
|
||||||
"ru",
|
|
||||||
"sk",
|
|
||||||
"sv",
|
|
||||||
"tr",
|
|
||||||
"zh"
|
|
||||||
],
|
|
||||||
"catalogs": [
|
|
||||||
{
|
|
||||||
"path": "src/locales/{locale}/messages",
|
|
||||||
"include": [
|
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"src/locales/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"format": "po",
|
|
||||||
"formatOptions": {
|
|
||||||
"origins": true,
|
|
||||||
"lineNumbers": false
|
|
||||||
},
|
|
||||||
"sourceLocale": "en",
|
|
||||||
"fallbackLocales": {
|
|
||||||
"default": "en"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
52
commafeed-client/lingui.config.ts
Normal file
52
commafeed-client/lingui.config.ts
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
import type { LinguiConfig } from "@lingui/conf"
|
||||||
|
|
||||||
|
const config: LinguiConfig = {
|
||||||
|
locales: [
|
||||||
|
"ar",
|
||||||
|
"ca",
|
||||||
|
"cs",
|
||||||
|
"cy",
|
||||||
|
"da",
|
||||||
|
"de",
|
||||||
|
"en",
|
||||||
|
"es",
|
||||||
|
"fa",
|
||||||
|
"fi",
|
||||||
|
"fr",
|
||||||
|
"gl",
|
||||||
|
"hu",
|
||||||
|
"id",
|
||||||
|
"it",
|
||||||
|
"ja",
|
||||||
|
"ko",
|
||||||
|
"ms",
|
||||||
|
"nb",
|
||||||
|
"nl",
|
||||||
|
"nn",
|
||||||
|
"pl",
|
||||||
|
"pt",
|
||||||
|
"ru",
|
||||||
|
"sk",
|
||||||
|
"sv",
|
||||||
|
"tr",
|
||||||
|
"zh",
|
||||||
|
],
|
||||||
|
catalogs: [
|
||||||
|
{
|
||||||
|
path: "src/locales/{locale}/messages",
|
||||||
|
include: ["src"],
|
||||||
|
exclude: ["src/locales/**"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
format: "po",
|
||||||
|
formatOptions: {
|
||||||
|
origins: true,
|
||||||
|
lineNumbers: false,
|
||||||
|
},
|
||||||
|
sourceLocale: "en",
|
||||||
|
fallbackLocales: {
|
||||||
|
default: "en",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
||||||
@@ -10,7 +10,7 @@ interface Locale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add an object to the array to add a new locale
|
// add an object to the array to add a new locale
|
||||||
// don't forget to also add it to the 'locales' array in .linguirc
|
// don't forget to also add it to the 'locales' array in lingui.config.ts
|
||||||
export const locales: Locale[] = [
|
export const locales: Locale[] = [
|
||||||
{ key: "ar", label: "العربية", dayjsImportFn: async () => await import("dayjs/locale/ar") },
|
{ key: "ar", label: "العربية", dayjsImportFn: async () => await import("dayjs/locale/ar") },
|
||||||
{ key: "ca", label: "Català", dayjsImportFn: async () => await import("dayjs/locale/ca") },
|
{ key: "ca", label: "Català", dayjsImportFn: async () => await import("dayjs/locale/ca") },
|
||||||
|
|||||||
Reference in New Issue
Block a user