Merge pull request #5334 from vector-im/dbkr/use_t_normally

Use _t as _t
pull/5338/head
David Baker 2017-10-19 10:08:51 +01:00 committed by GitHub
commit 6910b83c20
1 changed files with 4 additions and 2 deletions

View File

@ -69,6 +69,8 @@ import Promise from 'bluebird';
var request = require('browser-request'); var request = require('browser-request');
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
import * as languageHandler from 'matrix-react-sdk/lib/languageHandler'; import * as languageHandler from 'matrix-react-sdk/lib/languageHandler';
// Also import _t directly so we can call it just `_t` as this is what gen-i18n.js expects
import { _t } from 'matrix-react-sdk/lib/languageHandler';
import url from 'url'; import url from 'url';
@ -248,13 +250,13 @@ async function loadApp() {
if (!preventRedirect) { if (!preventRedirect) {
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
if (confirm(languageHandler._t("Riot is not supported on mobile web. Install the app?"))) { if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067"; window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
return; return;
} }
} }
else if (/Android/.test(navigator.userAgent)) { else if (/Android/.test(navigator.userAgent)) {
if (confirm(languageHandler._t("Riot is not supported on mobile web. Install the app?"))) { if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha"; window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
return; return;
} }