Merge branch 'feature/translations' of https://github.com/ONLYOFFICE/AppServer into feature/translations
This commit is contained in:
commit
b0e2ee5a19
@ -106,7 +106,6 @@
|
||||
"TitleSubfolders": "Flds",
|
||||
"TitleUploaded": "Uploaded",
|
||||
"TooltipElementCopyMessage": "Copy {{element}}",
|
||||
"TooltipElementMoveMessage": "Move {{element}}",
|
||||
"TooltipElementsCopyMessage": "Copy {{element}} elements",
|
||||
"TooltipElementsMoveMessage": "Move {{element}} elements",
|
||||
"TrashEmptyContainerDescription": "Trash is where all the deleted files are moved. You can restore or delete them permanently by emptying Trash. ",
|
||||
@ -117,4 +116,4 @@
|
||||
"View": "View",
|
||||
"ViewList": "List",
|
||||
"ViewTiles": "Tiles"
|
||||
}
|
||||
}
|
@ -106,7 +106,6 @@
|
||||
"TitleSubfolders": "Папки",
|
||||
"TitleUploaded": "Загружен",
|
||||
"TooltipElementCopyMessage": "Скопировать {{element}}",
|
||||
"TooltipElementMoveMessage": "Переместить {{element}}",
|
||||
"TooltipElementsCopyMessage": "Скопировать {{element}} элемента(ов)",
|
||||
"TooltipElementsMoveMessage": "Переместить {{element}} элемента(ов)",
|
||||
"TrashEmptyContainerDescription": "В разделе «Корзина» находятся все удаленные файлы. Вы можете восстановить их, если они были удалены по ошибке, или удалить их навсегда. Обратите внимание, что когда вы удаляете файлы из корзины, они больше не могут быть восстановлены.",
|
||||
@ -117,4 +116,4 @@
|
||||
"View": "Просмотр",
|
||||
"ViewList": "Список",
|
||||
"ViewTiles": "Плитки"
|
||||
}
|
||||
}
|
@ -33,14 +33,14 @@ const DragTooltip = (props) => {
|
||||
const tooltipRef = useRef(null);
|
||||
const {
|
||||
t,
|
||||
tooltipValue,
|
||||
tooltipOptions,
|
||||
iconOfDraggedFile,
|
||||
isSingleItem,
|
||||
item,
|
||||
tooltipPageX,
|
||||
tooltipPageY,
|
||||
} = props;
|
||||
const { label, filesCount } = tooltipValue;
|
||||
const { filesCount, operationName } = tooltipOptions;
|
||||
const { title } = item;
|
||||
|
||||
useEffect(() => {
|
||||
@ -85,11 +85,15 @@ const DragTooltip = (props) => {
|
||||
);
|
||||
}, [title, iconOfDraggedFile]);
|
||||
|
||||
const tooltipLabel = tooltipValue
|
||||
? isSingleItem && label === "TooltipElementMoveMessage"
|
||||
const tooltipLabel = tooltipOptions
|
||||
? operationName === "copy"
|
||||
? isSingleItem
|
||||
? t("TooltipElementCopyMessage", { element: filesCount })
|
||||
: t("TooltipElementsCopyMessage", { element: filesCount })
|
||||
: isSingleItem
|
||||
? renderFileMoveTooltip()
|
||||
: t(label, { element: filesCount })
|
||||
: "";
|
||||
: t("TooltipElementsMoveMessage", { element: filesCount })
|
||||
: t("");
|
||||
|
||||
return <StyledTooltip ref={tooltipRef}>{tooltipLabel}</StyledTooltip>;
|
||||
};
|
||||
@ -98,7 +102,7 @@ export default inject(({ filesStore }) => {
|
||||
const {
|
||||
selection,
|
||||
iconOfDraggedFile,
|
||||
tooltipValue,
|
||||
tooltipOptions,
|
||||
tooltipPageX,
|
||||
tooltipPageY,
|
||||
} = filesStore;
|
||||
@ -108,7 +112,7 @@ export default inject(({ filesStore }) => {
|
||||
return {
|
||||
item: selection[0],
|
||||
isSingleItem,
|
||||
tooltipValue,
|
||||
tooltipOptions,
|
||||
iconOfDraggedFile,
|
||||
|
||||
tooltipPageX,
|
||||
|
@ -91,7 +91,7 @@ class FilesStore {
|
||||
this.startDrag = startDrag;
|
||||
};
|
||||
|
||||
get tooltipValue() {
|
||||
get tooltipOptions() {
|
||||
if (!this.dragging) return null;
|
||||
|
||||
const selectionLength = this.selection.length;
|
||||
@ -110,13 +110,10 @@ class FilesStore {
|
||||
operationName = "move";
|
||||
}
|
||||
|
||||
return operationName === "copy"
|
||||
? singleElement
|
||||
? { label: "TooltipElementCopyMessage", filesCount }
|
||||
: { label: "TooltipElementsCopyMessage", filesCount }
|
||||
: singleElement
|
||||
? { label: "TooltipElementMoveMessage", filesCount }
|
||||
: { label: "TooltipElementsMoveMessage", filesCount };
|
||||
return {
|
||||
filesCount,
|
||||
operationName,
|
||||
};
|
||||
}
|
||||
|
||||
initFiles = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user