From f9ef5e84988a844c7d8cc3875dac7a065cf261df Mon Sep 17 00:00:00 2001 From: Raul Date: Sun, 18 Jun 2017 22:44:39 +0000 Subject: [PATCH 1/6] Translated using Weblate (Esperanto) Currently translated at 84.0% (168 of 200 strings) Translation: Riot Web/riot-web Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/eo/ --- src/i18n/strings/eo.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index 4a50ff56..ae0e365e 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -164,5 +164,7 @@ "Get started with some tips from Riot Bot!": "Eki per sugesto de la roboto Riot Bot!", "General discussion about Matrix and Riot": "Ĝenerala diskutado pri Matrix kaj Riot", "Discussion of all things Matrix!": "Diskutado pri ĉio rilate al Matrix!", - "Riot/Web & Desktop chat": "Diskudato labortabla pri Riot/Web" + "Riot/Web & Desktop chat": "Diskudato labortabla pri Riot/Web", + "Riot/iOS & matrix-ios-sdk chat": "Diskutado pri Riot/iOS & matrix-ios-sdk", + "Riot/Android & matrix-android-sdk chat": "Diskutado pri Riot/Android & matrix-android-sdk" } From 2fa05f8d615c9bd7f92637c8098b59345b78155d Mon Sep 17 00:00:00 2001 From: Raul Date: Sun, 18 Jun 2017 22:49:06 +0000 Subject: [PATCH 2/6] Translated using Weblate (Esperanto) Currently translated at 87.0% (174 of 200 strings) Translation: Riot Web/riot-web Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/eo/ --- src/i18n/strings/eo.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index ae0e365e..7556aa83 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -166,5 +166,11 @@ "Discussion of all things Matrix!": "Diskutado pri ĉio rilate al Matrix!", "Riot/Web & Desktop chat": "Diskudato labortabla pri Riot/Web", "Riot/iOS & matrix-ios-sdk chat": "Diskutado pri Riot/iOS & matrix-ios-sdk", - "Riot/Android & matrix-android-sdk chat": "Diskutado pri Riot/Android & matrix-android-sdk" + "Riot/Android & matrix-android-sdk chat": "Diskutado pri Riot/Android & matrix-android-sdk", + "Matrix technical discussions": "Teknikaj diskutoj pri Matrix", + "Running Matrix services": "Funkciigado de servoj Matrix", + "Community-run support for Synapse": "Komunuma subtenado de Synapse", + "Admin support for Dendrite": "Administra subtenado por Dendrite", + "Announcements about Synapse releases": "Anoncoj pri eldonoj Synapse", + "Support for those using and running matrix-appservice-irc": "Subteno por tiuj, kiuj uzas kaj funkciigas matrix-appservice-irc" } From 82eb69324d566dc34789204e3bde835520aa8e04 Mon Sep 17 00:00:00 2001 From: Raul Date: Sun, 18 Jun 2017 22:50:04 +0000 Subject: [PATCH 3/6] Translated using Weblate (Esperanto) Currently translated at 88.0% (176 of 200 strings) Translation: Riot Web/riot-web Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/eo/ --- src/i18n/strings/eo.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index 7556aa83..efa658e0 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -172,5 +172,7 @@ "Community-run support for Synapse": "Komunuma subtenado de Synapse", "Admin support for Dendrite": "Administra subtenado por Dendrite", "Announcements about Synapse releases": "Anoncoj pri eldonoj Synapse", - "Support for those using and running matrix-appservice-irc": "Subteno por tiuj, kiuj uzas kaj funkciigas matrix-appservice-irc" + "Support for those using and running matrix-appservice-irc": "Subteno por tiuj, kiuj uzas kaj funkciigas matrix-appservice-irc", + "Building services on Matrix": "Konstruante servojn per Matrix", + "Support for those using the Matrix spec": "Subteno por tiuj, kiuj uzas la specifon Matrix" } From 1a72d3134c42c9a66452df66d2648c582a188d81 Mon Sep 17 00:00:00 2001 From: Raul Date: Sun, 18 Jun 2017 23:00:43 +0000 Subject: [PATCH 4/6] Translated using Weblate (Esperanto) Currently translated at 90.0% (180 of 200 strings) Translation: Riot Web/riot-web Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/eo/ --- src/i18n/strings/eo.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index f873e9c0..feadadd6 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -174,5 +174,9 @@ "Announcements about Synapse releases": "Anoncoj pri eldonoj Synapse", "Support for those using and running matrix-appservice-irc": "Subteno por tiuj, kiuj uzas kaj funkciigas matrix-appservice-irc", "Building services on Matrix": "Konstruante servojn per Matrix", - "Support for those using the Matrix spec": "Subteno por tiuj, kiuj uzas la specifon Matrix" + "Support for those using the Matrix spec": "Subteno por tiuj, kiuj uzas la specifon Matrix", + "Design and implementation of E2E in Matrix": "Dizajno kaj realigo de E2E en Matrix", + "Implementing VR services with Matrix": "Realigi VR-servojn per Matrix", + "Implementing VoIP services with Matrix": "Realigi VoIP-servojn per Matrix", + "Discussion of the Identity Service API": "Diskutado pri la API de Identiga Servo" } From b7368fa93371c13c26af39a946186f447615399a Mon Sep 17 00:00:00 2001 From: Raul Date: Sun, 18 Jun 2017 23:29:54 +0000 Subject: [PATCH 5/6] Translated using Weblate (Esperanto) Currently translated at 100.0% (200 of 200 strings) Translation: Riot Web/riot-web Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/eo/ --- src/i18n/strings/eo.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index feadadd6..a7baa043 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -178,5 +178,25 @@ "Design and implementation of E2E in Matrix": "Dizajno kaj realigo de E2E en Matrix", "Implementing VR services with Matrix": "Realigi VR-servojn per Matrix", "Implementing VoIP services with Matrix": "Realigi VoIP-servojn per Matrix", - "Discussion of the Identity Service API": "Diskutado pri la API de Identiga Servo" + "Discussion of the Identity Service API": "Diskutado pri la API de Identiga Servo", + "Support for those using, running and writing other bridges": "Subteno por tiuj, kiuj uzas, funkciigas kaj skribas aliajn pontojn", + "Contributing code to Matrix and Riot": "Kontribui kodon al Matrix kaj Riot", + "Dev chat for the Riot/Web dev team": "Programista babilado por la programteamo de Riot/Web", + "Dev chat for the Dendrite dev team": "Programista babilado por la programteamo de Dendrite", + "Co-ordination for Riot/Web translators": "Kunordigado por tradukistoj de Riot/Web", + "Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Multaj ejoj jam ekzistas en Matrix, ligitaj al ekzistantaj retoj (Slock, IRC, Gitter, ktp) aŭ sendependaj. Kontrolu la dosierujon!", + "Failed to change password. Is your password correct?": "Malsukcesis ŝanĝi la pasvorton. Ĉu via pasvorto pravas?", + "You have successfully set a password!": "Vi sukcese agordis pasvorton!", + "You can now return to your account after signing out, and sign in on other devices.": "Vi nun rajtas reiri al via konto post elsaluto, kaj ensaluti per aliaj aparatoj.", + "Continue": "Daŭrigi", + "Please set a password!": "Bonvolu agordi pasvorton!", + "This will allow you to return to your account after signing out, and sign in on other devices.": "Tio ĉi permesos vin reiri al via konto post elsaluto, kaj ensaluti per alia aparato.", + "You have successfully set a password and an email address!": "Vi sukcese agordis pasvorton kaj retpoŝtadreson!", + "Remember, you can always set an email address in user settings if you change your mind.": "Memoru, vi ĉiam povas agordi retpoŝtadreson en via uzanta agordo se vi decidas ŝanĝi ĝin poste.", + "%(appName)s via %(browserName)s on %(osName)s": "%(appName)s per %(browserName)s je %(osName)s", + "Safari and Opera work too.": "Safari kaj Opera ankaŭ funkcias.", + "Drop here %(toAction)s": "Forlasi ĉi tie %(toAction)s", + "Favourite": "Plej ŝatata", + "Fetching third party location failed": "Venigado de ekstere liverita loko malsukcesis", + "Filter room names": "Filtri nomojn de ejoj" } From 641f20a4f62a30b9067f7ba20a4201655836fc68 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 13 Jun 2017 14:45:05 +0100 Subject: [PATCH 6/6] Tweak tests to match updates to matrixchat Mostly this is just making it look at the `view` state rather than the individual boolean flags. One other tweak merits explanation: we now implement the initial couldn't-register-as-guest login with an explicit switch to the LOGIN view, which means that the URL gets updated to #/login. We also now need to give the login panel a bit longer to appear. --- src/vector/index.js | 18 ++++++++---------- test/app-tests/loading.js | 24 ++++++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 9f162051..da03327d 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -216,18 +216,16 @@ function getConfig() { return deferred.promise; } -function onLoadCompleted() { +function onTokenLoginCompleted() { // if we did a token login, we're now left with the token, hs and is // url as query params in the url; a little nasty but let's redirect to // clear them. - if (window.location.search) { - var parsedUrl = url.parse(window.location.href); - parsedUrl.search = ""; - var formatted = url.format(parsedUrl); - console.log("Redirecting to " + formatted + " to drop loginToken " + - "from queryparams"); - window.location.href = formatted; - } + var parsedUrl = url.parse(window.location.href); + parsedUrl.search = ""; + var formatted = url.format(parsedUrl); + console.log("Redirecting to " + formatted + " to drop loginToken " + + "from queryparams"); + window.location.href = formatted; } async function loadApp() { @@ -288,7 +286,7 @@ async function loadApp() { realQueryParams={params} startingFragmentQueryParams={fragparts.params} enableGuest={true} - onLoadCompleted={onLoadCompleted} + onTokenLoginCompleted={onTokenLoginCompleted} initialScreenAfterLogin={getScreenFromLocation(window.location)} defaultDeviceDisplayName={PlatformPeg.get().getDefaultDeviceDisplayName()} />, diff --git a/test/app-tests/loading.js b/test/app-tests/loading.js index a323a262..cad2b922 100644 --- a/test/app-tests/loading.js +++ b/test/app-tests/loading.js @@ -29,6 +29,7 @@ import jssdk from 'matrix-js-sdk'; import sdk from 'matrix-react-sdk'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; import * as languageHandler from 'matrix-react-sdk/lib/languageHandler'; +import {VIEWS} from 'matrix-react-sdk/lib/components/structures/MatrixChat'; import * as test_utils from '../test-utils'; import MockHttpBackend from '../mock-request'; @@ -47,7 +48,7 @@ describe('loading:', function () { // the mounted MatrixChat let matrixChat; - // a promise which resolves when the MatrixChat calls onLoadCompleted + // a promise which resolves when the MatrixChat calls onTokenLoginCompleted let loadCompletePromise; beforeEach(function() { @@ -135,7 +136,7 @@ describe('loading:', function () { realQueryParams={params} startingFragmentQueryParams={fragParts.params} enableGuest={true} - onLoadCompleted={loadCompleteDefer.resolve} + onTokenLoginCompleted={loadCompleteDefer.resolve} initialScreenAfterLogin={getScreenFromLocation(windowLocation)} makeRegistrationUrl={() => {throw new Error('Not implemented');}} />, parentDiv @@ -153,8 +154,8 @@ describe('loading:', function () { .check((r) => {syncRequest = r;}) .respond(200, response); - console.log("waiting for /sync"); for (let attempts = 10; attempts > 0; attempts--) { + console.log(Date.now() + " waiting for /sync"); if (syncRequest) { return syncRequest; } @@ -179,12 +180,12 @@ describe('loading:', function () { return httpBackend.flush(); }).then(() => { // Wait for another trip around the event loop for the UI to update - return q.delay(1); + return q.delay(10); }).then(() => { // we expect a single component following session load ReactTestUtils.findRenderedComponentWithType( matrixChat, sdk.getComponent('structures.login.Login')); - expect(windowLocation.hash).toEqual(""); + expect(windowLocation.hash).toEqual("#/login"); }).done(done, done); }); @@ -205,7 +206,7 @@ describe('loading:', function () { return httpBackend.flush(); }).then(() => { // Wait for another trip around the event loop for the UI to update - return q.delay(1); + return q.delay(10); }).then(() => { return completeLogin(matrixChat); }).then(() => { @@ -360,6 +361,9 @@ describe('loading:', function () { loadApp({ uriFragment: "#/login", }); + + // give the UI a chance to display + return q.delay(50); }); it('shows a login view', function() { @@ -513,7 +517,7 @@ describe('loading:', function () { return httpBackend.flush(); }).then(() => { - // at this point, MatrixChat should fire onLoadCompleted, which + // at this point, MatrixChat should fire onTokenLoginCompleted, which // makes index.js reload the app. We're not going to attempt to // simulate the reload - just check that things are left in the // right state for the reloaded app. @@ -589,7 +593,8 @@ function awaitSyncingSpinner(matrixChat, retryLimit, retryCount) { retryCount = 0; } - if (matrixChat.state.loading || matrixChat.state.loggingIn) { + if (matrixChat.state.view === VIEWS.LOADING || + matrixChat.state.view === VIEWS.LOGGING_IN) { console.log(Date.now() + " Awaiting sync spinner: still loading."); if (retryCount >= retryLimit) { throw new Error("MatrixChat still not loaded after " + @@ -628,8 +633,7 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) { retryCount = 0; } - if (matrixChat.state.loading || - !(matrixChat.state.loggedIn && matrixChat.state.ready)) { + if (matrixChat.state.view !== VIEWS.LOGGED_IN || !matrixChat.state.ready) { console.log(Date.now() + " Awaiting room view: not ready yet."); if (retryCount >= retryLimit) { throw new Error("MatrixChat still not ready after " +