1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 09:51:26 +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 // check password params
if (showPasswordInput) { if (showPasswordInput) {
if (password.length === 0) { if (password.length === 0) {
this.setState({errorInfo: 'Please enter password'}); this.setState({errorInfo: gettext('Please enter password')});
return false; return false;
} }
if (password.length < shareLinkPasswordMinLength) { if (password.length < shareLinkPasswordMinLength) {
this.setState({errorInfo: 'Password is too short'}); this.setState({errorInfo: gettext('Password is too short')});
return false; return false;
} }
if (password !== passwordnew) { if (password !== passwordnew) {
this.setState({errorInfo: 'Passwords don\'t match'}); this.setState({errorInfo: gettext('Passwords don\'t match')});
return false; return false;
} }
} }
@@ -127,11 +127,11 @@ class GenerateUploadLink extends React.Component {
let reg = /^\d+$/; let reg = /^\d+$/;
if (isExpireChecked) { if (isExpireChecked) {
if (!expireDays) { if (!expireDays) {
this.setState({errorInfo: 'Please enter days'}); this.setState({errorInfo: gettext('Please enter days')});
return false; return false;
} }
if (!reg.test(expireDays)) { 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; return false;
} }
this.setState({expireDays: parseInt(expireDays)}); this.setState({expireDays: parseInt(expireDays)});

View File

@@ -53,10 +53,10 @@ class Content extends Component {
<thead> <thead>
<tr> <tr>
<th width="4%">{/*icon*/}</th> <th width="4%">{/*icon*/}</th>
<th width="35%">{gettext('Name')}</th> <th width="30%">{gettext('Name')}</th>
<th width="28%">{gettext('Library')}</th> <th width="24%">{gettext('Library')}</th>
<th width="9%">{gettext('Visits')}</th> <th width="16%">{gettext('Visits')}</th>
<th width="14%">{gettext('Expiration')}</th> <th width="16%">{gettext('Expiration')}</th>
<th width="10%">{/*Operations*/}</th> <th width="10%">{/*Operations*/}</th>
</tr> </tr>
</thead> </thead>