From ae91f0ca62478e9722ac9828ac7fba54d6a3f547 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Jun 2017 21:34:18 +0100 Subject: [PATCH 01/12] catch ev arg so the disable stuff works Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/login/RegistrationForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/login/RegistrationForm.js b/src/components/views/login/RegistrationForm.js index daabb7cb61..75feab0f12 100644 --- a/src/components/views/login/RegistrationForm.js +++ b/src/components/views/login/RegistrationForm.js @@ -121,7 +121,7 @@ module.exports = React.createClass({ } }, - _doSubmit: function() { + _doSubmit: function(ev) { let email = this.refs.email.value.trim(); var promise = this.props.onRegisterClick({ username: this.refs.username.value.trim() || this.props.guestUsername, From 464863acd6200a42fba52e107e7e31e4c5c20819 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Jun 2017 21:35:55 +0100 Subject: [PATCH 02/12] remove unused imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/CallMediaHandler.js | 1 - src/MatrixClientPeg.js | 1 - src/Rooms.js | 1 - src/autocomplete/Components.js | 1 - src/autocomplete/UserProvider.js | 1 - src/components/structures/CreateRoom.js | 1 - src/components/structures/InteractiveAuth.js | 2 -- src/components/structures/RoomStatusBar.js | 1 - src/components/structures/login/Login.js | 1 - src/components/structures/login/Registration.js | 2 -- src/components/views/dialogs/ChatInviteDialog.js | 3 --- src/components/views/dialogs/InteractiveAuthDialog.js | 2 -- src/components/views/dialogs/UnknownDeviceDialog.js | 1 - src/components/views/elements/AddressTile.js | 2 -- src/components/views/elements/LanguageDropdown.js | 1 - src/components/views/login/PasswordLogin.js | 1 - src/components/views/messages/MAudioBody.js | 1 - src/components/views/messages/MFileBody.js | 1 - src/components/views/messages/MVideoBody.js | 2 -- src/components/views/rooms/Autocomplete.js | 2 +- src/components/views/rooms/MessageComposerInput.js | 1 - src/components/views/rooms/PresenceLabel.js | 2 -- src/index.js | 2 -- src/languageHandler.js | 1 - 24 files changed, 1 insertion(+), 33 deletions(-) diff --git a/src/CallMediaHandler.js b/src/CallMediaHandler.js index 45ca5dc30d..839b496845 100644 --- a/src/CallMediaHandler.js +++ b/src/CallMediaHandler.js @@ -16,7 +16,6 @@ import UserSettingsStore from './UserSettingsStore'; import * as Matrix from 'matrix-js-sdk'; -import q from 'q'; export default { getDevices: function() { diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 452b67c4ee..94e55a8d8a 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -16,7 +16,6 @@ limitations under the License. 'use strict'; -import q from "q"; import Matrix from 'matrix-js-sdk'; import utils from 'matrix-js-sdk/lib/utils'; import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline'; diff --git a/src/Rooms.js b/src/Rooms.js index 08fa7f797f..16b5ab9ee2 100644 --- a/src/Rooms.js +++ b/src/Rooms.js @@ -15,7 +15,6 @@ limitations under the License. */ import MatrixClientPeg from './MatrixClientPeg'; -import DMRoomMap from './utils/DMRoomMap'; import q from 'q'; /** diff --git a/src/autocomplete/Components.js b/src/autocomplete/Components.js index b26a217ec6..0f0399cf7d 100644 --- a/src/autocomplete/Components.js +++ b/src/autocomplete/Components.js @@ -15,7 +15,6 @@ limitations under the License. */ import React from 'react'; -import ReactDOM from 'react-dom'; import classNames from 'classnames'; /* These were earlier stateless functional components but had to be converted diff --git a/src/autocomplete/UserProvider.js b/src/autocomplete/UserProvider.js index fedebb3618..809fec94be 100644 --- a/src/autocomplete/UserProvider.js +++ b/src/autocomplete/UserProvider.js @@ -18,7 +18,6 @@ limitations under the License. import React from 'react'; import { _t } from '../languageHandler'; import AutocompleteProvider from './AutocompleteProvider'; -import Q from 'q'; import Fuse from 'fuse.js'; import {PillCompletion} from './Components'; import sdk from '../index'; diff --git a/src/components/structures/CreateRoom.js b/src/components/structures/CreateRoom.js index 8b3d035dc1..0a4a30d24a 100644 --- a/src/components/structures/CreateRoom.js +++ b/src/components/structures/CreateRoom.js @@ -17,7 +17,6 @@ limitations under the License. 'use strict'; import React from 'react'; -import q from 'q'; import { _t } from '../../languageHandler'; import sdk from '../../index'; import MatrixClientPeg from '../../MatrixClientPeg'; diff --git a/src/components/structures/InteractiveAuth.js b/src/components/structures/InteractiveAuth.js index 7c8a5b8065..dee8400a08 100644 --- a/src/components/structures/InteractiveAuth.js +++ b/src/components/structures/InteractiveAuth.js @@ -19,8 +19,6 @@ const InteractiveAuth = Matrix.InteractiveAuth; import React from 'react'; -import sdk from '../../index'; - import {getEntryComponentForLoginType} from '../views/login/InteractiveAuthEntryComponents'; export default React.createClass({ diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index 5a9592243a..f8a3d340b7 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import { _t } from '../../languageHandler'; import sdk from '../../index'; -import dis from '../../dispatcher'; import WhoIsTyping from '../../WhoIsTyping'; import MatrixClientPeg from '../../MatrixClientPeg'; import MemberAvatar from '../views/avatars/MemberAvatar'; diff --git a/src/components/structures/login/Login.js b/src/components/structures/login/Login.js index 8848a33deb..a15068e058 100644 --- a/src/components/structures/login/Login.js +++ b/src/components/structures/login/Login.js @@ -19,7 +19,6 @@ limitations under the License. import React from 'react'; import { _t, _tJsx } from '../../../languageHandler'; -import ReactDOM from 'react-dom'; import sdk from '../../../index'; import Login from '../../../Login'; diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index d9b7c46b6b..85fb18f13b 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -21,11 +21,9 @@ import q from 'q'; import React from 'react'; import sdk from '../../../index'; -import dis from '../../../dispatcher'; import ServerConfig from '../../views/login/ServerConfig'; import MatrixClientPeg from '../../../MatrixClientPeg'; import RegistrationForm from '../../views/login/RegistrationForm'; -import CaptchaForm from '../../views/login/CaptchaForm'; import RtsClient from '../../../RtsClient'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js index 7dd5b05041..cd294a123d 100644 --- a/src/components/views/dialogs/ChatInviteDialog.js +++ b/src/components/views/dialogs/ChatInviteDialog.js @@ -15,15 +15,12 @@ limitations under the License. */ import React from 'react'; -import classNames from 'classnames'; import { _t } from '../../../languageHandler'; import sdk from '../../../index'; import { getAddressType, inviteMultipleToRoom } from '../../../Invite'; import createRoom from '../../../createRoom'; import MatrixClientPeg from '../../../MatrixClientPeg'; import DMRoomMap from '../../../utils/DMRoomMap'; -import rate_limited_func from '../../../ratelimitedfunc'; -import dis from '../../../dispatcher'; import Modal from '../../../Modal'; import AccessibleButton from '../elements/AccessibleButton'; import q from 'q'; diff --git a/src/components/views/dialogs/InteractiveAuthDialog.js b/src/components/views/dialogs/InteractiveAuthDialog.js index 51561270c4..945e0a9d69 100644 --- a/src/components/views/dialogs/InteractiveAuthDialog.js +++ b/src/components/views/dialogs/InteractiveAuthDialog.js @@ -15,8 +15,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import Matrix from 'matrix-js-sdk'; - import React from 'react'; import sdk from '../../../index'; diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index 9ffad5d32a..8f91b84519 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -16,7 +16,6 @@ limitations under the License. import React from 'react'; import sdk from '../../../index'; -import dis from '../../../dispatcher'; import MatrixClientPeg from '../../../MatrixClientPeg'; import GeminiScrollbar from 'react-gemini-scrollbar'; import Resend from '../../../Resend'; diff --git a/src/components/views/elements/AddressTile.js b/src/components/views/elements/AddressTile.js index 33cc7f9923..78fd942a46 100644 --- a/src/components/views/elements/AddressTile.js +++ b/src/components/views/elements/AddressTile.js @@ -19,9 +19,7 @@ limitations under the License. import React from 'react'; import classNames from 'classnames'; import sdk from "../../../index"; -import Invite from "../../../Invite"; import MatrixClientPeg from "../../../MatrixClientPeg"; -import Avatar from '../../../Avatar'; import { _t } from '../../../languageHandler'; // React PropType definition for an object describing diff --git a/src/components/views/elements/LanguageDropdown.js b/src/components/views/elements/LanguageDropdown.js index 49f89aa469..c5ed1f8942 100644 --- a/src/components/views/elements/LanguageDropdown.js +++ b/src/components/views/elements/LanguageDropdown.js @@ -19,7 +19,6 @@ import React from 'react'; import sdk from '../../../index'; import UserSettingsStore from '../../../UserSettingsStore'; -import { _t } from '../../../languageHandler'; import * as languageHandler from '../../../languageHandler'; function languageMatchesSearchQuery(query, language) { diff --git a/src/components/views/login/PasswordLogin.js b/src/components/views/login/PasswordLogin.js index 972516b553..46a48d14a0 100644 --- a/src/components/views/login/PasswordLogin.js +++ b/src/components/views/login/PasswordLogin.js @@ -16,7 +16,6 @@ limitations under the License. */ import React from 'react'; -import ReactDOM from 'react-dom'; import classNames from 'classnames'; import sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/MAudioBody.js b/src/components/views/messages/MAudioBody.js index 0b6214b9bf..52c1341e60 100644 --- a/src/components/views/messages/MAudioBody.js +++ b/src/components/views/messages/MAudioBody.js @@ -20,7 +20,6 @@ import React from 'react'; import MFileBody from './MFileBody'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; import { decryptFile, readBlobAsDataUri } from '../../../utils/DecryptFile'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/MFileBody.js b/src/components/views/messages/MFileBody.js index 1bb9464999..bccae923eb 100644 --- a/src/components/views/messages/MFileBody.js +++ b/src/components/views/messages/MFileBody.js @@ -24,7 +24,6 @@ import { _t } from '../../../languageHandler'; import {decryptFile} from '../../../utils/DecryptFile'; import Tinter from '../../../Tinter'; import request from 'browser-request'; -import q from 'q'; import Modal from '../../../Modal'; diff --git a/src/components/views/messages/MVideoBody.js b/src/components/views/messages/MVideoBody.js index 8caf9d8f96..46d8366592 100644 --- a/src/components/views/messages/MVideoBody.js +++ b/src/components/views/messages/MVideoBody.js @@ -19,8 +19,6 @@ limitations under the License. import React from 'react'; import MFileBody from './MFileBody'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import Model from '../../../Modal'; -import sdk from '../../../index'; import { decryptFile, readBlobAsDataUri } from '../../../utils/DecryptFile'; import q from 'q'; import UserSettingsStore from '../../../UserSettingsStore'; diff --git a/src/components/views/rooms/Autocomplete.js b/src/components/views/rooms/Autocomplete.js index 9be91e068a..5f6bac0007 100644 --- a/src/components/views/rooms/Autocomplete.js +++ b/src/components/views/rooms/Autocomplete.js @@ -4,7 +4,7 @@ import classNames from 'classnames'; import flatMap from 'lodash/flatMap'; import isEqual from 'lodash/isEqual'; import sdk from '../../../index'; -import type {Completion, SelectionRange} from '../../../autocomplete/Autocompleter'; +import type {Completion} from '../../../autocomplete/Autocompleter'; import Q from 'q'; import {getCompletions} from '../../../autocomplete/Autocompleter'; diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 65148f91ef..d3010044e5 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -33,7 +33,6 @@ import sdk from '../../../index'; import { _t } from '../../../languageHandler'; import dis from '../../../dispatcher'; -import KeyCode from '../../../KeyCode'; import UserSettingsStore from '../../../UserSettingsStore'; import * as RichText from '../../../RichText'; diff --git a/src/components/views/rooms/PresenceLabel.js b/src/components/views/rooms/PresenceLabel.js index b79de2b21c..47a723f5cd 100644 --- a/src/components/views/rooms/PresenceLabel.js +++ b/src/components/views/rooms/PresenceLabel.js @@ -18,8 +18,6 @@ limitations under the License. import React from 'react'; -import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/index.js b/src/index.js index 03b854a112..7d0547d9c9 100644 --- a/src/index.js +++ b/src/index.js @@ -15,8 +15,6 @@ limitations under the License. */ import Skinner from './Skinner'; -import request from 'browser-request'; -import UserSettingsStore from './UserSettingsStore'; module.exports.loadSkin = function(skinObject) { Skinner.load(skinObject); diff --git a/src/languageHandler.js b/src/languageHandler.js index 798798b6e5..0e8b08018f 100644 --- a/src/languageHandler.js +++ b/src/languageHandler.js @@ -18,7 +18,6 @@ limitations under the License. import request from 'browser-request'; import counterpart from 'counterpart'; import q from 'q'; -import sanitizeHtml from "sanitize-html"; import UserSettingsStore from './UserSettingsStore'; From 4032a820f0961dea44cd5bb2a2fdeacef69701c4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Jun 2017 21:46:08 +0100 Subject: [PATCH 03/12] move KEY_M to KeyCode Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/KeyCode.js | 1 + src/components/views/rooms/MessageComposerInput.js | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KeyCode.js b/src/KeyCode.js index c9cac01239..28aafc00cb 100644 --- a/src/KeyCode.js +++ b/src/KeyCode.js @@ -32,4 +32,5 @@ module.exports = { DELETE: 46, KEY_D: 68, KEY_E: 69, + KEY_M: 77, }; diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index d3010044e5..1c92a9339e 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -28,6 +28,7 @@ import Q from 'q'; import MatrixClientPeg from '../../../MatrixClientPeg'; import type {MatrixClient} from 'matrix-js-sdk/lib/matrix'; import SlashCommands from '../../../SlashCommands'; +import KeyCode from '../../../KeyCode'; import Modal from '../../../Modal'; import sdk from '../../../index'; import { _t } from '../../../languageHandler'; @@ -44,8 +45,6 @@ import {onSendMessageFailed} from './MessageComposerInputOld'; const TYPING_USER_TIMEOUT = 10000, TYPING_SERVER_TIMEOUT = 30000; -const KEY_M = 77; - const ZWS_CODE = 8203; const ZWS = String.fromCharCode(ZWS_CODE); // zero width space function stateToMarkdown(state) { @@ -61,7 +60,7 @@ function stateToMarkdown(state) { export default class MessageComposerInput extends React.Component { static getKeyBinding(e: SyntheticKeyboardEvent): string { // C-m => Toggles between rich text and markdown modes - if (e.keyCode === KEY_M && KeyBindingUtil.isCtrlKeyCommand(e)) { + if (e.keyCode === KeyCode.KEY_M && KeyBindingUtil.isCtrlKeyCommand(e)) { return 'toggle-mode'; } From 1bbdb6c9850f0305d640ae6aaf8f22a05ae50f38 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 3 Jun 2017 15:51:20 +0100 Subject: [PATCH 04/12] actually pass ev through Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/login/RegistrationForm.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/views/login/RegistrationForm.js b/src/components/views/login/RegistrationForm.js index 75feab0f12..9066e31b47 100644 --- a/src/components/views/login/RegistrationForm.js +++ b/src/components/views/login/RegistrationForm.js @@ -110,13 +110,12 @@ module.exports = React.createClass({ button: _t("Continue"), onFinished: function(confirmed) { if (confirmed) { - self._doSubmit(); + self._doSubmit(ev); } }, }); - } - else { - self._doSubmit(); + } else { + self._doSubmit(ev); } } }, From 0b56d33bd2a7738ca9a988ae13083c3cb8f618e4 Mon Sep 17 00:00:00 2001 From: Kegsay Date: Tue, 6 Jun 2017 13:56:37 +0100 Subject: [PATCH 05/12] Null guard all interpolated strings passed to _t (#1035) --- src/languageHandler.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/languageHandler.js b/src/languageHandler.js index 798798b6e5..68e8ca6172 100644 --- a/src/languageHandler.js +++ b/src/languageHandler.js @@ -35,6 +35,25 @@ counterpart.setFallbackLocale('en'); // just import counterpart and use it directly, we end up using a different // instance. export function _t(...args) { + // Horrible hack to avoid https://github.com/vector-im/riot-web/issues/4191 + // The interpolation library that counterpart uses does not support undefined/null + // values and instead will throw an error. This is a problem since everywhere else + // in JS land passing undefined/null will simply stringify instead, and when converting + // valid ES6 template strings to i18n strings it's extremely easy to pass undefined/null + // if there are no existing null guards. To avoid this making the app completely inoperable, + // we'll check all the values for undefined/null and stringify them here. + if (args[1] && typeof args[1] === 'object') { + Object.keys(args[1]).forEach((k) => { + if (args[1][k] === undefined) { + console.warn("_t called with undefined interpolation name: " + k); + args[1][k] = 'undefined'; + } + if (args[1][k] === null) { + console.warn("_t called with null interpolation name: " + k); + args[1][k] = 'null'; + } + }); + } return counterpart.translate(...args); } From 5c1866c1c67d2916509f1d6bca1515d05c70d057 Mon Sep 17 00:00:00 2001 From: Kegsay Date: Tue, 6 Jun 2017 16:41:08 +0100 Subject: [PATCH 06/12] Add get_membership_count scalar API (#1043) --- src/ScalarMessaging.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index 8c591f7cb2..c1b975e8e8 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -94,6 +94,22 @@ Example: } } +get_membership_count +-------------------- +Get the number of joined users in the room. + +Request: + - room_id is the room to get the count in. +Response: +78 +Example: +{ + action: "get_membership_count", + room_id: "!foo:bar", + response: 78 +} + + membership_state AND bot_options -------------------------------- Get the content of the "m.room.member" or "m.room.bot.options" state event respectively. @@ -256,6 +272,21 @@ function botOptions(event, roomId, userId) { returnStateEvent(event, roomId, "m.room.bot.options", "_" + userId); } +function getMembershipCount(event, roomId) { + const client = MatrixClientPeg.get(); + if (!client) { + sendError(event, _t('You need to be logged in.')); + return; + } + const room = client.getRoom(roomId); + if (!room) { + sendError(event, _t('This room is not recognised.')); + return; + } + const count = room.getJoinedMembers().length; + sendResponse(event, count); +} + function returnStateEvent(event, roomId, eventType, stateKey) { const client = MatrixClientPeg.get(); if (!client) { @@ -343,6 +374,9 @@ const onMessage = function(event) { } else if (event.data.action === "set_plumbing_state") { setPlumbingState(event, roomId, event.data.status); return; + } else if (event.data.action === "get_membership_count") { + getMembershipCount(event, roomId); + return; } if (!userId) { From 71c12b0615bcf7341a348a5f500a01d0f4f1de5c Mon Sep 17 00:00:00 2001 From: RiotTranslate Date: Tue, 6 Jun 2017 17:44:28 +0200 Subject: [PATCH 07/12] Update from Weblate. (#1042) * Added translation using Weblate (Thai) * Translated using Weblate (Thai) Currently translated at 2.6% (22 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/th/ * Translated using Weblate (Thai) Currently translated at 8.9% (74 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/th/ * Translated using Weblate (German) Currently translated at 99.8% (826 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/de/ * Translated using Weblate (Swedish) Currently translated at 35.4% (293 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/sv/ * Translated using Weblate (Thai) Currently translated at 9.7% (81 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/th/ * Translated using Weblate (German) Currently translated at 100.0% (827 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/de/ * Translated using Weblate (Russian) Currently translated at 76.9% (636 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/ru/ * Translated using Weblate (Hungarian) Currently translated at 0.1% (1 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/hu/ * Translated using Weblate (Thai) Currently translated at 39.2% (325 of 827 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/th/ * Translated using Weblate (German) Currently translated at 99.8% (827 of 828 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.nordgedanken.de/projects/riot-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 15 +- src/i18n/strings/hu.json | 4 +- src/i18n/strings/ru.json | 5 +- src/i18n/strings/sv.json | 117 +++++++++++++- src/i18n/strings/th.json | 305 +++++++++++++++++++++++++++++++++++- 5 files changed, 435 insertions(+), 11 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 4e0a922b52..15375b8f90 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -46,8 +46,8 @@ "Return to app": "Zurück zur Anwendung", "Sign in": "Anmelden", "Create a new account": "Erstelle einen neuen Benutzer", - "Send an encrypted message": "Eine verschlüsselte Nachricht senden", - "Send a message (unencrypted)": "Sende eine Nachricht (unverschlüsselt)", + "Send an encrypted message": "Verschlüsselte Nachricht senden", + "Send a message (unencrypted)": "Nachricht senden (unverschlüsselt)", "Warning!": "Warnung!", "Direct Chat": "Privater Chat", "Error": "Fehler", @@ -191,7 +191,7 @@ "Return to login screen": "Zur Anmeldemaske zurückkehren", "Room Colour": "Raumfarbe", "Room name (optional)": "Raumname (optional)", - "Scroll to unread messages": "Scrolle zu ungelesenen Nachrichten", + "Scroll to unread messages": "Zu den ungelesenen Nachrichten scrollen", "Send Invites": "Einladungen senden", "Send Reset Email": "E-Mail für das Zurücksetzen senden", "sent an image": "hat ein Bild gesendet", @@ -342,7 +342,7 @@ "An error occured: %(error_string)s": "Ein Fehler trat auf: %(error_string)s", "Topic": "Thema", "Make this room private": "Mache diesen Raum privat", - "Share message history with new users": "Nachrichtenhistorie mit neuen Nutzern teilen", + "Share message history with new users": "Bisherigen Chatverlauf mit neuen Nutzern teilen", "Encrypt room": "Raum verschlüsseln", "To send events of type": "Zum Senden von Ereignissen mit Typ", "%(names)s and %(lastPerson)s are typing": "%(names)s und %(lastPerson)s schreiben", @@ -770,7 +770,7 @@ "You can also set a custom identity server but this will typically prevent interaction with users based on email address.": "Du kannst auch einen angepassten Idantitätsserver angeben aber dies wird typischerweise Interaktionen mit anderen Nutzern auf Basis der E-Mail-Adresse verhindern.", "Please check your email to continue registration.": "Bitte prüfe deine E-Mail um mit der Registrierung fortzufahren.", "Token incorrect": "Token inkorrekt", - "A text message has been sent to": "Eine Textnachricht wurde gesandt an", + "A text message has been sent to": "Eine Textnachricht wurde gesendet an", "Please enter the code it contains:": "Bitte gebe den Code ein, den sie enthält:", "powered by Matrix": "betrieben mit Matrix", "If you don't specify an email address, you won't be able to reset your password. Are you sure?": "Wenn du keine E-Mail-Adresse angibst, wirst du nicht in der Lage sein, dein Passwort zurückzusetzen. Bist du sicher?", @@ -834,7 +834,7 @@ "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s hat das Raum-Bild entfernt.", "VoIP": "VoIP", "No Webcams detected": "Keine Webcam erkannt", - "Missing Media Permissions, click here to request.": "Fehlende Medienberechtigungen. Klicke hier um anzufragen.", + "Missing Media Permissions, click here to request.": "Fehlende Medienberechtigungen. Hier klicken, um Berechtigungen zu beantragen.", "No Microphones detected": "Keine Mikrofone erkannt", "No media permissions": "Keine Medienberechtigungen", "You may need to manually permit Riot to access your microphone/webcam": "Gegebenenfalls kann es notwendig sein, dass du Riot manuell den Zugriff auf dein Mikrofon bzw. deine Webcam gewähren musst", @@ -888,5 +888,6 @@ "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Deine E-Mail-Adresse scheint nicht mit einer Matrix-ID auf diesem Heimserver verbunden zu sein.", "$senderDisplayName changed the room avatar to ": "$senderDisplayName hat das Raum-Bild geändert zu ", "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s hat das Raum-Bild für %(roomName)s geändert", - "Hide removed messages": "Gelöschte Nachrichten verbergen" + "Hide removed messages": "Gelöschte Nachrichten verbergen", + "Start new chat": "Neuen Chat starten" } diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 9e26dfeeb6..5430737f15 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "Cancel": "Mégse" +} diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 4d83321009..a0788a15dc 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -670,5 +670,8 @@ "Analytics": "Аналитика", "Riot collects anonymous analytics to allow us to improve the application.": "Riot собирет анонимные данные, чтобы улутшыть эту програму.", "Opt out of analytics": "Подтвердить отказ передачи аналитических данных", - "Logged in as:": "Зарегестрирован как:" + "Logged in as:": "Зарегестрирован как:", + "Default Device": "Стандартное устройство", + "No Webcams detected": "Веб-камера не обнаружена", + "VoIP": "VoIP" } diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 5b376a22d6..af5e27acc2 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -176,5 +176,120 @@ "Banned users": "Bannade användare", "Bans user with given id": "Bannar användaren med givet ID", "Ban": "Banna", - "Attachment": "Bilaga" + "Attachment": "Bilaga", + "Call Timeout": "Samtalstimeout", + "Can't connect to homeserver - please check your connectivity and ensure your homeserver's SSL certificate is trusted.": "Det gick inte att ansluta till hemservern - kontrollera anslutningen och att hemserverns TLS-certifikat är pålitat.", + "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Det går inte att ansluta till en hemserver via HTTP då adressen i webbläsaren är HTTPS. Använd HTTPS, eller sätt på osäkra skript.", + "Can't load user settings": "Det gick inte att ladda användarinställningar", + "Change Password": "Byt lösenord", + "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s bytte namn från %(oldDisplayName)s till %(displayName)s.", + "%(senderName)s changed their profile picture.": "%(senderName)s bytte sin profilbild.", + "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s bytte rummets namn till %(roomName)s.", + "%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s tog bort rummets namn.", + "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s bytte rummets ämne till \"%(topic)s\".", + "Changes to who can read history will only apply to future messages in this room": "Ändringar till vem som kan läsa meddelandehistorik tillämpas endast till framtida meddelanden i det här rummet", + "Changes your display nickname": "Byter ditt synliga namn", + "Changing password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Om du byter lösenord kommer för tillfället alla krypteringsnycklar på alla enheter att nollställas, vilket gör all krypterad meddelandehistorik omöjligt att läsa, om du inte först exporterar rumsnycklarna och sedan importerar dem efteråt. I framtiden kommer det här att förbättras.", + "Claimed Ed25519 fingerprint key": "Påstådd Ed25519-fingeravtrycksnyckel", + "Clear Cache and Reload": "Töm cache och ladda om", + "Clear Cache": "Töm cache", + "Click here": "Klicka här", + "Click here to fix": "Klicka här för att fixa", + "Click to mute audio": "Klicka för att dämpa ljud", + "Click to mute video": "Klicka för att stänga av video", + "click to reveal": "klicka för att avslöja", + "Click to unmute video": "Klicka för att sätta på video", + "Click to unmute audio": "Klicka för att sätta på ljud", + "Command error": "Kommandofel", + "Commands": "Kommandon", + "Conference call failed.": "Konferenssamtal misslyckades.", + "Conference calling is in development and may not be reliable.": "Konferenssamtal är under utveckling och är inte nödvändigtvis pålitliga.", + "Conference calls are not supported in encrypted rooms": "Konferenssamtal stöds inte i krypterade rum", + "Conference calls are not supported in this client": "Konferenssamtal stöds inte i den här klienten", + "Confirm password": "Bekräfta lösenord", + "Confirm your new password": "Bekräfta ditt nya lösenord", + "Continue": "Fortsätt", + "Could not connect to the integration server": "Det gick inte att ansluta till integrationsservern", + "Create an account": "Skapa ett konto", + "Create Room": "Skapa ett rum", + "Cryptography": "Kryptografi", + "Current password": "Nuvarande lösenord", + "Curve25519 identity key": "Curve25519 -identitetsnyckel", + "Custom level": "Egen nivå", + "/ddg is not a command": "/ddg är inte ett kommando", + "Deactivate Account": "Deaktivera konto", + "Deactivate my account": "Deaktivera mitt konto", + "decline": "avböj", + "Decrypt %(text)s": "Dekryptera %(text)s", + "Decryption error": "Dekrypteringsfel", + "(default: %(userName)s)": "(standard: %(userName)s)", + "Delete": "Radera", + "demote": "degradera", + "Deops user with given id": "Degraderar användaren med givet id", + "Default": "Standard", + "Device already verified!": "Enheten är redan verifierad!", + "Device ID": "Enhets-ID", + "Device ID:": "Enhets-ID:", + "device id: ": "enhets-id: ", + "Device key:": "Enhetsnyckel:", + "Devices": "Enheter", + "Devices will not yet be able to decrypt history from before they joined the room": "Enheter kan inte ännu dekryptera meddelandehistorik från före de gick med i rummet", + "Direct Chat": "Direkt-chatt", + "Direct chats": "Direkta chattar", + "disabled": "avstängd", + "Disable inline URL previews by default": "Stäng av inline-URL-förhandsvisningar som standard", + "Disinvite": "Häv inbjudan", + "Display name": "Namn", + "Displays action": "Visar handling", + "Don't send typing notifications": "Sänd inte \"skriver\"-status", + "Download %(text)s": "Ladda ner %(text)s", + "Drop here %(toAction)s": "Dra hit för att %(toAction)s", + "Drop here to tag %(section)s": "Dra hit för att tagga %(section)s", + "Ed25519 fingerprint": "Ed25519-fingeravtryck", + "Email": "Epost", + "Email address": "Epostadress", + "Email address (optional)": "Epostadress (valfri)", + "Email, name or matrix ID": "Epostadress, namn, eller Matrix-ID", + "Emoji": "Emoji", + "Enable encryption": "Sätt på kryptering", + "enabled": "aktiverat", + "Encrypted messages will not be visible on clients that do not yet implement encryption": "Krypterade meddelanden syns inte på klienter som inte ännu stöder kryptering", + "Encrypted room": "Krypterat rum", + "%(senderName)s ended the call.": "%(senderName)s avslutade samtalet.", + "End-to-end encryption information": "Krypteringsinformation", + "End-to-end encryption is in beta and may not be reliable": "Kryptering är i beta och är inte nödvändigtvis pålitligt", + "Enter Code": "Skriv in kod", + "Error": "Fel", + "Error decrypting attachment": "Det gick inte att dekryptera bilagan", + "Event information": "Händelseinformation", + "Existing Call": "Existerande samtal", + "Export": "Exportera", + "Export E2E room keys": "Exportera krypteringsrumsnycklar", + "Failed to ban user": "Det gick inte att banna användaren", + "Failed to change password. Is your password correct?": "Det gick inte att byta lösenord. Är lösenordet rätt?", + "Failed to change power level": "Det gick inte att ändra maktnivå", + "Failed to delete device": "Det gick inte att radera enhet", + "Failed to forget room %(errCode)s": "Det gick inte att glömma bort rummet %(errCode)s", + "Failed to join room": "Det gick inte att gå med i rummet", + "Failed to join the room": "Det gick inte att gå med i rummet", + "Failed to kick": "Det gick inte att kicka", + "Failed to leave room": "Det gick inte att lämna rummet", + "Failed to load timeline position": "Det gick inte att hämta positionen på tidslinjen", + "Failed to lookup current room": "Det gick inte att hämta det nuvarande rummet", + "Failed to mute user": "Det gick inte att dämpa användaren", + "Failed to register as guest:": "Det gick inte att registrera som gästanvändare:", + "Failed to reject invite": "Det gick inte att avböja inbjudan", + "Failed to reject invitation": "Det gick inte att avböja inbjudan", + "Failed to save settings": "Det gick inte att spara inställningarna", + "Failed to send email": "Det gick inte att skicka epost", + "Failed to send request.": "Det gick inte att sända begäran.", + "Failed to set avatar.": "Det gick inte att sätta profilbilden.", + "Failed to set display name": "Det gick inte att sätta namnet", + "Failed to set up conference call": "Det gick inte att starta konferenssamtalet", + "Failed to toggle moderator status": "Det gick inte att växla moderator-status", + "Failed to unban": "Det gick inte att avbanna", + "Failed to upload file": "Det gick inte att ladda upp filen", + "Failed to verify email address: make sure you clicked the link in the email": "Det gick inte att bekräfta epostadressen, klicka på länken i epostmeddelandet", + "Favourite": "Favorit", + "favourite": "favorit" } diff --git a/src/i18n/strings/th.json b/src/i18n/strings/th.json index 9e4266753c..db67539b38 100644 --- a/src/i18n/strings/th.json +++ b/src/i18n/strings/th.json @@ -20,5 +20,308 @@ "Bug Report": "รายงานจุดบกพร่อง", "Change Password": "เปลี่ยนรหัสผ่าน", "Create Room": "สรัางห้อง", - "Delete": "ลบ" + "Delete": "ลบ", + "Default": "ค่าเริ่มต้น", + "(default: %(userName)s)": "(ค่าเริ่มต้น: %(userName)s)", + "Default Device": "อุปกรณ์เริ่มต้น", + "%(senderName)s banned %(targetName)s.": "%(senderName)s แบน %(targetName)s แล้ว", + "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s เปลี่ยนหัวข้อเป็น \"%(topic)s\" แล้ว", + "Decrypt %(text)s": "ถอดรหัส %(text)s", + "Device ID": "ID อุปกรณ์", + "Device ID:": "ID อุปกรณ์:", + "device id: ": "id อุปกรณ์: ", + "Devices": "อุปกรณ์", + "Direct Chat": "แชทโดยตรง", + "Download %(text)s": "ดาวน์โหลด %(text)s", + "Emoji": "อีโมจิ", + "Enable encryption": "เปิดใช้งานการเข้ารหัส", + "enabled": "เปิดใช้งานแล้ว", + "Error": "ข้อผิดพลาด", + "Found a bug?": "พบจุดบกพร่อง?", + "is a": "เป็น", + "%(displayName)s is typing": "%(displayName)s กำลังพิมพ์", + "Kick": "เตะ", + "Low priority": "ความสำคัญต่ำ", + "matrix-react-sdk version:": "เวอร์ชัน matrix-react-sdk:", + "Members only": "สมาชิกเท่านั้น", + "Mobile phone number": "หมายเลขโทรศัพท์", + "Mobile phone number (optional)": "หมายเลขโทรศัพท์ (เลือกหรือไม่ก็ได้)", + "Name": "ชื่อ", + "OK": "ตกลง", + "Password": "รหัสผ่าน", + "Password:": "รหัสผ่าน:", + "Please Register": "กรุณาลงทะเบียน", + "Profile": "โปรไฟล์", + "Reason": "เหตุผล", + "Register": "ลงทะเบียน", + "Results from DuckDuckGo": "ผลจาก DuckDuckGo", + "Return to app": "กลับไปยังแอป", + "riot-web version:": "เวอร์ชัน riot-web:", + "Cancel": "ยกเลิก", + "Dismiss": "ไม่สนใจ", + "Mute": "เงียบ", + "Notifications": "การแจ้งเตือน", + "Operation failed": "การดำเนินการล้มเหลว", + "powered by Matrix": "ใช้เทคโนโลยี Matrix", + "Search": "ค้นหา", + "Settings": "การตั้งค่า", + "unknown error code": "รหัสข้อผิดพลาดที่ไม่รู้จัก", + "Sunday": "วันอาทิตย์", + "Monday": "วันจันทร์", + "Tuesday": "วันอังคาร", + "Wednesday": "วันพุธ", + "Thursday": "วันพฤหัสบดี", + "Friday": "วันศุกร์", + "Saturday": "วันเสาร์", + "olm version:": "เวอร์ชัน olm:", + "Report it": "รายงานเลย", + "Remove": "ลบ", + "Custom Server Options": "กำหนดเซิร์ฟเวอร์เอง", + "Failed to join the room": "การเข้าร่วมห้องล้มเหลว", + "Drop here %(toAction)s": "ปล่อยที่นี่ %(toAction)s", + "Favourite": "รายการโปรด", + "Failed to forget room %(errCode)s": "การลืมห้องล้มเหลว %(errCode)s", + "%(targetName)s accepted an invitation.": "%(targetName)s ตอบรับคำเชิญแล้ว", + "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s ตอบรับคำเชิญสำหรับ %(displayName)s แล้ว", + "Add a topic": "เพิ่มหัวข้อ", + "Add email address": "เพิ่มที่อยู่อีเมล", + "Admin": "ผู้ดูแล", + "No Webcams detected": "ไม่พบกล้องเว็บแคม", + "No media permissions": "ไม่มีสิทธิ์เข้าถึงสื่อ", + "You may need to manually permit Riot to access your microphone/webcam": "คุณอาจต้องให้สิทธิ์ Riot เข้าถึงไมค์โครโฟนไมค์โครโฟน/กล้องเว็บแคม ด้วยตัวเอง", + "Algorithm": "อัลกอริทึม", + "Hide removed messages": "ซ่อนข้อความที่ถูกลบแล้ว", + "Authentication": "การยืนยันตัวตน", + "all room members": "สมาชิกทั้งหมด", + "all room members, from the point they are invited": "สมาชิกทั้งหมด นับตั้งแต่เมื่อได้รับคำเชิญ", + "all room members, from the point they joined": "สมาชิกทั้งหมด นับตั้งแต่เมื่อเข้าร่วมห้อง", + "an address": "ที่อยู่", + "%(items)s and %(remaining)s others": "%(items)s และอีก %(remaining)s อย่าง", + "%(items)s and one other": "%(items)s และอีกหนึ่งอย่าง", + "%(items)s and %(lastItem)s": "%(items)s และ %(lastItem)s", + "and %(overflowCount)s others...": "และอีก %(overflowCount)s ผู้ใช้...", + "and one other...": "และอีกหนึ่งผู้ใช้...", + "%(names)s and %(lastPerson)s are typing": "%(names)s และ %(lastPerson)s กำลังพิมพ์", + "%(names)s and one other are typing": "%(names)s และอีกหนึ่งคนกำลังพิมพ์", + "%(names)s and %(count)s others are typing": "%(names)s และอีก %(count)s คนกำลังพิมพ์", + "%(senderName)s answered the call.": "%(senderName)s รับสายแล้ว", + "anyone": "ทุกคน", + "An error has occurred.": "เกิดข้อผิดพลาด", + "Anyone": "ทุกคน", + "Anyone who knows the room's link, apart from guests": "ทุกคนที่มีลิงก์ ยกเว้นแขก", + "Anyone who knows the room's link, including guests": "ทุกคนที่มีลิงก์ รวมถึงแขก", + "Are you sure?": "คุณแน่ใจหรือไม่?", + "Are you sure you want to leave the room '%(roomName)s'?": "คุณแน่ใจหรือว่าต้องการจะออกจากห้อง '%(roomName)s'?", + "Are you sure you want to reject the invitation?": "คุณแน่ใจหรือว่าต้องการจะปฏิเสธคำเชิญ?", + "Are you sure you want to upload the following files?": "คุณแน่ใจหรือว่าต้องการอัปโหลดไฟล์ต่อไปนี้?", + "Attachment": "ไฟล์แนบ", + "Autoplay GIFs and videos": "เล่น GIF และวิดิโออัตโนมัติ", + "Banned users": "ผู้ใช้ที่ถูกแบน", + "Bans user with given id": "ผู้ใช้และ id ที่ถูกแบน", + "Blacklisted": "ขึ้นบัญชีดำ", + "Can't load user settings": "ไม่สามารถโหลดการตั้งค่าผู้ใช้ได้", + "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s ได้เปลี่ยนชื่อที่แสดงจาก %(oldDisplayName)s ไปเป็น %(displayName)s", + "%(senderName)s changed their profile picture.": "%(senderName)s เปลี่ยนรูปโปรไฟล์ของเขา", + "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s เปลี่ยนชื่อห้องไปเป็น %(roomName)s", + "%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s ลบชื่อห้อง", + "Changes your display nickname": "เปลี่ยนชื่อเล่นที่แสดงของคุณ", + "changing room on a RoomView is not supported": "ไม่รองรับการเปลี่ยนห้องใน RoomView", + "Clear Cache and Reload": "ล้างแคชแล้วโหลดใหม่", + "Clear Cache": "ล้างแคช", + "Click here": "คลิกที่นี่", + "Click here to fix": "คลิกที่นี่เพื่อแก้ไข", + "Click to mute audio": "คลิกที่นี่เพื่อปิดเสียง", + "Click to mute video": "คลิกที่นี่เพื่อปิดกล้อง", + "click to reveal": "คลิกเพื่อแสดง", + "Click to unmute video": "คลิกเพื่อเปิดกล้อง", + "Click to unmute audio": "คลิกเพื่อเปิดเสียง", + "Command error": "คำสั่งผิดพลาด", + "Commands": "คำสั่ง", + "Conference call failed.": "การโทรประชุมล้มเหลว", + "Conference calling is in development and may not be reliable.": "การโทรประชุมอยู่ระหว่างการพัฒนาและอาจพึ่งพาไม่ได้", + "Conference calls are not supported in encrypted rooms": "การโทรประชุมไม่รองรับห้องที่ถูกเข้ารหัส", + "Conference calls are not supported in this client": "ไคลเอนต์นี้ไม่รองรับการโทรประชุม", + "Confirm password": "ยืนยันรหัสผ่าน", + "Confirm your new password": "ยืนยันรหัสผ่านใหม่", + "Continue": "ดำเนินการต่อ", + "Create an account": "สร้างบัญชี", + "Cryptography": "วิทยาการเข้ารหัส", + "Current password": "รหัสผ่านปัจจุบัน", + "/ddg is not a command": "/ddg ไม่ใช่คำสั่ง", + "Deactivate Account": "ปิดการใช้งานบัญชี", + "Deactivate my account": "ปิดการใช้งานบัญชีของฉัน", + "decline": "ปฏิเสธ", + "Decryption error": "การถอดรหัสผิดพลาด", + "demote": "ลดขั้น", + "Device already verified!": "ยืนยันอุปกรณ์แล้ว!", + "Device key:": "Key อุปกรณ์:", + "Devices will not yet be able to decrypt history from before they joined the room": "อุปกรณ์จะยังไม่สามารถถอดรหัสประวัติแชทก่อนจะเข้าร่วมห้องได้", + "Direct chats": "แชทตรง", + "disabled": "ถูกปิดใช้งาน", + "Disinvite": "ถอนคำเชิญ", + "Display name": "ชื่อที่แสดง", + "Don't send typing notifications": "ไม่แจ้งว่ากำลังพิมพ์", + "Drop here to tag %(section)s": "ปล่อยที่นี่เพื่อแท็กว่า %(section)s", + "Ed25519 fingerprint": "ลายนิ้วมือ Ed25519", + "Email": "อีเมล", + "Email address": "ที่อยู่อีเมล", + "Email address (optional)": "ที่อยู่อีเมล (เลือกหรือไม่ก็ได้)", + "Email, name or matrix ID": "อีเมล ชื่อ หรือ ID matrix", + "Encrypted room": "ห้องที่ถูกเข้ารหัส", + "%(senderName)s ended the call.": "%(senderName)s จบการโทร", + "Enter Code": "กรอกรหัส", + "Error decrypting attachment": "การถอดรหัสไฟล์แนบผิดพลาด", + "Export": "ส่งออก", + "Failed to ban user": "การแบนผู้ใช้ล้มเหลว", + "Failed to change password. Is your password correct?": "การเปลี่ยนรหัสผ่านล้มเหลว รหัสผ่านของคุณถูกต้องหรือไม่?", + "Failed to delete device": "การลบอุปกรณ์ล้มเหลว", + "Failed to join room": "การเข้าร่วมห้องล้มเหลว", + "Failed to kick": "การเตะล้มเหลว", + "Failed to leave room": "การออกจากห้องล้มเหลว", + "Failed to lookup current room": "การหาห้องปัจจุบันล้มเหลว", + "Failed to register as guest:": "การลงทะเบียนในฐานะแขกล้มเหลว:", + "Failed to reject invite": "การปฏิเสธคำเชิญล้มเหลว", + "Failed to reject invitation": "การปฏิเสธคำเชิญล้มเหลว", + "Failed to save settings": "การบันทึกการตั้งค่าล้มเหลว", + "Failed to send email": "การส่งอีเมลล้มเหลว", + "Failed to send request.": "การส่งคำขอล้มเหลว", + "Failed to set display name": "การตั้งชื่อที่แสดงล้มเหลว", + "Failed to toggle moderator status": "การสลับสถานะผู้ช่วยดูแลล้มเหลว", + "Failed to unban": "การถอนแบนล้มเหลว", + "Failed to upload file": "การอัปโหลดไฟล์ล้มเหลว", + "Failed to verify email address: make sure you clicked the link in the email": "การยืนยันอีเมลล้มเหลว: กรุณาตรวจสอบว่าคุณคลิกลิงก์ในอีเมลแล้ว", + "Failure to create room": "การสร้างห้องล้มเหลว", + "favourite": "รายการโปรด", + "Favourites": "รายการโปรด", + "Filter room members": "กรองสมาชิกห้อง", + "Forget room": "ลืมห้อง", + "Forgot your password?": "ลิมรหัสผ่าน?", + "%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s จาก %(fromPowerLevel)s ไปเป็น %(toPowerLevel)s", + "had": "เคยมี", + "Hangup": "วางสาย", + "Historical": "ประวัติแชทเก่า", + "Homeserver is": "เซิร์ฟเวอร์บ้านคือ", + "Identity Server is": "เซิร์ฟเวอร์ยืนยันตัวตนคือ", + "I have verified my email address": "ฉันยืนยันที่อยู่อีเมลแล้ว", + "Import": "นำเข้า", + "Incorrect username and/or password.": "ชื่อผู้ใช้และ/หรือรหัสผ่านไม่ถูกต้อง", + "Incorrect verification code": "รหัสยืนยันไม่ถูกต้อง", + "Interface Language": "ภาษาอินเตอร์เฟส", + "Invalid alias format": "รูปแบบนามแฝงไม่ถูกต้อง", + "Invalid address format": "รูปแบบที่อยู่ไม่ถูกต้อง", + "Invalid Email Address": "ที่อยู่อีเมลไม่ถูกต้อง", + "Invalid file%(extra)s": "ไฟล์ %(extra)s ไม่ถูกต้อง", + "%(senderName)s invited %(targetName)s.": "%(senderName)s เชิญ %(targetName)s แล้ว", + "Invite new room members": "เชิญสมาชิกใหม่", + "Invited": "เชิญแล้ว", + "Invites": "คำเชิญ", + "Invites user with given id to current room": "เชิญผู้ใช้ พร้อม id ของห้องปัจจุบัน", + "'%(alias)s' is not a valid format for an address": "'%(alias)s' ไม่ใช่รูปแบบที่ถูกต้องสำหรับที่อยู่", + "'%(alias)s' is not a valid format for an alias": "'%(alias)s' ไม่ใช่รูปแบบที่ถูกต้องสำหรับนามแฝง", + "Sign in with": "เข้าสู่ระบบด้วย", + "Join Room": "เข้าร่วมห้อง", + "joined and left": "เข้าร่วมแล้วออกจากห้อง", + "joined": "เข้าร่วมแล้ว", + "%(targetName)s joined the room.": "%(targetName)s เข้าร่วมห้องแล้ว", + "Jump to first unread message.": "ข้ามไปยังข้อความแรกที่ยังไม่ได้อ่าน", + "%(senderName)s kicked %(targetName)s.": "%(senderName)s เตะ %(targetName)s แล้ว", + "Labs": "ห้องทดลอง", + "Leave room": "ออกจากห้อง", + "left and rejoined": "ออกแล้วกลับเข้าร่วมอีกครั้ง", + "left": "ออกไปแล้ว", + "%(targetName)s left the room.": "%(targetName)s ออกจากห้องไปแล้ว", + "List this room in %(domain)s's room directory?": "แสดงห้องนี้ในไดเรกทอรีห้องของ %(domain)s?", + "Logged in as:": "เข้าสู่ระบบในชื่อ:", + "Login as guest": "เข้าสู่ระบบในฐานะแขก", + "Logout": "ออกจากระบบ", + "Markdown is disabled": "ปิดใช้งาน Markdown แล้ว", + "Markdown is enabled": "เปิดใช้งาน Markdown แล้ว", + "Missing user_id in request": "ไม่พบ user_id ในคำขอ", + "Moderator": "ผู้ช่วยดูแล", + "my Matrix ID": "Matrix ID ของฉัน", + "New address (e.g. #foo:%(localDomain)s)": "ที่อยู่ใหม่ (เช่น #foo:%(localDomain)s)", + "New password": "รหัสผ่านใหม่", + "New passwords don't match": "รหัสผ่านใหม่ไม่ตรงกัน", + "New passwords must match each other.": "รหัสผ่านใหม่ทั้งสองช่องต้องตรงกัน", + "none": "ไม่มี", + "not set": "ไม่ได้ตั้ง", + "not specified": "ไม่ได้ระบุ", + "(not supported by this browser)": "(เบราว์เซอร์นี้ไม่รองรับ)", + "": "<ไม่รองรับ>", + "NOT verified": "ยังไม่ได้ยืนยัน", + "No more results": "ไม่มีผลลัพธ์อื่น", + "No results": "ไม่มีผลลัพธ์", + "Once you've followed the link it contains, click below": "หลังจากคุณเปิดลิงก์ข้างในแล้ว คลิกข้างล่าง", + "Passwords can't be empty": "รหัสผ่านต้องไม่ว่าง", + "People": "บุคคล", + "Permissions": "สิทธิ์", + "Phone": "โทรศัพท์", + "%(senderName)s placed a %(callType)s call.": "%(senderName)s ได้เริ่มการโทรแบบ%(callType)s", + "Please check your email and click on the link it contains. Once this is done, click continue.": "กรุณาเช็คอีเมลและคลิกลิงก์ข้างใน หลังจากนั้น คลิกดำเนินการต่อ", + "Privacy warning": "คำเตือนเกี่ยวกับความเป็นส่วนตัว", + "Privileged Users": "ผู้ใช้ที่มีสิทธิพิเศษ", + "Revoke Moderator": "เพิกถอนผู้ช่วยดูแล", + "Refer a friend to Riot:": "แนะนำเพื่อนให้รู้จัก Riot:", + "Registration required": "ต้องลงทะเบียนก่อน", + "rejected": "ปฏิเสธแล้ว", + "%(targetName)s rejected the invitation.": "%(targetName)s ปฏิเสธคำเชิญแล้ว", + "Reject invitation": "ปฏิเสธคำเชิญ", + "%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s ลบชื่อที่แสดงแล้ว (%(oldDisplayName)s)", + "%(senderName)s removed their profile picture.": "%(senderName)s ลบรูปโปรไฟล์ของเขาแล้ว", + "Remove %(threePid)s?": "ลบ %(threePid)s?", + "restore": "กู้คืน", + "Return to login screen": "กลับไปยังหน้าลงชื่อเข้าใช้", + "Riot does not have permission to send you notifications - please check your browser settings": "Riot ไม่มีสิทธิ์ส่งการแจ้งเตือน - กรุณาตรวจสอบการตั้งค่าเบราว์เซอร์ของคุณ", + "Riot was not given permission to send notifications - please try again": "Riot ไม่ได้รับสิทธิ์ส่งการแจ้งเตือน - กรุณาลองใหม่อีกครั้ง", + "Room Colour": "สีห้อง", + "Room name (optional)": "ชื้อห้อง (เลือกหรือไม่ก็ได้)", + "Rooms": "ห้องสนทนา", + "Save": "บันทึก", + "Scroll to bottom of page": "เลื่อนลงไปล่างสุด", + "Scroll to unread messages": "เลี่ยนไปที่ข้อความที่ยังไม่ได้อ่าน", + "Search failed": "การค้นหาล้มเหลว", + "Searches DuckDuckGo for results": "ค้นหาบน DuckDuckGo", + "Send a message (unencrypted)": "ส่งข้อความ (ไม่เข้ารหัส)", + "Send an encrypted message": "ส่งข้อความที่เข้ารหัสแล้ว", + "Send Invites": "ส่งคำเชิญ", + "sent an image": "ส่งรูป", + "%(senderDisplayName)s sent an image.": "%(senderDisplayName)s ได้ส่งรูป", + "%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.": "%(senderName)s ได้ส่งคำเชิญให้ %(targetDisplayName)s เข้าร่วมห้อง", + "sent a video": "ส่งวิดิโอ", + "Server error": "เซิร์ฟเวอร์ผิดพลาด", + "Server may be unavailable or overloaded": "เซิร์ฟเวอร์อาจไม่พร้อมใช้งานหรือทำงานหนักเกินไป", + "Server may be unavailable, overloaded, or search timed out :(": "เซิร์ฟเวอร์อาจไม่พร้อมใช้งาน ทำงานหนักเกินไป หรือการค้นหาหมดเวลา :(", + "Server may be unavailable, overloaded, or the file too big": "เซิร์ฟเวอร์อาจไม่พร้อมใช้งาน ทำงานหนักเกินไป หรือไฟล์ใหญ่เกินไป", + "Server may be unavailable, overloaded, or you hit a bug.": "เซิร์ฟเวอร์อาจไม่พร้อมใช้งาน ทำงานหนักเกินไป หรือเจอจุดบกพร่อง", + "Server unavailable, overloaded, or something else went wrong.": "เซิร์ฟเวอร์อาจไม่พร้อมใช้งาน ทำงานหนักเกินไป หรือบางอย่างผิดปกติ", + "%(senderName)s set a profile picture.": "%(senderName)s ตั้งรูปโปรไฟล์", + "%(senderName)s set their display name to %(displayName)s.": "%(senderName)s ตั้งชื่อที่แสดงเป็น %(displayName)s", + "Setting a user name will create a fresh account": "การตั้งชื่อผู้ใช้จะสร้างบัญชีใหม่", + "Show panel": "แสดงหน้าต่าง", + "Signed Out": "ออกจากระบบแล้ว", + "Sign in": "เข้าสู่ระบบ", + "Sign out": "ออกจากระบบ", + "Someone": "ใครบางคน", + "Always show message timestamps": "แสดงเวลาในแชทเสมอ", + "Show timestamps in 12 hour format (e.g. 2:30pm)": "แสดงเวลาในแชทในรูปแบบ 12 ชั่วโมง (เช่น 2:30pm)", + "Start a chat": "เริ่มแชท", + "Start Chat": "เริ่มแชท", + "Submit": "ส่ง", + "Success": "สำเร็จ", + "tag as %(tagName)s": "แท็กว่า %(tagName)s", + "tag direct chat": "แท็กว่าแชทตรง", + "Tagged as: ": "แท็กไว้ว่า: ", + "The main address for this room is": "ที่อยู่หลักของห้องนี้คือ", + "This email address is already in use": "ที่อยู่อีเมลถูกใช้แล้ว", + "This email address was not found": "ไม่พบที่อยู่อีเมล", + "%(actionVerb)s this person?": "%(actionVerb)s บุคคลนี้?", + "The file '%(fileName)s' failed to upload": "การอัปโหลดไฟล์ '%(fileName)s' ล้มเหลว", + "This Home Server does not support login using email address.": "เซิร์ฟเวอร์บ้านนี้ไม่รองรับการลงชื่อเข้าใช้ด้วยที่อยู่อีเมล", + "There was a problem logging in.": "มีปัญหาในการลงชื่อเข้าใช้", + "This room is private or inaccessible to guests. You may be able to join if you register": "ห้องนี้เป็นส่วนตัวหรือไม่อนุญาตให้แขกเข้าถึง คุณอาจเข้าร่วมได้หากคุณลงทะเบียน", + "this invitation?": "คำเชิญนี้?", + "This is a preview of this room. Room interactions have been disabled": "นี่คือตัวอย่างของห้อง การตอบสนองภายในห้องถูกปิดใช้งาน", + "This phone number is already in use": "หมายเลขโทรศัพท์นี้ถูกใช้งานแล้ว", + "This room's internal ID is": "ID ภายในของห้องนี้คือ", + "times": "เวลา" } From 205fd1fad47d78480fe741b444c3032ab4a34486 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 6 Jun 2017 17:22:49 +0100 Subject: [PATCH 08/12] Allow password reset when logged in --- src/components/structures/MatrixChat.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 0dedc02270..5deb74d905 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -369,7 +369,6 @@ module.exports = React.createClass({ this.notifyNewScreen('register'); break; case 'start_password_recovery': - if (this.state.loggedIn) return; this.setStateForNewScreen({ screen: 'forgot_password', }); From 00ccf4bb51910a92eda762a1e52452ce2838564d Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 5 Jun 2017 15:54:44 +0100 Subject: [PATCH 09/12] Revert "Call MatrixClient.clearStores on logout" This reverts commit c3d37c1ff9f3cb30834bb6e97c49845be9363b2f. This commit was introducing a bug where no rooms would be shown if you want straight to /#/login and logged in (because this causes a guest session to be created but the indexeddb store not to be cleared, so the new login picks up the stale indexedb sync data. --- src/Lifecycle.js | 38 ++++++------------------- src/components/structures/MatrixChat.js | 4 +-- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index a3bec14492..bf7b25fd2b 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -237,7 +237,7 @@ function _handleRestoreFailure(e) { + ' This is a once off; sorry for the inconvenience.', ); - _clearStorage(); + _clearLocalStorage(); return q.reject(new Error( _t('Unable to restore previous session') + ': ' + msg, @@ -258,7 +258,7 @@ function _handleRestoreFailure(e) { return def.promise.then((success) => { if (success) { // user clicked continue. - _clearStorage(); + _clearLocalStorage(); return false; } @@ -332,10 +332,6 @@ export function setLoggedIn(credentials) { } // stop any running clients before we create a new one with these new credentials - // - // XXX: why do we have any running clients here? Maybe on sign-in after - // initial use as a guest? but what about our persistent storage? we need to - // be careful not to leak e2e data created as one user into another session. stopMatrixClient(); MatrixClientPeg.replaceUsingCreds(credentials); @@ -406,19 +402,13 @@ export function startMatrixClient() { * a session has been logged out / ended. */ export function onLoggedOut() { - stopMatrixClient(true); + _clearLocalStorage(); + stopMatrixClient(); dis.dispatch({action: 'on_logged_out'}); } -function _clearStorage() { +function _clearLocalStorage() { Analytics.logout(); - - const cli = MatrixClientPeg.get(); - if (cli) { - // TODO: *really* ought to wait for the promise to complete - cli.clearStores().done(); - } - if (!window.localStorage) { return; } @@ -435,13 +425,9 @@ function _clearStorage() { } /** - * Stop all the background processes related to the current client. - * - * Optionally clears persistent stores. - * - * @param {boolean} clearStores true to clear the persistent stores. + * Stop all the background processes related to the current client */ -export function stopMatrixClient(clearStores) { +export function stopMatrixClient() { Notifier.stop(); UserActivity.stop(); Presence.stop(); @@ -450,13 +436,7 @@ export function stopMatrixClient(clearStores) { if (cli) { cli.stopClient(); cli.removeAllListeners(); + cli.store.deleteAllData(); + MatrixClientPeg.unset(); } - - if (clearStores) { - // note that we have to do this *after* stopping the client, but - // *before* clearing the MatrixClientPeg. - _clearStorage(); - } - - MatrixClientPeg.unset(); } diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 5deb74d905..e5181fc4ac 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -292,7 +292,7 @@ module.exports = React.createClass({ }, componentWillUnmount: function() { - Lifecycle.stopMatrixClient(false); + Lifecycle.stopMatrixClient(); dis.unregister(this.dispatcherRef); UDEHandler.stopListening(); window.removeEventListener("focus", this.onFocus); @@ -364,7 +364,7 @@ module.exports = React.createClass({ // is completed in another browser, we'll be 401ed for using // a guest access token for a non-guest account. // It will be restarted in onReturnToGuestClick - Lifecycle.stopMatrixClient(false); + Lifecycle.stopMatrixClient(); this.notifyNewScreen('register'); break; From 5191f93432e6f5961b1ff0c45b7e4f2b745e9949 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Jun 2017 17:40:30 +0100 Subject: [PATCH 10/12] Prepare changelog for v0.9.2 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870b42ecfc..66e4627afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Changes in [0.9.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.9.2) (2017-06-06) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.9.1...v0.9.2) + + * Hotfix: Allow password reset when logged in + [\#1044](https://github.com/matrix-org/matrix-react-sdk/pull/1044) + Changes in [0.9.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.9.1) (2017-06-02) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.9.0...v0.9.1) From 31f1e421f226bd471b68cdf1f69a8e049a443e5d Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Jun 2017 17:40:30 +0100 Subject: [PATCH 11/12] v0.9.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 97e9426243..e4f7d82984 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.9.1", + "version": "0.9.2", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 4127e7121c7dec20243ffe4bd90a0be4db046d79 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 7 Jun 2017 11:40:46 +0100 Subject: [PATCH 12/12] Translate src/components/structures Includes some pluralisation! Tested them manually to make sure they work. --- src/components/structures/CreateRoom.js | 2 +- src/components/structures/FilePanel.js | 6 ++-- src/components/structures/MatrixChat.js | 10 ++++++- src/components/structures/RoomStatusBar.js | 21 +++++++------- src/components/structures/RoomView.js | 6 ++-- src/components/structures/TimelinePanel.js | 4 +-- src/components/structures/UploadBar.js | 9 +++--- src/components/structures/UserSettings.js | 4 +-- src/components/structures/login/Login.js | 6 ++-- .../structures/login/PostRegistration.js | 2 +- src/i18n/strings/en_EN.json | 28 +++++++++++++------ 11 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/components/structures/CreateRoom.js b/src/components/structures/CreateRoom.js index 0a4a30d24a..3e291dfd94 100644 --- a/src/components/structures/CreateRoom.js +++ b/src/components/structures/CreateRoom.js @@ -246,7 +246,7 @@ module.exports = React.createClass({ return (
- +