chore: update i18n

This commit is contained in:
Steven
2022-08-19 21:30:31 +08:00
parent e3fac742c5
commit a7a01df79a
21 changed files with 190 additions and 150 deletions

View File

@ -1,6 +1,7 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { UNKNOWN_ID } from "../helpers/consts";
import { editorStateService, locationService, memoService, resourceService } from "../services";
import useI18n from "../hooks/useI18n";
import { useAppSelector } from "../store";
import * as storage from "../helpers/storage";
import Icon from "./Icon";
@ -16,6 +17,7 @@ interface State {
}
const MemoEditor: React.FC<Props> = () => {
const { t, locale } = useI18n();
const editorState = useAppSelector((state) => state.editor);
const tags = useAppSelector((state) => state.memo.tags);
const [state, setState] = useState<State>({
@ -212,7 +214,7 @@ const MemoEditor: React.FC<Props> = () => {
() => ({
className: "memo-editor",
initialContent: getEditorContentCache(),
placeholder: "Any thoughts...",
placeholder: t("editor.placeholder"),
fullscreen: state.fullscreen,
showConfirmBtn: true,
showCancelBtn: isEditing,
@ -220,7 +222,7 @@ const MemoEditor: React.FC<Props> = () => {
onCancelBtnClick: handleCancelBtnClick,
onContentChange: handleContentChange,
}),
[isEditing, state.fullscreen]
[isEditing, state.fullscreen, locale]
);
return (