Merge branch 'develop' into kegan/translation-macaque
This commit is contained in:
commit
aa5587ba95
|
@ -119,19 +119,19 @@ electron.ipcMain.on('install_update', installUpdate);
|
||||||
let focusHandlerAttached = false;
|
let focusHandlerAttached = false;
|
||||||
electron.ipcMain.on('setBadgeCount', function(ev, count) {
|
electron.ipcMain.on('setBadgeCount', function(ev, count) {
|
||||||
electron.app.setBadgeCount(count);
|
electron.app.setBadgeCount(count);
|
||||||
if (process.platform === 'win32' && mainWindow && !mainWindow.isFocused()) {
|
if (count === 0) {
|
||||||
if (count > 0) {
|
mainWindow.flashFrame(false);
|
||||||
if (!focusHandlerAttached) {
|
}
|
||||||
mainWindow.once('focus', () => {
|
});
|
||||||
mainWindow.flashFrame(false);
|
|
||||||
focusHandlerAttached = false;
|
electron.ipcMain.on('loudNotification', function() {
|
||||||
});
|
if (process.platform === 'win32' && mainWindow && !mainWindow.isFocused() && !focusHandlerAttached) {
|
||||||
focusHandlerAttached = true;
|
mainWindow.flashFrame(true);
|
||||||
}
|
mainWindow.once('focus', () => {
|
||||||
mainWindow.flashFrame(true);
|
|
||||||
} else {
|
|
||||||
mainWindow.flashFrame(false);
|
mainWindow.flashFrame(false);
|
||||||
}
|
focusHandlerAttached = false;
|
||||||
|
});
|
||||||
|
focusHandlerAttached = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
# the branch the current checkout is on, use that branch. Otherwise,
|
# the branch the current checkout is on, use that branch. Otherwise,
|
||||||
# use develop.
|
# use develop.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# Look in the many different CI env vars for which branch we're
|
# Look in the many different CI env vars for which branch we're
|
||||||
# building
|
# building
|
||||||
if [[ "$TRAVIS" == true ]]; then
|
if [[ "$TRAVIS" == true ]]; then
|
||||||
|
@ -40,13 +42,13 @@ dodep matrix-org matrix-react-sdk
|
||||||
mkdir -p node_modules
|
mkdir -p node_modules
|
||||||
cd node_modules
|
cd node_modules
|
||||||
|
|
||||||
rm -r matrix-js-sdk 2> /dev/null
|
rm -r matrix-js-sdk 2> /dev/null || true
|
||||||
ln -s ../matrix-js-sdk ./
|
ln -s ../matrix-js-sdk ./
|
||||||
pushd matrix-js-sdk
|
pushd matrix-js-sdk
|
||||||
npm install
|
npm install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm -r matrix-react-sdk 2> /dev/null
|
rm -r matrix-react-sdk 2> /dev/null || true
|
||||||
ln -s ../matrix-react-sdk ./
|
ln -s ../matrix-react-sdk ./
|
||||||
pushd matrix-react-sdk
|
pushd matrix-react-sdk
|
||||||
mkdir -p node_modules
|
mkdir -p node_modules
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s via %(browserName)s on %(osName)s",
|
||||||
"<a href=\"http://apple.com/safari\">Safari</a> and <a href=\"http://opera.com\">Opera</a> work too.": "<a href=\"http://apple.com/safari\">Safari</a> and <a href=\"http://opera.com\">Opera</a> work too.",
|
"<a href=\"http://apple.com/safari\">Safari</a> and <a href=\"http://opera.com\">Opera</a> work too.": "<a href=\"http://apple.com/safari\">Safari</a> and <a href=\"http://opera.com\">Opera</a> work too.",
|
||||||
"A new version of Riot is available.": "A new version of Riot is available.",
|
"A new version of Riot is available.": "A new version of Riot is available.",
|
||||||
"Add an email address above to configure email notifications": "Add an email address above to configure email notifications",
|
"Add an email address above to configure email notifications": "Add an email address above to configure email notifications",
|
||||||
|
@ -15,6 +16,8 @@
|
||||||
"Changelog": "Changelog",
|
"Changelog": "Changelog",
|
||||||
"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",
|
||||||
|
@ -100,7 +103,9 @@
|
||||||
"Remove from Directory": "Remove from Directory",
|
"Remove from Directory": "Remove from Directory",
|
||||||
"Report a bug": "Report a bug",
|
"Report a bug": "Report a bug",
|
||||||
"Resend": "Resend",
|
"Resend": "Resend",
|
||||||
|
"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",
|
||||||
|
@ -124,14 +129,17 @@
|
||||||
"Unable to look up room ID from server": "Unable to look up room ID from server",
|
"Unable to look up room ID from server": "Unable to look up room ID from server",
|
||||||
"Unavailable": "Unavailable",
|
"Unavailable": "Unavailable",
|
||||||
"Unhide Preview": "Unhide Preview",
|
"Unhide Preview": "Unhide Preview",
|
||||||
|
"Unknown device": "Unknown device",
|
||||||
"unknown error code": "unknown error code",
|
"unknown error code": "unknown error code",
|
||||||
"Unnamed room": "Unnamed room",
|
"Unnamed room": "Unnamed room",
|
||||||
"Update": "Update",
|
"Update": "Update",
|
||||||
"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",
|
||||||
"What's New": "What's New",
|
"What's New": "What's New",
|
||||||
"What's new?": "What's new?",
|
"What's new?": "What's new?",
|
||||||
|
"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)",
|
||||||
|
@ -148,6 +156,7 @@
|
||||||
"Saturday": "Saturday",
|
"Saturday": "Saturday",
|
||||||
"Today": "Today",
|
"Today": "Today",
|
||||||
"Yesterday": "Yesterday",
|
"Yesterday": "Yesterday",
|
||||||
|
"You need to be using HTTPS to place a screen-sharing call.": "You need to be using HTTPS to place a screen-sharing call.",
|
||||||
"Welcome page": "Welcome page",
|
"Welcome page": "Welcome page",
|
||||||
"With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!": "With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!"
|
"With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!": "With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
"Files": "Arquivos",
|
"Files": "Arquivos",
|
||||||
"Filter room names": "Filtrar salas por título",
|
"Filter room names": "Filtrar salas por título",
|
||||||
"Forget": "Esquecer",
|
"Forget": "Esquecer",
|
||||||
|
"Forward Message": "Encaminhar",
|
||||||
" from room": " da sala",
|
" from room": " da sala",
|
||||||
"Guests can join": "Convidados podem entrar",
|
"Guests can join": "Convidados podem entrar",
|
||||||
"Guest users can't invite users. Please register to invite": "Usuários convidados não podem convidar outros usuários. Por gentileza se registre para enviar convites",
|
"Guest users can't invite users. Please register to invite": "Usuários convidados não podem convidar outros usuários. Por gentileza se registre para enviar convites",
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,6 @@ async function loadApp() {
|
||||||
</div>, document.getElementById('matrixchat'));
|
</div>, document.getElementById('matrixchat'));
|
||||||
} else if (validBrowser) {
|
} else if (validBrowser) {
|
||||||
UpdateChecker.start();
|
UpdateChecker.start();
|
||||||
|
|
||||||
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||||
window.matrixChat = ReactDOM.render(
|
window.matrixChat = ReactDOM.render(
|
||||||
<MatrixChat
|
<MatrixChat
|
||||||
|
|
|
@ -19,6 +19,7 @@ limitations under the License.
|
||||||
|
|
||||||
import VectorBasePlatform from './VectorBasePlatform';
|
import VectorBasePlatform from './VectorBasePlatform';
|
||||||
import dis from 'matrix-react-sdk/lib/dispatcher';
|
import dis from 'matrix-react-sdk/lib/dispatcher';
|
||||||
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
import q from 'q';
|
import q from 'q';
|
||||||
import electron, {remote, ipcRenderer} from 'electron';
|
import electron, {remote, ipcRenderer} from 'electron';
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getHumanReadableName(): string {
|
getHumanReadableName(): string {
|
||||||
return 'Electron Platform';
|
return 'Electron Platform'; // no translation required: only used for analytics
|
||||||
}
|
}
|
||||||
|
|
||||||
setNotificationCount(count: number) {
|
setNotificationCount(count: number) {
|
||||||
|
@ -124,6 +125,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return notification;
|
return notification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loudNotification(ev: Event, room: Object) {
|
||||||
|
ipcRenderer.send('loudNotification');
|
||||||
|
}
|
||||||
|
|
||||||
clearNotification(notif: Notification) {
|
clearNotification(notif: Notification) {
|
||||||
notif.close();
|
notif.close();
|
||||||
}
|
}
|
||||||
|
@ -146,7 +151,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDefaultDeviceDisplayName(): string {
|
getDefaultDeviceDisplayName(): string {
|
||||||
return 'Riot Desktop on ' + platformFriendlyName();
|
return _t('Riot Desktop on %(platformName)s', { platformName: platformFriendlyName() });
|
||||||
}
|
}
|
||||||
|
|
||||||
screenCaptureErrorString(): ?string {
|
screenCaptureErrorString(): ?string {
|
||||||
|
|
|
@ -18,6 +18,8 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import BasePlatform from 'matrix-react-sdk/lib/BasePlatform';
|
import BasePlatform from 'matrix-react-sdk/lib/BasePlatform';
|
||||||
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
|
|
||||||
import Favico from 'favico.js';
|
import Favico from 'favico.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +38,7 @@ export default class VectorBasePlatform extends BasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getHumanReadableName(): string {
|
getHumanReadableName(): string {
|
||||||
return 'Vector Base Platform';
|
return 'Vector Base Platform'; // no translation required: only used for analytics
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateFavicon() {
|
_updateFavicon() {
|
||||||
|
@ -94,6 +96,6 @@ export default class VectorBasePlatform extends BasePlatform {
|
||||||
* device Vector is running on
|
* device Vector is running on
|
||||||
*/
|
*/
|
||||||
getDefaultDeviceDisplayName(): string {
|
getDefaultDeviceDisplayName(): string {
|
||||||
return "Unknown device";
|
return _t("Unknown device");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ limitations under the License.
|
||||||
import VectorBasePlatform from './VectorBasePlatform';
|
import VectorBasePlatform from './VectorBasePlatform';
|
||||||
import request from 'browser-request';
|
import request from 'browser-request';
|
||||||
import dis from 'matrix-react-sdk/lib/dispatcher.js';
|
import dis from 'matrix-react-sdk/lib/dispatcher.js';
|
||||||
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
import q from 'q';
|
import q from 'q';
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
|
@ -32,7 +33,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getHumanReadableName(): string {
|
getHumanReadableName(): string {
|
||||||
return 'Web Platform';
|
return 'Web Platform'; // no translation required: only used for analytics
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -159,13 +160,15 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||||
const appName = u.format();
|
const appName = u.format();
|
||||||
|
|
||||||
const ua = new UAParser();
|
const ua = new UAParser();
|
||||||
return `${appName} via ${ua.getBrowser().name} on ${ua.getOS().name}`;
|
const browserName = ua.getBrowser().name;
|
||||||
|
const osName = ua.getOS().name;
|
||||||
|
return _t('%(appName)s via %(browserName)s on %(osName)s', {appName: appName, browserName: browserName, osName: osName});
|
||||||
}
|
}
|
||||||
|
|
||||||
screenCaptureErrorString(): ?string {
|
screenCaptureErrorString(): ?string {
|
||||||
// it won't work at all if you're not on HTTPS so whine whine whine
|
// it won't work at all if you're not on HTTPS so whine whine whine
|
||||||
if (!global.window || global.window.location.protocol !== "https:") {
|
if (!global.window || global.window.location.protocol !== "https:") {
|
||||||
return "You need to be using HTTPS to place a screen-sharing call.";
|
return _t("You need to be using HTTPS to place a screen-sharing call.");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue