diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000..cc13f9c7 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,3 @@ +files: + - source: /**/i18n/en/*.* + translation: /**/i18n/%two_letters_code%/%original_file_name% diff --git a/package.json b/package.json index 1d0ad898..a9292008 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "vitest", "preview": "vite preview", "extract": "formatjs extract 'src/**/*.{ts,tsx}' --ignore='**/*.d.ts' --out-file './extracted/en.json' --id-interpolation-pattern '[sha512:contenthash:base64:6]'", - "extract-simple": "formatjs extract 'src/**/*.{ts,tsx}' --ignore='**/*.d.ts' --out-file './src/i18n/en.json' --id-interpolation-pattern '[sha512:contenthash:base64:6]' --format simple", + "extract-simple": "formatjs extract 'src/**/*.{ts,tsx}' --ignore='**/*.d.ts' --out-file 'src/i18n/en/test.json' --id-interpolation-pattern '[sha512:contenthash:base64:6]' --format simple", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", "prepare": "husky" diff --git a/src/context/LanguageContext.tsx b/src/context/LanguageContext.tsx index da44ca8e..1c6e7a09 100644 --- a/src/context/LanguageContext.tsx +++ b/src/context/LanguageContext.tsx @@ -2,7 +2,7 @@ import { IntlProvider } from "react-intl"; import { createContext, useContext, useState } from "react"; import { detectBrowserLanguage } from "@/utils"; -import en from "@/i18n/en.json"; +import en from "@/i18n/en/test.json"; const DEFAULT_LOCALE = "en"; diff --git a/src/i18n/en.json b/src/i18n/en/test.json similarity index 100% rename from src/i18n/en.json rename to src/i18n/en/test.json