Skip to content

Commit 5ffc9c5

Browse files
committed
Merge branch 'develop' into rob/electron-screensharing
2 parents e8424d7 + f18f136 commit 5ffc9c5

23 files changed

Lines changed: 720 additions & 133 deletions

‎CHANGELOG.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
Changes in [0.12.3](https://github.com/vector-im/riot-web/releases/tag/v0.12.3) (2017-09-06)
2+
============================================================================================
3+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.12.3-rc.3...v0.12.3)
4+
5+
* No changes
6+
7+
Changes in [0.12.3-rc.3](https://github.com/vector-im/riot-web/releases/tag/v0.12.3-rc.3) (2017-09-05)
8+
======================================================================================================
9+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.12.3-rc.2...v0.12.3-rc.3)
10+
11+
* Fix plurals in translations
12+
[\#4971](https://github.com/vector-im/riot-web/pull/4971)
13+
* Update from Weblate.
14+
[\#4968](https://github.com/vector-im/riot-web/pull/4968)
15+
16+
Changes in [0.12.3-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.12.3-rc.2) (2017-09-05)
17+
======================================================================================================
18+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.12.3-rc.1...v0.12.3-rc.2)
19+
20+
* New react-sdk version to pull in new translations and fix some translation bugs.
21+
22+
23+
Changes in [0.12.3-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.12.3-rc.1) (2017-09-01)
24+
======================================================================================================
25+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.12.2...v0.12.3-rc.1)
26+
27+
* Fix overflowing login/register buttons on some languages issue #4804
28+
[\#4858](https://github.com/vector-im/riot-web/pull/4858)
29+
* Update vector-im to riot-im on Login
30+
[\#4943](https://github.com/vector-im/riot-web/pull/4943)
31+
* lets let people know that the bug report actually sent properly :)
32+
[\#4910](https://github.com/vector-im/riot-web/pull/4910)
33+
* another s/vector/riot/ in README
34+
[\#4934](https://github.com/vector-im/riot-web/pull/4934)
35+
* fix two room list regressions
36+
[\#4907](https://github.com/vector-im/riot-web/pull/4907)
37+
138
Changes in [0.12.2](https://github.com/vector-im/riot-web/releases/tag/v0.12.2) (2017-08-24)
239
============================================================================================
340
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.12.1...v0.12.2)

‎electron_app/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "src/electron-main.js",
5-
"version": "0.12.2",
5+
"version": "0.12.3",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "Vector Creations Ltd.",
88
"dependencies": {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIF0jCCBLqgAwIBAgIRAISYBqZi3VvCUeSfHXF+cbwwDQYJKoZIhvcNAQELBQAw
3+
gZExCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
4+
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTcwNQYD
5+
VQQDEy5DT01PRE8gUlNBIEV4dGVuZGVkIFZhbGlkYXRpb24gQ29kZSBTaWduaW5n
6+
IENBMB4XDTE3MDgyMzAwMDAwMFoXDTIwMDgyMjIzNTk1OVowgdgxETAPBgNVBAUT
7+
CDEwODczNjYxMRMwEQYLKwYBBAGCNzwCAQMTAkdCMR0wGwYDVQQPExRQcml2YXRl
8+
IE9yZ2FuaXphdGlvbjELMAkGA1UEBhMCR0IxETAPBgNVBBEMCFdDMVIgNEFHMQ8w
9+
DQYDVQQIDAZMb25kb24xDzANBgNVBAcMBkxvbmRvbjEbMBkGA1UECQwSMjYgUmVk
10+
IExpb24gU3F1YXJlMRcwFQYDVQQKDA5OZXcgVmVjdG9yIEx0ZDEXMBUGA1UEAwwO
11+
TmV3IFZlY3RvciBMdGQ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bBggrBgEFBQcI
27+
A6APMA0MC0dCLTEwODczNjYxMA0GCSqGSIb3DQEBCwUAA4IBAQBJ2aH4aixh0aiz
28+
4WKlK+LMVLHpQ2POE3FZYNpAW7o1q2YDGEADXdGrygPE9NCGNBXKo0CAemCYNWfX
29+
Ov/jdoiMfeqW3vrZ66oEy8OqbvJSwK1xmomWuYw3wYPWcPVG+YbWYD2CGdQu8jTz
30+
fzAJCpvAuY3Wji3fQjiecAC7JCSB4fBHa0ALJOmiSqKQUUpkXs5kW7O0lPBnHzNF
31+
2tQGltXMSIrq1QfFtcreMyKlwDOxPIh360dv5aHhaeSRDRKxq7uq5ikQF2gjKx4k
32+
ieg2HRbAW6fVPpFr4zRS5umpeZV3i06i11VQQPS/mA/OBEXyaqzx4mr6B7U6ptrp
33+
jMqiUv2w
34+
-----END CERTIFICATE-----

‎electron_app/src/vectormenu.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const {app, shell, Menu} = require('electron');
1919
// Menu template from http://electron.atom.io/docs/api/menu/, edited
2020
const template = [
2121
{
22-
label: 'Edit',
22+
label: '&Edit',
2323
submenu: [
2424
{ role: 'undo' },
2525
{ role: 'redo' },
@@ -33,7 +33,7 @@ const template = [
3333
],
3434
},
3535
{
36-
label: 'View',
36+
label: '&View',
3737
submenu: [
3838
{ type: 'separator' },
3939
{ role: 'resetzoom' },
@@ -45,13 +45,15 @@ const template = [
4545
],
4646
},
4747
{
48+
label: '&Window',
4849
role: 'window',
4950
submenu: [
5051
{ role: 'minimize' },
5152
{ role: 'close' },
5253
],
5354
},
5455
{
56+
label: '&Help',
5557
role: 'help',
5658
submenu: [
5759
{
@@ -122,7 +124,7 @@ if (process.platform === 'darwin') {
122124
];
123125
} else {
124126
template.unshift({
125-
label: 'File',
127+
label: '&File',
126128
submenu: [
127129
// For some reason, 'about' does not seem to work on windows.
128130
/*{

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "electron_app/src/electron-main.js",
5-
"version": "0.12.2",
5+
"version": "0.12.3",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "Vector Creations Ltd.",
88
"repository": {
@@ -67,7 +67,7 @@
6767
"highlight.js": "^9.0.0",
6868
"linkifyjs": "^2.1.3",
6969
"matrix-js-sdk": "0.8.2",
70-
"matrix-react-sdk": "0.10.2",
70+
"matrix-react-sdk": "0.10.3",
7171
"modernizr": "^3.1.0",
7272
"pako": "^1.0.5",
7373
"react": "^15.6.0",

‎scripts/copy-res.js‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function genLangFile(lang, dest) {
156156
const reactSdkFile = 'node_modules/matrix-react-sdk/src/i18n/strings/' + lang + '.json';
157157
const riotWebFile = 'src/i18n/strings/' + lang + '.json';
158158

159-
const translations = {};
159+
let translations = {};
160160
[reactSdkFile, riotWebFile].forEach(function(f) {
161161
if (fs.existsSync(f)) {
162162
Object.assign(
@@ -165,6 +165,9 @@ function genLangFile(lang, dest) {
165165
);
166166
}
167167
});
168+
169+
translations = weblateToCounterpart(translations)
170+
168171
fs.writeFileSync(dest + lang + '.json', JSON.stringify(translations, null, 4));
169172
if (verbose) {
170173
console.log("Generated language file: " + lang);
@@ -193,5 +196,39 @@ function genLangList() {
193196
}
194197
}
195198

199+
/**
200+
* Convert translation key from weblate format
201+
* (which only supports a single level) to counterpart
202+
* which requires object values for 'count' translations.
203+
*
204+
* eg.
205+
* "there are %(count)s badgers|one": "a badger",
206+
* "there are %(count)s badgers|other": "%(count)s badgers"
207+
* becomes
208+
* "there are %(count)s badgers": {
209+
* "one": "a badger",
210+
* "other": "%(count)s badgers"
211+
* }
212+
*/
213+
function weblateToCounterpart(inTrs) {
214+
const outTrs = {};
215+
216+
for (const key of Object.keys(inTrs)) {
217+
const keyParts = key.split('|', 2);
218+
if (keyParts.length === 2) {
219+
let obj = outTrs[keyParts[0]];
220+
if (obj === undefined) {
221+
obj = {};
222+
outTrs[keyParts[0]] = obj;
223+
}
224+
obj[keyParts[1]] = inTrs[key];
225+
} else {
226+
outTrs[key] = inTrs[key];
227+
}
228+
}
229+
230+
return outTrs;
231+
}
232+
196233
genLangList();
197234
next(0);

‎scripts/deploy.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import subprocess
1414
import sys
1515
import tarfile
16+
import shutil
1617

1718
try:
1819
# python3
@@ -48,11 +49,12 @@ def move_bundles(source, dest):
4849
for f in os.listdir(source):
4950
dst = os.path.join(dest, f)
5051
if os.path.exists(dst):
51-
raise DeployException(
52-
"Not deploying. The bundle includes '%s' which we have previously deployed."
52+
print (
53+
"Skipping bundle. The bundle includes '%s' which we have previously deployed."
5354
% f
5455
)
55-
renames[os.path.join(source, f)] = dst
56+
else:
57+
renames[os.path.join(source, f)] = dst
5658

5759
for (src, dst) in renames.iteritems():
5860
print ("Move %s -> %s" % (src, dst))
@@ -107,9 +109,9 @@ def deploy(self, tarball, extract_path):
107109
extracted_bundles = os.path.join(extracted_dir, 'bundles')
108110
move_bundles(source=extracted_bundles, dest=self.bundles_path)
109111

110-
# replace the (hopefully now empty) extracted_bundles dir with a
111-
# symlink to the common dir.
112-
os.rmdir(extracted_bundles)
112+
# replace the extracted_bundles dir (which may not be empty if some
113+
# bundles were skipped) with a symlink to the common dir.
114+
shutil.rmtree(extracted_bundles)
113115
create_relative_symlink(
114116
target=self.bundles_path,
115117
linkname=extracted_bundles,

‎scripts/electron-package.sh‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,20 @@ distdir="$builddir/electron_app/dist"
9494
pubdir="$projdir/electron_app/pub"
9595
rm -r "$pubdir" || true
9696
mkdir -p "$pubdir"
97+
rm -r "$projdir/electron_app/dist" || true
98+
mkdir -p "$projdir/electron_app/dist/unsigned/"
9799

98100
# Install packages: what the user downloads the first time,
99101
# (DMGs for mac, exe installer for windows)
100102
mkdir -p "$pubdir/install/macos"
101103
cp $distdir/mac/*.dmg "$pubdir/install/macos/"
102104

105+
# Windows installers go to the dist dir because they need signing
103106
mkdir -p "$pubdir/install/win32/ia32/"
104-
cp $distdir/win-ia32/*.exe "$pubdir/install/win32/ia32/"
107+
cp $distdir/win-ia32/*.exe "$projdir/electron_app/dist/unsigned/"
105108

106109
mkdir -p "$pubdir/install/win32/x64/"
107-
cp $distdir/win/*.exe "$pubdir/install/win32/x64/"
110+
cp $distdir/win/*.exe "$projdir/electron_app/dist/unsigned/"
108111

109112
# Packages for auto-update
110113
mkdir -p "$pubdir/update/macos"
@@ -120,11 +123,11 @@ cp $distdir/win/*.nupkg "$pubdir/update/win32/x64/"
120123
cp $distdir/win/RELEASES "$pubdir/update/win32/x64/"
121124

122125
# Move the debs to the main project dir's dist folder
123-
rm -r "$projdir/electron_app/dist" || true
124-
mkdir -p "$projdir/electron_app/dist"
125126
cp $distdir/*.deb "$projdir/electron_app/dist/"
126127

127128
rm -rf "$builddir"
128129

129-
echo "Riot Desktop is ready to go in $pubdir: this directory can be hosted on your web server."
130+
echo "Unsigned Windows installers have been placed in electron_app/dist/unsigned/ - sign them,"
131+
echo "or just copy them to "$pubdir/install/win32/\<arch\>/""
132+
echo "Once you've done this, $pubdir can be hosted on your web server."
130133
echo "deb archives are in electron_app/dist/ - these should be added into your debian repository"

0 commit comments

Comments
 (0)