It turns out that the assertion made in
https://github.com/matrix-org/matrix-react-sdk/pull/1213 about `async`
functions returning bluebird promises was only correct when babel used an
inline version of the `asyncToGenerator` helper; in react-sdk we are using
`babel-transform-runtime` which means that we use a separate
`babel-runtime/helpers/asyncToGenerator`, which returns a native (or core-js)
Promise.
This meant that we were still in the situation where some methods returned
native Promises, and some bluebird ones, which is exactly the situation I
wanted to resolve by switching to bluebird in the first place: in short,
unless/until we get rid of all code which assumes Promises have a `done` method
etc, we need to make sure that everything returns a bluebird promise.
(Aside: there was debate over whether in the long term we should be trying to
wean ourselves off bluebird promises by assuming all promises are native. The
conclusion was that the complexity hit involved in doing so outweighed any
benefit of a potential future migration away from bluebird).
In order to get ILAG internationalised
Conflicts:
src/components/structures/LoggedInView.js
src/components/structures/MatrixChat.js
src/components/views/dialogs/ChatCreateOrReuseDialog.js
src/components/views/dialogs/SetDisplayNameDialog.js
src/createRoom.js
src/i18n/strings/en_EN.json
We no longer need the custom counterpart. The things that were
changed in it and reasosn we no lomger need them are:
1. set separator - this can be done with standard counterpart
2. ES6 port: this was done to allow importing as _t, but is
unnecessary with the _t wrapper function in react-sdk
(although also seems to work fine with
`import _t from 'counterpart';`)
3. Fallback to key name: unnecessary with
`setMissingEntryGenerator` in 0.18, but we've changed to just
using a fallback locale anyway since No code missing en
translations should ever make it to the devbelop branch.
4. Logging on missing translations. Unnecessary with
`onTranslationNotFound`, but now not used anyway because we
let missing translations show up in the UI as
'missing translation'
Bulk changes to imports coming in separate commit for easy reading.