summaryrefslogtreecommitdiff
path: root/web-ui/src/login
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-02-15 11:43:58 -0200
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-02-21 13:32:01 -0300
commitd7dbc1dc61f74f7bd74464bda5e4e0051f062352 (patch)
tree918cf306829f768e1cc110d942b32777ac079eb1 /web-ui/src/login
parentf21558d8ceea177a26096e4922eef02413394058 (diff)
[#907] Translates login page to pt_BR
Diffstat (limited to 'web-ui/src/login')
-rw-r--r--web-ui/src/login/app.js12
-rw-r--r--web-ui/src/login/login.js4
2 files changed, 10 insertions, 6 deletions
diff --git a/web-ui/src/login/app.js b/web-ui/src/login/app.js
index e6ac3192..dda6148c 100644
--- a/web-ui/src/login/app.js
+++ b/web-ui/src/login/app.js
@@ -18,18 +18,22 @@
import React from 'react';
import { translate } from 'react-i18next';
-const App = () => (
+export const App = ({ t }) => (
<form className='standard' id='login_form' action='/login' method='post'>
<input
type='text' name='username' id='email' className='text-field'
- placeholder='username' autoFocus=''
+ placeholder={t('login.email')} autoFocus=''
/>
<input
type='password' name='password' id='password' className='text-field'
- placeholder='password' autoComplete='off'
+ placeholder={t('login.password')} autoComplete='off'
/>
- <input type='submit' name='login' value='Login' className='button' />
+ <input type='submit' name='login' value={t('login.submit')} className='button' />
</form>
);
+App.propTypes = {
+ t: React.PropTypes.func.isRequired
+};
+
export default translate('', { wait: true })(App);
diff --git a/web-ui/src/login/login.js b/web-ui/src/login/login.js
index ddbe1943..9a8c9042 100644
--- a/web-ui/src/login/login.js
+++ b/web-ui/src/login/login.js
@@ -20,14 +20,14 @@ import { render } from 'react-dom';
import a11y from 'react-a11y';
import { I18nextProvider } from 'react-i18next';
-import App from './app';
+import AppWrapper from './app';
import i18n from '../i18n';
if (process.env.NODE_ENV === 'development') a11y(React);
render(
<I18nextProvider i18n={i18n}>
- <App />
+ <AppWrapper />
</I18nextProvider>,
document.getElementById('root')
);