mirror of
https://github.com/alextselegidis/plainpad.git
synced 2024-10-05 14:37:29 +03:00
Merge pull request #69 from T1anjiu/master
i18n Add simplified Chinese.
This commit is contained in:
commit
aef222311b
@ -1,34 +0,0 @@
|
|||||||
import 'react-app-polyfill/ie9'; // For IE 9-11 support
|
|
||||||
import 'react-app-polyfill/stable';
|
|
||||||
// import 'react-app-polyfill/ie11'; // For IE 11 support
|
|
||||||
import './polyfill'
|
|
||||||
import React from 'react';
|
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import './index.css';
|
|
||||||
import App from './App';
|
|
||||||
import * as serviceWorker from './serviceWorker';
|
|
||||||
import {Provider} from 'mobx-react';
|
|
||||||
import {IntlProvider} from 'react-intl';
|
|
||||||
import {messages} from './lang';
|
|
||||||
import stores from './stores';
|
|
||||||
|
|
||||||
stores.application.initialize();
|
|
||||||
|
|
||||||
const locale = stores.account.user ? stores.account.user.locale : 'en-US';
|
|
||||||
|
|
||||||
const Root = () => {
|
|
||||||
return (
|
|
||||||
<Provider {...stores}>
|
|
||||||
<IntlProvider locale={locale} messages={messages[locale]}>
|
|
||||||
<App/>
|
|
||||||
</IntlProvider>
|
|
||||||
</Provider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
ReactDOM.render(<Root/>, document.getElementById('root'));
|
|
||||||
|
|
||||||
// If you want your app to work offline and load faster, you can change
|
|
||||||
// unregister() to register() below. Note this comes with some pitfalls.
|
|
||||||
// Learn more about service workers: http://bit.ly/CRA-PWA
|
|
||||||
serviceWorker.register({});
|
|
@ -21,6 +21,7 @@ import enUS from './en-US';
|
|||||||
import deDE from './de-DE';
|
import deDE from './de-DE';
|
||||||
import frFR from './fr-FR';
|
import frFR from './fr-FR';
|
||||||
import svSE from './sv-SE';
|
import svSE from './sv-SE';
|
||||||
|
import zhCN from './zh-CN';
|
||||||
import account from '../stores/account';
|
import account from '../stores/account';
|
||||||
import {createIntl} from 'react-intl';
|
import {createIntl} from 'react-intl';
|
||||||
|
|
||||||
@ -28,7 +29,8 @@ const messages = {
|
|||||||
'en-US': flatten(enUS),
|
'en-US': flatten(enUS),
|
||||||
'de-DE': flatten(deDE),
|
'de-DE': flatten(deDE),
|
||||||
'fr-FR': flatten(frFR),
|
'fr-FR': flatten(frFR),
|
||||||
'sv-SE': flatten(svSE)
|
'sv-SE': flatten(svSE),
|
||||||
|
'zh-CN': flatten(zhCN)
|
||||||
};
|
};
|
||||||
|
|
||||||
let intl = null;
|
let intl = null;
|
||||||
|
29
client/src/lang/zh-CN/account.js
Normal file
29
client/src/lang/zh-CN/account.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
successfullyLoggedIn: '登录成功',
|
||||||
|
failedToLogIn: '账号或密码错误,请重试',
|
||||||
|
successfullyLoggedOut: '您已成功登出账号',
|
||||||
|
failedToLogOut: '登出失败,请重试',
|
||||||
|
successfullyRecoveredPassword: '您的密码已成功恢复!请检查您的电子邮件获得更多内容',
|
||||||
|
failedToRecoverPassword: '恢复密码时出现错误,请重试',
|
||||||
|
invalidateSuccess: '成功清除缓存',
|
||||||
|
sessionExpired: '您的会话已过期,请重新登录',
|
||||||
|
}
|
23
client/src/lang/zh-CN/application.js
Normal file
23
client/src/lang/zh-CN/application.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
updateSuccess: '更新成功',
|
||||||
|
updateFailure: '更新失败'
|
||||||
|
}
|
36
client/src/lang/zh-CN/index.js
Normal file
36
client/src/lang/zh-CN/index.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
import account from './account';
|
||||||
|
import application from './application';
|
||||||
|
import notes from './notes';
|
||||||
|
import users from './users';
|
||||||
|
import settings from './settings';
|
||||||
|
import profile from './profile';
|
||||||
|
import layout from './layout';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
account,
|
||||||
|
application,
|
||||||
|
notes,
|
||||||
|
users,
|
||||||
|
settings,
|
||||||
|
profile,
|
||||||
|
layout,
|
||||||
|
}
|
28
client/src/lang/zh-CN/layout.js
Normal file
28
client/src/lang/zh-CN/layout.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
users: '用户',
|
||||||
|
settings: '设置',
|
||||||
|
profile: '个人信息',
|
||||||
|
about: '关于',
|
||||||
|
help: '帮助',
|
||||||
|
logout: '登出',
|
||||||
|
pageNotAvailableOffline: '您已离线,无法对此页面进行操作'
|
||||||
|
}
|
48
client/src/lang/zh-CN/notes.js
Normal file
48
client/src/lang/zh-CN/notes.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
notes: '笔记',
|
||||||
|
note: '笔记',
|
||||||
|
saved: '已保存',
|
||||||
|
pin: '置顶',
|
||||||
|
unpin: '取消置顶',
|
||||||
|
unpinFailure: '该笔记不可取消置顶',
|
||||||
|
download: '下载',
|
||||||
|
share: '分享',
|
||||||
|
shareSuccess: '分享成功',
|
||||||
|
shareFailure: '分享失败',
|
||||||
|
delete: '删除',
|
||||||
|
deletePrompt: '你确定要删除吗?',
|
||||||
|
search: '搜索',
|
||||||
|
syncFailure: '笔记同步失败',
|
||||||
|
filter: '搜索',
|
||||||
|
keyword: '关键词',
|
||||||
|
newNote: '新建笔记',
|
||||||
|
add: '添加',
|
||||||
|
created: '创建于',
|
||||||
|
modified: '修改于',
|
||||||
|
selectNote: '选择笔记',
|
||||||
|
selectNoteInformation: '从注释列表中选择注释后,此面板将显示有用的信息和操作',
|
||||||
|
welcome: '欢迎使用!',
|
||||||
|
selectNoteOrCreate: '选择一个现有的笔记或创建一个新笔记',
|
||||||
|
conflict: 'Conflict',
|
||||||
|
syncingGotDisabled: '由于未知错误,笔记同步已被禁用',
|
||||||
|
notFoundOrNotSynced: '笔记不存在或尚未同步',
|
||||||
|
}
|
54
client/src/lang/zh-CN/profile.js
Normal file
54
client/src/lang/zh-CN/profile.js
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
profile: '个人信息',
|
||||||
|
settings: '设置',
|
||||||
|
name: '姓名',
|
||||||
|
email: '电子邮件',
|
||||||
|
password: '密码',
|
||||||
|
passwordConfirmation: '重复密码',
|
||||||
|
locale: '语言',
|
||||||
|
view: '布局',
|
||||||
|
comfortable: '宽松',
|
||||||
|
compact: '紧凑',
|
||||||
|
line: '间隔',
|
||||||
|
full: '宽',
|
||||||
|
narrow: '窄',
|
||||||
|
sort: '排序',
|
||||||
|
lastModifiedFirst: '按修改排序',
|
||||||
|
lastCreatedFirst: '按创建排序',
|
||||||
|
alphabetically: '按名称排序',
|
||||||
|
theme: '主题',
|
||||||
|
dark: '暗黑的',
|
||||||
|
light: '明亮的',
|
||||||
|
save: '保存',
|
||||||
|
saveSuccess: '保存成功',
|
||||||
|
saveFailure: '保存失败',
|
||||||
|
fetchFailure: '无法获取配置信息',
|
||||||
|
application: '应用',
|
||||||
|
install: '安装',
|
||||||
|
youCanInstallPlainpad: '此服务器可以安装Plainpad',
|
||||||
|
invalidateCache: '无效的缓存',
|
||||||
|
encrypt: '加密',
|
||||||
|
yes: '是',
|
||||||
|
no: '否',
|
||||||
|
passwordsMismatch: '密码不匹配,请重试',
|
||||||
|
invalidateCachePrompt: '确定要清除本地缓存吗?未同步的信息将会丢失'
|
||||||
|
}
|
41
client/src/lang/zh-CN/settings.js
Normal file
41
client/src/lang/zh-CN/settings.js
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
settings: '设置',
|
||||||
|
setting: 'Setting',
|
||||||
|
defaultLocale: '默认语言',
|
||||||
|
mail: '邮件配置',
|
||||||
|
driver: '协议',
|
||||||
|
host: 'SMTP地址',
|
||||||
|
port: '端口',
|
||||||
|
username: '用户名',
|
||||||
|
password: '密码',
|
||||||
|
encryption: '加密方式',
|
||||||
|
fromAddress: '发件邮箱',
|
||||||
|
fromName: '发件姓名',
|
||||||
|
save: '保存',
|
||||||
|
saveSuccess: '保存成功',
|
||||||
|
saveFailure: '保存失败',
|
||||||
|
fetchFailure: '无法获取设置',
|
||||||
|
updates: '更新',
|
||||||
|
update: 'Update',
|
||||||
|
newUpdatesAvailable: '有新版本',
|
||||||
|
beforeUpdatingMakeSure: '更新前,请确保Plainpad的安装目录可写。如果在更新后报错,则需要在终端手动运行“php artisan refresh”命令',
|
||||||
|
}
|
45
client/src/lang/zh-CN/users.js
Normal file
45
client/src/lang/zh-CN/users.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
user: '用户',
|
||||||
|
users: '用户',
|
||||||
|
name: '昵称',
|
||||||
|
email: '邮箱',
|
||||||
|
password: '密码',
|
||||||
|
passwordConfirmation: '重复密码',
|
||||||
|
admin: '管理员',
|
||||||
|
role: '权限',
|
||||||
|
actions: '操作',
|
||||||
|
add: '添加',
|
||||||
|
edit: '编辑',
|
||||||
|
save: '保存',
|
||||||
|
saveSuccess: '保存成功',
|
||||||
|
saveFailure: '保存失败',
|
||||||
|
delete: '删除',
|
||||||
|
deletePrompt: '你确定要删除吗?',
|
||||||
|
deleteSuccess: '删除成功',
|
||||||
|
deleteFailure: '删除失败',
|
||||||
|
cancel: '取消',
|
||||||
|
search: '搜索',
|
||||||
|
emailAlreadyInUse: '该邮箱已被使用,请更换其他邮箱',
|
||||||
|
passwordsMismatch: '密码不匹配,请重试',
|
||||||
|
listFailure: '列出用户失败,请重试',
|
||||||
|
filterUsers: '查找用户',
|
||||||
|
}
|
@ -155,6 +155,9 @@ class Profile extends Component {
|
|||||||
<option value="sv-SE">
|
<option value="sv-SE">
|
||||||
sv-SE
|
sv-SE
|
||||||
</option>
|
</option>
|
||||||
|
<option value="zh-CN">
|
||||||
|
zh-CN
|
||||||
|
</option>
|
||||||
</Input>
|
</Input>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
|
28
server/resources/lang/zh-CN/account.php
Normal file
28
server/resources/lang/zh-CN/account.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Plainpad - Self Hosted Note Taking App
|
||||||
|
|
||||||
|
Copyright (C) 2020 Alex Tselegidis - https://alextselegidis.com
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
'registration' => '注册',
|
||||||
|
'registrationMessage' => '感谢您在 :url 上创建帐户,请使用您的凭据登录。',
|
||||||
|
'resetPassword' => '重置您的密码',
|
||||||
|
'resetPasswordMessage' => '使用以下密码登录您的帐户,请尽快登录后更改您的密码。',
|
||||||
|
'resetPasswordPreheader' => '此邮件包含您的新密码。请使用它登录并为您的帐户设置一个新密码。',
|
||||||
|
];
|
19
server/resources/lang/zh-CN/auth.php
Normal file
19
server/resources/lang/zh-CN/auth.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used during authentication for various
|
||||||
|
| messages that we need to display to the user. You are free to modify
|
||||||
|
| these language lines according to your application's requirements.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => '信息不匹配。',
|
||||||
|
'throttle' => '登录尝试过多。 请在 :seconds 秒后重试。',
|
||||||
|
|
||||||
|
];
|
19
server/resources/lang/zh-CN/pagination.php
Normal file
19
server/resources/lang/zh-CN/pagination.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used by the paginator library to build
|
||||||
|
| the simple pagination links. You are free to change them to anything
|
||||||
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« ÉÏÒ»Ò³',
|
||||||
|
'next' => 'ÏÂÒ»Ò³ »',
|
||||||
|
|
||||||
|
];
|
22
server/resources/lang/zh-CN/passwords.php
Normal file
22
server/resources/lang/zh-CN/passwords.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are the default lines which match reasons
|
||||||
|
| that are given by the password broker for a password update attempt
|
||||||
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'reset' => '密码重置成功!',
|
||||||
|
'sent' => '我们给你发送了一封密码重置邮件!',
|
||||||
|
'throttled' => '请等待一段时间后重试。',
|
||||||
|
'token' => '重置链接失效,请重新获取。',
|
||||||
|
'user' => "我们找不到使该电子邮件地址的用户。",
|
||||||
|
|
||||||
|
];
|
151
server/resources/lang/zh-CN/validation.php
Normal file
151
server/resources/lang/zh-CN/validation.php
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => '必须接受 :attribute。',
|
||||||
|
'active_url' => ':attribute 不是一个有效的 URL。',
|
||||||
|
'after' => ':attribute 必须是 :date 之后的一个日期。',
|
||||||
|
'after_or_equal' => ':attribute 必须是 :date 之后或相等的一个日期。',
|
||||||
|
'alpha' => ':attribute 只能包含字母。',
|
||||||
|
'alpha_dash' => ':attribute 只能包含字母、数字、短划线和下划线。',
|
||||||
|
'alpha_num' => ':attribute 只能包含字母和数字。',
|
||||||
|
'array' => ':attribute 必须是一个数组。',
|
||||||
|
'before' => ':attribute 必须是 :date 之前的一个日期。',
|
||||||
|
'before_or_equal' => ':attribute 必须是 :date 之前或相等的一个日期。',
|
||||||
|
'between' => [
|
||||||
|
'numeric' => ':attribute 必须介于 :min 和 :max 之间。',
|
||||||
|
'file' => ':attribute 必须介于 :min 和 :max 千字节之间。',
|
||||||
|
'string' => ':attribute 必须介于 :min 和 :max 个字符之间。',
|
||||||
|
'array' => ':attribute 必须介于 :min 和 :max 项之间。',
|
||||||
|
],
|
||||||
|
'boolean' => ':attribute 字段必须为 true 或 false。',
|
||||||
|
'confirmed' => ':attribute 确认不匹配。',
|
||||||
|
'date' => ':attribute 不是一个有效的日期。',
|
||||||
|
'date_equals' => ':attribute 必须等于 :date。',
|
||||||
|
'date_format' => ':attribute 与格式 :format 不匹配。',
|
||||||
|
'different' => ':attribute 和 :other 必须不同。',
|
||||||
|
'digits' => ':attribute 必须是 :digits 位数字。',
|
||||||
|
'digits_between' => ':attribute 必须介于 :min 和 :max 位数字之间。',
|
||||||
|
'dimensions' => ':attribute 具有无效的图像尺寸。',
|
||||||
|
'distinct' => ':attribute 字段具有重复值。',
|
||||||
|
'email' => ':attribute 必须是一个有效的电子邮件地址。',
|
||||||
|
'ends_with' => ':attribute 必须以以下之一结尾: :values。',
|
||||||
|
'exists' => '所选的 :attribute 是无效的。',
|
||||||
|
'file' => ':attribute 必须是一个文件。',
|
||||||
|
'filled' => ':attribute 字段必须有一个值。',
|
||||||
|
'gt' => [
|
||||||
|
'numeric' => ':attribute 必须大于 :value。',
|
||||||
|
'file' => ':attribute 必须大于 :value 千字节。',
|
||||||
|
'string' => ':attribute 必须多于 :value 个字符。',
|
||||||
|
'array' => ':attribute 必须多于 :value 项。',
|
||||||
|
],
|
||||||
|
'gte' => [
|
||||||
|
'numeric' => ':attribute 必须大于或等于 :value。',
|
||||||
|
'file' => ':attribute 必须大于或等于 :value 千字节。',
|
||||||
|
'string' => ':attribute 必须大于或等于 :value 个字符。',
|
||||||
|
'array' => ':attribute 必须至少有 :value 项。',
|
||||||
|
],
|
||||||
|
'image' => ':attribute 必须是一个图像。',
|
||||||
|
'in' => '所选的 :attribute 是无效的。',
|
||||||
|
'in_array' => ':attribute 字段不存在于 :other 中。',
|
||||||
|
'integer' => ':attribute 必须是一个整数。',
|
||||||
|
'ip' => ':attribute 必须是一个有效的 IP 地址。',
|
||||||
|
'ipv4' => ':attribute 必须是一个有效的 IPv4 地址。',
|
||||||
|
'ipv6' => ':attribute 必须是一个有效的 IPv6 地址。',
|
||||||
|
'json' => ':attribute 必须是一个有效的 JSON 字符串。',
|
||||||
|
'lt' => [
|
||||||
|
'numeric' => ':attribute 必须小于 :value。',
|
||||||
|
'file' => ':attribute 必须小于 :value 千字节。',
|
||||||
|
'string' => ':attribute 必须少于 :value 个字符。',
|
||||||
|
'array' => ':attribute 必须少于 :value 项。',
|
||||||
|
],
|
||||||
|
'lte' => [
|
||||||
|
'numeric' => ':attribute 必须小于或等于 :value。',
|
||||||
|
'file' => ':attribute 必须小于或等于 :value 千字节。',
|
||||||
|
'string' => ':attribute 必须小于或等于 :value 个字符。',
|
||||||
|
'array' => ':attribute 不能超过 :value 项。',
|
||||||
|
],
|
||||||
|
'max' => [
|
||||||
|
'numeric' => ':attribute 不能大于 :max。',
|
||||||
|
'file' => ':attribute 不能大于 :max 千字节。',
|
||||||
|
'string' => ':attribute 不能大于 :max 个字符。',
|
||||||
|
'array' => ':attribute 不能超过 :max 项。',
|
||||||
|
],
|
||||||
|
'mimes' => ':attribute 必须是文件类型: :values。',
|
||||||
|
'mimetypes' => ':attribute 必须是文件类型: :values。',
|
||||||
|
'min' => [
|
||||||
|
'numeric' => ':attribute 必须至少为 :min。',
|
||||||
|
'file' => ':attribute 必须至少为 :min 千字节。',
|
||||||
|
'string' => ':attribute 必须至少为 :min 个字符。',
|
||||||
|
'array' => ':attribute 必须至少有 :min 项。',
|
||||||
|
],
|
||||||
|
'not_in' => '所选的 :attribute 是无效的。',
|
||||||
|
'not_regex' => ':attribute 格式无效。',
|
||||||
|
'numeric' => ':attribute 必须是一个数字。',
|
||||||
|
'password' => '密码不正确。',
|
||||||
|
'present' => ':attribute 字段必须存在。',
|
||||||
|
'regex' => ':attribute 格式无效。',
|
||||||
|
'required' => ':attribute 字段是必填的。',
|
||||||
|
'required_if' => '当 :other 是 :value 时,:attribute 字段是必填的。',
|
||||||
|
'required_unless' => '除非 :other 在 :values 中,否则 :attribute 字段是必填的。',
|
||||||
|
'required_with' => '当 :values 存在时,:attribute 字段是必填的。',
|
||||||
|
'required_with_all' => '当 :values 存在时,:attribute 字段是必填的。',
|
||||||
|
'required_without' => '当 :values 不存在时,:attribute 字段是必填的。',
|
||||||
|
'required_without_all' => '当 :values 都不存在时,:attribute 字段是必填的。',
|
||||||
|
'same' => ':attribute 和 :other 必须匹配。',
|
||||||
|
'size' => [
|
||||||
|
'numeric' => ':attribute 必须是 :size。',
|
||||||
|
'file' => ':attribute 必须是 :size 千字节。',
|
||||||
|
'string' => ':attribute 必须是 :size 个字符。',
|
||||||
|
'array' => ':attribute 必须包含 :size 项。',
|
||||||
|
],
|
||||||
|
'starts_with' => ':attribute 必须以以下之一开头: :values。',
|
||||||
|
'string' => ':attribute 必须是一个字符串。',
|
||||||
|
'timezone' => ':attribute 必须是一个有效的区域。',
|
||||||
|
'unique' => ':attribute 已经被占用。',
|
||||||
|
'uploaded' => ':attribute 上传失败。',
|
||||||
|
'url' => ':attribute 格式无效。',
|
||||||
|
'uuid' => ':attribute 必须是一个有效的 UUID。',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap our attribute placeholder
|
||||||
|
| with something more reader friendly such as "E-Mail Address" instead
|
||||||
|
| of "email". This simply helps us make our message more expressive.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => [],
|
||||||
|
|
||||||
|
];
|
Loading…
Reference in New Issue
Block a user