mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 11:34:26 +00:00
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 React, {Component} from 'react';
|
||||||
import translate from 'translations';
|
import translate, {getTranslators} from 'translations';
|
||||||
|
|
||||||
|
|
||||||
export default class Footer extends Component {
|
export default class Footer extends Component {
|
||||||
constructor(props) {
|
|
||||||
super(props)
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const translators = getTranslators()
|
||||||
return (
|
return (
|
||||||
<footer role="contentinfo" aria-label="footer">
|
<footer role="contentinfo" aria-label="footer">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
@ -55,6 +52,15 @@ export default class Footer extends Component {
|
|||||||
TREZOR</a>
|
TREZOR</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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>
|
||||||
<div className="col-sm-3 footer-3">
|
<div className="col-sm-3 footer-3">
|
||||||
<h5><i aria-hidden="true">🌎</i> On the Web</h5>
|
<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
|
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…
x
Reference in New Issue
Block a user