Translate src/vector

This commit is contained in:
Kegan Dougal 2017-05-31 15:06:03 +01:00
parent 52ddcd8a60
commit fd5e7ff37a
4 changed files with 13 additions and 7 deletions

View file

@ -36,7 +36,7 @@
</head>
<body style="height: 100%;">
<section id="matrixchat" style="height: 100%;"></section>
<noscript>Sorry, Riot requires JavaScript to be enabled.</noscript>
<noscript>Sorry, Riot requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
<% for (var i=0; i < htmlWebpackPlugin.files.js.length; i++) {
// Not a particularly graceful way of not putting the indexeddb worker script
// into the main page

View file

@ -245,13 +245,13 @@ async function loadApp() {
if (!preventRedirect) {
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
if (confirm("Riot is not supported on mobile web. Install the app?")) {
if (confirm(languageHandler._t("Riot is not supported on mobile web. Install the app?"))) {
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
return;
}
}
else if (/Android/.test(navigator.userAgent)) {
if (confirm("Riot is not supported on mobile web. Install the app?")) {
if (confirm(languageHandler._t("Riot is not supported on mobile web. Install the app?"))) {
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
return;
}

View file

@ -19,6 +19,7 @@ import q from "q";
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
import rageshake from './rageshake'
@ -53,7 +54,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
opts = opts || {};
const progressCallback = opts.progressCallback || (() => {});
progressCallback("Collecting app version information");
progressCallback(_t("Collecting app version information"));
let version = "UNKNOWN";
try {
version = await PlatformPeg.get().getAppVersion();
@ -81,7 +82,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
}
if (opts.sendLogs) {
progressCallback("Collecting logs");
progressCallback(_t("Collecting logs"));
const logs = await rageshake.getLogsForReport();
for (let entry of logs) {
// encode as UTF-8
@ -94,7 +95,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
}
}
progressCallback("Uploading report");
progressCallback(_t("Uploading report"));
await _submitReport(bugReportEndpoint, body, progressCallback);
}
@ -106,7 +107,7 @@ function _submitReport(endpoint, body, progressCallback) {
req.timeout = 5 * 60 * 1000;
req.onreadystatechange = function() {
if (req.readyState === XMLHttpRequest.LOADING) {
progressCallback("Waiting for response from server");
progressCallback(_t("Waiting for response from server"));
} else if (req.readyState === XMLHttpRequest.DONE) {
on_done();
}