Ver Fonte

添加大部分中英文翻译

Csy817 há 7 anos atrás
pai
commit
82362fcb6f

+ 24 - 15
src/app/App.jsx

@@ -163,14 +163,15 @@ class App extends Component {
                                 <Link to="/wechat-service/trial-case/index"><FormattedMessage
                                     id="Wechat Service"/></Link>
                             </Menu.Item>
-                            <Menu.Item key="quant-service">
-                                <Link to="/quant-service/trial-case/index"><FormattedMessage id="Quantization Service"/></Link>
-                            </Menu.Item>
+                            {/*<Menu.Item key="quant-service">*/}
+                                {/*<Link to="/quant-service/trial-case/index"><FormattedMessage id="Quantization Service"/></Link>*/}
+                            {/*</Menu.Item>*/}
                         </Menu>
 
                         <Link to="/login">
                             <Button className='login-button' type='primary'
-                                    onClick={() => this.switchMenuLevel('menuLevel1', 'user')}>Login</Button>
+                                    onClick={() => this.switchMenuLevel('menuLevel1', 'user')}>
+                                <FormattedMessage id="Login"/></Button>
                         </Link>
 
                         <div className="change-locale">
@@ -248,7 +249,7 @@ class App extends Component {
                                                 <a href="https://ioobot-document.netlify.com/" title="instructions"
                                                    target="instructions">
                                                     <Icon type="file-text" theme="twoTone"/>
-                                                    <span>Instructions</span>
+                                                    <span><FormattedMessage id="Instructions"/></span>
                                                 </a>
                                             </Menu.Item>
                                         </Menu>
@@ -279,13 +280,13 @@ class App extends Component {
                                         >
                                             <Menu.Item key="account">
                                                 <Icon type="setting" theme="twoTone"/>
-                                                <span>Account center</span>
+                                                <span><FormattedMessage id="Account center"/></span>
                                                 <Link to="/login/account"/>
                                             </Menu.Item>
 
                                             <Menu.Item key="cloud-settings">
                                                 <Icon type="cloud" theme="twoTone"/>
-                                                <span>Cloud settings</span>
+                                                <span><FormattedMessage id="Cloud settings"/></span>
                                                 <Link to="/login/cloud"/>
                                             </Menu.Item>
                                         </Menu>
@@ -372,7 +373,9 @@ class GraphqlSidebar extends Component {
                                     position: 'fixed'
                                 }}
                             >
-                                <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/><span>Case Show</span></span>}>
+                                <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/><span>
+                                    <FormattedMessage id="Case Show"/>
+                                </span></span>}>
                                     {
                                         data.caseSchema.map((schema) =>
                                             <Menu.Item key={schema.schemaName}>
@@ -389,7 +392,7 @@ class GraphqlSidebar extends Component {
 
                                 <Menu.Item key="create-graphql" onClick={this.props.showModal}>
                                     <Icon type="edit" theme="twoTone"/>
-                                    <span>Create</span>
+                                    <span><FormattedMessage id="Create"/></span>
                                     <Icon type="plus" style={{
                                         position: 'absolute',
                                         top: '35%',
@@ -398,7 +401,9 @@ class GraphqlSidebar extends Component {
                                     }}/>
                                 </Menu.Item>
 
-                                <SubMenu key="my-create" title={<span><Icon type="user" theme="outlined"/><span>My Create</span></span>}>
+                                <SubMenu key="my-create" title={<span><Icon type="user" theme="outlined"/><span>
+                                    <FormattedMessage id="My Create"/>
+                                </span></span>}>
                                     {
                                         data.userSchema.map((schema) =>
                                             <Menu.Item key={schema.schemaName}>
@@ -417,7 +422,7 @@ class GraphqlSidebar extends Component {
                                     <a href="https://ioobot-document.netlify.com/" title="instructions" target="_blank"
                                        rel="noopener noreferrer">
                                         <Icon type="file-text" theme="twoTone"/>
-                                        <span>Instructions</span>
+                                        <span><FormattedMessage id="Instructions"/></span>
                                     </a>
                                 </Menu.Item>
 
@@ -465,7 +470,9 @@ class WxConfigSiderbar extends Component {
                                     position: 'fixed'
                                 }}
                             >
-                                <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/><span>Case Show</span></span>}>
+                                <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/>
+                                    <span><FormattedMessage id="Case Show"/></span>
+                                </span>}>
                                     {
                                         data.caseWxConfig.map((config) =>
                                             <Menu.Item key={config.appName}>
@@ -482,7 +489,7 @@ class WxConfigSiderbar extends Component {
 
                                 <Menu.Item key="create-config" onClick={this.props.wxShowModal}>
                                     <Icon type="edit" theme="twoTone"/>
-                                    <span>Create</span>
+                                    <span><FormattedMessage id="Create"/></span>
                                     <Icon type="plus" style={{
                                         position: 'absolute',
                                         top: '35%',
@@ -491,7 +498,9 @@ class WxConfigSiderbar extends Component {
                                     }}/>
                                 </Menu.Item>
 
-                                <SubMenu key="my-create" title={<span><Icon type="user" theme="outlined"/><span>My Create</span></span>}>
+                                <SubMenu key="my-create" title={<span><Icon type="user" theme="outlined"/>
+                                    <span><FormattedMessage id="My Create"/></span>
+                                </span>}>
                                     {
                                         data.userWxConfig.map((config) =>
                                             <Menu.Item key={config.appName}>
@@ -510,7 +519,7 @@ class WxConfigSiderbar extends Component {
                                     <a href="https://ioobot-document.netlify.com/" title="instructions" target="_blank"
                                        rel="noopener noreferrer">
                                         <Icon type="file-text" theme="twoTone"/>
-                                        <span>Instructions</span>
+                                        <span><FormattedMessage id="Instructions"/></span>
                                     </a>
                                 </Menu.Item>
 

+ 1 - 1
src/app/common/deploy/index.css

@@ -40,7 +40,7 @@ p.show {
 
 .cloud-name {
     font-weight: bold;
-    font-size: large;
+    font-size: medium;
     display: block;
     height: 35px;
 }

+ 8 - 7
src/app/graphqlService/TrialCase.jsx

@@ -1,5 +1,6 @@
 import React, {Component} from 'react';
 import {Layout, Menu} from 'antd';
+import {FormattedMessage} from 'react-intl';
 
 import GenerateJs from "./component/generateJs/GenerateJs";
 import Deploy from '../common/deploy/Deploy';
@@ -57,12 +58,12 @@ class TrialCase extends Component {
                     onClick={(e) => this.switchMenu('menuLevel2', e)}
                     selectedKeys={[this.state.menuLevel2]}
                 >
-                    <Menu.Item key="schema">schema</Menu.Item>
-                    <Menu.Item key="deploy">deploy</Menu.Item>
-                    <Menu.Item key="graphiql">graphql IDE</Menu.Item>
-                    <Menu.Item key="templeate">templeate</Menu.Item>
-                    <Menu.Item key="preview">preview</Menu.Item>
-                    <Menu.Item key="metabase">metabase</Menu.Item>
+                    <Menu.Item key="schema"><FormattedMessage id="schema"/></Menu.Item>
+                    <Menu.Item key="deploy"><FormattedMessage id="deploy"/></Menu.Item>
+                    <Menu.Item key="graphiql"><FormattedMessage id="graphql IDE"/></Menu.Item>
+                    <Menu.Item key="template"><FormattedMessage id="template"/></Menu.Item>
+                    <Menu.Item key="preview"><FormattedMessage id="preview"/></Menu.Item>
+                    <Menu.Item key="metabase"><FormattedMessage id="metabase"/></Menu.Item>
                 </Menu>
 
 
@@ -77,7 +78,7 @@ class TrialCase extends Component {
                                         return <Deploy userID={this.state.userID} schemaID={schemaID}/>;
                                     case 'graphiql':
                                         return <Graphql/>;
-                                    case 'templeate':
+                                    case 'template':
                                         return <GenerateJs schemaID={schemaID} schemaName={schemaName}/>;
                                     case 'preview':
                                         return <Application location={this.props.location}/>;

+ 6 - 5
src/app/graphqlService/UserCreate.jsx

@@ -1,5 +1,6 @@
 import React, {Component} from 'react';
 import {Layout, Menu} from 'antd';
+import {FormattedMessage} from 'react-intl';
 
 import GenerateJs from "./component/generateJs/GenerateJs";
 import Deploy from '../common/deploy/Deploy';
@@ -56,11 +57,11 @@ class UserCreate extends Component {
                     onClick={(e) => this.switchMenu('menuLevel2', e)}
                     selectedKeys={[this.state.menuLevel2]}
                 >
-                    <Menu.Item key="schema">schema</Menu.Item>
-                    <Menu.Item key="deploy">deploy</Menu.Item>
-                    <Menu.Item key="graphiql">graphql IDE</Menu.Item>
-                    <Menu.Item key="template">template</Menu.Item>
-                    <Menu.Item key="metabase">metabase</Menu.Item>
+                    <Menu.Item key="schema"><FormattedMessage id="schema"/></Menu.Item>
+                    <Menu.Item key="deploy"><FormattedMessage id="deploy"/></Menu.Item>
+                    <Menu.Item key="graphiql"><FormattedMessage id="graphql IDE"/></Menu.Item>
+                    <Menu.Item key="template"><FormattedMessage id="template"/></Menu.Item>
+                    <Menu.Item key="metabase"><FormattedMessage id="metabase"/></Menu.Item>
                 </Menu>
 
 

+ 5 - 1
src/app/graphqlService/component/caseMetabase/CaseMetabase.jsx

@@ -1,4 +1,7 @@
 import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
+
+import './index.css';
 
 class CaseMetabase extends Component {
 
@@ -6,7 +9,8 @@ class CaseMetabase extends Component {
     render() {
         return (
             <div>
-                Only members to use this website.
+                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
+                {/*Only members to use this website.*/}
             </div>
         )
     }

+ 3 - 0
src/app/graphqlService/component/caseMetabase/index.css

@@ -0,0 +1,3 @@
+p {
+    font-size: 16px;
+}

+ 32 - 31
src/app/graphqlService/component/generateJs/GenerateJs.jsx

@@ -1,4 +1,5 @@
 import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
 import axios from 'axios';
 import {BackTop, Tabs, Button, Spin} from 'antd';
 import saveAs from 'file-saver';
@@ -111,7 +112,9 @@ class GenerateJs extends Component {
                 >
                     <TabPane tab="Query" key="query">
                         <div className='download-button'>
-                            <Button type="primary" style={{float:'right'}} onClick={()=>this.saveFile()}>Download</Button>
+                            <Button type="primary" style={{float:'right'}} onClick={()=>this.saveFile()}>
+                                <FormattedMessage id="Download"/>
+                            </Button>
                         </div>
                         <br/>
                         {this.state.show ?
@@ -123,7 +126,9 @@ class GenerateJs extends Component {
 
                     <TabPane tab="Mutation" key="mutation">
                         <div className='download-button'>
-                            <Button type="primary" style={{float:'right'}} onClick={()=>this.saveFile()}>Download</Button>
+                            <Button type="primary" style={{float:'right'}} onClick={()=>this.saveFile()}>
+                                <FormattedMessage id="Download"/>
+                            </Button>
                         </div>
                         <br/>
                         {this.state.show ?
@@ -143,33 +148,29 @@ class GenerateJs extends Component {
 
 export default GenerateJs;
 
-class GraphqlJs extends Component {
-    render() {
-        return (
-            <div>
-                 <pre>
-                     <code>
-                         {this.props.graphqlList}
-                     </code>
-                 </pre>
-            </div>
-        );
-    }
-}
+const GraphqlJs = (props) => {
+    return (
+        <div>
+            <pre>
+                <code>
+                    {props.graphqlList}
+                </code>
+            </pre>
+        </div>
+    );
+};
 
-class Loading extends Component {
-    render() {
-        return (
-            <div style={{width: '100%', height: window.innerHeight - 164}}>
-                <Spin
-                    tip={'loading...'}
-                    style={{
-                        position: 'relative',
-                        top: '50%',
-                        left: '50%',
-                        transform: 'translate(-50%,-50%)'
-                    }}/>
-            </div>
-        );
-    }
-}
+const Loading =() => {
+    return (
+        <div style={{width: '100%', height: window.innerHeight - 164}}>
+            <Spin
+                tip={'loading...'}
+                style={{
+                    position: 'relative',
+                    top: '50%',
+                    left: '50%',
+                    transform: 'translate(-50%,-50%)'
+                }}/>
+        </div>
+    );
+};

+ 1 - 0
src/app/graphqlService/component/graphql/Graphql.jsx

@@ -9,6 +9,7 @@ class Graphql extends Component {
   constructor() {
     super();
     this.state = {
+      // api: 'http://service-4i9xdoqo-1254337200.ap-guangzhou.apigateway.myqcloud.com/release/graphql',
       // api: 'http://service-ci2tk8iu-1254337200.ap-guangzhou.apigateway.myqcloud.com/release/graphql',
       // 便于开发调试,请删除并换成上面
       api: graphqlUrl

+ 2 - 1
src/app/graphqlService/component/schema/Schema.jsx

@@ -254,7 +254,7 @@ class Schema extends Component {
                                                                                 currentTable: 'add'
                                                                             })
                                                                         }}>
-                                                                    <Icon type="plus"/>
+                                                                        <Icon type="plus" style={{color: '#096dd9',cursor: 'pointer'}}/>
                                                                 </span>
                                                         }
 
@@ -665,6 +665,7 @@ class DeleteTableButton extends Component {
 
                                     return (
                                         <Icon type="delete"
+                                              theme="twoTone"
                                               onClick={() => {
                                                   update_schema({
                                                       variables: {

+ 4 - 4
src/app/wechatService/WxTrialCase.js

@@ -1,6 +1,6 @@
 import React, {Component} from 'react';
-
 import {Layout, Menu} from 'antd';
+import {FormattedMessage} from 'react-intl';
 
 import WxConfig from "./wxConfig/WxConfig";
 import WxDeploy from "../common/deploy/Deploy";
@@ -42,9 +42,9 @@ class WxTrialCase extends Component {
                     onClick={(e) => this.switchMenu('menuLevel3', e)}
                     selectedKeys={[this.state.menuLevel3]}
                 >
-                    <Menu.Item key="wechat-config">config settings</Menu.Item>
-                    <Menu.Item key="wechat-deploy">deploy settings</Menu.Item>
-                    <Menu.Item key="wechat-result">result</Menu.Item>
+                    <Menu.Item key="wechat-config"><FormattedMessage id="config"/></Menu.Item>
+                    <Menu.Item key="wechat-deploy"><FormattedMessage id="deploy"/></Menu.Item>
+                    <Menu.Item key="wechat-result"><FormattedMessage id="manage"/></Menu.Item>
                 </Menu>
 
                 <Layout style={{padding: '24px', zIndex: '0'}}>

+ 1 - 1
src/app/wechatService/wxConfig/WxConfig.jsx

@@ -121,7 +121,7 @@ class Display extends Component {
                 }
                 {
                     this.props.trialcase ?
-                        <Button type={'primary'}> need copy</Button>
+                        ""
                         :
                         <div>
                             <UpdateWXConfigButton

+ 49 - 0
src/language/en_US.js

@@ -6,5 +6,54 @@ const en_US = {
     "Data Storage":"Data Storage",
     "Data Analysis":"Data Analysis",
     "Monitor Notification":"Monitor Notification",
+    "schema":"schema",
+    "deploy":"deploy",
+    "graphql IDE":"graphql IDE",
+    "template":"template",
+    "preview":"preview",
+    "metabase":"metabase",
+    "Case Show":"Case Show",
+    "Create":"Create",
+    "My Create":"My Create",
+    "Instructions":"Instructions",
+    "Login":"Login",
+    "login":"login",
+    "Download":"Download",
+
+    "Name":"Name",
+    "name":"name",
+    "type":"type",
+    "description":"description",
+    "Remark":"Remark",
+    "copy":"copy",
+    "Table":"Table",
+    "fields":"fields",
+     // wexin相关
+    "config":"config",
+    "manage":"manage",
+    //cloud 相关
+    "Tencent":"Tencent",
+    "Aliyun":"Aliyun",
+    "AWS":"AWS",
+    // deploy相关
+    "Deploy":"Deploy",
+
+    //account 个人中心相关
+    "Account center":"Account center",
+    "Cloud settings":"Cloud settings",
+    "user setting":"user setting",
+    "cloud setting":"cloud setting",
+    "save":"save",
+    "cancel":"cancel",
+    "modify":"modify",
+    "exit":"exit",
+    "email":"email",
+    "tel":"tel",
+    "username":"username",
+    "password":"password",
+    "modify avatar":"modify avatar",
+    //提示语
+    "It is under development, please look forward to it. Thank you for your attention":"It is under development, please look forward to it. Thank you for your attention"
+
 };
 export default en_US;

+ 50 - 1
src/language/zh_CN.js

@@ -5,6 +5,55 @@ const zh_CN = {
     "Cloud Function":"云函数",
     "Data Storage":"数据存储",
     "Data Analysis":"数据分析",
-    "Monitor Notification":"监控通知"
+    "Monitor Notification":"监控通知",
+    "schema":"数据表",
+    "deploy":"一键部署",
+    "graphql IDE":"graphql IDE",
+    "template":"模板语句",
+    "preview":"展示",
+    "metabase":"数据分析",
+    "Case Show":"案例展示",
+    "Create":"创建",
+    "My Create":"我的创建",
+    "Instructions":"使用说明",
+    "Login":"登陆",
+    "login":"登陆",
+    "Download":"下载",
+
+    "Name":"名称",
+    "name":"名称",
+    "type":"类型",
+    "description":"description",
+    "Remark":"描述",
+    "copy":"复制",
+    "Table":"表",
+    "fields":"字段",
+    // wexin相关
+    "config":"配置",
+    "manage":"管理",
+    //cloud 相关
+    "Tencent":"腾讯云",
+    "Aliyun":"阿里云",
+    "AWS":"亚马逊",
+    // deploy相关
+    "Deploy":"部署",
+
+    //account 个人中心相关
+    "Account center":"账户中心",
+    "Cloud settings":"云服务商配置",
+    "user setting":"用户设置",
+    "cloud setting":"云授权设置",
+    "save":"保存",
+    "cancel":"取消",
+    "modify":"修改",
+    "exit":"退出",
+    "email":"邮箱",
+    "tel":"联系号码",
+    "username":"用户名",
+    "password":"密码",
+    "modify avatar":"修改我的头像",
+
+    //提示语
+    "It is under development, please look forward to it. Thank you for your attention":"正在开发中,请敬请期待,感谢您对我们的关注"
 };
 export default zh_CN;

+ 13 - 10
src/login/AccountConfig.js

@@ -1,4 +1,5 @@
 import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
 import {Icon, Row, Col, Input, Button} from 'antd';
 import './index.css'
 import avatar from '../images/avatar.jpg';
@@ -34,7 +35,9 @@ class AccountConfig extends Component {
                             <div className={'mask-black'}>
                                 <div className={'tip'}>
                                     <Icon style={{fontSize: 30, display: 'block'}} type="camera"/>
-                                    <span style={{paddingTop: 5, display: 'block'}} className={'tip-span'}>修改我的头像</span>
+                                    <span style={{paddingTop: 5, display: 'block'}} className={'tip-span'}>
+                                        <FormattedMessage id="modify avatar"/>
+                                    </span>
                                 </div>
                             </div>
                         </div>
@@ -63,7 +66,7 @@ class AccountConfig extends Component {
                                                                   }}>
                                                                 <Icon style={{fontSize: '18px'}} type="edit"
                                                                       theme="twoTone"/>
-                                                                <span className={'modify'}> modify</span>
+                                                                <span className={'modify'}> <FormattedMessage id="modify"/></span>
                                                             </span>
                                                             :
                                                             ''
@@ -77,14 +80,14 @@ class AccountConfig extends Component {
                                                 pathname: '/login',
                                             })
                                         }}>
-                                            login <Icon type="right" style={{color: '#848fa6'}}/>
+                                            <FormattedMessage id="login"/> <Icon type="right" style={{color: '#848fa6'}}/>
                                         </div>
                                     </Col>
                                 </Row>
 
                                 <Row className={'message'}>
                                     <Col span={5}>
-                                        <span className={'message-title'}>tel</span>
+                                        <span className={'message-title'}><FormattedMessage id="tel"/></span>
                                     </Col>
                                     <Col span={19}>
                                         {
@@ -108,7 +111,7 @@ class AccountConfig extends Component {
                                                                   }}>
                                                                 <Icon style={{fontSize: '18px'}} type="edit"
                                                                       theme="twoTone"/>
-                                                                <span className={'modify'}> modify</span>
+                                                                <span className={'modify'}> <FormattedMessage id="modify"/></span>
                                                             </span>
                                                             :
                                                             ''
@@ -120,7 +123,7 @@ class AccountConfig extends Component {
 
                                 <Row className={'message'}>
                                     <Col span={5}>
-                                        <span className={'message-title'}>email</span>
+                                        <span className={'message-title'}><FormattedMessage id="email"/></span>
                                     </Col>
 
                                     <Col span={19}>
@@ -181,8 +184,8 @@ class EditNickname extends Component {
                 <Col span={19}>
                     <span className={'message-content'}>
                         <Input/>
-                        <Button type={'primary'}>save</Button>
-                        <Button onClick={() => this.props.cancelEdit(this.props.kind)}>cancel</Button>
+                        <Button type={'primary'}><FormattedMessage id="save"/></Button>
+                        <Button onClick={() => this.props.cancelEdit(this.props.kind)}><FormattedMessage id="cancel"/></Button>
                     </span>
                 </Col>
             </Row>
@@ -200,8 +203,8 @@ class Edit extends Component {
         return (
             <span className={'message-content'}>
                 <Input/>
-                <Button type={'primary'}>save</Button>
-                <Button onClick={() => this.props.cancelEdit(this.props.kind)}>cancel</Button>
+                <Button type={'primary'}><FormattedMessage id="save"/></Button>
+                <Button onClick={() => this.props.cancelEdit(this.props.kind)}><FormattedMessage id="cancel"/></Button>
             </span>
         )
     }

+ 70 - 59
src/login/CloudConfig.js

@@ -1,4 +1,5 @@
 import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
 import {Button, Input, Spin, Icon} from 'antd';
 
 import {SHOW_CLOUD, ADD_CLOUD, UPDATE_CLOUD} from "../gql";
@@ -134,18 +135,19 @@ class CloudConfig extends Component {
                             pathname: '/login',
                         })
                     }}>
-                        <Icon type="left" style={{color: '#3187FA'}}/> login
+                        <Icon type="left" style={{color: '#3187FA'}}/> <FormattedMessage id="login"/>
                     </div>
+
                     <div style={{marginTop: 15}}>
-                        <span className='cloud-name'>Tencent: </span>
+                        <span className='cloud-name'><FormattedMessage id="Tencent"/>: </span>
                         <div style={{marginBottom: 15}}>
                             <div>
-                                <div style={{marginBottom: 10}}>
-                                    <span className='item-title-cloud'>ID:</span>
+                                <div style={{marginBottom: 20}}>
+                                    <span className='item-title-cloud'>secret ID:</span>
                                     <Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('tenID')}/>
                                 </div>
-                                <div style={{marginBottom: 10}}>
-                                    <span className='item-title-cloud'>Key:</span>
+                                <div style={{marginBottom: 20}}>
+                                    <span className='item-title-cloud'>secret Key:</span>
                                     <Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('tenKey')}/>
                                 </div>
                                 {
@@ -159,62 +161,71 @@ class CloudConfig extends Component {
                                 }
                             </div>
                             <Button type='primary'
-                                    onClick={this.submit(this.state.tencentCLoudID, 'tencent', this.state.tenID, this.state.tenKey)}>ok</Button>
+                                    onClick={this.submit(this.state.tencentCLoudID, 'tencent', this.state.tenID, this.state.tenKey)}>
+                                <FormattedMessage id="save"/>
+                            </Button>
                         </div>
                     </div>
-                    <div>
-                        <span className='cloud-name'>Aliyun: </span>
-                        <div style={{marginBottom: 15}}>
-                            <div>
-                                <div style={{marginBottom: 10}}>
-                                    <span className='item-title-cloud'>ID:</span>
-                                    <Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('aliID')}/>
-                                </div>
-                                <div style={{marginBottom: 10}}>
-                                    <span className='item-title-cloud'>Key:</span>
-                                    <Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('aliKey')}/>
-                                </div>
 
-                                {
-                                    this.state.showOK === 'aliyun' ?
-                                        <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                        :
-                                        this.state.showNotOK === 'aliyun' ?
-                                            <span>not ok</span>
-                                            :
-                                            ""
-                                }
-                            </div>
-                            <Button type='primary'
-                                    onClick={this.submit(this.state.aliyunCLoudID, 'aliyun', this.state.aliID, this.state.aliKey)}>ok</Button>
-                        </div>
-                    </div>
-                    <div>
-                        <span className='cloud-name'>AWS: </span>
-                        <div style={{marginBottom: 15}}>
-                            <div>
-                                <div style={{marginBottom: 10}}>
-                                    <span className='item-title-cloud'>ID:</span>
-                                    <Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('awsID')}/>
-                                </div>
-                                <div style={{marginBottom: 10}}>
-                                    <span className='item-title-cloud'>Key:</span>
-                                    <Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('awsKey')}/>
-                                </div>
-                                {
-                                    this.state.showOK === 'amazon' ?
-                                        <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                        :
-                                        this.state.showNotOK === 'amazon' ?
-                                            <span>not ok</span>
-                                            :
-                                            ""
-                                }
-                            </div>
-                            <Button type='primary'
-                                    onClick={this.submit(this.state.awsCLoudID, 'amazon', this.state.awsID, this.state.awsKey)}>ok</Button>
-                        </div>
-                    </div>
+                    {/*<div>*/}
+                        {/*<span className='cloud-name'><FormattedMessage id="Aliyun"/>: </span>*/}
+                        {/*<div style={{marginBottom: 15}}>*/}
+                            {/*<div>*/}
+                                {/*<div style={{marginBottom: 10}}>*/}
+                                    {/*<span className='item-title-cloud'>ID:</span>*/}
+                                    {/*<Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('aliID')}/>*/}
+                                {/*</div>*/}
+                                {/*<div style={{marginBottom: 10}}>*/}
+                                    {/*<span className='item-title-cloud'>Key:</span>*/}
+                                    {/*<Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('aliKey')}/>*/}
+                                {/*</div>*/}
+
+                                {/*{*/}
+                                    {/*this.state.showOK === 'aliyun' ?*/}
+                                        {/*<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>*/}
+                                        {/*:*/}
+                                        {/*this.state.showNotOK === 'aliyun' ?*/}
+                                            {/*<span>not ok</span>*/}
+                                            {/*:*/}
+                                            {/*""*/}
+                                {/*}*/}
+                            {/*</div>*/}
+                            {/*<Button type='primary'*/}
+                                    {/*onClick={this.submit(this.state.aliyunCLoudID, 'aliyun', this.state.aliID, this.state.aliKey)}>*/}
+                                {/*<FormattedMessage id="save"/>*/}
+                            {/*</Button>*/}
+                        {/*</div>*/}
+                    {/*</div>*/}
+
+                    {/*<div>*/}
+                        {/*<span className='cloud-name'><FormattedMessage id="AWS"/>: </span>*/}
+                        {/*<div style={{marginBottom: 15}}>*/}
+                            {/*<div>*/}
+                                {/*<div style={{marginBottom: 10}}>*/}
+                                    {/*<span className='item-title-cloud'>ID:</span>*/}
+                                    {/*<Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('awsID')}/>*/}
+                                {/*</div>*/}
+                                {/*<div style={{marginBottom: 10}}>*/}
+                                    {/*<span className='item-title-cloud'>Key:</span>*/}
+                                    {/*<Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('awsKey')}/>*/}
+                                {/*</div>*/}
+                                {/*{*/}
+                                    {/*this.state.showOK === 'amazon' ?*/}
+                                        {/*<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>*/}
+                                        {/*:*/}
+                                        {/*this.state.showNotOK === 'amazon' ?*/}
+                                            {/*<span>not ok</span>*/}
+                                            {/*:*/}
+                                            {/*""*/}
+                                {/*}*/}
+                            {/*</div>*/}
+                            {/*<Button type='primary'*/}
+                                    {/*onClick={this.submit(this.state.awsCLoudID, 'amazon', this.state.awsID, this.state.awsKey)}>*/}
+                                {/*<FormattedMessage id="save"/>*/}
+                            {/*</Button>*/}
+                        {/*</div>*/}
+                    {/*</div>*/}
+
                 </div>
                 :
                 <Spin style={{marginLeft: 3}}/>

+ 4 - 3
src/login/LoginInput.js

@@ -1,4 +1,5 @@
 import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
 
 import {Input, Button, Spin, Icon} from 'antd';
 import {ADD_USER, GET_USER, SEARCH_USER} from "../gql";
@@ -258,18 +259,18 @@ class LoginInput extends Component {
                                         loginOnce: true
                                     });
                                     // cookie.remove('ring-session')
-                                }}>exit</Button>
+                                }}><FormattedMessage id="exit"/></Button>
                                 <div style={{marginTop: 20}}>
                                     <Button type="primary" style={{marginRight: 10}} onClick={() => {
                                         this.props.history.push({
                                             pathname: '/login/account',
                                         })
-                                    }}>user setting</Button>
+                                    }}><FormattedMessage id="user setting"/></Button>
                                     <Button type="primary" onClick={() => {
                                         this.props.history.push({
                                             pathname: '/login/cloud',
                                         })
-                                    }}>cloud setting</Button>
+                                    }}><FormattedMessage id="cloud setting"/></Button>
                                 </div>
                             </div>
                             :

+ 1 - 1
src/login/index.css

@@ -10,7 +10,7 @@
 
 .item-title-cloud {
   display: inline-block;
-  width: 50px;
+  width: 100px;
 }
 
 .login-wrapper {