Commit e6670a75 authored by BBeretta's avatar BBeretta

feat/language-translation (prettier fixes)

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