1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

add gettext, modify UI

This commit is contained in:
LeoSirius
2019-07-04 18:14:13 +08:00
parent 446d074066
commit 9920f85b92
2 changed files with 9 additions and 9 deletions

View File

@@ -110,15 +110,15 @@ class GenerateUploadLink extends React.Component {
// check password params
if (showPasswordInput) {
if (password.length === 0) {
this.setState({errorInfo: 'Please enter password'});
this.setState({errorInfo: gettext('Please enter password')});
return false;
}
if (password.length < shareLinkPasswordMinLength) {
this.setState({errorInfo: 'Password is too short'});
this.setState({errorInfo: gettext('Password is too short')});
return false;
}
if (password !== passwordnew) {
this.setState({errorInfo: 'Passwords don\'t match'});
this.setState({errorInfo: gettext('Passwords don\'t match')});
return false;
}
}
@@ -127,11 +127,11 @@ class GenerateUploadLink extends React.Component {
let reg = /^\d+$/;
if (isExpireChecked) {
if (!expireDays) {
this.setState({errorInfo: 'Please enter days'});
this.setState({errorInfo: gettext('Please enter days')});
return false;
}
if (!reg.test(expireDays)) {
this.setState({errorInfo: 'Please enter a non-negative integer'});
this.setState({errorInfo: gettext('Please enter a non-negative integer')});
return false;
}
this.setState({expireDays: parseInt(expireDays)});