Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
a8d201b9
A
ant-design-pro
项目概览
钟摆人-Puppet゜
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design-pro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a8d201b9
编写于
7月 17, 2018
作者:
张
张秀玲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
translate error page
上级
d8b3214a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
10 deletion
+46
-10
src/components/Exception/index.js
src/components/Exception/index.js
+5
-2
src/locales/en-US.js
src/locales/en-US.js
+9
-0
src/locales/zh-CN.js
src/locales/zh-CN.js
+8
-0
src/pages/Result/Error.js
src/pages/Result/Error.js
+24
-8
未找到文件。
src/components/Exception/index.js
浏览文件 @
a8d201b9
import
React
,
{
createElement
}
from
'
react
'
;
import
{
injectIntl
,
FormattedMessage
}
from
'
react-intl
'
;
import
classNames
from
'
classnames
'
;
import
{
Button
}
from
'
antd
'
;
import
config
from
'
./typeConfig
'
;
...
...
@@ -26,7 +27,9 @@ const Exception = ({ className, linkElement = 'a', type, title, desc, img, actio
to
:
'
/
'
,
href
:
'
/
'
,
},
<
Button
type
=
"
primary
"
>
返回首页
<
/Button
>
<
Button
type
=
"
primary
"
>
<
FormattedMessage
id
=
"
app.exception.back
"
defaultMessage
=
"
Back to home
"
/>
<
/Button
>
)}
<
/div
>
<
/div
>
...
...
@@ -34,4 +37,4 @@ const Exception = ({ className, linkElement = 'a', type, title, desc, img, actio
);
};
export
default
Exception
;
export
default
injectIntl
(
Exception
)
;
src/locales/en-US.js
浏览文件 @
a8d201b9
...
...
@@ -129,4 +129,13 @@ export default {
'
app.exception.description.403
'
:
"
Sorry, you don't have access to this page
"
,
'
app.exception.description.404
'
:
'
Sorry, the page you visited does not exist
'
,
'
app.exception.description.500
'
:
'
Sorry, the server is reporting an error
'
,
'
app.result.error.title
'
:
'
Submission Failed
'
,
'
app.result.error.description
'
:
'
Please check and modify the following information before resubmitting.
'
,
'
app.result.error.hint-title
'
:
'
The content you submitted has the following error:
'
,
'
app.result.error.hint-text1
'
:
'
Your account has been frozen
'
,
'
app.result.error.hint-btn1
'
:
'
Thaw immediately
'
,
'
app.result.error.hint-text2
'
:
'
Your account is not yet eligible to apply
'
,
'
app.result.error.hint-btn2
'
:
'
Upgrade immediately
'
,
'
app.result.error.btn-text
'
:
'
Return to modify
'
,
};
src/locales/zh-CN.js
浏览文件 @
a8d201b9
...
...
@@ -125,4 +125,12 @@ export default {
'
app.exception.description.403
'
:
'
抱歉,你无权访问该页面
'
,
'
app.exception.description.404
'
:
'
抱歉,你访问的页面不存在
'
,
'
app.exception.description.500
'
:
'
抱歉,服务器出错了
'
,
'
app.result.error.title
'
:
'
提交失败
'
,
'
app.result.error.description
'
:
'
请核对并修改以下信息后,再重新提交。
'
,
'
app.result.error.hint-title
'
:
'
您提交的内容有如下错误:
'
,
'
app.result.error.hint-text1
'
:
'
您的账户已被冻结
'
,
'
app.result.error.hint-btn1
'
:
'
立即解冻
'
,
'
app.result.error.hint-text2
'
:
'
您的账户还不具备申请资格
'
,
'
app.result.error.hint-btn2
'
:
'
立即升级
'
,
'
app.result.error.btn-text
'
:
'
返回修改
'
,
};
src/pages/Result/Error.js
浏览文件 @
a8d201b9
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
Button
,
Icon
,
Card
}
from
'
antd
'
;
import
Result
from
'
components/Result
'
;
import
PageHeaderLayout
from
'
../layouts/PageHeaderLayout
'
;
...
...
@@ -13,34 +14,49 @@ const extra = (
marginBottom
:
16
,
}}
>
您提交的内容有如下错误
:
<
FormattedMessage
id
=
"
app.result.error.hint-title
"
defaultMessage
=
"
The content you submitted has the following error:
"
/>
<
/div
>
<
div
style
=
{{
marginBottom
:
16
}}
>
<
Icon
style
=
{{
color
:
'
#f5222d
'
,
marginRight
:
8
}}
type
=
"
close-circle-o
"
/>
您的账户已被冻结
<
FormattedMessage
id
=
"
app.result.error.hint-text1
"
defaultMessage
=
"
Your account has been frozen
"
/>
<
a
style
=
{{
marginLeft
:
16
}}
>
立即解冻
<
Icon
type
=
"
right
"
/>
<
FormattedMessage
id
=
"
app.result.error.hint-btn1
"
defaultMessage
=
"
Thaw immediately
"
/>
<
Icon
type
=
"
right
"
/>
<
/a
>
<
/div
>
<
div
>
<
Icon
style
=
{{
color
:
'
#f5222d
'
,
marginRight
:
8
}}
type
=
"
close-circle-o
"
/>
您的账户还不具备申请资格
<
FormattedMessage
id
=
"
app.result.error.hint-text2
"
defaultMessage
=
"
Your account is not yet eligible to apply
"
/>
<
a
style
=
{{
marginLeft
:
16
}}
>
立即升级
<
Icon
type
=
"
right
"
/>
<
FormattedMessage
id
=
"
app.result.error.hint-btn2
"
defaultMessage
=
"
Upgrade immediately
"
/>
<
Icon
type
=
"
right
"
/>
<
/a
>
<
/div
>
<
/Fragment
>
);
const
actions
=
<
Button
type
=
"
primary
"
>
返回修改
<
/Button>
;
const
actions
=
(
<
Button
type
=
"
primary
"
>
<
FormattedMessage
id
=
"
app.result.error.btn-text
"
defaultMessage
=
"
Return to modify
"
/>
<
/Button
>
);
export
default
()
=>
(
<
PageHeaderLayout
>
<
Card
bordered
=
{
false
}
>
<
Result
type
=
"
error
"
title
=
"
提交失败
"
description
=
"
请核对并修改以下信息后,再重新提交。
"
title
=
{
formatMessage
({
id
:
'
app.result.error.title
'
},
{})}
description
=
{
formatMessage
({
id
:
'
app.result.error.description
'
},
{})}
extra
=
{
extra
}
actions
=
{
actions
}
style
=
{{
marginTop
:
48
,
marginBottom
:
16
}}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录