mirror of
https://github.com/YuzuZensai/Pien-Studio.git
synced 2026-09-02 14:18:35 +00:00
♻️ refactor!: massive refactor
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import React from "react";
|
||||
|
||||
type Translator = (key: string, params?: Record<string, string | number>) => string;
|
||||
type Translator = (
|
||||
key: string,
|
||||
params?: Record<string, string | number>,
|
||||
) => string;
|
||||
|
||||
export function useEditorLabels(t: Translator) {
|
||||
const headerLabels = React.useMemo(
|
||||
@@ -29,7 +32,11 @@ export function useEditorLabels(t: Translator) {
|
||||
);
|
||||
|
||||
const contextMenuLabels = React.useMemo(
|
||||
() => ({ copy: t("editor.copy"), cut: t("editor.cut"), paste: t("editor.paste") }),
|
||||
() => ({
|
||||
copy: t("editor.copy"),
|
||||
cut: t("editor.cut"),
|
||||
paste: t("editor.paste"),
|
||||
}),
|
||||
[t],
|
||||
);
|
||||
|
||||
@@ -38,7 +45,8 @@ export function useEditorLabels(t: Translator) {
|
||||
resize: t("editor.resize"),
|
||||
faceMlFailedShort: t("editor.faceMlFailedShort"),
|
||||
detectingFacesShort: t("editor.detectingFacesShort"),
|
||||
faceDetectionTip: (count: number) => t("editor.faceDetectionTip", { count }),
|
||||
faceDetectionTip: (count: number) =>
|
||||
t("editor.faceDetectionTip", { count }),
|
||||
import: t("editor.import"),
|
||||
mood: t("editor.mood"),
|
||||
quick: t("editor.quick"),
|
||||
|
||||
Reference in New Issue
Block a user