mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 17:02:47 +00:00
Update translation (#5378)
* update translation * [l10n] update * [user settings] WebDAV Password: fixup & improvements * [i18n] fixed text * upgrade transifex * update local command * pull & make * update po.files * [l10n] update * update translation --------- Co-authored-by: llj <lingjun.li1@gmail.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Modal, ModalHeader, ModalBody, ModalFooter, Alert, Button, Input, InputGroup, InputGroupAddon } from 'reactstrap';
|
||||
import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
|
||||
const propTypes = {
|
||||
removePassword: PropTypes.func.isRequired,
|
||||
@@ -14,13 +13,11 @@ class RemoveWebdavPassword extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
btnDisabled: false,
|
||||
errMsg: ''
|
||||
btnDisabled: false
|
||||
};
|
||||
}
|
||||
|
||||
submit = () => {
|
||||
|
||||
this.setState({
|
||||
btnDisabled: true
|
||||
});
|
||||
@@ -30,18 +27,16 @@ class RemoveWebdavPassword extends Component {
|
||||
|
||||
render() {
|
||||
const { toggle } = this.props;
|
||||
let dialogMsg = gettext('Are you sure you want to remove {placeholder} ?').replace('{placeholder}', 'WebDAV password');
|
||||
|
||||
return (
|
||||
<Modal centered={true} isOpen={true} toggle={toggle}>
|
||||
<ModalHeader toggle={toggle}>{gettext('Remove WebDAV Password')}</ModalHeader>
|
||||
<ModalHeader toggle={toggle}>{gettext('Delete WebDAV Password')}</ModalHeader>
|
||||
<ModalBody>
|
||||
<p>{dialogMsg}</p>
|
||||
<p>{gettext('Are you sure you want to delete WebDAV password?')}</p>
|
||||
</ModalBody>
|
||||
{this.state.errMsg && <Alert color="danger" className="m-0 mt-2">{gettext(this.state.errMsg)}</Alert>}
|
||||
<ModalFooter>
|
||||
<Button color="secondary" onClick={toggle}>{gettext('Cancel')}</Button>
|
||||
<Button color="primary" onClick={this.submit} disabled={this.state.btnDisabled}>{gettext('Submit')}</Button>
|
||||
<Button color="primary" onClick={this.submit} disabled={this.state.btnDisabled}>{gettext('Delete')}</Button>
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
);
|
||||
|
@@ -59,8 +59,7 @@ class ResetWebdavPassword extends Component {
|
||||
generatePassword = () => {
|
||||
let randomPassword = Utils.generatePassword(webdavSecretMinLength);
|
||||
this.setState({
|
||||
password: randomPassword,
|
||||
isPasswordVisible: true
|
||||
password: randomPassword
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -59,8 +59,7 @@ class SetWebdavPassword extends Component {
|
||||
generatePassword = () => {
|
||||
let randomPassword = Utils.generatePassword(webdavSecretMinLength);
|
||||
this.setState({
|
||||
password: randomPassword,
|
||||
isPasswordVisible: true
|
||||
password: randomPassword
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -90,21 +90,21 @@ class WebdavPassword extends React.Component {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div id="update-webdav-passwd" className="setting-item">
|
||||
<h3 className="setting-item-heading">{gettext('WebDAV Password')}</h3>
|
||||
<p>{gettext('WebDAV URL:')}<a href={webdavUrl}> {webdavUrl}</a></p>
|
||||
<p>{gettext('WebDAV username:')} {username}</p>
|
||||
{!isWebdavPasswordSetted ?
|
||||
<React.Fragment>
|
||||
<p>{gettext('WebDAV password:')} {gettext('not set')}</p>
|
||||
<button className="btn btn-outline-primary" onClick={this.toggleSetPasswordDialog}>{gettext('Set Password')}</button>
|
||||
</React.Fragment>
|
||||
:
|
||||
<React.Fragment>
|
||||
<p>{gettext('WebDAV password:')} ***</p>
|
||||
<button className="btn btn-outline-primary mr-2" onClick={this.toggleResetPasswordDialog}>{gettext('Reset Password')}</button>
|
||||
<button className="btn btn-outline-primary" onClick={this.toggleRemovePasswordDialog}>{gettext('Remove Password')}</button>
|
||||
</React.Fragment>
|
||||
}
|
||||
<h3 className="setting-item-heading">{gettext('WebDAV Password')}</h3>
|
||||
<p>WebDAV URL: <a href={webdavUrl}>{webdavUrl}</a></p>
|
||||
<p>{gettext('WebDAV username:')} {username}</p>
|
||||
{!isWebdavPasswordSetted ?
|
||||
<React.Fragment>
|
||||
<p>{gettext('WebDAV password:')} {gettext('not set')}</p>
|
||||
<button className="btn btn-outline-primary" onClick={this.toggleSetPasswordDialog}>{gettext('Set Password')}</button>
|
||||
</React.Fragment>
|
||||
:
|
||||
<React.Fragment>
|
||||
<p>{gettext('WebDAV password:')} ***</p>
|
||||
<button className="btn btn-outline-primary mr-2" onClick={this.toggleResetPasswordDialog}>{gettext('Reset Password')}</button>
|
||||
<button className="btn btn-outline-primary" onClick={this.toggleRemovePasswordDialog}>{gettext('Delete Password')}</button>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
{this.state.isSetPasserdDialogOpen && (
|
||||
<ModalPortal>
|
||||
|
Reference in New Issue
Block a user