Skip to content

Commit

Permalink
Add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
kacan98 committed Apr 14, 2024
1 parent 00a4558 commit 7b6c9e5
Show file tree
Hide file tree
Showing 24 changed files with 1,775 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
"plugin:react/jsx-runtime",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
ignorePatterns: ["dist", ".eslintrc.cjs", "i18next-scanner.config.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json"],
Expand Down
20 changes: 20 additions & 0 deletions i18next-scanner.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
input: [
"src/**/*.{ts,tsx}", // Scan TypeScript and TSX files
"!src/**/*.spec.{ts,tsx}", // Exclude test files
"!**/node_modules/**", // Exclude node_modules
],
output: "./public",
options: {
func: {
list: ["t"], // Include the 't' function
extensions: [".ts", ".tsx"], // Scan TypeScript and TSX files
},
lngs: ["en", "de", "cz", "dk", "se"],
defaultLng: "en",
resource: {
loadPath: "i18n/{{lng}}/{{ns}}.json",
savePath: "i18n/{{lng}}/{{ns}}.json",
},
},
};
Loading

0 comments on commit 7b6c9e5

Please sign in to comment.