mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-25 10:29:14 +00:00
f5b6a49463
* Updated all translations, moved into their own folders. * Switch translations to use Markdown component. * Remove markup tests, since were using a module now. * Fix flow errors, render react elements instead of dangerouslysetinnerhtml. * Make translate a connected component, so it updates with Redux. * Fix flow errors * First pass at returning raw when needed for placeholder. * Added aria test. * Fixed flow errors and linter warnings. * Move settimeout to saga. * Change reload to 250 ms from 1500 ms
25 lines
559 B
JavaScript
25 lines
559 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import Markdown from 'react-markdown';
|
|
import { translateRaw } from 'translations';
|
|
|
|
type Props = {
|
|
translationKey: string
|
|
};
|
|
|
|
const Translate = ({ translationKey }: Props) => {
|
|
const source = translateRaw(translationKey);
|
|
return (
|
|
<Markdown
|
|
containerTagName="span"
|
|
containerProps={{ 'data-l10n-key': translationKey }}
|
|
escapeHtml={true}
|
|
unwrapDisallowed={true}
|
|
allowedTypes={['Text', 'Link', 'Emph', 'Strong', 'Code']}
|
|
source={source}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default Translate;
|