Commit e6670a75 authored by BBeretta's avatar BBeretta

feat/language-translation (prettier fixes)

parent 78517db3
...@@ -11,6 +11,7 @@ import { isEqual } from "lodash-es"; ...@@ -11,6 +11,7 @@ import { isEqual } from "lodash-es";
import { OverlayScrollbarsComponentRef } from "overlayscrollbars-react"; import { OverlayScrollbarsComponentRef } from "overlayscrollbars-react";
import React, { useCallback, useEffect, useRef, useState } from "react"; import React, { useCallback, useEffect, useRef, useState } from "react";
import { useDrop } from "react-dnd"; import { useDrop } from "react-dnd";
import { useTranslation } from "react-i18next";
import { CardMeta, searchCards } from "@/api"; import { CardMeta, searchCards } from "@/api";
import { isToken } from "@/common"; import { isToken } from "@/common";
...@@ -22,7 +23,6 @@ import styles from "../index.module.scss"; ...@@ -22,7 +23,6 @@ import styles from "../index.module.scss";
import { editDeckStore } from "../store"; import { editDeckStore } from "../store";
import { CardResults } from "./CardResults"; import { CardResults } from "./CardResults";
import { DeckResults, freshMdrpoDecks } from "./DeckResults"; import { DeckResults, freshMdrpoDecks } from "./DeckResults";
import { useTranslation } from "react-i18next";
/** 卡片库,选择卡片加入正在编辑的卡组 */ /** 卡片库,选择卡片加入正在编辑的卡组 */
export const DeckDatabase: React.FC = () => { export const DeckDatabase: React.FC = () => {
...@@ -126,7 +126,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -126,7 +126,7 @@ export const DeckDatabase: React.FC = () => {
<div className={styles.container} ref={dropRef}> <div className={styles.container} ref={dropRef}>
<Space className={styles.title} direction="horizontal"> <Space className={styles.title} direction="horizontal">
<Input <Input
placeholder={ i18n("KeywordsPlaceholder") } placeholder={i18n("KeywordsPlaceholder")}
bordered={false} bordered={false}
suffix={ suffix={
<Button <Button
...@@ -176,7 +176,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -176,7 +176,7 @@ export const DeckDatabase: React.FC = () => {
icon={<FilterOutlined />} icon={<FilterOutlined />}
onClick={showFilterModal} onClick={showFilterModal}
> >
{ i18n("Filter") } {i18n("Filter")}
</Button> </Button>
)} )}
<Dropdown <Dropdown
...@@ -192,7 +192,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -192,7 +192,7 @@ export const DeckDatabase: React.FC = () => {
icon={<SortAscendingOutlined />} icon={<SortAscendingOutlined />}
> >
<span> <span>
{ i18n("SortBy") } {i18n("SortBy")}
<span className={styles["search-count"]}> <span className={styles["search-count"]}>
({searchCardResult.length}) ({searchCardResult.length})
</span> </span>
...@@ -211,7 +211,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -211,7 +211,7 @@ export const DeckDatabase: React.FC = () => {
handleSearch(emptySearchConditions); handleSearch(emptySearchConditions);
}} }}
> >
{ i18n("Reset") } {i18n("Reset")}
</Button> </Button>
</div> </div>
<ScrollableArea className={styles["search-cards-container"]} ref={ref}> <ScrollableArea className={styles["search-cards-container"]} ref={ref}>
......
import { App, Avatar, Dropdown } from "antd"; import { App, Avatar, Dropdown } from "antd";
import classNames from "classnames"; import classNames from "classnames";
import React, { useEffect, useState } from "react"; import React, { useEffect } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { import {
type LoaderFunction, type LoaderFunction,
......
import { Checkbox, Form, Slider, Space, Switch } from "antd"; import { Checkbox, Form, Slider, Space, Switch } from "antd";
import React from "react"; import React from "react";
import { useTranslation } from "react-i18next";
import { useSnapshot } from "valtio"; import { useSnapshot } from "valtio";
import { settingStore } from "@/stores/settingStore"; import { settingStore } from "@/stores/settingStore";
import { useTranslation } from "react-i18next";
export const AudioSetting: React.FC = () => { export const AudioSetting: React.FC = () => {
const { audio } = useSnapshot(settingStore); const { audio } = useSnapshot(settingStore);
......
...@@ -2,11 +2,11 @@ import { ConfigProvider, Modal, Tabs, TabsProps } from "antd"; ...@@ -2,11 +2,11 @@ import { ConfigProvider, Modal, Tabs, TabsProps } from "antd";
import zhCN from "antd/locale/zh_CN"; import zhCN from "antd/locale/zh_CN";
import React from "react"; import React from "react";
import { render, unmountComponentAtNode } from "react-dom"; import { render, unmountComponentAtNode } from "react-dom";
import { useTranslation } from "react-i18next";
import { I18NSelector } from "../I18N";
import { theme } from "../theme"; import { theme } from "../theme";
import { AudioSetting } from "./Audio"; import { AudioSetting } from "./Audio";
import { useTranslation } from "react-i18next";
import { I18NSelector } from "../I18N";
/** 设置面板属性 */ /** 设置面板属性 */
export interface SettingProps { export interface SettingProps {
......
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