Commit 677e08f2 authored by BBeretta's avatar BBeretta

feat/language-translation (prettier fixes)

parent 2aac735f
Pipeline #27834 passed with stages
in 9 minutes and 5 seconds
...@@ -2,6 +2,7 @@ import { App, Dropdown, message, Pagination } from "antd"; ...@@ -2,6 +2,7 @@ import { App, Dropdown, message, Pagination } from "antd";
import { MessageInstance } from "antd/es/message/interface"; import { MessageInstance } from "antd/es/message/interface";
import Fuse from "fuse.js"; import Fuse from "fuse.js";
import React, { memo, useEffect } from "react"; import React, { memo, useEffect } from "react";
import { useTranslation } from "react-i18next";
import { type INTERNAL_Snapshot as Snapshot, proxy, useSnapshot } from "valtio"; import { type INTERNAL_Snapshot as Snapshot, proxy, useSnapshot } from "valtio";
import YGOProDeck from "ygopro-deck-encode"; import YGOProDeck from "ygopro-deck-encode";
...@@ -15,7 +16,6 @@ import { setSelectedDeck } from "../.."; ...@@ -15,7 +16,6 @@ import { setSelectedDeck } from "../..";
import { editDeckStore } from "../../store"; import { editDeckStore } from "../../store";
import { iDeckToEditingDeck } from "../../utils"; import { iDeckToEditingDeck } from "../../utils";
import styles from "./index.module.scss"; import styles from "./index.module.scss";
import { useTranslation } from "react-i18next";
const { assetsPath } = useConfig(); const { assetsPath } = useConfig();
...@@ -117,7 +117,7 @@ export const DeckResults: React.FC = memo(() => { ...@@ -117,7 +117,7 @@ export const DeckResults: React.FC = memo(() => {
) : ( ) : (
<div className={styles.empty}> <div className={styles.empty}>
<IconFont type="icon-empty" size={40} /> <IconFont type="icon-empty" size={40} />
<div>{ i18n("NoDeckGroupFound") }</div> <div>{i18n("NoDeckGroupFound")}</div>
</div> </div>
)} )}
</> </>
......
...@@ -86,7 +86,9 @@ const resources = { ...@@ -86,7 +86,9 @@ const resources = {
i18next.use(initReactI18next).init({ i18next.use(initReactI18next).init({
resources, resources,
lng: localStorage.getItem("language") ? localStorage.getItem("language")?.toString() : "cn", //default language lng: localStorage.getItem("language")
? localStorage.getItem("language")?.toString()
: "cn", //default language
}); });
export default i18next; export default i18next;
...@@ -19,7 +19,6 @@ import { ...@@ -19,7 +19,6 @@ import {
import { useConfig } from "@/config"; import { useConfig } from "@/config";
import { accountStore } from "@/stores"; import { accountStore } from "@/stores";
import { I18NSelector } from "../I18N";
import { Setting } from "../Setting"; import { Setting } from "../Setting";
import styles from "./index.module.scss"; import styles from "./index.module.scss";
import { import {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment