Merge branch 'feature/translations' of github.com:ONLYOFFICE/AppServer into feature/translations
This commit is contained in:
commit
cc338e62d0
@ -14,7 +14,8 @@ export function regDesktop(
|
||||
keys,
|
||||
setEncryptionKeys,
|
||||
isEditor,
|
||||
getEncryptionAccess
|
||||
getEncryptionAccess,
|
||||
t
|
||||
) {
|
||||
const data = {
|
||||
displayName: user.displayName,
|
||||
@ -58,7 +59,7 @@ export function regDesktop(
|
||||
break;
|
||||
}
|
||||
case "relogin": {
|
||||
toastr.info("Encryption keys must be re-entered");
|
||||
toastr.info(t("Common:EncryptionKeysReload"));
|
||||
//relogin();
|
||||
break;
|
||||
}
|
||||
@ -82,13 +83,13 @@ export function regDesktop(
|
||||
if (!message) {
|
||||
switch (e.opType) {
|
||||
case 0:
|
||||
message = "Preparing file for encryption";
|
||||
message = t("Common:EncryptionFilePreparing");
|
||||
break;
|
||||
case 1:
|
||||
message = "Encrypting file";
|
||||
message = t("Common:EncryptingFile");
|
||||
break;
|
||||
default:
|
||||
message = "Loading...";
|
||||
message = t("Common:LoadingProcessing");
|
||||
}
|
||||
}
|
||||
toastr.info(message);
|
||||
|
@ -9,7 +9,7 @@ import toastr from "studio/toastr";
|
||||
import { combineUrl, updateTempContent } from "@appserver/common/utils";
|
||||
import stores from "./store/index";
|
||||
import i18n from "./i18n";
|
||||
import { I18nextProvider } from "react-i18next";
|
||||
import { I18nextProvider, withTranslation } from "react-i18next";
|
||||
import { regDesktop } from "@appserver/common/desktop";
|
||||
import Home from "./pages/Home";
|
||||
import Settings from "./pages/Settings";
|
||||
@ -85,7 +85,8 @@ class FilesContent extends React.Component {
|
||||
isEncryption,
|
||||
encryptionKeys,
|
||||
setEncryptionKeys,
|
||||
this.isEditor
|
||||
this.isEditor,
|
||||
this.props.t
|
||||
);
|
||||
console.log(
|
||||
"%c%s",
|
||||
@ -130,7 +131,7 @@ const Files = inject(({ auth, filesStore }) => {
|
||||
auth.setProductVersion(config.version);
|
||||
},
|
||||
};
|
||||
})(observer(FilesContent));
|
||||
})(withTranslation("Common")(observer(FilesContent)));
|
||||
|
||||
export default () => (
|
||||
<FilesProvider {...stores}>
|
||||
|
@ -325,25 +325,23 @@ class TreeFolders extends React.Component {
|
||||
newFilter.withSubfolders = null;
|
||||
newFilter.authorType = null;
|
||||
|
||||
return getFolder(folderId, newFilter)
|
||||
.then((data) => {
|
||||
arrayFolders = data.folders;
|
||||
return getFolder(folderId, newFilter).then((data) => {
|
||||
arrayFolders = data.folders;
|
||||
|
||||
let listIds = [];
|
||||
for (let item of data.pathParts) {
|
||||
listIds.push(item.toString());
|
||||
}
|
||||
let listIds = [];
|
||||
for (let item of data.pathParts) {
|
||||
listIds.push(item.toString());
|
||||
}
|
||||
|
||||
const folderIndex = treeNode.props.pos;
|
||||
let i = 0;
|
||||
for (let item of arrayFolders) {
|
||||
item["key"] = `${folderIndex}-${i}`;
|
||||
i++;
|
||||
}
|
||||
const folderIndex = treeNode.props.pos;
|
||||
let i = 0;
|
||||
for (let item of arrayFolders) {
|
||||
item["key"] = `${folderIndex}-${i}`;
|
||||
i++;
|
||||
}
|
||||
|
||||
return { folders: arrayFolders, listIds };
|
||||
})
|
||||
.catch((err) => toastr.error("Something went wrong", err));
|
||||
return { folders: arrayFolders, listIds };
|
||||
});
|
||||
};
|
||||
|
||||
onLoadData = (treeNode, isExpand) => {
|
||||
|
@ -162,7 +162,7 @@ class SectionHeaderContent extends React.Component {
|
||||
|
||||
createFolder = () => this.onCreate();
|
||||
|
||||
uploadToFolder = () => toastr.info("Upload To Folder click");
|
||||
uploadToFolder = () => console.log("Upload To Folder click");
|
||||
|
||||
getContextOptionsPlus = () => {
|
||||
const { t } = this.props;
|
||||
@ -217,7 +217,7 @@ class SectionHeaderContent extends React.Component {
|
||||
.catch((err) => toastr.error(err));
|
||||
|
||||
downloadAsAction = () => this.props.setDownloadDialogVisible(true);
|
||||
renameAction = () => toastr.info("renameAction click");
|
||||
renameAction = () => console.log("renameAction click");
|
||||
onOpenSharingPanel = () => this.props.setSharingPanelVisible(true);
|
||||
|
||||
onDeleteAction = () => {
|
||||
|
@ -35,6 +35,9 @@
|
||||
"Email": "Email",
|
||||
"EmptyFieldError": "Empty field",
|
||||
"Enable": "Enable",
|
||||
"EncryptingFile": "Encrypting file",
|
||||
"EncryptionKeysReload": "Encryption keys must be re-entered",
|
||||
"EncryptionFilePreparing": "Preparing file for encryption",
|
||||
"Error": "Error",
|
||||
"FullAccess": "Full access",
|
||||
"Guest": "Guest",
|
||||
@ -88,4 +91,4 @@
|
||||
"View": "View",
|
||||
"ViewWeb": "View web version",
|
||||
"Warning": "Warning"
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,9 @@
|
||||
"Email": "Email",
|
||||
"EmptyFieldError": "Пустое поле",
|
||||
"Enable": "Включить",
|
||||
"EncryptingFile": "Шифрование файла",
|
||||
"EncryptionKeysReload": "Ключи шифрования необходимо ввести повторно",
|
||||
"EncryptionFilePreparing": "Подготовка файла к шифрованию",
|
||||
"Error": "Ошибка",
|
||||
"FullAccess": "Полный доступ",
|
||||
"Guest": "Гость",
|
||||
@ -88,4 +91,4 @@
|
||||
"View": "Просмотр",
|
||||
"ViewWeb": "Просмотреть веб-версию",
|
||||
"Warning": "Внимание"
|
||||
}
|
||||
}
|
||||
|
@ -66,9 +66,9 @@ const RecoverAccess = ({ t }) => {
|
||||
} else {
|
||||
setLoading(true);
|
||||
sendRecoverRequest(email, description)
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
setLoading(false);
|
||||
toastr.success("Successfully sent");
|
||||
toastr.success(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
|
@ -207,11 +207,11 @@ class WhiteLabel extends React.Component {
|
||||
};
|
||||
|
||||
onChangeLogo = () => {
|
||||
toastr.success("Click to Change logo button");
|
||||
console.log("Click to Change logo button");
|
||||
};
|
||||
|
||||
onRestoreLogo = () => {
|
||||
toastr.success("restore button action");
|
||||
console.log("restore button action");
|
||||
this.setState({ isCanvasProcessing: false });
|
||||
};
|
||||
|
||||
@ -445,7 +445,7 @@ class WhiteLabel extends React.Component {
|
||||
label={t("Common:SaveButton")}
|
||||
isLoading={false}
|
||||
isDisabled={false}
|
||||
onClick={() => toastr.success("Save button action")}
|
||||
onClick={() => console.log("Save button action")}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
@ -110,13 +110,9 @@ class PureAdminsSettings extends Component {
|
||||
const { changeAdmins } = this.props;
|
||||
const newFilter = this.onAdminsFilter();
|
||||
|
||||
changeAdmins(userIds, productId, isAdmin, newFilter)
|
||||
.catch((error) => {
|
||||
toastr.error("accessRights onChangeAdmin", error);
|
||||
})
|
||||
.finally(() => {
|
||||
this.onLoading(false);
|
||||
});
|
||||
changeAdmins(userIds + "", productId, isAdmin, newFilter)
|
||||
.catch((error) => toastr.error(error)) //TODO: add translation to toast if need
|
||||
.finally(() => this.onLoading(false));
|
||||
};
|
||||
|
||||
onShowGroupSelector = () => {
|
||||
|
@ -146,7 +146,8 @@ const Editor = () => {
|
||||
true
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
i18n.t
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -59,9 +59,9 @@ const Register = (props) => {
|
||||
} else {
|
||||
setLoading(true);
|
||||
sendRegisterRequest(email)
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
setLoading(false);
|
||||
toastr.success("Successfully sent");
|
||||
toastr.success(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
|
Loading…
Reference in New Issue
Block a user