Skip to content

Commit fd5e7ff

Browse files
committed
Translate src/vector
1 parent 52ddcd8 commit fd5e7ff

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎src/i18n/strings/en_EN.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"Can't update user notification settings": "Can't update user notification settings",
1313
"Close": "Close",
1414
"Collapse panel": "Collapse panel",
15+
"Collecting app version information": "Collecting app version information",
16+
"Collecting logs": "Collecting logs",
1517
"Create new room": "Create new room",
1618
"Couldn't find a matching Matrix room": "Couldn't find a matching Matrix room",
1719
"Custom Server Options": "Custom Server Options",
@@ -91,6 +93,7 @@
9193
"Resend": "Resend",
9294
"Riot Desktop on %(platformName)": "Riot Desktop on %(platformName)",
9395
"Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network",
96+
"Riot is not supported on mobile web. Install the app?": "Riot is not supported on mobile web. Install the app?",
9497
"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.",
9598
"Room directory": "Room directory",
9699
"Room not found": "Room not found",
@@ -112,8 +115,10 @@
112115
"unknown error code": "unknown error code",
113116
"Unnamed room": "Unnamed room",
114117
"Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s",
118+
"Uploading report": "Uploading report",
115119
"View Decrypted Source": "View Decrypted Source",
116120
"View Source": "View Source",
121+
"Waiting for response from server": "Waiting for response from server",
117122
"When I'm invited to a room": "When I'm invited to a room",
118123
"World readable": "World readable",
119124
"You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)",

‎src/vector/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</head>
3737
<body style="height: 100%;">
3838
<section id="matrixchat" style="height: 100%;"></section>
39-
<noscript>Sorry, Riot requires JavaScript to be enabled.</noscript>
39+
<noscript>Sorry, Riot requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
4040
<% for (var i=0; i < htmlWebpackPlugin.files.js.length; i++) {
4141
// Not a particularly graceful way of not putting the indexeddb worker script
4242
// into the main page

‎src/vector/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ async function loadApp() {
245245

246246
if (!preventRedirect) {
247247
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
248-
if (confirm("Riot is not supported on mobile web. Install the app?")) {
248+
if (confirm(languageHandler._t("Riot is not supported on mobile web. Install the app?"))) {
249249
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
250250
return;
251251
}
252252
}
253253
else if (/Android/.test(navigator.userAgent)) {
254-
if (confirm("Riot is not supported on mobile web. Install the app?")) {
254+
if (confirm(languageHandler._t("Riot is not supported on mobile web. Install the app?"))) {
255255
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
256256
return;
257257
}

‎src/vector/submit-rageshake.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import q from "q";
1919

2020
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
2121
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
22+
import { _t } from 'matrix-react-sdk/lib/languageHandler';
2223

2324
import rageshake from './rageshake'
2425

@@ -53,7 +54,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
5354
opts = opts || {};
5455
const progressCallback = opts.progressCallback || (() => {});
5556

56-
progressCallback("Collecting app version information");
57+
progressCallback(_t("Collecting app version information"));
5758
let version = "UNKNOWN";
5859
try {
5960
version = await PlatformPeg.get().getAppVersion();
@@ -81,7 +82,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
8182
}
8283

8384
if (opts.sendLogs) {
84-
progressCallback("Collecting logs");
85+
progressCallback(_t("Collecting logs"));
8586
const logs = await rageshake.getLogsForReport();
8687
for (let entry of logs) {
8788
// encode as UTF-8
@@ -94,7 +95,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
9495
}
9596
}
9697

97-
progressCallback("Uploading report");
98+
progressCallback(_t("Uploading report"));
9899
await _submitReport(bugReportEndpoint, body, progressCallback);
99100
}
100101

@@ -106,7 +107,7 @@ function _submitReport(endpoint, body, progressCallback) {
106107
req.timeout = 5 * 60 * 1000;
107108
req.onreadystatechange = function() {
108109
if (req.readyState === XMLHttpRequest.LOADING) {
109-
progressCallback("Waiting for response from server");
110+
progressCallback(_t("Waiting for response from server"));
110111
} else if (req.readyState === XMLHttpRequest.DONE) {
111112
on_done();
112113
}

0 commit comments

Comments
 (0)