Merge pull request #11 from MyEtherWallet/feat/translator-names
translator names
This commit is contained in:
commit
9144d2c666
|
@ -1,13 +1,10 @@
|
|||
import React, {Component} from 'react';
|
||||
import translate from 'translations';
|
||||
import translate, {getTranslators} from 'translations';
|
||||
|
||||
|
||||
export default class Footer extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
render() {
|
||||
const translators = getTranslators()
|
||||
return (
|
||||
<footer role="contentinfo" aria-label="footer">
|
||||
<div className="container">
|
||||
|
@ -55,6 +52,15 @@ export default class Footer extends Component {
|
|||
TREZOR</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{!!translators.length &&
|
||||
<h5> <i>🏅</i> <span>{translate('Translator_Desc')}</span></h5>
|
||||
}
|
||||
{!!translators.length &&
|
||||
<ul>
|
||||
<li>{translators.map(key => <span key={key}>{translate(key)}</span>)}</li>
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
<div className="col-sm-3 footer-3">
|
||||
<h5><i aria-hidden="true">🌎</i> On the Web</h5>
|
||||
|
|
|
@ -40,3 +40,19 @@ export default function translate(key: string) {
|
|||
repository[activeLanguage][key] || repository[fallbackLanguage][key] || key
|
||||
);
|
||||
}
|
||||
|
||||
export function getTranslators() {
|
||||
return [
|
||||
'TranslatorName_1',
|
||||
'TranslatorName_2',
|
||||
'TranslatorName_3',
|
||||
'TranslatorName_4',
|
||||
'TranslatorName_5'
|
||||
].filter(x => {
|
||||
const translated = translate(x);
|
||||
if (typeof translated === 'string') {
|
||||
return !!translated.trim();
|
||||
}
|
||||
return !!translated;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue