Skip to content

Commit 5db44bd

Browse files
author
Luke Barnard
committed
Merge branch 'develop' into TheLastProject-reverse-video
2 parents 9541fc1 + bc3df74 commit 5db44bd

154 files changed

Lines changed: 17661 additions & 2060 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.babelrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"presets": ["react", "es2015", "es2016"],
3-
"plugins": ["transform-class-properties", "transform-object-rest-spread", "transform-async-to-generator", "transform-runtime", "add-module-exports"]
3+
"plugins": ["transform-class-properties", "transform-object-rest-spread", "transform-async-to-bluebird", "transform-runtime", "add-module-exports"]
44
}

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
npm-debug.log
1515
electron/dist
1616
electron/pub
17-
/.idea
17+
**/.idea
1818
/config.json
1919
/src/component-index.js

‎.travis.yml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
# we need trusty for the chrome addon
2+
dist: trusty
3+
4+
# we don't need sudo, so can run in a container, which makes startup much
5+
# quicker.
6+
sudo: false
7+
18
language: node_js
29
node_js:
310
# make sure we work with a range of node versions.
411
# As of the time of writing:
512
# - 4.x is still in LTS (until April 2018), but some of our deps (notably
613
# extract-zip) don't work with it
714
# - 5.x has been EOLed for nearly a year.
8-
# - 6.x is the current 'LTS' version
9-
# - 7.x is the current 'current' version (until October 2017)
15+
# - 6.x is the active 'LTS' version
16+
# - 7.x is no longer supported
17+
# - 8.x is the current 'current' version (until October 2017)
1018
#
1119
# see: https://github.com/nodejs/LTS/
1220
#
@@ -16,6 +24,8 @@ node_js:
1624
- 6.3
1725
- 6
1826
- 7
27+
addons:
28+
chrome: stable
1929
install:
2030
# clone the deps with depth 1: we know we will only ever need that one
2131
# commit.

‎CHANGELOG.md‎

Lines changed: 332 additions & 1 deletion
Large diffs are not rendered by default.

‎README.md‎

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ released version of Riot:
1616

1717
1. Download the latest version from https://github.com/vector-im/riot-web/releases
1818
1. Untar the tarball on your web server
19-
1. Move (or symlink) the vector-x.x.x directory to an appropriate name
19+
1. Move (or symlink) the riot-x.x.x directory to an appropriate name
2020
1. If desired, copy `config.sample.json` to `config.json` and edit it
2121
as desired. See below for details.
2222
1. Enter the URL into your browser and log into Riot!
2323

2424
Releases are signed by PGP, and can be checked against the public key
25-
at https://riot.im/packages/keys/riot-master.asc
25+
at https://riot.im/packages/keys/riot.asc
2626

2727
Note that Chrome does not allow microphone or webcam access for sites served
2828
over http (except localhost), so for working VoIP you will need to serve Riot
@@ -62,7 +62,7 @@ to build.
6262
1. If you're using the `develop` branch, install the develop versions of the
6363
dependencies, as the released ones will be too old:
6464
```
65-
scripts/fetch-develop-deps.sh
65+
scripts/fetch-develop.deps.sh
6666
```
6767
Whenever you git pull on riot-web you will also probably need to force an update
6868
to these dependencies - the simplest way is to re-run the script, but you can also
@@ -81,7 +81,7 @@ to build.
8181
npm run build
8282
```
8383
However, we recommend setting up a proper development environment (see "Setting
84-
up a development environment" below) if you want to run your own copy of the
84+
up a dev environment" below) if you want to run your own copy of the
8585
`develop` branch, as it makes it much easier to keep these dependencies
8686
up-to-date. Or just use https://riot.im/develop - the continuous integration
8787
release of the develop branch.
@@ -115,7 +115,9 @@ You can configure the app by copying `config.sample.json` to
115115
addresses) to matrix IDs: see http://matrix.org/docs/spec/identity_service/unstable.html
116116
for more details. Currently the only public matrix identity servers are https://matrix.org
117117
and https://vector.im. In future identity servers will be decentralised.
118-
1. `integrations_ui_url`: URL to the web interface for the integrations server.
118+
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
119+
server is not Riot and normally not your Home Server either. The integration server settings
120+
may be left blank to disable integrations.
119121
1. `integrations_rest_url`: URL to the REST interface for the integrations server.
120122
1. `roomDirectory`: config for the public room directory. This section is optional.
121123
1. `roomDirectory.servers`: List of other Home Servers' directories to include in the drop
@@ -253,7 +255,6 @@ Finally, build and start Riot itself:
253255
1. `rm -r node_modules/matrix-react-sdk; ln -s ../../matrix-react-sdk node_modules/`
254256
1. `npm start`
255257
1. Wait a few seconds for the initial build to finish; you should see something like:
256-
257258
```
258259
Hash: b0af76309dd56d7275c8
259260
Version: webpack 1.12.14
@@ -282,18 +283,33 @@ If any of these steps error with, `file table overflow`, you are probably on a m
282283
which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again.
283284
You'll need to do this in each new terminal you open before building Riot.
284285
285-
How to add a new translation?
286-
=============================
286+
Running the tests
287+
-----------------
287288
288-
[<img src="https://translate.riot.im/widgets/riot-web/-/multi-auto.svg" alt="translationsstatus" width="340">](https://translate.riot.im/engage/riot-web/?utm_source=widget)
289+
There are a number of application-level tests in the `tests` directory; these
290+
are designed to run in a browser instance under the control of
291+
[karma](https://karma-runner.github.io). To run them:
292+
293+
* Make sure you have Chrome installed (a recent version, like 59)
294+
* Make sure you have `matrix-js-sdk` and `matrix-react-sdk` installed and
295+
built, as above
296+
* `npm run test`
289297
298+
The above will run the tests under Chrome in a `headless` mode.
290299
291-
Head to the [translating doc](docs/translating.md)
300+
You can also tell karma to run the tests in a loop (every time the source
301+
changes), in an instance of Chrome on your desktop, with `npm run
302+
test-multi`. This also gives you the option of running the tests in 'debug'
303+
mode, which is useful for stepping through the tests in the developer tools.
292304
293-
Adding Strings to the translations (Developer Guide)
294-
====================================================
305+
Translations
306+
============
295307
296-
Head to the [translating dev doc](docs/translating-dev.md)
308+
To add a new translation, head to the [translating doc](docs/translating.md).
309+
310+
For a developer guide, see the [translating dev doc](docs/translating-dev.md).
311+
312+
[<img src="https://translate.riot.im/widgets/riot-web/-/multi-auto.svg" alt="translationsstatus" width="340">](https://translate.riot.im/engage/riot-web/?utm_source=widget)
297313
298314
Triaging issues
299315
===============

‎config.sample.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"integrations_ui_url": "https://scalar.vector.im/",
66
"integrations_rest_url": "https://scalar.vector.im/api",
77
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
8-
"enableLabs": true,
8+
"features": {
9+
"feature_groups": "labs",
10+
"feature_pinning": "labs"
11+
},
12+
"default_federate": true,
913
"roomDirectory": {
1014
"servers": [
1115
"matrix.org"

‎docs/translating-dev.md‎

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,32 @@
66
- Be able to understand English
77
- Be able to understand the language you want to translate riot-web into
88

9+
## Translating strings vs. marking strings for translation
10+
11+
Translating strings are done with the `_t()` function found in matrix-react-sdk/lib/languageHandler.js. It is recommended to call this function wherever you introduce a string constant which should be translated. However, translating can not be performed until after the translation system has been initialized. Thus, sometimes translation must be performed at a different location in the source code than where the string is introduced. This breaks some tooling and makes it difficult to find translatable strings. Therefore, there is the alternative `_td()` function which is used to mark strings for translation, without actually performing the translation (which must still be performed separately, and after the translation system has been initialized).
12+
13+
Basically, whenever a translatable string is introduced, you should call either `_t()` immediately OR `_td()` and later `_t()`.
14+
15+
Example:
16+
```
17+
// Module-level constant
18+
const COLORS = {
19+
'#f8481c': _td('reddish orange'), // Can't call _t() here yet
20+
'#fc2647': _td('pinky red') // Use _td() instead so the text is picked up for translation anyway
21+
}
22+
23+
// Function that is called some time after i18n has been loaded
24+
function getColorName(hex) {
25+
return _t(COLORS[hex]); // Perform actual translation here
26+
}
27+
```
28+
929
## Adding new strings
1030

11-
1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/languageHandler';`` is present. If not add it to the other import statements.
12-
2. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method)
13-
3. Add the String to the ``en_EN.json`` file in ``src/i18n/strings`` (respect which repository you are on).
31+
1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed.
32+
1. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method). If the string is introduced at a point before the translation system has not yet been initialized, use `_td()` instead, and call `_t()` at the appropriate time.
33+
1. Run `npm run i18n` to update ``src/i18n/strings/en_EN.json`` (if it fails because it can't find the script, your dev environment predates the script, so reinstall/link react-sdk with `npm link ../matrix-react-sdk`). If it segfaults, you may be on Node 6, so try a newer version of node.
34+
1. If you added a string with a plural, you can add other English plural variants to ``src/i18n/strings/en_EN.json`` (remeber to edit the one in the same project as the source file containing your new translation).
1435

1536
## Adding variables inside a string.
1637

@@ -21,6 +42,8 @@
2142

2243
## Things to know/Style Guides
2344

24-
- Do not use it inside ``getDefaultProps`` at the point where ``getDefaultProps`` is initialized the translations aren't loaded yet and it causes missing translations.
25-
- If using translated strings as constants, translated strings can't be in constants loaded at class-load time since the translations won't be loaded.
45+
- Do not use `_t()` inside ``getDefaultProps``: the translations aren't loaded when `getDefaultProps` is called, leading to missing translations. Use `_td()` to indicate that `_t()` will be called on the string later.
46+
- If using translated strings as constants, translated strings can't be in constants loaded at class-load time since the translations won't be loaded. Mark the strings using `_td()` instead and perform the actual translation later.
2647
- If a string is presented in the UI with punctuation like a full stop, include this in the translation strings, since punctuation varies between languages too.
48+
- Avoid "translation in parts", i.e. concatenating translated strings or using translated strings in variable substitutions. Context is important for translations, and translating partial strings this way is simply not always possible.
49+
- Concatenating strings often also introduces an implicit assumption about word order (e.g. that the subject of the sentence comes first), which is incorrect for many languages.

‎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.11.4",
5+
"version": "0.12.7",
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+
MIIF0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34+
-----END CERTIFICATE-----

‎electron_app/riot.im/config.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"integrations_rest_url": "https://scalar.vector.im/api",
88
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
99
"welcomeUserId": "@riot-bot:matrix.org",
10-
"enableLabs": true,
1110
"roomDirectory": {
1211
"servers": [
1312
"matrix.org"

0 commit comments

Comments
 (0)