Merge pull request #221 from ONLYOFFICE/bugfix/editor-dialog

bugfix/editor-dialog
This commit is contained in:
Alexey Safronov 2024-02-02 19:36:04 +04:00 committed by GitHub
commit a80a49a57e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -496,6 +496,7 @@ const FilesSelector = ({
const headerLabel = getHeaderLabel(
t,
isEditorDialog,
isCopy,
isRestoreAll,
isMove,
@ -506,6 +507,7 @@ const FilesSelector = ({
const acceptButtonLabel = getAcceptButtonLabel(
t,
isEditorDialog,
isCopy,
isRestoreAll,
isMove,

View File

@ -14,6 +14,7 @@ export const MIN_LOADER_TIMER = 500;
export const getHeaderLabel = (
t: any,
isEditorDialog: boolean,
isCopy?: boolean,
isRestoreAll?: boolean,
isMove?: boolean,
@ -23,7 +24,7 @@ export const getHeaderLabel = (
) => {
if (isRestore) return t("Common:RestoreTo");
if (isMove) return t("Common:MoveTo");
if (isCopy) return t("Common:Copy");
if (isCopy && !isEditorDialog) return t("Common:Copy");
if (isRestoreAll) return t("Common:Restore");
if (isSelect) {
return filterParam ? t("Common:SelectFile") : t("Common:SelectAction");
@ -38,6 +39,7 @@ export const getHeaderLabel = (
export const getAcceptButtonLabel = (
t: any,
isEditorDialog: boolean,
isCopy?: boolean,
isRestoreAll?: boolean,
isMove?: boolean,
@ -47,7 +49,7 @@ export const getAcceptButtonLabel = (
) => {
if (isRestore) return t("Common:RestoreHere");
if (isMove) return t("Translations:MoveHere");
if (isCopy) return t("Translations:CopyHere");
if (isCopy && !isEditorDialog) return t("Translations:CopyHere");
if (isRestoreAll) return t("Common:RestoreHere");
if (isSelect) return t("Common:SelectAction");