mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-05 20:41:43 -07:00
chore: move localesList to generated folder
This commit is contained in:
parent
5b1ad30e98
commit
d826cda2a0
4 changed files with 13 additions and 2 deletions
|
@ -9,7 +9,7 @@ import {
|
||||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||||
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import localesList from "utils/localesList.json";
|
import localesList from "generated/localesList.json";
|
||||||
|
|
||||||
function Settings() {
|
function Settings() {
|
||||||
const { t, i18n } = useTranslation();
|
const { t, i18n } = useTranslation();
|
||||||
|
|
10
frontend/src/generated/localesList.json
Normal file
10
frontend/src/generated/localesList.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "en",
|
||||||
|
"name": "English"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "es-ES",
|
||||||
|
"name": "Español"
|
||||||
|
}
|
||||||
|
]
|
|
@ -37,7 +37,7 @@ export default function GenerateLocalesPlugin() {
|
||||||
const outputPath = path.resolve(
|
const outputPath = path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
"src",
|
"src",
|
||||||
"utils",
|
"generated",
|
||||||
"localesList.json"
|
"localesList.json"
|
||||||
);
|
);
|
||||||
fs.writeFileSync(outputPath, JSON.stringify(localesList, null, 2));
|
fs.writeFileSync(outputPath, JSON.stringify(localesList, null, 2));
|
||||||
|
|
|
@ -22,6 +22,7 @@ export default defineConfig({
|
||||||
components: "/src/components",
|
components: "/src/components",
|
||||||
utils: "/src/utils",
|
utils: "/src/utils",
|
||||||
external: "/src/external",
|
external: "/src/external",
|
||||||
|
generated: "/src/generated",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue