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

@ -12,6 +12,8 @@
"Can't update user notification settings": "Can't update user notification settings", "Can't update user notification settings": "Can't update user notification settings",
"Close": "Close", "Close": "Close",
"Collapse panel": "Collapse panel", "Collapse panel": "Collapse panel",
"Collecting app version information": "Collecting app version information",
"Collecting logs": "Collecting logs",
"Create new room": "Create new room", "Create new room": "Create new room",
"Couldn't find a matching Matrix room": "Couldn't find a matching Matrix room", "Couldn't find a matching Matrix room": "Couldn't find a matching Matrix room",
"Custom Server Options": "Custom Server Options", "Custom Server Options": "Custom Server Options",
@ -91,6 +93,7 @@
"Resend": "Resend", "Resend": "Resend",
"Riot Desktop on %(platformName)": "Riot Desktop on %(platformName)", "Riot Desktop on %(platformName)": "Riot Desktop on %(platformName)",
"Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network", "Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network",
"Riot is not supported on mobile web. Install the app?": "Riot is not supported on mobile web. Install the app?",
"Riot uses many advanced browser features, some of which are not available or experimental in your current browser.": "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.", "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.": "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.",
"Room directory": "Room directory", "Room directory": "Room directory",
"Room not found": "Room not found", "Room not found": "Room not found",
@ -112,8 +115,10 @@
"unknown error code": "unknown error code", "unknown error code": "unknown error code",
"Unnamed room": "Unnamed room", "Unnamed room": "Unnamed room",
"Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s", "Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s",
"Uploading report": "Uploading report",
"View Decrypted Source": "View Decrypted Source", "View Decrypted Source": "View Decrypted Source",
"View Source": "View Source", "View Source": "View Source",
"Waiting for response from server": "Waiting for response from server",
"When I'm invited to a room": "When I'm invited to a room", "When I'm invited to a room": "When I'm invited to a room",
"World readable": "World readable", "World readable": "World readable",
"You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)", "You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)",

View File

@ -36,7 +36,7 @@
</head> </head>
<body style="height: 100%;"> <body style="height: 100%;">
<section id="matrixchat" style="height: 100%;"></section> <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++) { <% for (var i=0; i < htmlWebpackPlugin.files.js.length; i++) {
// Not a particularly graceful way of not putting the indexeddb worker script // Not a particularly graceful way of not putting the indexeddb worker script
// into the main page // into the main page

View File

@ -245,13 +245,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("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"; 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("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"; window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
return; return;
} }

View File

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