mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
[markdown file view] i18n: fixup & modified text
This commit is contained in:
@@ -9,7 +9,7 @@ class FileInfo extends React.PureComponent {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { fileInfo, isPro, isLocked, mediaUrl } = this.props;
|
const { fileInfo, isPro, isLocked, mediaUrl } = this.props;
|
||||||
const starTitle = fileInfo.starred ? gettext('unstar') : gettext('star');
|
const starTitle = fileInfo.starred ? gettext('starred') : gettext('unstarred');
|
||||||
const starIconClass = `iconfont ${fileInfo.starred ? 'icon-star1 star' : 'icon-star2'}`;
|
const starIconClass = `iconfont ${fileInfo.starred ? 'icon-star1 star' : 'icon-star2'}`;
|
||||||
const modifyTime = moment(fileInfo.mtime * 1000).format('YYYY-MM-DD HH:mm');
|
const modifyTime = moment(fileInfo.mtime * 1000).format('YYYY-MM-DD HH:mm');
|
||||||
|
|
||||||
|
@@ -98,7 +98,7 @@ class SeafileEditor extends React.Component {
|
|||||||
|
|
||||||
onUnload = (event) => {
|
onUnload = (event) => {
|
||||||
if (!this.props.contentChanged) return;
|
if (!this.props.contentChanged) return;
|
||||||
const confirmationMessage = 'Leave this page? The system may not save your changes.';
|
const confirmationMessage = gettext('Leave this page? The system may not save your changes.');
|
||||||
this.props.clearTimer();
|
this.props.clearTimer();
|
||||||
this.props.deleteDraft && this.props.deleteDraft();
|
this.props.deleteDraft && this.props.deleteDraft();
|
||||||
event.returnValue = confirmationMessage;
|
event.returnValue = confirmationMessage;
|
||||||
@@ -146,7 +146,7 @@ class SeafileEditor extends React.Component {
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
this.lastModifyTime = new Date();
|
this.lastModifyTime = new Date();
|
||||||
const message = gettext('File Saved');
|
const message = gettext('Successfully saved');
|
||||||
toaster.success(message, {duration: 2,});
|
toaster.success(message, {duration: 2,});
|
||||||
|
|
||||||
this.props.editorApi.getFileInfo().then((res) => {
|
this.props.editorApi.getFileInfo().then((res) => {
|
||||||
@@ -156,7 +156,7 @@ class SeafileEditor extends React.Component {
|
|||||||
this.addParticipants();
|
this.addParticipants();
|
||||||
}, () => {
|
}, () => {
|
||||||
this.props.onSaving(false);
|
this.props.onSaving(false);
|
||||||
const message = gettext('File failed to save');
|
const message = gettext('Failed to save');
|
||||||
toaster.danger(message, {duration: 2});
|
toaster.danger(message, {duration: 2});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user