Web: Files: Fixed translation for file dialog.
This commit is contained in:
parent
68d889fb2b
commit
d113abe541
@ -83,6 +83,5 @@
|
||||
"ViewList": "List",
|
||||
"ViewTiles": "Tiles",
|
||||
"NewMasterForm": "New master form",
|
||||
"ViewTiles": "Tiles",
|
||||
"Create": "Create"
|
||||
"ViewTiles": "Tiles"
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"SelectFile": "Select file"
|
||||
"SelectFile": "Select file",
|
||||
"Create": "Create"
|
||||
}
|
||||
|
@ -81,6 +81,5 @@
|
||||
"UnblockVersion": "Заблокировать/Разблокировать",
|
||||
"UploadToFolder": "Загрузить в папку",
|
||||
"ViewList": "Список",
|
||||
"ViewTiles": "Плитки",
|
||||
"Create": "Создать"
|
||||
"ViewTiles": "Плитки"
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"SelectFile": "Выбрать файл"
|
||||
"SelectFile": "Выбрать файл",
|
||||
"Create": "Создать"
|
||||
}
|
||||
|
@ -44,10 +44,13 @@ const Panels = (props) => {
|
||||
selectFileDialogVisible,
|
||||
setSelectFileDialogVisible,
|
||||
} = props;
|
||||
const { t } = useTranslation(["Article", "Home"]);
|
||||
|
||||
const { t } = useTranslation("Article");
|
||||
|
||||
const onClose = () => {
|
||||
setSelectFileDialogVisible(false);
|
||||
};
|
||||
|
||||
return [
|
||||
uploadPanelVisible && <UploadPanel key="upload-panel" />,
|
||||
sharingPanelVisible && (
|
||||
@ -88,8 +91,9 @@ const Panels = (props) => {
|
||||
onClose={onClose}
|
||||
foldersType="exceptPrivacyTrashFolders"
|
||||
isDocumentsOnly
|
||||
searchParam={"docx"}
|
||||
headerName={t("Article:CreateMasterFormFromFile")}
|
||||
buttonName={t("Home:Create")}
|
||||
creationButtonPrimary
|
||||
/>
|
||||
),
|
||||
];
|
||||
|
@ -44,7 +44,7 @@ const SelectFileDialogAsideView = ({
|
||||
passedId,
|
||||
headerName,
|
||||
isAvailableFolderList,
|
||||
buttonName,
|
||||
primaryButtonName,
|
||||
}) => {
|
||||
const [isLoadingData, setIsLoadingData] = useState(false);
|
||||
const onSetLoadingData = (loading) => {
|
||||
@ -134,13 +134,13 @@ const SelectFileDialogAsideView = ({
|
||||
className="select-file-dialog-buttons-save"
|
||||
primary
|
||||
size="big"
|
||||
label={buttonName ? buttonName : t("Common:SaveButton")}
|
||||
label={primaryButtonName}
|
||||
onClick={onClickSave}
|
||||
isDisabled={selectedFile.length === 0}
|
||||
/>
|
||||
<Button
|
||||
size="big"
|
||||
label={t("Common:CloseButton")}
|
||||
label={t("Common:CancelButton")}
|
||||
onClick={onClose}
|
||||
/>
|
||||
</div>
|
||||
|
@ -176,7 +176,7 @@ class SelectFileDialogModalView extends React.Component {
|
||||
selectedFile,
|
||||
onClickSave,
|
||||
headerName,
|
||||
buttonName,
|
||||
primaryButtonName,
|
||||
} = this.props;
|
||||
|
||||
const { isLoading, isAvailable } = this.state;
|
||||
@ -251,14 +251,14 @@ class SelectFileDialogModalView extends React.Component {
|
||||
className="select-file-modal-dialog-buttons-save"
|
||||
primary
|
||||
size="medium"
|
||||
label={buttonName ? buttonName : t("Common:SaveButton")}
|
||||
label={primaryButtonName}
|
||||
onClick={onClickSave}
|
||||
isDisabled={selectedFile.length === 0}
|
||||
/>
|
||||
<Button
|
||||
className="modal-dialog-button"
|
||||
size="medium"
|
||||
label={t("Common:CloseButton")}
|
||||
label={t("Common:CancelButton")}
|
||||
onClick={onClose}
|
||||
/>
|
||||
</div>
|
||||
|
@ -24,7 +24,18 @@ const { auth: authStore } = store;
|
||||
class SelectFileDialogBody extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const { folderId, storeFolderId, fileInfo, filter } = this.props;
|
||||
const {
|
||||
folderId,
|
||||
storeFolderId,
|
||||
fileInfo,
|
||||
filter,
|
||||
creationButtonPrimary,
|
||||
t,
|
||||
} = this.props;
|
||||
|
||||
this.buttonName = creationButtonPrimary
|
||||
? t("Create")
|
||||
: t("Common:SaveButton");
|
||||
|
||||
this.state = {
|
||||
isVisible: false,
|
||||
@ -238,7 +249,6 @@ class SelectFileDialogBody extends React.Component {
|
||||
onSetFileName,
|
||||
tReady,
|
||||
headerName,
|
||||
buttonName,
|
||||
} = this.props;
|
||||
const {
|
||||
isVisible,
|
||||
@ -287,7 +297,7 @@ class SelectFileDialogBody extends React.Component {
|
||||
passedId={passedId}
|
||||
header={header}
|
||||
isAvailableFolderList={isAvailableFolderList}
|
||||
buttonName={buttonName}
|
||||
primaryButtonName={this.buttonName}
|
||||
/>
|
||||
) : (
|
||||
<SelectFileDialogModalView
|
||||
@ -310,7 +320,7 @@ class SelectFileDialogBody extends React.Component {
|
||||
folderId={folderId}
|
||||
passedId={passedId}
|
||||
header={header}
|
||||
buttonName={buttonName}
|
||||
primaryButtonName={this.buttonName}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -328,6 +338,7 @@ SelectFileDialogBody.propTypes = {
|
||||
]),
|
||||
folderId: PropTypes.string,
|
||||
withoutProvider: PropTypes.bool,
|
||||
creationButtonPrimary: PropTypes.bool,
|
||||
headerName: PropTypes.string,
|
||||
zIndex: PropTypes.number,
|
||||
};
|
||||
@ -337,6 +348,7 @@ SelectFileDialogBody.defaultProps = {
|
||||
header: "",
|
||||
withoutProvider: false,
|
||||
zIndex: 310,
|
||||
creationButtonPrimary: false,
|
||||
};
|
||||
|
||||
const SelectFileDialogWrapper = inject(
|
||||
|
Loading…
Reference in New Issue
Block a user