Add i18n support #5
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": ["@lingui/babel-plugin-lingui-macro"]
|
|
||||||
}
|
|
||||||
15
frontend/.swcrc
Normal file
15
frontend/.swcrc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://swc.rs/schema.json",
|
||||||
|
"jsc": {
|
||||||
|
"experimental": {
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@lingui/swc-plugin",
|
||||||
|
{
|
||||||
|
// Additional Configuration
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,5 +9,4 @@ export default defineConfig({
|
|||||||
include: ["src"],
|
include: ["src"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
compileNamespace: "ts",
|
|
||||||
});
|
});
|
||||||
2220
frontend/package-lock.json
generated
2220
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,17 +4,15 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "concurrently \"npm:dev:vite\" \"npm:i18n:watch\"",
|
"dev": "vite",
|
||||||
"dev:vite": "vite",
|
"build": "tsc -b && vite build",
|
||||||
"build": "lingui compile --typescript && tsc -b && vite build",
|
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"format": "prettier . --write",
|
"format": "prettier . --write",
|
||||||
"update-api": "openapi-typescript http://localhost:8080/v3/api-docs --output src/lib/api.d.ts",
|
"update-api": "openapi-typescript http://localhost:8080/v3/api-docs --output src/lib/api.d.ts",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"extract": "lingui extract",
|
"extract": "lingui extract",
|
||||||
"extract-clean": "lingui extract --clean",
|
"extract-clean": "lingui extract --clean",
|
||||||
"compile": "lingui compile --typescript",
|
"compile": "lingui compile --typescript"
|
||||||
|
stne3960 marked this conversation as resolved
Outdated
|
|||||||
"i18n:watch": "lingui compile --typescript --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lingui/react": "^5.3.0",
|
"@lingui/react": "^5.3.0",
|
||||||
@ -25,13 +23,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.21.0",
|
"@eslint/js": "^9.21.0",
|
||||||
"@lingui/babel-plugin-lingui-macro": "^5.3.0",
|
|
||||||
"@lingui/cli": "^5.3.0",
|
"@lingui/cli": "^5.3.0",
|
||||||
|
"@lingui/swc-plugin": "^5.5.1",
|
||||||
"@lingui/vite-plugin": "^5.3.0",
|
"@lingui/vite-plugin": "^5.3.0",
|
||||||
"@types/react": "^19.0.10",
|
"@types/react": "^19.0.10",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react-swc": "^3.8.0",
|
||||||
"concurrently": "^9.1.2",
|
|
||||||
"eslint": "^9.21.0",
|
"eslint": "^9.21.0",
|
||||||
"eslint-config-prettier": "^10.1.1",
|
"eslint-config-prettier": "^10.1.1",
|
||||||
"eslint-plugin-react-hooks": "^5.1.0",
|
"eslint-plugin-react-hooks": "^5.1.0",
|
||||||
@ -42,5 +39,8 @@
|
|||||||
"typescript": "~5.7.2",
|
"typescript": "~5.7.2",
|
||||||
"typescript-eslint": "^8.24.1",
|
"typescript-eslint": "^8.24.1",
|
||||||
"vite": "^6.2.0"
|
"vite": "^6.2.0"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"@swc/core": "1.3.56"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,11 @@
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react-swc";
|
||||||
import { lingui } from "@lingui/vite-plugin";
|
import { lingui } from "@lingui/vite-plugin";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
build: {
|
|
||||||
target: "esnext",
|
|
||||||
},
|
|
||||||
plugins: [
|
plugins: [
|
||||||
react({
|
react({
|
||||||
babel: {
|
plugins: [["@lingui/swc-plugin", {}]],
|
||||||
plugins: ["@lingui/babel-plugin-lingui-macro"],
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
lingui(),
|
lingui(),
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user
Need instructions in the readme what these commands do and what the expected workflow is when adding/translating new content.