Merge pull request #5613 from pafcu/simplify-translation
Refactor translations
This commit is contained in:
commit
cb235a29fa
5 changed files with 40 additions and 39 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler';
|
||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'CompatibilityPage',
|
||||
|
@ -40,30 +40,24 @@ module.exports = React.createClass({
|
|||
return (
|
||||
<div className="mx_CompatibilityPage">
|
||||
<div className="mx_CompatibilityPage_box">
|
||||
<p>{ _tJsx("Sorry, your browser is <b>not</b> able to run Riot.", /<b>(.*?)<\/b>/, (sub) => <b>{sub}</b>) } </p>
|
||||
<p>{ _t("Sorry, your browser is <b>not</b> able to run Riot.", {}, { 'b': (sub) => <b>{sub}</b> }) } </p>
|
||||
<p>
|
||||
{ _t("Riot uses many advanced browser features, some of which are not available or experimental in your current browser.") }
|
||||
</p>
|
||||
<p>
|
||||
{ _tJsx('Please install <a href="https://www.google.com/chrome">Chrome</a> or <a href="https://getfirefox.com">Firefox</a> for the best experience.',
|
||||
[
|
||||
/<a href="https:\/\/www.google.com\/chrome">(.*?)<\/a>/,
|
||||
/<a href="https:\/\/getfirefox.com">(.*?)<\/a>/,
|
||||
],
|
||||
[
|
||||
(sub) => <a href="https://www.google.com/chrome">{sub}</a>,
|
||||
(sub) => <a href="https://getfirefox.com">{sub}</a>,
|
||||
]
|
||||
{ _t('Please install <chromeLink>Chrome</chromeLink> or <firefoxLink>Firefox</firefoxLink> for the best experience.',
|
||||
{},
|
||||
{
|
||||
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{sub}</a>,
|
||||
'firefoxLink': (sub) => <a href="https://getfirefox.com">{sub}</a>,
|
||||
},
|
||||
)}
|
||||
{ _tJsx('<a href="http://apple.com/safari">Safari</a> and <a href="http://opera.com">Opera</a> work too.',
|
||||
[
|
||||
/<a href="http:\/\/apple\.com\/safari">(.*?)<\/a>/,
|
||||
/<a href="http:\/\/opera\.com">(.*?)<\/a>/,
|
||||
],
|
||||
[
|
||||
(sub) => <a href="http://apple.com/safari">{sub}</a>,
|
||||
(sub) => <a href="http://opera.com">{sub}</a>,
|
||||
]
|
||||
{ _t('<safariLink>Safari</safariLink> and <operaLink>Opera</operaLink> work too.',
|
||||
{},
|
||||
{
|
||||
'safariLink': (sub) => <a href="http://apple.com/safari">{sub}</a>,
|
||||
'operaLink': (sub) => <a href="http://opera.com">{sub}</a>,
|
||||
},
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue