Merge branch 'develop' into kegan/translation-tamarin

This commit is contained in:
Kegan Dougal 2017-06-08 14:19:56 +01:00
commit c57823a31d
51 changed files with 2759 additions and 795 deletions

2
.gitignore vendored
View file

@ -12,3 +12,5 @@ npm-debug.log
/.idea
/src/component-index.js
.DS_Store

View file

@ -66,6 +66,7 @@
"lodash": "^4.13.1",
"matrix-js-sdk": "0.7.10",
"optimist": "^0.6.1",
"prop-types": "^15.5.8",
"q": "^1.4.1",
"react": "^15.4.0",
"react-addons-css-transition-group": "15.3.2",

View file

@ -61,6 +61,11 @@ You are already in a call.
You cannot place VoIP calls in this browser.
You cannot place a call with yourself.
Your email address does not appear to be associated with a Matrix ID on this Homeserver.
Guest users can't upload files. Please register to upload.
Some of your messages have not been sent.
This room is private or inaccessible to guests. You may be able to join if you register.
Tried to load a specific point in this room's timeline, but was unable to find it.
Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.
EOT
)];
}

View file

@ -20,9 +20,9 @@ import PlatformPeg from './PlatformPeg';
import SdkConfig from './SdkConfig';
function getRedactedUrl() {
const base = window.location.pathname.split('/').slice(-2).join('/');
const redactedHash = window.location.hash.replace(/#\/(room|user)\/(.+)/, "#/$1/<redacted>");
return base + redactedHash;
// hardcoded url to make piwik happy
return 'https://riot.im/app/' + redactedHash;
}
const customVariables = {
@ -30,6 +30,7 @@ const customVariables = {
'App Version': 2,
'User Type': 3,
'Chosen Language': 4,
'Instance': 5,
};
@ -55,6 +56,7 @@ class Analytics {
* but this is second best, Piwik should not pull anything implicitly.
*/
disable() {
this.trackEvent('Analytics', 'opt-out');
this.disabled = true;
}
@ -86,6 +88,10 @@ class Analytics {
this._setVisitVariable('Chosen Language', getCurrentLanguage());
if (window.location.hostname === 'riot.im') {
this._setVisitVariable('Instance', window.location.pathname);
}
(function() {
const g = document.createElement('script');
const s = document.getElementsByTagName('script')[0];

View file

@ -187,6 +187,14 @@ function _registerAsGuest(hsUrl, isUrl, defaultDeviceDisplayName) {
// returns a promise which resolves to true if a session is found in
// localstorage
//
// N.B. Lifecycle.js should not maintain any further localStorage state, we
// are moving towards using SessionStore to keep track of state related
// to the current session (which is typically backed by localStorage).
//
// The plan is to gradually move the localStorage access done here into
// SessionStore to avoid bugs where the view becomes out-of-sync with
// localStorage (e.g. teamToken, isGuest etc.)
function _restoreFromLocalStorage() {
if (!localStorage) {
return q(false);
@ -314,6 +322,16 @@ export function setLoggedIn(credentials) {
localStorage.setItem("mx_device_id", credentials.deviceId);
}
// The user registered as a PWLU (PassWord-Less User), the generated password
// is cached here such that the user can change it at a later time.
if (credentials.password) {
// Update SessionStore
dis.dispatch({
action: 'cached_password',
cachedPassword: credentials.password,
});
}
console.log("Session persisted for %s", credentials.userId);
} catch (e) {
console.warn("Error using local storage: can't persist session!", e);

View file

@ -231,7 +231,7 @@ module.exports = React.createClass({
if (curr_phase == this.phases.ERROR) {
error_box = (
<div className="mx_Error">
{_t('An error occured: %(error_string)s', {error_string: this.state.error_string})}
{_t('An error occurred: %(error_string)s', {error_string: this.state.error_string})}
</div>
);
}

View file

@ -25,6 +25,8 @@ import PageTypes from '../../PageTypes';
import CallMediaHandler from '../../CallMediaHandler';
import sdk from '../../index';
import dis from '../../dispatcher';
import sessionStore from '../../stores/SessionStore';
import MatrixClientPeg from '../../MatrixClientPeg';
/**
* This is what our MatrixChat shows when we are logged in. The precise view is
@ -41,10 +43,13 @@ export default React.createClass({
propTypes: {
matrixClient: React.PropTypes.instanceOf(Matrix.MatrixClient).isRequired,
page_type: React.PropTypes.string.isRequired,
onRoomIdResolved: React.PropTypes.func,
onRoomCreated: React.PropTypes.func,
onUserSettingsClose: React.PropTypes.func,
// Called with the credentials of a registered user (if they were a ROU that
// transitioned to PWLU)
onRegistered: React.PropTypes.func,
teamToken: React.PropTypes.string,
// and lots and lots of other stuff.
@ -83,12 +88,32 @@ export default React.createClass({
CallMediaHandler.loadDevices();
document.addEventListener('keydown', this._onKeyDown);
this._sessionStore = sessionStore;
this._sessionStoreToken = this._sessionStore.addListener(
this._setStateFromSessionStore,
);
this._setStateFromSessionStore();
this._matrixClient.on("accountData", this.onAccountData);
},
componentWillUnmount: function() {
document.removeEventListener('keydown', this._onKeyDown);
this._matrixClient.removeListener("accountData", this.onAccountData);
if (this._sessionStoreToken) {
this._sessionStoreToken.remove();
}
},
// Child components assume that the client peg will not be null, so give them some
// sort of assurance here by only allowing a re-render if the client is truthy.
//
// This is required because `LoggedInView` maintains its own state and if this state
// updates after the client peg has been made null (during logout), then it will
// attempt to re-render and the children will throw errors.
shouldComponentUpdate: function() {
return Boolean(MatrixClientPeg.get());
},
getScrollStateForRoom: function(roomId) {
@ -102,10 +127,16 @@ export default React.createClass({
return this.refs.roomView.canResetTimeline();
},
_setStateFromSessionStore() {
this.setState({
userHasGeneratedPassword: Boolean(this._sessionStore.getCachedPassword()),
});
},
onAccountData: function(event) {
if (event.getType() === "im.vector.web.settings") {
this.setState({
useCompactLayout: event.getContent().useCompactLayout
useCompactLayout: event.getContent().useCompactLayout,
});
}
},
@ -180,8 +211,8 @@ export default React.createClass({
const RoomDirectory = sdk.getComponent('structures.RoomDirectory');
const HomePage = sdk.getComponent('structures.HomePage');
const MatrixToolbar = sdk.getComponent('globals.MatrixToolbar');
const GuestWarningBar = sdk.getComponent('globals.GuestWarningBar');
const NewVersionBar = sdk.getComponent('globals.NewVersionBar');
const PasswordNagBar = sdk.getComponent('globals.PasswordNagBar');
let page_element;
let right_panel = '';
@ -190,15 +221,14 @@ export default React.createClass({
case PageTypes.RoomView:
page_element = <RoomView
ref='roomView'
roomAddress={this.props.currentRoomAlias || this.props.currentRoomId}
autoJoin={this.props.autoJoin}
onRoomIdResolved={this.props.onRoomIdResolved}
onRegistered={this.props.onRegistered}
eventId={this.props.initialEventId}
thirdPartyInvite={this.props.thirdPartyInvite}
oobData={this.props.roomOobData}
highlightedEventId={this.props.highlightedEventId}
eventPixelOffset={this.props.initialEventPixelOffset}
key={this.props.currentRoomAlias || this.props.currentRoomId}
key={this.props.currentRoomId || 'roomview'}
opacity={this.props.middleOpacity}
collapsedRhs={this.props.collapse_rhs}
ConferenceHandler={this.props.ConferenceHandler}
@ -235,12 +265,18 @@ export default React.createClass({
break;
case PageTypes.HomePage:
// If team server config is present, pass the teamServerURL. props.teamToken
// must also be set for the team page to be displayed, otherwise the
// welcomePageUrl is used (which might be undefined).
const teamServerUrl = this.props.config.teamServerConfig ?
this.props.config.teamServerConfig.teamServerURL : null;
page_element = <HomePage
collapsedRhs={this.props.collapse_rhs}
teamServerUrl={this.props.config.teamServerConfig.teamServerURL}
teamServerUrl={teamServerUrl}
teamToken={this.props.teamToken}
/>
if (!this.props.collapse_rhs) right_panel = <RightPanel opacity={this.props.rightOpacity}/>
homePageUrl={this.props.config.welcomePageUrl}
/>;
break;
case PageTypes.UserView:
@ -249,16 +285,15 @@ export default React.createClass({
break;
}
const isGuest = this.props.matrixClient.isGuest();
var topBar;
if (this.props.hasNewVersion) {
topBar = <NewVersionBar version={this.props.version} newVersion={this.props.newVersion}
releaseNotes={this.props.newVersionReleaseNotes}
/>;
}
else if (this.props.matrixClient.isGuest()) {
topBar = <GuestWarningBar />;
}
else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
} else if (this.state.userHasGeneratedPassword) {
topBar = <PasswordNagBar />;
} else if (!isGuest && Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
topBar = <MatrixToolbar />;
}
@ -278,7 +313,6 @@ export default React.createClass({
selectedRoom={this.props.currentRoomId}
collapsed={this.props.collapse_lhs || false}
opacity={this.props.leftOpacity}
teamToken={this.props.teamToken}
/>
<main className='mx_MatrixChat_middlePanel'>
{page_element}

View file

@ -34,6 +34,9 @@ import sdk from '../../index';
import * as Rooms from '../../Rooms';
import linkifyMatrix from "../../linkify-matrix";
import * as Lifecycle from '../../Lifecycle';
// LifecycleStore is not used but does listen to and dispatch actions
import LifecycleStore from '../../stores/LifecycleStore';
import RoomViewStore from '../../stores/RoomViewStore';
import PageTypes from '../../PageTypes';
import createRoom from "../../createRoom";
@ -102,9 +105,6 @@ module.exports = React.createClass({
// What the LoggedInView would be showing if visible
page_type: null,
// If we are viewing a room by alias, this contains the alias
currentRoomAlias: null,
// The ID of the room we're viewing. This is either populated directly
// in the case where we view a room by ID or by RoomView when it resolves
// what ID an alias points at.
@ -191,6 +191,9 @@ module.exports = React.createClass({
componentWillMount: function() {
SdkConfig.put(this.props.config);
RoomViewStore.addListener(this._onRoomViewStoreUpdated);
this._onRoomViewStoreUpdated();
if (!UserSettingsStore.getLocalSetting('analyticsOptOut', false)) Analytics.enable();
// Used by _viewRoom before getting state from sync
@ -322,7 +325,6 @@ module.exports = React.createClass({
onAction: function(payload) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
const TextInputDialog = sdk.getComponent("dialogs.TextInputDialog");
switch (payload.action) {
case 'logout':
@ -374,6 +376,11 @@ module.exports = React.createClass({
});
this.notifyNewScreen('forgot_password');
break;
case 'start_chat':
createRoom({
dmUserId: payload.user_id,
});
break;
case 'leave_room':
this._leaveRoom(payload.room_id);
break;
@ -434,37 +441,36 @@ module.exports = React.createClass({
this._viewIndexedRoom(payload.roomIndex);
break;
case 'view_user_settings':
if (MatrixClientPeg.get().isGuest()) {
dis.dispatch({
action: 'do_after_sync_prepared',
deferred_action: {
action: 'view_user_settings',
},
});
dis.dispatch({action: 'view_set_mxid'});
break;
}
this._setPage(PageTypes.UserSettings);
this.notifyNewScreen('settings');
break;
case 'view_create_room':
//this._setPage(PageTypes.CreateRoom);
//this.notifyNewScreen('new');
Modal.createDialog(TextInputDialog, {
title: _t('Create Room'),
description: _t('Room name (optional)'),
button: _t('Create Room'),
onFinished: (shouldCreate, name) => {
if (shouldCreate) {
const createOpts = {};
if (name) createOpts.name = name;
createRoom({createOpts}).done();
}
},
});
this._createRoom();
break;
case 'view_room_directory':
this._setPage(PageTypes.RoomDirectory);
this.notifyNewScreen('directory');
break;
case 'view_home_page':
if (!this._teamToken) {
dis.dispatch({action: 'view_room_directory'});
return;
}
this._setPage(PageTypes.HomePage);
this.notifyNewScreen('home');
break;
case 'view_set_mxid':
this._setMxId();
break;
case 'view_start_chat_or_reuse':
this._chatCreateOrReuse(payload.user_id);
break;
case 'view_create_chat':
this._createChat();
break;
@ -533,6 +539,10 @@ module.exports = React.createClass({
}
},
_onRoomViewStoreUpdated: function() {
this.setState({ currentRoomId: RoomViewStore.getRoomId() });
},
_setPage: function(pageType) {
this.setState({
page_type: pageType,
@ -555,6 +565,7 @@ module.exports = React.createClass({
this.notifyNewScreen('register');
},
// TODO: Move to RoomViewStore
_viewNextRoom: function(roomIndexDelta) {
const allRooms = RoomListSorter.mostRecentActivityFirst(
MatrixClientPeg.get().getRooms(),
@ -568,15 +579,22 @@ module.exports = React.createClass({
}
roomIndex = (roomIndex + roomIndexDelta) % allRooms.length;
if (roomIndex < 0) roomIndex = allRooms.length - 1;
this._viewRoom({ room_id: allRooms[roomIndex].roomId });
dis.dispatch({
action: 'view_room',
room_id: allRooms[roomIndex].roomId,
});
},
// TODO: Move to RoomViewStore
_viewIndexedRoom: function(roomIndex) {
const allRooms = RoomListSorter.mostRecentActivityFirst(
MatrixClientPeg.get().getRooms(),
);
if (allRooms[roomIndex]) {
this._viewRoom({ room_id: allRooms[roomIndex].roomId });
dis.dispatch({
action: 'view_room',
room_id: allRooms[roomIndex].roomId,
});
}
},
@ -626,6 +644,17 @@ module.exports = React.createClass({
}
}
if (roomInfo.room_alias) {
console.log(
`Switching to room alias ${roomInfo.room_alias} at event ` +
newState.initialEventId,
);
} else {
console.log(`Switching to room id ${roomInfo.room_id} at event ` +
newState.initialEventId,
);
}
// Wait for the first sync to complete so that if a room does have an alias,
// it would have been retrieved.
let waitFor = q(null);
@ -660,7 +689,41 @@ module.exports = React.createClass({
});
},
_setMxId: function() {
const SetMxIdDialog = sdk.getComponent('views.dialogs.SetMxIdDialog');
const close = Modal.createDialog(SetMxIdDialog, {
homeserverUrl: MatrixClientPeg.get().getHomeserverUrl(),
onFinished: (submitted, credentials) => {
if (!submitted) {
dis.dispatch({
action: 'cancel_after_sync_prepared',
});
return;
}
this.onRegistered(credentials);
},
onDifferentServerClicked: (ev) => {
dis.dispatch({action: 'start_registration'});
close();
},
onLoginClick: (ev) => {
dis.dispatch({action: 'start_login'});
close();
},
}).close;
},
_createChat: function() {
if (MatrixClientPeg.get().isGuest()) {
dis.dispatch({
action: 'do_after_sync_prepared',
deferred_action: {
action: 'view_create_chat',
},
});
dis.dispatch({action: 'view_set_mxid'});
return;
}
const ChatInviteDialog = sdk.getComponent("dialogs.ChatInviteDialog");
Modal.createDialog(ChatInviteDialog, {
title: _t('Start a chat'),
@ -670,6 +733,81 @@ module.exports = React.createClass({
});
},
_createRoom: function() {
if (MatrixClientPeg.get().isGuest()) {
dis.dispatch({
action: 'do_after_sync_prepared',
deferred_action: {
action: 'view_create_room',
},
});
dis.dispatch({action: 'view_set_mxid'});
return;
}
const TextInputDialog = sdk.getComponent("dialogs.TextInputDialog");
Modal.createDialog(TextInputDialog, {
title: _t('Create Room'),
description: _t('Room name (optional)'),
button: _t('Create Room'),
onFinished: (should_create, name) => {
if (should_create) {
const createOpts = {};
if (name) createOpts.name = name;
createRoom({createOpts}).done();
}
},
});
},
_chatCreateOrReuse: function(userId) {
const ChatCreateOrReuseDialog = sdk.getComponent(
'views.dialogs.ChatCreateOrReuseDialog',
);
// Use a deferred action to reshow the dialog once the user has registered
if (MatrixClientPeg.get().isGuest()) {
// No point in making 2 DMs with welcome bot. This assumes view_set_mxid will
// result in a new DM with the welcome user.
if (userId !== this.props.config.welcomeUserId) {
dis.dispatch({
action: 'do_after_sync_prepared',
deferred_action: {
action: 'view_start_chat_or_reuse',
user_id: userId,
},
});
}
dis.dispatch({
action: 'view_set_mxid',
});
return;
}
const close = Modal.createDialog(ChatCreateOrReuseDialog, {
userId: userId,
onFinished: (success) => {
if (!success) {
// Dialog cancelled, default to home
dis.dispatch({ action: 'view_home_page' });
}
},
onNewDMClick: () => {
dis.dispatch({
action: 'start_chat',
user_id: userId,
});
// Close the dialog, indicate success (calls onFinished(true))
close(true);
},
onExistingRoomSelected: (roomId) => {
dis.dispatch({
action: 'view_room',
room_id: roomId,
});
close(true);
},
}).close;
},
_invite: function(roomId) {
const ChatInviteDialog = sdk.getComponent("dialogs.ChatInviteDialog");
Modal.createDialog(ChatInviteDialog, {
@ -703,7 +841,7 @@ module.exports = React.createClass({
d.then(() => {
modal.close();
if (this.currentRoomId === roomId) {
if (this.state.currentRoomId === roomId) {
dis.dispatch({action: 'view_next_room'});
}
}, (err) => {
@ -798,12 +936,27 @@ module.exports = React.createClass({
this._teamToken = teamToken;
dis.dispatch({action: 'view_home_page'});
} else if (this._is_registered) {
this._is_registered = false;
// reset the 'have completed first sync' flag,
// since we've just logged in and will be about to sync
this.firstSyncComplete = false;
this.firstSyncPromise = q.defer();
// Set the display name = user ID localpart
MatrixClientPeg.get().setDisplayName(
MatrixClientPeg.get().getUserIdLocalpart(),
);
if (this.props.config.welcomeUserId && getCurrentLanguage().startsWith("en")) {
createRoom({dmUserId: this.props.config.welcomeUserId});
createRoom({
dmUserId: this.props.config.welcomeUserId,
// Only view the welcome user if we're NOT looking at a room
andView: !this.state.currentRoomId,
});
return;
}
// The user has just logged in after registering
dis.dispatch({action: 'view_room_directory'});
dis.dispatch({action: 'view_home_page'});
} else {
this._showScreenAfterLogin();
}
@ -825,12 +978,8 @@ module.exports = React.createClass({
action: 'view_room',
room_id: localStorage.getItem('mx_last_room_id'),
});
} else if (this._teamToken) {
// Team token might be set if we're a guest.
// Guests do not call _onLoggedIn with a teamToken
dis.dispatch({action: 'view_home_page'});
} else {
dis.dispatch({action: 'view_room_directory'});
dis.dispatch({action: 'view_home_page'});
}
},
@ -844,7 +993,6 @@ module.exports = React.createClass({
ready: false,
collapse_lhs: false,
collapse_rhs: false,
currentRoomAlias: null,
currentRoomId: null,
page_type: PageTypes.RoomDirectory,
});
@ -882,6 +1030,12 @@ module.exports = React.createClass({
});
cli.on('sync', function(state, prevState) {
// LifecycleStore and others cannot directly subscribe to matrix client for
// events because flux only allows store state changes during flux dispatches.
// So dispatch directly from here. Ideally we'd use a SyncStateStore that
// would do this dispatch and expose the sync state itself (by listening to
// its own dispatch).
dis.dispatch({action: 'sync_state', prevState, state});
self.updateStatusIndicator(state, prevState);
if (state === "SYNCING" && prevState === "SYNCING") {
return;
@ -951,6 +1105,11 @@ module.exports = React.createClass({
dis.dispatch({
action: 'view_home_page',
});
} else if (screen == 'start') {
this.showScreen('home');
dis.dispatch({
action: 'view_set_mxid',
});
} else if (screen == 'directory') {
dis.dispatch({
action: 'view_room_directory',
@ -994,6 +1153,12 @@ module.exports = React.createClass({
}
} else if (screen.indexOf('user/') == 0) {
const userId = screen.substring(5);
if (params.action === 'chat') {
this._chatCreateOrReuse(userId);
return;
}
this.setState({ viewUserId: userId });
this._setPage(PageTypes.UserView);
this.notifyNewScreen('user/' + userId);
@ -1090,6 +1255,8 @@ module.exports = React.createClass({
},
onRegistered: function(credentials, teamToken) {
// XXX: These both should be in state or ideally store(s) because we risk not
// rendering the most up-to-date view of state otherwise.
// teamToken may not be truthy
this._teamToken = teamToken;
this._is_registered = true;
@ -1159,13 +1326,6 @@ module.exports = React.createClass({
}
},
onRoomIdResolved: function(roomId) {
// It's the RoomView's resposibility to look up room aliases, but we need the
// ID to pass into things like the Member List, so the Room View tells us when
// its done that resolution so we can display things that take a room ID.
this.setState({currentRoomId: roomId});
},
_makeRegistrationUrl: function(params) {
if (this.props.startingFragmentQueryParams.referrer) {
params.referrer = this.props.startingFragmentQueryParams.referrer;
@ -1207,9 +1367,10 @@ module.exports = React.createClass({
const LoggedInView = sdk.getComponent('structures.LoggedInView');
return (
<LoggedInView ref="loggedInView" matrixClient={MatrixClientPeg.get()}
onRoomIdResolved={this.onRoomIdResolved}
onRoomCreated={this.onRoomCreated}
onUserSettingsClose={this.onUserSettingsClose}
onRegistered={this.onRegistered}
currentRoomId={this.state.currentRoomId}
teamToken={this._teamToken}
{...this.props}
{...this.state}

View file

@ -45,6 +45,8 @@ import KeyCode from '../../KeyCode';
import UserProvider from '../../autocomplete/UserProvider';
import RoomViewStore from '../../stores/RoomViewStore';
var DEBUG = false;
if (DEBUG) {
@ -59,16 +61,9 @@ module.exports = React.createClass({
propTypes: {
ConferenceHandler: React.PropTypes.any,
// Either a room ID or room alias for the room to display.
// If the room is being displayed as a result of the user clicking
// on a room alias, the alias should be supplied. Otherwise, a room
// ID should be supplied.
roomAddress: React.PropTypes.string.isRequired,
// If a room alias is passed to roomAddress, a function can be
// provided here that will be called with the ID of the room
// once it has been resolved.
onRoomIdResolved: React.PropTypes.func,
// Called with the credentials of a registered user (if they were a ROU that
// transitioned to PWLU)
onRegistered: React.PropTypes.func,
// An object representing a third party invite to join this room
// Fields:
@ -125,6 +120,7 @@ module.exports = React.createClass({
room: null,
roomId: null,
roomLoading: true,
peekLoading: false,
forwardingEvent: null,
editingRoomSettings: false,
@ -172,40 +168,28 @@ module.exports = React.createClass({
onClickCompletes: true,
onStateChange: (isCompleting) => {
this.forceUpdate();
}
},
});
if (this.props.roomAddress[0] == '#') {
// we always look up the alias from the directory server:
// we want the room that the given alias is pointing to
// right now. We may have joined that alias before but there's
// no guarantee the alias hasn't subsequently been remapped.
MatrixClientPeg.get().getRoomIdForAlias(this.props.roomAddress).done((result) => {
if (this.props.onRoomIdResolved) {
this.props.onRoomIdResolved(result.room_id);
// Start listening for RoomViewStore updates
this._roomStoreToken = RoomViewStore.addListener(this._onRoomViewStoreUpdate);
this._onRoomViewStoreUpdate(true);
},
_onRoomViewStoreUpdate: function(initial) {
if (this.unmounted) {
return;
}
var room = MatrixClientPeg.get().getRoom(result.room_id);
this.setState({
room: room,
roomId: result.room_id,
roomLoading: !room,
unsentMessageError: this._getUnsentMessageError(room),
}, this._onHaveRoom);
}, (err) => {
this.setState({
roomLoading: false,
roomLoadError: err,
roomId: RoomViewStore.getRoomId(),
roomAlias: RoomViewStore.getRoomAlias(),
roomLoading: RoomViewStore.isRoomLoading(),
roomLoadError: RoomViewStore.getRoomLoadError(),
joining: RoomViewStore.isJoining(),
}, () => {
this._onHaveRoom();
this.onRoom(MatrixClientPeg.get().getRoom(this.state.roomId));
});
});
} else {
var room = MatrixClientPeg.get().getRoom(this.props.roomAddress);
this.setState({
roomId: this.props.roomAddress,
room: room,
roomLoading: !room,
unsentMessageError: this._getUnsentMessageError(room),
}, this._onHaveRoom);
}
},
_onHaveRoom: function() {
@ -223,26 +207,29 @@ module.exports = React.createClass({
// NB. We peek if we are not in the room, although if we try to peek into
// a room in which we have a member event (ie. we've left) synapse will just
// send us the same data as we get in the sync (ie. the last events we saw).
var user_is_in_room = null;
if (this.state.room) {
user_is_in_room = this.state.room.hasMembershipState(
MatrixClientPeg.get().credentials.userId, 'join'
const room = MatrixClientPeg.get().getRoom(this.state.roomId);
let isUserJoined = null;
if (room) {
isUserJoined = room.hasMembershipState(
MatrixClientPeg.get().credentials.userId, 'join',
);
this._updateAutoComplete();
this.tabComplete.loadEntries(this.state.room);
this._updateAutoComplete(room);
this.tabComplete.loadEntries(room);
}
if (!user_is_in_room && this.state.roomId) {
if (!isUserJoined && !this.state.joining && this.state.roomId) {
if (this.props.autoJoin) {
this.onJoinButtonClicked();
} else if (this.state.roomId) {
console.log("Attempting to peek into room %s", this.state.roomId);
this.setState({
peekLoading: true,
});
MatrixClientPeg.get().peekInRoom(this.state.roomId).then((room) => {
this.setState({
room: room,
roomLoading: false,
peekLoading: false,
});
this._onRoomLoaded(room);
}, (err) => {
@ -252,16 +239,19 @@ module.exports = React.createClass({
if (err.errcode == "M_GUEST_ACCESS_FORBIDDEN") {
// This is fine: the room just isn't peekable (we assume).
this.setState({
roomLoading: false,
peekLoading: false,
});
} else {
throw err;
}
}).done();
}
} else if (user_is_in_room) {
} else if (isUserJoined) {
MatrixClientPeg.get().stopPeeking();
this._onRoomLoaded(this.state.room);
this.setState({
unsentMessageError: this._getUnsentMessageError(room),
});
this._onRoomLoaded(room);
}
},
@ -298,10 +288,6 @@ module.exports = React.createClass({
},
componentWillReceiveProps: function(newProps) {
if (newProps.roomAddress != this.props.roomAddress) {
throw new Error(_t("changing room on a RoomView is not supported"));
}
if (newProps.eventId != this.props.eventId) {
// when we change focussed event id, hide the search results.
this.setState({searchResults: null});
@ -362,6 +348,11 @@ module.exports = React.createClass({
document.removeEventListener("keydown", this.onKeyDown);
// Remove RoomStore listener
if (this._roomStoreToken) {
this._roomStoreToken.remove();
}
// cancel any pending calls to the rate_limited_funcs
this._updateRoomMembers.cancelPendingCall();
@ -527,7 +518,7 @@ module.exports = React.createClass({
this._updatePreviewUrlVisibility(room);
},
_warnAboutEncryption: function (room) {
_warnAboutEncryption: function(room) {
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) {
return;
}
@ -608,20 +599,14 @@ module.exports = React.createClass({
},
onRoom: function(room) {
// This event is fired when the room is 'stored' by the JS SDK, which
// means it's now a fully-fledged room object ready to be used, so
// set it in our state and start using it (ie. init the timeline)
// This will happen if we start off viewing a room we're not joined,
// then join it whilst RoomView is looking at that room.
if (!this.state.room && room.roomId == this._joiningRoomId) {
this._joiningRoomId = undefined;
if (!room || room.roomId !== this.state.roomId) {
return;
}
this.setState({
room: room,
joining: false,
});
}, () => {
this._onRoomLoaded(room);
}
});
},
updateTint: function() {
@ -687,7 +672,7 @@ module.exports = React.createClass({
// refresh the tab complete list
this.tabComplete.loadEntries(this.state.room);
this._updateAutoComplete();
this._updateAutoComplete(this.state.room);
// if we are now a member of the room, where we were not before, that
// means we have finished joining a room we were previously peeking
@ -704,10 +689,6 @@ module.exports = React.createClass({
// compatability workaround, let's not bother.
Rooms.setDMRoom(this.state.room.roomId, me.events.member.getSender()).done();
}
this.setState({
joining: false
});
}
}, 500),
@ -782,41 +763,62 @@ module.exports = React.createClass({
},
onJoinButtonClicked: function(ev) {
var self = this;
const cli = MatrixClientPeg.get();
var cli = MatrixClientPeg.get();
var display_name_promise = q();
// if this is the first room we're joining, check the user has a display name
// and if they don't, prompt them to set one.
// NB. This unfortunately does not re-use the ChangeDisplayName component because
// it doesn't behave quite as desired here (we want an input field here rather than
// content-editable, and we want a default).
if (cli.getRooms().filter((r) => {
return r.hasMembershipState(cli.credentials.userId, "join");
})) {
display_name_promise = cli.getProfileInfo(cli.credentials.userId).then((result) => {
if (!result.displayname) {
var SetDisplayNameDialog = sdk.getComponent('views.dialogs.SetDisplayNameDialog');
var dialog_defer = q.defer();
Modal.createDialog(SetDisplayNameDialog, {
currentDisplayName: result.displayname,
onFinished: (submitted, newDisplayName) => {
// If the user is a ROU, allow them to transition to a PWLU
if (cli && cli.isGuest()) {
// Join this room once the user has registered and logged in
const signUrl = this.props.thirdPartyInvite ?
this.props.thirdPartyInvite.inviteSignUrl : undefined;
dis.dispatch({
action: 'do_after_sync_prepared',
deferred_action: {
action: 'join_room',
opts: { inviteSignUrl: signUrl },
},
});
// Don't peek whilst registering otherwise getPendingEventList complains
// Do this by indicating our intention to join
dis.dispatch({
action: 'will_join',
});
const SetMxIdDialog = sdk.getComponent('views.dialogs.SetMxIdDialog');
const close = Modal.createDialog(SetMxIdDialog, {
homeserverUrl: cli.getHomeserverUrl(),
onFinished: (submitted, credentials) => {
if (submitted) {
cli.setDisplayName(newDisplayName).done(() => {
dialog_defer.resolve();
this.props.onRegistered(credentials);
} else {
dis.dispatch({
action: 'cancel_after_sync_prepared',
});
dis.dispatch({
action: 'cancel_join',
});
}
else {
dialog_defer.reject();
}
}
});
return dialog_defer.promise;
}
});
},
onDifferentServerClicked: (ev) => {
dis.dispatch({action: 'start_registration'});
close();
},
onLoginClick: (ev) => {
dis.dispatch({action: 'start_login'});
close();
},
}).close;
return;
}
display_name_promise.then(() => {
q().then(() => {
const signUrl = this.props.thirdPartyInvite ?
this.props.thirdPartyInvite.inviteSignUrl : undefined;
dis.dispatch({
action: 'join_room',
opts: { inviteSignUrl: signUrl },
});
// if this is an invite and has the 'direct' hint set, mark it as a DM room now.
if (this.state.room) {
const me = this.state.room.getMember(MatrixClientPeg.get().credentials.userId);
@ -828,72 +830,7 @@ module.exports = React.createClass({
}
}
}
return q();
}).then(() => {
var sign_url = this.props.thirdPartyInvite ? this.props.thirdPartyInvite.inviteSignUrl : undefined;
return MatrixClientPeg.get().joinRoom(this.props.roomAddress,
{ inviteSignUrl: sign_url } );
}).then(function(resp) {
var roomId = resp.roomId;
// It is possible that there is no Room yet if state hasn't come down
// from /sync - joinRoom will resolve when the HTTP request to join succeeds,
// NOT when it comes down /sync. If there is no room, we'll keep the
// joining flag set until we see it.
// We'll need to initialise the timeline when joining, but due to
// the above, we can't do it here: we do it in onRoom instead,
// once we have a useable room object.
var room = MatrixClientPeg.get().getRoom(roomId);
if (!room) {
// wait for the room to turn up in onRoom.
self._joiningRoomId = roomId;
} else {
// we've got a valid room, but that might also just mean that
// it was peekable (so we had one before anyway). If we are
// not yet a member of the room, we will need to wait for that
// to happen, in onRoomStateMember.
var me = MatrixClientPeg.get().credentials.userId;
self.setState({
joining: !room.hasMembershipState(me, "join"),
room: room
});
}
}).catch(function(error) {
self.setState({
joining: false,
joinError: error
});
if (!error) return;
// https://matrix.org/jira/browse/SYN-659
// Need specific error message if joining a room is refused because the user is a guest and guest access is not allowed
if (
error.errcode == 'M_GUEST_ACCESS_FORBIDDEN' ||
(
error.errcode == 'M_FORBIDDEN' &&
MatrixClientPeg.get().isGuest()
)
) {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Failed to join the room"),
description: _t("This room is private or inaccessible to guests. You may be able to join if you register.")
});
} else {
var msg = error.message ? error.message : JSON.stringify(error);
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: _t("Failed to join room"),
description: msg,
});
}
}).done();
this.setState({
joining: true
});
},
@ -945,11 +882,7 @@ module.exports = React.createClass({
uploadFile: function(file) {
if (MatrixClientPeg.get().isGuest()) {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Please Register"),
description: _t("Guest users can't upload files. Please register to upload.")
});
dis.dispatch({action: 'view_set_mxid'});
return;
}
@ -1474,9 +1407,9 @@ module.exports = React.createClass({
}
},
_updateAutoComplete: function() {
_updateAutoComplete: function(room) {
const myUserId = MatrixClientPeg.get().credentials.userId;
const members = this.state.room.getJoinedMembers().filter(function(member) {
const members = room.getJoinedMembers().filter(function(member) {
if (member.userId !== myUserId) return true;
});
UserProvider.getInstance().setUserList(members);
@ -1496,7 +1429,7 @@ module.exports = React.createClass({
const TimelinePanel = sdk.getComponent("structures.TimelinePanel");
if (!this.state.room) {
if (this.state.roomLoading) {
if (this.state.roomLoading || this.state.peekLoading) {
return (
<div className="mx_RoomView">
<Loader />
@ -1514,7 +1447,7 @@ module.exports = React.createClass({
// We have no room object for this room, only the ID.
// We've got to this room by following a link, possibly a third party invite.
var room_alias = this.props.roomAddress[0] == '#' ? this.props.roomAddress : null;
var room_alias = this.state.room_alias;
return (
<div className="mx_RoomView">
<RoomHeader ref="header"

View file

@ -902,6 +902,9 @@ var TimelinePanel = React.createClass({
var onError = (error) => {
this.setState({timelineLoading: false});
console.error(
`Error loading timeline panel at ${eventId}: ${error}`,
);
var msg = error.message ? error.message : JSON.stringify(error);
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");

View file

@ -311,11 +311,7 @@ module.exports = React.createClass({
onAvatarPickerClick: function(ev) {
if (MatrixClientPeg.get().isGuest()) {
const NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Please Register"),
description: _t("Guests can't set avatars. Please register."),
});
dis.dispatch({action: 'view_set_mxid'});
return;
}
@ -395,6 +391,7 @@ module.exports = React.createClass({
title: _t("Success"),
description: _t("Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them") + ".",
});
dis.dispatch({action: 'password_changed'});
},
onUpgradeClicked: function() {
@ -807,11 +804,7 @@ module.exports = React.createClass({
onChange={(e) => {
if (MatrixClientPeg.get().isGuest()) {
e.target.checked = false;
const NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Please Register"),
description: _t("Guests can't use labs features. Please register."),
});
dis.dispatch({action: 'view_set_mxid'});
return;
}

View file

@ -97,7 +97,7 @@ module.exports = React.createClass({
this.props.teamServerConfig.teamServerURL &&
!this._rtsClient
) {
this._rtsClient = new RtsClient(this.props.teamServerConfig.teamServerURL);
this._rtsClient = this.props.rtsClient || new RtsClient(this.props.teamServerConfig.teamServerURL);
this.setState({
teamServerBusy: true,
@ -220,7 +220,6 @@ module.exports = React.createClass({
}
trackPromise.then((teamToken) => {
console.info('Team token promise',teamToken);
this.props.onLoggedIn({
userId: response.user_id,
deviceId: response.device_id,

View file

@ -32,6 +32,7 @@ module.exports = React.createClass({
urls: React.PropTypes.array, // [highest_priority, ... , lowest_priority]
width: React.PropTypes.number,
height: React.PropTypes.number,
// XXX resizeMethod not actually used.
resizeMethod: React.PropTypes.string,
defaultToInitialLetter: React.PropTypes.bool // true to add default url
},

View file

@ -16,37 +16,30 @@ limitations under the License.
import React from 'react';
import sdk from '../../../index';
import dis from '../../../dispatcher';
import { _t } from '../../../languageHandler';
import MatrixClientPeg from '../../../MatrixClientPeg';
import DMRoomMap from '../../../utils/DMRoomMap';
import AccessibleButton from '../elements/AccessibleButton';
import Unread from '../../../Unread';
import classNames from 'classnames';
import createRoom from '../../../createRoom';
export default class ChatCreateOrReuseDialog extends React.Component {
constructor(props) {
super(props);
this.onNewDMClick = this.onNewDMClick.bind(this);
this.onRoomTileClick = this.onRoomTileClick.bind(this);
this.state = {
tiles: [],
profile: {
displayName: null,
avatarUrl: null,
},
profileError: null,
};
}
onNewDMClick() {
createRoom({dmUserId: this.props.userId});
this.props.onFinished(true);
}
onRoomTileClick(roomId) {
dis.dispatch({
action: 'view_room',
room_id: roomId,
});
this.props.onFinished(true);
}
render() {
componentWillMount() {
const client = MatrixClientPeg.get();
const dmRoomMap = new DMRoomMap(client);
@ -71,40 +64,123 @@ export default class ChatCreateOrReuseDialog extends React.Component {
highlight={highlight}
isInvite={me.membership == "invite"}
onClick={this.onRoomTileClick}
/>
/>,
);
}
}
this.setState({
tiles: tiles,
});
if (tiles.length === 0) {
this.setState({
busyProfile: true,
});
MatrixClientPeg.get().getProfileInfo(this.props.userId).done((resp) => {
const profile = {
displayName: resp.displayname,
avatarUrl: null,
};
if (resp.avatar_url) {
profile.avatarUrl = MatrixClientPeg.get().mxcUrlToHttp(
resp.avatar_url, 48, 48, "crop",
);
}
this.setState({
busyProfile: false,
profile: profile,
});
}, (err) => {
console.error(
'Unable to get profile for user ' + this.props.userId + ':',
err,
);
this.setState({
busyProfile: false,
profileError: err,
});
});
}
}
onRoomTileClick(roomId) {
this.props.onExistingRoomSelected(roomId);
}
render() {
let title = '';
let content = null;
if (this.state.tiles.length > 0) {
// Show the existing rooms with a "+" to add a new dm
title = _t('Create a new chat or reuse an existing one');
const labelClasses = classNames({
mx_MemberInfo_createRoom_label: true,
mx_RoomTile_name: true,
});
const startNewChat = <AccessibleButton
className="mx_MemberInfo_createRoom"
onClick={this.onNewDMClick}
onClick={this.props.onNewDMClick}
>
<div className="mx_RoomTile_avatar">
<img src="img/create-big.svg" width="26" height="26" />
</div>
<div className={labelClasses}><i>{_t("Start new chat")}</i></div>
<div className={labelClasses}><i>{ _t("Start new chat") }</i></div>
</AccessibleButton>;
content = <div className="mx_Dialog_content">
{ _t('You already have existing direct chats with this user:') }
<div className="mx_ChatCreateOrReuseDialog_tiles">
{ this.state.tiles }
{ startNewChat }
</div>
</div>;
} else {
// Show the avatar, name and a button to confirm that a new chat is requested
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const Spinner = sdk.getComponent('elements.Spinner');
title = _t('Start chatting');
let profile = null;
if (this.state.busyProfile) {
profile = <Spinner />;
} else if (this.state.profileError) {
profile = <div className="error">
Unable to load profile information for { this.props.userId }
</div>;
} else {
profile = <div className="mx_ChatCreateOrReuseDialog_profile">
<BaseAvatar
name={this.state.profile.displayName || this.props.userId}
url={this.state.profile.avatarUrl}
width={48} height={48}
/>
<div className="mx_ChatCreateOrReuseDialog_profile_name">
{this.state.profile.displayName || this.props.userId}
</div>
</div>;
}
content = <div>
<div className="mx_Dialog_content">
<p>
{ _t('Click on the button below to start chatting!') }
</p>
{ profile }
</div>
<div className="mx_Dialog_buttons">
<button className="mx_Dialog_primary" onClick={this.props.onNewDMClick}>
{ _t('Start Chatting') }
</button>
</div>
</div>;
}
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
return (
<BaseDialog className='mx_ChatCreateOrReuseDialog'
onFinished={() => {
this.props.onFinished(false)
}}
title={_t('Create a new chat or reuse an existing one')}
onFinished={ this.props.onFinished.bind(false) }
title={title}
>
<div className="mx_Dialog_content">
{_t("You already have existing direct chats with this user:")}
<div className="mx_ChatCreateOrReuseDialog_tiles">
{tiles}
{startNewChat}
</div>
</div>
{ content }
</BaseDialog>
);
}
@ -112,5 +188,8 @@ export default class ChatCreateOrReuseDialog extends React.Component {
ChatCreateOrReuseDialog.propTyps = {
userId: React.PropTypes.string.isRequired,
// Called when clicking outside of the dialog
onFinished: React.PropTypes.func.isRequired,
onNewDMClick: React.PropTypes.func.isRequired,
onExistingRoomSelected: React.PropTypes.func.isRequired,
};

View file

@ -26,6 +26,7 @@ import AccessibleButton from '../elements/AccessibleButton';
import q from 'q';
const TRUNCATE_QUERY_LIST = 40;
const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200;
module.exports = React.createClass({
displayName: "ChatInviteDialog",
@ -40,13 +41,13 @@ module.exports = React.createClass({
roomId: React.PropTypes.string,
button: React.PropTypes.string,
focus: React.PropTypes.bool,
onFinished: React.PropTypes.func.isRequired
onFinished: React.PropTypes.func.isRequired,
},
getDefaultProps: function() {
return {
value: "",
focus: true
focus: true,
};
},
@ -54,12 +55,20 @@ module.exports = React.createClass({
return {
error: false,
// List of AddressTile.InviteAddressType objects represeting
// List of AddressTile.InviteAddressType objects representing
// the list of addresses we're going to invite
inviteList: [],
// List of AddressTile.InviteAddressType objects represeting
// the set of autocompletion results for the current search
// Whether a search is ongoing
busy: false,
// An error message generated during the user directory search
searchError: null,
// Whether the server supports the user_directory API
serverSupportsUserDirectory: true,
// The query being searched for
query: "",
// List of AddressTile.InviteAddressType objects representing
// the set of auto-completion results for the current search
// query.
queryList: [],
};
@ -70,7 +79,6 @@ module.exports = React.createClass({
// Set the cursor at the end of the text input
this.refs.textinput.value = this.props.value;
}
this._updateUserList();
},
onButtonClick: function() {
@ -92,16 +100,25 @@ module.exports = React.createClass({
// A Direct Message room already exists for this user, so select a
// room from a list that is similar to the one in MemberInfo panel
const ChatCreateOrReuseDialog = sdk.getComponent(
"views.dialogs.ChatCreateOrReuseDialog"
"views.dialogs.ChatCreateOrReuseDialog",
);
Modal.createDialog(ChatCreateOrReuseDialog, {
userId: userId,
onFinished: (success) => {
if (success) {
this.props.onFinished(true, inviteList[0]);
}
// else show this ChatInviteDialog again
}
this.props.onFinished(success);
},
onNewDMClick: () => {
dis.dispatch({
action: 'start_chat',
user_id: userId,
});
},
onExistingRoomSelected: (roomId) => {
dis.dispatch({
action: 'view_room',
user_id: roomId,
});
},
});
} else {
this._startChat(inviteList);
@ -128,15 +145,15 @@ module.exports = React.createClass({
} else if (e.keyCode === 38) { // up arrow
e.stopPropagation();
e.preventDefault();
this.addressSelector.moveSelectionUp();
if (this.addressSelector) this.addressSelector.moveSelectionUp();
} else if (e.keyCode === 40) { // down arrow
e.stopPropagation();
e.preventDefault();
this.addressSelector.moveSelectionDown();
if (this.addressSelector) this.addressSelector.moveSelectionDown();
} else if (this.state.queryList.length > 0 && (e.keyCode === 188 || e.keyCode === 13 || e.keyCode === 9)) { // comma or enter or tab
e.stopPropagation();
e.preventDefault();
this.addressSelector.chooseSelection();
if (this.addressSelector) this.addressSelector.chooseSelection();
} else if (this.refs.textinput.value.length === 0 && this.state.inviteList.length && e.keyCode === 8) { // backspace
e.stopPropagation();
e.preventDefault();
@ -159,74 +176,36 @@ module.exports = React.createClass({
onQueryChanged: function(ev) {
const query = ev.target.value.toLowerCase();
let queryList = [];
if (query.length < 2) {
return;
}
if (this.queryChangedDebouncer) {
clearTimeout(this.queryChangedDebouncer);
}
this.queryChangedDebouncer = setTimeout(() => {
// Only do search if there is something to search
if (query.length > 0 && query != '@') {
this._userList.forEach((user) => {
if (user.userId.toLowerCase().indexOf(query) === -1 &&
user.displayName.toLowerCase().indexOf(query) === -1
) {
return;
}
// Return objects, structure of which is defined
// by InviteAddressType
queryList.push({
addressType: 'mx',
address: user.userId,
displayName: user.displayName,
avatarMxc: user.avatarUrl,
isKnown: true,
order: user.getLastActiveTs(),
});
});
queryList = queryList.sort((a,b) => {
return a.order < b.order;
});
// If the query is a valid address, add an entry for that
// This is important, otherwise there's no way to invite
// a perfectly valid address if there are close matches.
const addrType = getAddressType(query);
if (addrType !== null) {
queryList.unshift({
addressType: addrType,
address: query,
isKnown: false,
});
if (this._cancelThreepidLookup) this._cancelThreepidLookup();
if (addrType == 'email') {
this._lookupThreepid(addrType, query).done();
}
}
if (query.length > 0 && query != '@' && query.length >= 2) {
this.queryChangedDebouncer = setTimeout(() => {
if (this.state.serverSupportsUserDirectory) {
this._doUserDirectorySearch(query);
} else {
this._doLocalSearch(query);
}
}, QUERY_USER_DIRECTORY_DEBOUNCE_MS);
} else {
this.setState({
queryList: queryList,
error: false,
}, () => {
this.addressSelector.moveSelectionTop();
queryList: [],
query: "",
searchError: null,
});
}, 200);
}
},
onDismissed: function(index) {
var self = this;
return function() {
return () => {
var inviteList = self.state.inviteList.slice();
inviteList.splice(index, 1);
self.setState({
inviteList: inviteList,
queryList: [],
query: "",
});
if (this._cancelThreepidLookup) this._cancelThreepidLookup();
};
@ -245,10 +224,103 @@ module.exports = React.createClass({
this.setState({
inviteList: inviteList,
queryList: [],
query: "",
});
if (this._cancelThreepidLookup) this._cancelThreepidLookup();
},
_doUserDirectorySearch: function(query) {
this.setState({
busy: true,
query,
searchError: null,
});
MatrixClientPeg.get().searchUserDirectory({
term: query,
}).then((resp) => {
this._processResults(resp.results, query);
}).catch((err) => {
console.error('Error whilst searching user directory: ', err);
this.setState({
searchError: err.errcode ? err.message : _t('Something went wrong!'),
});
if (err.errcode === 'M_UNRECOGNIZED') {
this.setState({
serverSupportsUserDirectory: false,
});
// Do a local search immediately
this._doLocalSearch(query);
}
}).done(() => {
this.setState({
busy: false,
});
});
},
_doLocalSearch: function(query) {
this.setState({
query,
searchError: null,
});
const results = [];
MatrixClientPeg.get().getUsers().forEach((user) => {
if (user.userId.toLowerCase().indexOf(query) === -1 &&
user.displayName.toLowerCase().indexOf(query) === -1
) {
return;
}
// Put results in the format of the new API
results.push({
user_id: user.userId,
display_name: user.displayName,
avatar_url: user.avatarUrl,
});
});
this._processResults(results, query);
},
_processResults: function(results, query) {
const queryList = [];
results.forEach((user) => {
if (user.user_id === MatrixClientPeg.get().credentials.userId) {
return;
}
// Return objects, structure of which is defined
// by InviteAddressType
queryList.push({
addressType: 'mx',
address: user.user_id,
displayName: user.display_name,
avatarMxc: user.avatar_url,
isKnown: true,
});
});
// If the query is a valid address, add an entry for that
// This is important, otherwise there's no way to invite
// a perfectly valid address if there are close matches.
const addrType = getAddressType(query);
if (addrType !== null) {
queryList.unshift({
addressType: addrType,
address: query,
isKnown: false,
});
if (this._cancelThreepidLookup) this._cancelThreepidLookup();
if (addrType == 'email') {
this._lookupThreepid(addrType, query).done();
}
}
this.setState({
queryList,
error: false,
}, () => {
if (this.addressSelector) this.addressSelector.moveSelectionTop();
});
},
_getDirectMessageRooms: function(addr) {
const dmRoomMap = new DMRoomMap(MatrixClientPeg.get());
const dmRooms = dmRoomMap.getDMRoomsForUserId(addr);
@ -267,11 +339,7 @@ module.exports = React.createClass({
_startChat: function(addrs) {
if (MatrixClientPeg.get().isGuest()) {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Please Register"),
description: _t("Guest users can't invite users. Please register."),
});
dis.dispatch({action: 'view_set_mxid'});
return;
}
@ -337,16 +405,6 @@ module.exports = React.createClass({
this.props.onFinished(true, addrTexts);
},
_updateUserList: function() {
// Get all the users
this._userList = MatrixClientPeg.get().getUsers();
// Remove current user
const meIx = this._userList.findIndex((u) => {
return u.userId === MatrixClientPeg.get().credentials.userId;
});
this._userList.splice(meIx, 1);
},
_isOnInviteList: function(uid) {
for (let i = 0; i < this.state.inviteList.length; i++) {
if (
@ -414,6 +472,7 @@ module.exports = React.createClass({
this.setState({
inviteList: inviteList,
queryList: [],
query: "",
});
if (this._cancelThreepidLookup) this._cancelThreepidLookup();
return inviteList;
@ -449,7 +508,7 @@ module.exports = React.createClass({
displayName: res.displayname,
avatarMxc: res.avatar_url,
isKnown: true,
}]
}],
});
});
},
@ -481,23 +540,27 @@ module.exports = React.createClass({
placeholder={this.props.placeholder}
defaultValue={this.props.value}
autoFocus={this.props.focus}>
</textarea>
</textarea>,
);
var error;
var addressSelector;
let error;
let addressSelector;
if (this.state.error) {
error = <div className="mx_ChatInviteDialog_error">{_t("You have entered an invalid contact. Try using their Matrix ID or email address.")}</div>;
} else if (this.state.searchError) {
error = <div className="mx_ChatInviteDialog_error">{this.state.searchError}</div>;
} else if (
this.state.query.length > 0 &&
this.state.queryList.length === 0 &&
!this.state.busy
) {
error = <div className="mx_ChatInviteDialog_error">{_t("No results")}</div>;
} else {
const addressSelectorHeader = <div className="mx_ChatInviteDialog_addressSelectHeader">
{_t("Searching known users")}
</div>;
addressSelector = (
<AddressSelector ref={(ref) => {this.addressSelector = ref;}}
addressList={ this.state.queryList }
onSelected={ this.onSelected }
truncateAt={ TRUNCATE_QUERY_LIST }
header={ addressSelectorHeader }
/>
);
}

View file

@ -1,89 +0,0 @@
/*
Copyright 2016 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg';
import { _t } from '../../../languageHandler';
/**
* Prompt the user to set a display name.
*
* On success, `onFinished(true, newDisplayName)` is called.
*/
export default React.createClass({
displayName: 'SetDisplayNameDialog',
propTypes: {
onFinished: React.PropTypes.func.isRequired,
currentDisplayName: React.PropTypes.string,
},
getInitialState: function() {
if (this.props.currentDisplayName) {
return { value: this.props.currentDisplayName };
}
if (MatrixClientPeg.get().isGuest()) {
return { value : "Guest " + MatrixClientPeg.get().getUserIdLocalpart() };
}
else {
return { value : MatrixClientPeg.get().getUserIdLocalpart() };
}
},
componentDidMount: function() {
this.refs.input_value.select();
},
onValueChange: function(ev) {
this.setState({
value: ev.target.value
});
},
onFormSubmit: function(ev) {
ev.preventDefault();
this.props.onFinished(true, this.state.value);
return false;
},
render: function() {
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
return (
<BaseDialog className="mx_SetDisplayNameDialog"
onFinished={this.props.onFinished}
title={_t("Set a Display Name")}
>
<div className="mx_Dialog_content">
{_t("Your display name is how you'll appear to others when you speak in rooms. " +
"What would you like it to be?")}
</div>
<form onSubmit={this.onFormSubmit}>
<div className="mx_Dialog_content">
<input type="text" ref="input_value" value={this.state.value}
autoFocus={true} onChange={this.onValueChange} size="30"
className="mx_SetDisplayNameDialog_input"
/>
</div>
<div className="mx_Dialog_buttons">
<input className="mx_Dialog_primary" type="submit" value={_t("Set")} />
</div>
</form>
</BaseDialog>
);
},
});

View file

@ -0,0 +1,294 @@
/*
Copyright 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import q from 'q';
import React from 'react';
import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg';
import classnames from 'classnames';
import KeyCode from '../../../KeyCode';
import { _t, _tJsx } from '../../../languageHandler';
// The amount of time to wait for further changes to the input username before
// sending a request to the server
const USERNAME_CHECK_DEBOUNCE_MS = 250;
/**
* Prompt the user to set a display name.
*
* On success, `onFinished(true, newDisplayName)` is called.
*/
export default React.createClass({
displayName: 'SetMxIdDialog',
propTypes: {
onFinished: React.PropTypes.func.isRequired,
// Called when the user requests to register with a different homeserver
onDifferentServerClicked: React.PropTypes.func.isRequired,
// Called if the user wants to switch to login instead
onLoginClick: React.PropTypes.func.isRequired,
},
getInitialState: function() {
return {
// The entered username
username: '',
// Indicate ongoing work on the username
usernameBusy: false,
// Indicate error with username
usernameError: '',
// Assume the homeserver supports username checking until "M_UNRECOGNIZED"
usernameCheckSupport: true,
// Whether the auth UI is currently being used
doingUIAuth: false,
// Indicate error with auth
authError: '',
};
},
componentDidMount: function() {
this.refs.input_value.select();
this._matrixClient = MatrixClientPeg.get();
},
onValueChange: function(ev) {
this.setState({
username: ev.target.value,
usernameBusy: true,
usernameError: '',
}, () => {
if (!this.state.username || !this.state.usernameCheckSupport) {
this.setState({
usernameBusy: false,
});
return;
}
// Debounce the username check to limit number of requests sent
if (this._usernameCheckTimeout) {
clearTimeout(this._usernameCheckTimeout);
}
this._usernameCheckTimeout = setTimeout(() => {
this._doUsernameCheck().finally(() => {
this.setState({
usernameBusy: false,
});
});
}, USERNAME_CHECK_DEBOUNCE_MS);
});
},
onKeyUp: function(ev) {
if (ev.keyCode === KeyCode.ENTER) {
this.onSubmit();
}
},
onSubmit: function(ev) {
this.setState({
doingUIAuth: true,
});
},
_doUsernameCheck: function() {
// Check if username is available
return this._matrixClient.isUsernameAvailable(this.state.username).then(
(isAvailable) => {
if (isAvailable) {
this.setState({usernameError: ''});
}
},
(err) => {
// Indicate whether the homeserver supports username checking
const newState = {
usernameCheckSupport: err.errcode !== "M_UNRECOGNIZED",
};
console.error('Error whilst checking username availability: ', err);
switch (err.errcode) {
case "M_USER_IN_USE":
newState.usernameError = _t('Username not available');
break;
case "M_INVALID_USERNAME":
newState.usernameError = _t(
'Username invalid: %(errMessage)s',
{ errMessage: err.message},
);
break;
case "M_UNRECOGNIZED":
// This homeserver doesn't support username checking, assume it's
// fine and rely on the error appearing in registration step.
newState.usernameError = '';
break;
case undefined:
newState.usernameError = _t('Something went wrong!');
break;
default:
newState.usernameError = _t(
'An error occurred: %(error_string)s',
{ error_string: err.message },
);
break;
}
this.setState(newState);
},
);
},
_generatePassword: function() {
return Math.random().toString(36).slice(2);
},
_makeRegisterRequest: function(auth) {
// Not upgrading - changing mxids
const guestAccessToken = null;
if (!this._generatedPassword) {
this._generatedPassword = this._generatePassword();
}
return this._matrixClient.register(
this.state.username,
this._generatedPassword,
undefined, // session id: included in the auth dict already
auth,
{},
guestAccessToken,
);
},
_onUIAuthFinished: function(success, response) {
this.setState({
doingUIAuth: false,
});
if (!success) {
this.setState({ authError: response.message });
return;
}
// XXX Implement RTS /register here
const teamToken = null;
this.props.onFinished(true, {
userId: response.user_id,
deviceId: response.device_id,
homeserverUrl: this._matrixClient.getHomeserverUrl(),
identityServerUrl: this._matrixClient.getIdentityServerUrl(),
accessToken: response.access_token,
password: this._generatedPassword,
teamToken: teamToken,
});
},
render: function() {
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth');
const Spinner = sdk.getComponent('elements.Spinner');
let auth;
if (this.state.doingUIAuth) {
auth = <InteractiveAuth
matrixClient={this._matrixClient}
makeRequest={this._makeRegisterRequest}
onAuthFinished={this._onUIAuthFinished}
inputs={{}}
poll={true}
/>;
}
const inputClasses = classnames({
"mx_SetMxIdDialog_input": true,
"error": Boolean(this.state.usernameError),
});
let usernameIndicator = null;
let usernameBusyIndicator = null;
if (this.state.usernameBusy) {
usernameBusyIndicator = <Spinner w="24" h="24"/>;
} else {
const usernameAvailable = this.state.username &&
this.state.usernameCheckSupport && !this.state.usernameError;
const usernameIndicatorClasses = classnames({
"error": Boolean(this.state.usernameError),
"success": usernameAvailable,
});
usernameIndicator = <div className={usernameIndicatorClasses}>
{ usernameAvailable ? _t('Username available') : this.state.usernameError }
</div>;
}
let authErrorIndicator = null;
if (this.state.authError) {
authErrorIndicator = <div className="error">
{ this.state.authError }
</div>;
}
const canContinue = this.state.username &&
!this.state.usernameError &&
!this.state.usernameBusy;
return (
<BaseDialog className="mx_SetMxIdDialog"
onFinished={this.props.onFinished}
title="To get started, please pick a username!"
>
<div className="mx_Dialog_content">
<div className="mx_SetMxIdDialog_input_group">
<input type="text" ref="input_value" value={this.state.username}
autoFocus={true}
onChange={this.onValueChange}
onKeyUp={this.onKeyUp}
size="30"
className={inputClasses}
/>
{ usernameBusyIndicator }
</div>
{ usernameIndicator }
<p>
{ _tJsx(
'This will be your account name on the <span></span> ' +
'homeserver, or you can pick a <a>different server</a>.',
[
/<span><\/span>/,
/<a>(.*?)<\/a>/,
],
[
(sub) => <span>{this.props.homeserverUrl}</span>,
(sub) => <a href="#" onClick={this.props.onDifferentServerClicked}>{sub}</a>,
],
)}
</p>
<p>
{ _tJsx(
'If you already have a Matrix account you can <a>log in</a> instead.',
/<a>(.*?)<\/a>/,
[(sub) => <a href="#" onClick={this.props.onLoginClick}>{sub}</a>],
)}
</p>
{ auth }
{ authErrorIndicator }
</div>
<div className="mx_Dialog_buttons">
<input className="mx_Dialog_primary"
type="submit"
value={_t("Continue")}
onClick={this.onSubmit}
disabled={!canContinue}
/>
</div>
</BaseDialog>
);
},
});

View file

@ -0,0 +1,84 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import PropTypes from 'prop-types';
import AccessibleButton from './AccessibleButton';
import dis from '../../../dispatcher';
import sdk from '../../../index';
export default React.createClass({
displayName: 'RoleButton',
propTypes: {
size: PropTypes.string,
tooltip: PropTypes.bool,
action: PropTypes.string.isRequired,
mouseOverAction: PropTypes.string,
label: PropTypes.string.isRequired,
iconPath: PropTypes.string.isRequired,
},
getDefaultProps: function() {
return {
size: "25",
tooltip: false,
};
},
getInitialState: function() {
return {
showTooltip: false,
};
},
_onClick: function(ev) {
ev.stopPropagation();
dis.dispatch({action: this.props.action});
},
_onMouseEnter: function() {
if (this.props.tooltip) this.setState({showTooltip: true});
if (this.props.mouseOverAction) {
dis.dispatch({action: this.props.mouseOverAction});
}
},
_onMouseLeave: function() {
this.setState({showTooltip: false});
},
render: function() {
const TintableSvg = sdk.getComponent("elements.TintableSvg");
let tooltip;
if (this.state.showTooltip) {
const RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
tooltip = <RoomTooltip className="mx_RoleButton_tooltip" label={this.props.label} />;
}
return (
<AccessibleButton className="mx_RoleButton"
onClick={this._onClick}
onMouseEnter={this._onMouseEnter}
onMouseLeave={this._onMouseLeave}
>
<TintableSvg src={this.props.iconPath} width={this.props.size} height={this.props.size} />
{tooltip}
</AccessibleButton>
);
}
});

View file

@ -0,0 +1,40 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
const CreateRoomButton = function(props) {
const ActionButton = sdk.getComponent('elements.ActionButton');
return (
<ActionButton action="view_create_room"
mouseOverAction={props.callout ? "callout_create_room" : null}
label={ _t("Create new room") }
iconPath="img/icons-create-room.svg"
size={props.size}
tooltip={props.tooltip}
/>
);
};
CreateRoomButton.propTypes = {
size: PropTypes.string,
tooltip: PropTypes.bool,
};
export default CreateRoomButton;

View file

@ -0,0 +1,39 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
const HomeButton = function(props) {
const ActionButton = sdk.getComponent('elements.ActionButton');
return (
<ActionButton action="view_home_page"
label={ _t("Home") }
iconPath="img/icons-home.svg"
size={props.size}
tooltip={props.tooltip}
/>
);
};
HomeButton.propTypes = {
size: PropTypes.string,
tooltip: PropTypes.bool,
};
export default HomeButton;

View file

@ -0,0 +1,40 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
const RoomDirectoryButton = function(props) {
const ActionButton = sdk.getComponent('elements.ActionButton');
return (
<ActionButton action="view_room_directory"
mouseOverAction={props.callout ? "callout_room_directory" : null}
label={ _t("Room directory") }
iconPath="img/icons-directory.svg"
size={props.size}
tooltip={props.tooltip}
/>
);
};
RoomDirectoryButton.propTypes = {
size: PropTypes.string,
tooltip: PropTypes.bool,
};
export default RoomDirectoryButton;

View file

@ -0,0 +1,39 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
const SettingsButton = function(props) {
const ActionButton = sdk.getComponent('elements.ActionButton');
return (
<ActionButton action="view_user_settings"
label={ _t("Settings") }
iconPath="img/icons-settings.svg"
size={props.size}
tooltip={props.tooltip}
/>
);
};
SettingsButton.propTypes = {
size: PropTypes.string,
tooltip: PropTypes.bool,
};
export default SettingsButton;

View file

@ -0,0 +1,40 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
const StartChatButton = function(props) {
const ActionButton = sdk.getComponent('elements.ActionButton');
return (
<ActionButton action="view_create_chat"
mouseOverAction={props.callout ? "callout_start_chat" : null}
label={ _t("Start chat") }
iconPath="img/icons-people.svg"
size={props.size}
tooltip={props.tooltip}
/>
);
};
StartChatButton.propTypes = {
size: PropTypes.string,
tooltip: PropTypes.bool,
};
export default StartChatButton;

View file

@ -16,6 +16,7 @@ limitations under the License.
'use strict';
import { _t } from '../../../languageHandler';
import React from 'react';
module.exports = React.createClass({
@ -27,5 +28,5 @@ module.exports = React.createClass({
<a href="https://matrix.org">{_t("powered by Matrix")}</a>
</div>
);
}
},
});

View file

@ -22,6 +22,8 @@ var MatrixClientPeg = require("../../../MatrixClientPeg");
var Modal = require("../../../Modal");
import { _t } from '../../../languageHandler';
import dis from '../../../dispatcher';
var ROOM_COLORS = [
// magic room default values courtesy of Ribot
["#76cfa6", "#eaf5f0"],
@ -87,11 +89,7 @@ module.exports = React.createClass({
}
).catch(function(err) {
if (err.errcode == 'M_GUEST_ACCESS_FORBIDDEN') {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Please Register"),
description: _t("Saving room color settings is only available to registered users")
});
dis.dispatch({action: 'view_set_mxid'});
}
});
}

View file

@ -375,11 +375,7 @@ module.exports = WithMatrixClient(React.createClass({
console.log("Mod toggle success");
}, function(err) {
if (err.errcode == 'M_GUEST_ACCESS_FORBIDDEN') {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t("Please Register"),
description: _t("This action cannot be performed by a guest user. Please register to be able to do this."),
});
dis.dispatch({action: 'view_set_mxid'});
} else {
console.error("Toggle moderator error:" + err);
Modal.createDialog(ErrorDialog, {

View file

@ -91,11 +91,7 @@ export default class MessageComposer extends React.Component {
onUploadClick(ev) {
if (MatrixClientPeg.get().isGuest()) {
let NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: _t('Please Register'),
description: _t('Guest users can\'t upload files. Please register to upload.'),
});
dis.dispatch({action: 'view_set_mxid'});
return;
}

View file

@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -30,7 +31,14 @@ var Rooms = require('../../../Rooms');
import DMRoomMap from '../../../utils/DMRoomMap';
var Receipt = require('../../../utils/Receipt');
var HIDE_CONFERENCE_CHANS = true;
const HIDE_CONFERENCE_CHANS = true;
const VERBS = {
'm.favourite': 'favourite',
'im.vector.fake.direct': 'tag direct chat',
'im.vector.fake.recent': 'restore',
'm.lowpriority': 'demote',
};
module.exports = React.createClass({
displayName: 'RoomList',
@ -45,6 +53,7 @@ module.exports = React.createClass({
getInitialState: function() {
return {
isLoadingLeftRooms: false,
totalRoomCount: null,
lists: {},
incomingCall: null,
};
@ -64,8 +73,14 @@ module.exports = React.createClass({
cli.on("RoomMember.name", this.onRoomMemberName);
cli.on("accountData", this.onAccountData);
var s = this.getRoomLists();
this.setState(s);
this.refreshRoomList();
// order of the sublists
//this.listOrder = [];
// loop count to stop a stack overflow if the user keeps waggling the
// mouse for >30s in a row, or if running under mocha
this._delayedRefreshRoomListLoopCount = 0
},
componentDidMount: function() {
@ -203,31 +218,33 @@ module.exports = React.createClass({
}, 500),
refreshRoomList: function() {
// console.log("DEBUG: Refresh room list delta=%s ms",
// (!this._lastRefreshRoomListTs ? "-" : (Date.now() - this._lastRefreshRoomListTs))
// );
// TODO: rather than bluntly regenerating and re-sorting everything
// every time we see any kind of room change from the JS SDK
// we could do incremental updates on our copy of the state
// based on the room which has actually changed. This would stop
// us re-rendering all the sublists every time anything changes anywhere
// in the state of the client.
this.setState(this.getRoomLists());
// TODO: ideally we'd calculate this once at start, and then maintain
// any changes to it incrementally, updating the appropriate sublists
// as needed.
// Alternatively we'd do something magical with Immutable.js or similar.
const lists = this.getRoomLists();
let totalRooms = 0;
for (const l of Object.values(lists)) {
totalRooms += l.length;
}
this.setState({
lists: this.getRoomLists(),
totalRoomCount: totalRooms,
});
// this._lastRefreshRoomListTs = Date.now();
},
getRoomLists: function() {
var self = this;
var s = { lists: {} };
const lists = {};
s.lists["im.vector.fake.invite"] = [];
s.lists["m.favourite"] = [];
s.lists["im.vector.fake.recent"] = [];
s.lists["im.vector.fake.direct"] = [];
s.lists["m.lowpriority"] = [];
s.lists["im.vector.fake.archived"] = [];
lists["im.vector.fake.invite"] = [];
lists["m.favourite"] = [];
lists["im.vector.fake.recent"] = [];
lists["im.vector.fake.direct"] = [];
lists["m.lowpriority"] = [];
lists["im.vector.fake.archived"] = [];
const dmRoomMap = new DMRoomMap(MatrixClientPeg.get());
@ -241,7 +258,7 @@ module.exports = React.createClass({
// ", prevMembership = " + me.events.member.getPrevContent().membership);
if (me.membership == "invite") {
s.lists["im.vector.fake.invite"].push(room);
lists["im.vector.fake.invite"].push(room);
}
else if (HIDE_CONFERENCE_CHANS && Rooms.isConfCallRoom(room, me, self.props.ConferenceHandler)) {
// skip past this room & don't put it in any lists
@ -255,20 +272,20 @@ module.exports = React.createClass({
if (tagNames.length) {
for (var i = 0; i < tagNames.length; i++) {
var tagName = tagNames[i];
s.lists[tagName] = s.lists[tagName] || [];
s.lists[tagNames[i]].push(room);
lists[tagName] = lists[tagName] || [];
lists[tagName].push(room);
}
}
else if (dmRoomMap.getUserIdForRoomId(room.roomId)) {
// "Direct Message" rooms (that we're still in and that aren't otherwise tagged)
s.lists["im.vector.fake.direct"].push(room);
lists["im.vector.fake.direct"].push(room);
}
else {
s.lists["im.vector.fake.recent"].push(room);
lists["im.vector.fake.recent"].push(room);
}
}
else if (me.membership === "leave") {
s.lists["im.vector.fake.archived"].push(room);
lists["im.vector.fake.archived"].push(room);
}
else {
console.error("unrecognised membership: " + me.membership + " - this should never happen");
@ -277,7 +294,22 @@ module.exports = React.createClass({
// we actually apply the sorting to this when receiving the prop in RoomSubLists.
return s;
// we'll need this when we get to iterating through lists programatically - e.g. ctrl-shift-up/down
/*
this.listOrder = [
"im.vector.fake.invite",
"m.favourite",
"im.vector.fake.recent",
"im.vector.fake.direct",
Object.keys(otherTagNames).filter(tagName=>{
return (!tagName.match(/^m\.(favourite|lowpriority)$/));
}).sort(),
"m.lowpriority",
"im.vector.fake.archived"
];
*/
return lists;
},
_getScrollNode: function() {
@ -431,6 +463,62 @@ module.exports = React.createClass({
this.refs.gemscroll.forceUpdate();
},
_getEmptyContent: function(section) {
const RoomDropTarget = sdk.getComponent('rooms.RoomDropTarget');
if (this.props.collapsed) {
return <RoomDropTarget label="" />;
}
const StartChatButton = sdk.getComponent('elements.StartChatButton');
const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
const TintableSvg = sdk.getComponent('elements.TintableSvg');
switch (section) {
case 'im.vector.fake.direct':
return <div className="mx_RoomList_emptySubListTip">
Press
<StartChatButton size="16" callout={true}/>
to start a chat with someone
</div>;
case 'im.vector.fake.recent':
return <div className="mx_RoomList_emptySubListTip">
You're not in any rooms yet! Press
<CreateRoomButton size="16" callout={true}/>
to make a room or
<RoomDirectoryButton size="16" callout={true}/>
to browse the directory
</div>;
}
// We don't want to display drop targets if there are no room tiles to drag'n'drop
if (this.state.totalRoomCount === 0) {
return null;
}
const labelText = 'Drop here to ' + (VERBS[section] || 'tag ' + section);
return <RoomDropTarget label={labelText} />;
},
_getHeaderItems: function(section) {
const StartChatButton = sdk.getComponent('elements.StartChatButton');
const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
switch (section) {
case 'im.vector.fake.direct':
return <span className="mx_RoomList_headerButtons">
<StartChatButton size="16" />
</span>;
case 'im.vector.fake.recent':
return <span className="mx_RoomList_headerButtons">
<RoomDirectoryButton size="16" />
<CreateRoomButton size="16" />
</span>;
}
},
render: function() {
var RoomSubList = sdk.getComponent('structures.RoomSubList');
var self = this;
@ -452,7 +540,7 @@ module.exports = React.createClass({
<RoomSubList list={ self.state.lists['m.favourite'] }
label={ _t('Favourites') }
tagName="m.favourite"
verb={ _t('to favourite') }
emptyContent={this._getEmptyContent('m.favourite')}
editable={ true }
order="manual"
selectedRoom={ self.props.selectedRoom }
@ -465,7 +553,8 @@ module.exports = React.createClass({
<RoomSubList list={ self.state.lists['im.vector.fake.direct'] }
label={ _t('People') }
tagName="im.vector.fake.direct"
verb={ _t('to tag direct chat') }
emptyContent={this._getEmptyContent('im.vector.fake.direct')}
headerItems={this._getHeaderItems('im.vector.fake.direct')}
editable={ true }
order="recent"
selectedRoom={ self.props.selectedRoom }
@ -479,7 +568,8 @@ module.exports = React.createClass({
<RoomSubList list={ self.state.lists['im.vector.fake.recent'] }
label={ _t('Rooms') }
editable={ true }
verb={ _t('to restore') }
emptyContent={this._getEmptyContent('im.vector.fake.recent')}
headerItems={this._getHeaderItems('im.vector.fake.recent')}
order="recent"
selectedRoom={ self.props.selectedRoom }
incomingCall={ self.state.incomingCall }
@ -488,13 +578,13 @@ module.exports = React.createClass({
onHeaderClick={ self.onSubListHeaderClick }
onShowMoreRooms={ self.onShowMoreRooms } />
{ Object.keys(self.state.lists).map(function(tagName) {
{ Object.keys(self.state.lists).map((tagName) => {
if (!tagName.match(/^(m\.(favourite|lowpriority)|im\.vector\.fake\.(invite|recent|direct|archived))$/)) {
return <RoomSubList list={ self.state.lists[tagName] }
key={ tagName }
label={ tagName }
tagName={ tagName }
verb={ _t('to tag as %(tagName)s', {tagName: tagName}) }
emptyContent={this._getEmptyContent(tagName)}
editable={ true }
order="manual"
selectedRoom={ self.props.selectedRoom }
@ -510,7 +600,7 @@ module.exports = React.createClass({
<RoomSubList list={ self.state.lists['m.lowpriority'] }
label={ _t('Low priority') }
tagName="m.lowpriority"
verb={ _t('to demote') }
emptyContent={this._getEmptyContent('m.lowpriority')}
editable={ true }
order="recent"
selectedRoom={ self.props.selectedRoom }

View file

@ -23,6 +23,8 @@ var sdk = require("../../../index");
import AccessibleButton from '../elements/AccessibleButton';
import { _t } from '../../../languageHandler';
import sessionStore from '../../../stores/SessionStore';
module.exports = React.createClass({
displayName: 'ChangePassword',
propTypes: {
@ -32,7 +34,10 @@ module.exports = React.createClass({
rowClassName: React.PropTypes.string,
rowLabelClassName: React.PropTypes.string,
rowInputClassName: React.PropTypes.string,
buttonClassName: React.PropTypes.string
buttonClassName: React.PropTypes.string,
confirm: React.PropTypes.bool,
// Whether to autoFocus the new password input
autoFocusNewPasswordInput: React.PropTypes.bool,
},
Phases: {
@ -55,20 +60,48 @@ module.exports = React.createClass({
error: _t("Passwords can't be empty")
};
}
}
},
confirm: true,
};
},
getInitialState: function() {
return {
phase: this.Phases.Edit
phase: this.Phases.Edit,
cachedPassword: null,
};
},
changePassword: function(old_password, new_password) {
var cli = MatrixClientPeg.get();
componentWillMount: function() {
this._sessionStore = sessionStore;
this._sessionStoreToken = this._sessionStore.addListener(
this._setStateFromSessionStore,
);
var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
this._setStateFromSessionStore();
},
componentWillUnmount: function() {
if (this._sessionStoreToken) {
this._sessionStoreToken.remove();
}
},
_setStateFromSessionStore: function() {
this.setState({
cachedPassword: this._sessionStore.getCachedPassword(),
});
},
changePassword: function(oldPassword, newPassword) {
const cli = MatrixClientPeg.get();
if (!this.props.confirm) {
this._changePassword(cli, oldPassword, newPassword);
return;
}
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createDialog(QuestionDialog, {
title: _t("Warning!"),
description:
@ -89,31 +122,34 @@ module.exports = React.createClass({
],
onFinished: (confirmed) => {
if (confirmed) {
var authDict = {
type: 'm.login.password',
user: cli.credentials.userId,
password: old_password
};
this.setState({
phase: this.Phases.Uploading
});
var self = this;
cli.setPassword(authDict, new_password).then(function() {
self.props.onFinished();
}, function(err) {
self.props.onError(err);
}).finally(function() {
self.setState({
phase: self.Phases.Edit
});
}).done();
this._changePassword(cli, oldPassword, newPassword);
}
},
});
},
_changePassword: function(cli, oldPassword, newPassword) {
const authDict = {
type: 'm.login.password',
user: cli.credentials.userId,
password: oldPassword,
};
this.setState({
phase: this.Phases.Uploading,
});
cli.setPassword(authDict, newPassword).then(() => {
this.props.onFinished();
}, (err) => {
this.props.onError(err);
}).finally(() => {
this.setState({
phase: this.Phases.Edit,
});
}).done();
},
_onExportE2eKeysClicked: function() {
Modal.createDialogAsync(
(cb) => {
@ -127,44 +163,50 @@ module.exports = React.createClass({
},
onClickChange: function() {
var old_password = this.refs.old_input.value;
var new_password = this.refs.new_input.value;
var confirm_password = this.refs.confirm_input.value;
var err = this.props.onCheckPassword(
old_password, new_password, confirm_password
const oldPassword = this.state.cachedPassword || this.refs.old_input.value;
const newPassword = this.refs.new_input.value;
const confirmPassword = this.refs.confirm_input.value;
const err = this.props.onCheckPassword(
oldPassword, newPassword, confirmPassword,
);
if (err) {
this.props.onError(err);
}
else {
this.changePassword(old_password, new_password);
} else {
this.changePassword(oldPassword, newPassword);
}
},
render: function() {
var rowClassName = this.props.rowClassName;
var rowLabelClassName = this.props.rowLabelClassName;
var rowInputClassName = this.props.rowInputClassName;
var buttonClassName = this.props.buttonClassName;
const rowClassName = this.props.rowClassName;
const rowLabelClassName = this.props.rowLabelClassName;
const rowInputClassName = this.props.rowInputClassName;
const buttonClassName = this.props.buttonClassName;
switch (this.state.phase) {
case this.Phases.Edit:
return (
<div className={this.props.className}>
<div className={rowClassName}>
let currentPassword = null;
if (!this.state.cachedPassword) {
currentPassword = <div className={rowClassName}>
<div className={rowLabelClassName}>
<label htmlFor="passwordold">{ _t('Current password') }</label>
<label htmlFor="passwordold">Current password</label>
</div>
<div className={rowInputClassName}>
<input id="passwordold" type="password" ref="old_input" />
</div>
</div>
</div>;
}
switch (this.state.phase) {
case this.Phases.Edit:
const passwordLabel = this.state.cachedPassword ?
_t('Password') : _t('New Password');
return (
<div className={this.props.className}>
{ currentPassword }
<div className={rowClassName}>
<div className={rowLabelClassName}>
<label htmlFor="password1">{ _t('New password') }</label>
<label htmlFor="password1">{ passwordLabel }</label>
</div>
<div className={rowInputClassName}>
<input id="password1" type="password" ref="new_input" />
<input id="password1" type="password" ref="new_input" autoFocus={this.props.autoFocusNewPasswordInput} />
</div>
</div>
<div className={rowClassName}>
@ -176,7 +218,8 @@ module.exports = React.createClass({
</div>
</div>
<AccessibleButton className={buttonClassName}
onClick={this.onClickChange}>
onClick={this.onClickChange}
element="button">
{ _t('Change Password') }
</AccessibleButton>
</div>

View file

@ -37,17 +37,11 @@ function createRoom(opts) {
opts = opts || {};
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
const NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
const Loader = sdk.getComponent("elements.Spinner");
const client = MatrixClientPeg.get();
if (client.isGuest()) {
setTimeout(()=>{
Modal.createDialog(NeedToRegisterDialog, {
title: _t('Please Register'),
description: _t('Guest users can\'t create new rooms. Please register to create room and start a chat.')
});
}, 0);
dis.dispatch({action: 'view_set_mxid'});
return q(null);
}
@ -64,6 +58,11 @@ function createRoom(opts) {
createOpts.is_direct = true;
}
// By default, view the room after creating it
if (opts.andView === undefined) {
opts.andView = true;
}
// Allow guests by default since the room is private and they'd
// need an invite. This means clicking on a 3pid invite email can
// actually drop you right in to a chat.
@ -97,10 +96,12 @@ function createRoom(opts) {
// room has been created, so we race here with the client knowing that
// the room exists, causing things like
// https://github.com/vector-im/vector-web/issues/1813
if (opts.andView) {
dis.dispatch({
action: 'view_room',
room_id: roomId
room_id: roomId,
});
}
return roomId;
}, function(err) {
console.error("Failed to create room " + roomId + " " + err);

View file

@ -6,7 +6,7 @@
"People": "Direkt-Chats",
"Rooms": "Räume",
"Low priority": "Niedrige Priorität",
"Historical": "Historisch",
"Historical": "Archiv",
"New passwords must match each other.": "Die neuen Passwörter müssen identisch sein.",
"A new password must be entered.": "Es muss ein neues Passwort eingegeben werden.",
"The email address linked to your account must be entered.": "Es muss die Email-Adresse eingeben werden, welche zum Account gehört.",
@ -42,7 +42,7 @@
"Commands": "Kommandos",
"Emoji": "Emoji",
"Sorry, this homeserver is using a login which is not recognised ": "Entschuldigung, dieser Homeserver nutzt eine Anmeldetechnik, die nicht bekannt ist ",
"Login as guest": "Anmelden als Gast",
"Login as guest": "Als Gast anmelden",
"Return to app": "Zurück zur Anwendung",
"Sign in": "Anmelden",
"Create a new account": "Erstelle einen neuen Benutzer",
@ -75,7 +75,7 @@
"changed the topic to": "änderte das Thema zu",
"Changes to who can read history will only apply to future messages in this room": "Änderungen, die bestimmen, wer den Chatverlauf lesen kann, gelten nur für zukünftige Nachrichten in diesem Raum",
"Clear Cache and Reload": "Cache leeren und neu laden",
"Click here": "Klicke hier",
"Click here": "Hier klicken,",
"Confirm your new password": "Neues Passwort bestätigen",
"Continue": "Fortfahren",
"Create an account": "Erstelle einen Account",
@ -96,7 +96,7 @@
"End-to-end encryption is in beta and may not be reliable": "Die Ende-zu-Ende-Verschlüsselung befindet sich aktuell im Beta-Stadium und ist eventuell noch nicht hundertprozentig zuverlässig",
"Failed to send email": "Fehler beim Senden der E-Mail",
"Account": "Konto",
"Add phone number": "Füge Telefonnummer hinzu",
"Add phone number": "Telefonnummer hinzufügen",
"an address": "an Adresse",
"Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Dein Passwort wurde erfolgreich geändert. Du wirst erst Benachrichtigungen auf anderen Geräten empfangen können, wenn du dich dort erneut anmeldest",
"all room members": "Alle Raum-Mitglieder",
@ -111,10 +111,10 @@
"Default": "Standard",
"demote": "Berechtigungslevel herabstufen",
"Export E2E room keys": "E2E-Raum-Schlüssel exportieren",
"Failed to change password. Is your password correct?": "Passwort-Änderung schlug fehl. Ist dein Passwort korrekt?",
"Failed to change password. Is your password correct?": "Passwortänderung fehlgeschlagen. Ist dein Passwort richtig?",
"Failed to forget room": "Vergessen des Raums schlug fehl",
"Failed to leave room": "Verlassen des Raums fehlgeschlagen",
"Failed to reject invitation": "Fehler beim Abweisen der Einladung",
"Failed to reject invitation": "Einladung konnte nicht abgelehnt werden",
"Failed to set avatar.": "Fehler beim Setzen des Profilbilds.",
"Failed to unban": "Entbannen fehlgeschlagen",
"Failed to upload file": "Datei-Upload fehlgeschlagen",
@ -127,7 +127,7 @@
"Found a bug?": "Fehler gefunden?",
"Guests cannot join this room even if explicitly invited.": "Gäste können diesem Raum nicht beitreten, auch wenn sie explizit eingeladen wurden.",
"Guests can't set avatars. Please register.": "Gäste können kein Profilbild setzen. Bitte registrieren.",
"Guest users can't upload files. Please register to upload.": "Gäste können keine Dateien hochladen. Bitte registrieren um hochzuladen.",
"Guest users can't upload files. Please register to upload.": "Gäste können keine Dateien hochladen. Bitte zunächst registrieren.",
"had": "hatte",
"Hangup": "Auflegen",
"Homeserver is": "Der Homeserver ist",
@ -140,12 +140,12 @@
"is a": "ist ein",
"is trusted": "wird vertraut",
"Sign in with": "Ich möchte mich anmelden mit",
"joined and left": "trat bei und ging",
"joined": "trat bei",
"joined and left": "hat den Raum betreten und wieder verlassen",
"joined": "hat den Raum betreten",
"joined the room": "trat dem Raum bei",
"Leave room": "Verlasse Raum",
"left and rejoined": "ging(en) und trat(en) erneut bei",
"left": "ging",
"left": "hat den Raum verlassen",
"left the room": "verließ den Raum",
"Logged in as": "Angemeldet als",
"Logout": "Abmelden",
@ -182,7 +182,7 @@
"Once you&#39;ve followed the link it contains, click below": "Nachdem du dem darin enthaltenen Link gefolgt bist, klicke unten",
"rejected the invitation.": "lehnte die Einladung ab.",
"Reject invitation": "Einladung ablehnen",
"Remove Contact Information?": "Kontakt-Informationen löschen?",
"Remove Contact Information?": "Kontakt-Informationen entfernen?",
"removed their display name": "löschte den eigenen Anzeigenamen",
"Remove": "Entfernen",
"requested a VoIP conference": "hat eine VoIP-Konferenz angefordert",
@ -204,7 +204,7 @@
"Signed Out": "Abgemeldet",
"Sign out": "Abmelden",
"since the point in time of selecting this option": "ab dem Zeitpunkt, an dem diese Option gewählt wird",
"since they joined": "seitdem sie beitraten",
"since they joined": "ab dem Zeitpunkt, an dem sie beigetreten sind",
"since they were invited": "seitdem sie eingeladen wurden",
"Someone": "Jemand",
"Start a chat": "Starte einen Chat",
@ -227,7 +227,7 @@
"to join the discussion": "um an der Diskussion teilzunehmen",
"To kick users": "Um Nutzer zu entfernen",
"Admin": "Administrator",
"Server may be unavailable, overloaded, or you hit a bug": "Server könnte nicht verfügbar oder überlastet sein oder du bist auf einen Fehler gestoßen",
"Server may be unavailable, overloaded, or you hit a bug.": "Server ist nicht verfügbar, überlastet oder du bist auf einen Fehler gestoßen.",
"Could not connect to the integration server": "Konnte keine Verbindung zum Integrations-Server herstellen",
"Disable inline URL previews by default": "URL-Vorschau im Chat standardmäßig deaktivieren",
"Guests can't use labs features. Please register.": "Gäste können keine Labor-Funktionen nutzen. Bitte registrieren.",
@ -271,7 +271,7 @@
"Who would you like to communicate with?": "Mit wem möchtest du kommunizieren?",
"Would you like to": "Möchtest du",
"You do not have permission to post to this room": "Du hast keine Berechtigung an diesen Raum etwas zu senden",
"You have been invited to join this room by %(inviterName)s": "Du wurdest von %(inviterName)s in diesen Raum eingeladen",
"You have been invited to join this room by %(inviterName)s": "%(inviterName)s hat dich in diesen Raum eingeladen",
"You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Du wurdest auf allen Geräten abgemeldet und wirst keine Push-Benachrichtigungen mehr erhalten. Um die Benachrichtigungen zu reaktivieren, musst du dich auf jedem Gerät neu anmelden",
"you must be a": "nötige Rolle",
"Your password has been reset": "Dein Passwort wurde zurückgesetzt",
@ -280,15 +280,15 @@
"times": "mal",
"Bulk Options": "Bulk-Optionen",
"Call Timeout": "Anruf-Timeout",
"Conference call failed": "Konferenzgespräch fehlgeschlagen",
"Conference calling is in development and may not be reliable": "Konferenzgespräche sind in Entwicklung und evtl. nicht zuverlässig",
"Conference call failed.": "Konferenzgespräch fehlgeschlagen.",
"Conference calling is in development and may not be reliable.": "Konferenzgespräche befinden sich noch in der Entwicklungsphase und sind möglicherweise nicht zuverlässig nutzbar.",
"Conference calls are not supported in encrypted rooms": "Konferenzgespräche werden in verschlüsselten Räumen nicht unterstützt",
"Conference calls are not supported in this client": "Konferenzgespräche werden von diesem Client nicht unterstützt",
"Existing Call": "Bereits bestehender Anruf",
"Failed to set up conference call": "Konferenzgespräch konnte nicht gestartet werden",
"Failed to verify email address: make sure you clicked the link in the email": "Verifizierung der E-Mail-Adresse fehlgeschlagen: Bitte stelle sicher, dass du den Link in der E-Mail angeklickt hast",
"Failure to create room": "Raumerstellung fehlgeschlagen",
"Guest users can't create new rooms. Please register to create room and start a chat": "Gäste können keine neuen Räume erstellen. Bitte registrieren um einen Raum zu erstellen und einen Chat zu starten",
"Guest users can't create new rooms. Please register to create room and start a chat.": "Gastnutzer können keine neuen Räume erstellen. Bitte registriere dich um Räume zu erstellen und Chats zu starten.",
"Riot does not have permission to send you notifications - please check your browser settings": "Riot hat keine Berechtigung Benachrichtigungen zu senden - bitte prüfe deine Browser-Einstellungen",
"Riot was not given permission to send notifications - please try again": "Riot hat das Recht nicht bekommen Benachrichtigungen zu senden. Bitte erneut probieren",
"This email address is already in use": "Diese E-Mail-Adresse wird bereits verwendet",
@ -302,11 +302,11 @@
"Unable to enable Notifications": "Benachrichtigungen konnten nicht aktiviert werden",
"Upload Failed": "Upload fehlgeschlagen",
"VoIP is unsupported": "VoIP wird nicht unterstützt",
"You are already in a call": "Du bist bereits bei einem Anruf",
"You cannot place a call with yourself": "Du kannst keinen Anruf mit dir selbst starten",
"You cannot place VoIP calls in this browser": "Du kannst kein VoIP-Gespräch in diesem Browser starten",
"You are already in a call.": "Du bist bereits in einem Gespräch.",
"You cannot place a call with yourself.": "Du kannst keinen Anruf mit dir selbst starten.",
"You cannot place VoIP calls in this browser.": "Du kannst keine VoIP-Gespräche in diesem Browser starten.",
"You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Du musst dich erneut anmelden, um Ende-zu-Ende-Verschlüsselungs-Schlüssel für dieses Gerät zu generieren und um den öffentlichen Schlüssel auf deinem Homeserver zu hinterlegen. Dies muss nur einmal durchgeführt werden, bitte entschuldige die Unannehmlichkeiten.",
"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 Homeserver verknüpft zu sein",
"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.",
"Sun": "So",
"Mon": "Mo",
"Tue": "Di",
@ -336,10 +336,10 @@
"Password too short (min %(MIN_PASSWORD_LENGTH)s).": "Passwort zu kurz (min. %(MIN_PASSWORD_LENGTH)s).",
"This doesn't look like a valid email address.": "Dies scheint keine gültige E-Mail-Adresse zu sein.",
"This doesn't look like a valid phone number.": "Dies scheint keine gültige Telefonnummer zu sein.",
"User names may only contain letters, numbers, dots, hyphens and underscores.": "Benutzernamen sollen nur Buchstaben, Nummern, Binde- und Unterstriche enthalten.",
"An unknown error occurred.": "Ein unbekannter Fehler trat auf.",
"User names may only contain letters, numbers, dots, hyphens and underscores.": "Benutzernamen dürfen nur Buchstaben, Nummern, Punkte, Binde- und Unterstriche enthalten.",
"An unknown error occurred.": "Ein unbekannter Fehler ist aufgetreten.",
"I already have an account": "Ich habe bereits einen Account",
"An error occured: %(error_string)s": "Ein Fehler trat auf: %(error_string)s",
"An error occurred: %(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": "Bisherigen Chatverlauf mit neuen Nutzern teilen",
@ -352,7 +352,7 @@
"%(names)s and %(count)s others are typing": "%(names)s und %(count)s weitere Personen schreiben",
"%(senderName)s answered the call.": "%(senderName)s hat den Anruf angenommen.",
"%(senderName)s banned %(targetName)s.": "%(senderName)s hat %(targetName)s aus dem Raum verbannt.",
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s hat den Anzeigenamen von %(oldDisplayName)s auf %(displayName)s geändert.",
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s hat den Anzeigenamen von \"%(oldDisplayName)s\" auf \"%(displayName)s\" geändert.",
"%(senderName)s changed their profile picture.": "%(senderName)s hat das Profilbild geändert.",
"%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s hat das Berechtigungslevel von %(powerLevelDiffText)s geändert.",
"%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s änderte den Raumnamen zu %(roomName)s.",
@ -364,7 +364,7 @@
"%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s von %(fromPowerLevel)s zu %(toPowerLevel)s",
"%(senderName)s invited %(targetName)s.": "%(senderName)s hat %(targetName)s eingeladen.",
"%(displayName)s is typing": "%(displayName)s schreibt",
"%(targetName)s joined the room.": "%(targetName)s trat dem Raum bei.",
"%(targetName)s joined the room.": "%(targetName)s hat den Raum betreten.",
"%(senderName)s kicked %(targetName)s.": "%(senderName)s kickte %(targetName)s.",
"%(targetName)s left the room.": "%(targetName)s hat den Raum verlassen.",
"%(senderName)s made future room history visible to": "%(senderName)s machte die zukünftige Raumhistorie sichtbar für",
@ -377,13 +377,13 @@
"Power level must be positive integer.": "Berechtigungslevel muss eine positive ganze Zahl sein.",
"Reason": "Grund",
"%(targetName)s rejected the invitation.": "%(targetName)s hat die Einladung abgelehnt.",
"%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s löschte den Anzeigenamen (%(oldDisplayName)s).",
"%(senderName)s removed their profile picture.": "%(senderName)s löschte das Profilbild.",
"%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s hat den Anzeigenamen entfernt (%(oldDisplayName)s).",
"%(senderName)s removed their profile picture.": "%(senderName)s hat das Profilbild gelöscht.",
"%(senderName)s requested a VoIP conference.": "%(senderName)s möchte eine VoIP-Konferenz beginnen.",
"Room %(roomId)s not visible": "Raum %(roomId)s ist nicht sichtbar",
"%(senderDisplayName)s sent an image.": "%(senderDisplayName)s hat ein Bild gesendet.",
"%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.": "%(senderName)s hat %(targetDisplayName)s in diesen Raum eingeladen.",
"%(senderName)s set a profile picture.": "%(senderName)s setzte ein Profilbild.",
"%(senderName)s set a profile picture.": "%(senderName)s hat ein Profilbild gesetzt.",
"%(senderName)s set their display name to %(displayName)s.": "%(senderName)s hat den Anzeigenamen geändert in %(displayName)s.",
"This room is not recognised.": "Dieser Raum wurde nicht erkannt.",
"These are experimental features that may break in unexpected ways": "Dies sind experimentelle Funktionen, die in unerwarteter Weise Fehler verursachen können",
@ -398,7 +398,7 @@
"There are no visible files in this room": "Es gibt keine sichtbaren Dateien in diesem Raum",
"Error changing language": "Fehler beim Ändern der Sprache",
"Riot was unable to find the correct Data for the selected Language.": "Riot war nicht in der Lage die korrekten Daten für die ausgewählte Sprache zu finden.",
"Connectivity to the server has been lost.": "Verbindung zum Server untergebrochen.",
"Connectivity to the server has been lost.": "Verbindung zum Server wurde unterbrochen.",
"Sent messages will be stored until your connection has returned.": "Gesendete Nachrichten werden gespeichert, bis die Internetverbindung wiederhergestellt wurde.",
"Auto-complete": "Autovervollständigung",
"Resend all": "Alle erneut senden",
@ -418,7 +418,7 @@
"Press": "Drücke",
"tag as %(tagName)s": "als %(tagName)s taggen",
"to browse the directory": "um das Raum-Verzeichnis zu durchsuchen",
"to demote": "um die Priorität herabzusetzen",
"to demote": "um das Berechtigungslevel herabzusetzen",
"to favourite": "zum Favorisieren",
"to make a room or": "um einen Raum zu erstellen, oder",
"to restore": "zum wiederherstellen",
@ -427,7 +427,7 @@
"You're not in any rooms yet! Press": "Du bist noch keinem Raum beigetreten! Drücke",
"click to reveal": "Klicke zum anzeigen",
"To remove other users' messages": "Um Nachrichten anderer Nutzer zu verbergen",
"You are trying to access %(roomName)s": "Du versuchst auf %(roomName)s zuzugreifen",
"You are trying to access %(roomName)s": "Du versuchst, auf den Raum \"%(roomName)s\" zuzugreifen",
"af": "Afrikaans",
"ar-ae": "Arabisch (VAE)",
"ar-bh": "Arabisch (Bahrain)",
@ -558,7 +558,7 @@
"Are you sure?": "Bist du sicher?",
"Attachment": "Anhang",
"Ban": "Verbannen",
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Kann nicht zum Heimserver verbinden - bitte checke eine Verbindung und stelle sicher, dass dem <a>SSL-Zertifikat deines Heimservers</a> vertraut wird.",
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Verbindungsaufbau zum Heimserver nicht möglich - bitte Internetverbindung überprüfen und sicherstellen, ob das <a>SSL-Zertifikat des Heimservers</a> vertrauenswürdig ist.",
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Kann nicht zum Heimserver via HTTP verbinden, wenn eine HTTPS-Url in deiner Adresszeile steht. Nutzer HTTPS oder <a>aktiviere unsichere Skripte</a>.",
"changing room on a RoomView is not supported": "Das Ändern eines Raumes in einer RaumAnsicht wird nicht unterstützt",
"Click to mute audio": "Klicke um den Ton stumm zu stellen",
@ -581,7 +581,6 @@
"Failed to save settings": "Einstellungen konnten nicht gespeichert werden",
"Failed to set display name": "Anzeigename konnte nicht gesetzt werden",
"Fill screen": "Fülle Bildschirm",
"Guest users can't upload files. Please register to upload": "Gäste können keine Dateien hochladen. Bitte zunächst registrieren",
"Hide Text Formatting Toolbar": "Verberge Text-Formatierungs-Toolbar",
"Incorrect verification code": "Falscher Verifizierungscode",
"Invalid alias format": "Ungültiges Alias-Format",
@ -590,7 +589,7 @@
"'%(alias)s' is not a valid format for an alias": "'%(alias)s' hat kein valides Aliasformat",
"Join Room": "Dem Raum beitreten",
"Kick": "Kicke",
"Level": "Level",
"Level": "Berechtigungslevel",
"Local addresses for this room:": "Lokale Adressen dieses Raumes:",
"Markdown is disabled": "Markdown ist deaktiviert",
"Markdown is enabled": "Markdown ist aktiviert",
@ -608,8 +607,8 @@
"Server error": "Server-Fehler",
"Server may be unavailable, overloaded, or search timed out :(": "Der Server ist entweder nicht verfügbar, überlastet oder die Suche wurde wegen Zeitüberschreitung abgebrochen :(",
"Server may be unavailable, overloaded, or the file too big": "Server ist entweder nicht verfügbar, überlastet oder die Datei ist zu groß",
"Server unavailable, overloaded, or something else went wrong": "Der Server ist entweder nicht verfügbar, überlastet oder es liegt ein anderweitiger Fehler vor",
"Some of your messages have not been sent": "Einige deiner Nachrichten wurden noch nicht gesendet",
"Server unavailable, overloaded, or something else went wrong.": "Server nicht verfügbar, überlastet oder etwas anderes lief falsch.",
"Some of your messages have not been sent.": "Einige deiner Nachrichten wurden nicht gesendet.",
"Submit": "Absenden",
"The main address for this room is: %(canonical_alias_section)s": "Die Hauptadresse für diesen Raum ist: %(canonical_alias_section)s",
"This action cannot be performed by a guest user. Please register to be able to do this": "Diese Aktion kann nicht von einem Gast ausgeführt werden. Bitte registriere dich um dies zu tun",
@ -618,7 +617,7 @@
"This room is private or inaccessible to guests. You may be able to join if you register": "Dieser Raum ist privat oder für Gäste nicht zugänglich. Du kannst jedoch eventuell beitreten, wenn du dich registrierst",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Versuchte einen spezifischen Punkt in der Raum-Chronik zu laden, aber du hast keine Berechtigung die angeforderte Nachricht anzuzeigen",
"Tried to load a specific point in this room's timeline, but was unable to find it": "Der Versuch, einen spezifischen Punkt im Chatverlauf zu laden, ist fehlgeschlagen. Der Punkt konnte nicht gefunden werden",
"Turn Markdown off": "Markdown abschalten",
"Turn Markdown off": "Markdown deaktiveren",
"Turn Markdown on": "Markdown einschalten",
"Unable to load device list": "Geräteliste konnte nicht geladen werden",
"Unknown command": "Unbekannter Befehl",
@ -653,25 +652,25 @@
"%(items)s and one other": "%(items)s und ein(e) weitere(r)",
"%(items)s and %(lastItem)s": "%(items)s und %(lastItem)s",
"%(severalUsers)sjoined %(repeats)s times": "%(severalUsers)ssind dem Raum %(repeats)s mal beigetreten",
"%(oneUser)sjoined %(repeats)s times": "%(oneUser)strat %(repeats)s mal bei",
"%(severalUsers)sjoined": "%(severalUsers)straten bei",
"%(oneUser)sjoined": "%(oneUser)strat bei",
"%(oneUser)sjoined %(repeats)s times": "%(oneUser)shat den Raum %(repeats)s mal betreten",
"%(severalUsers)sjoined": "%(severalUsers)shaben den Raum betreten",
"%(oneUser)sjoined": "%(oneUser)shat den Raum betreten",
"%(severalUsers)sleft %(repeats)s times": "%(severalUsers)sverließen %(repeats)s mal den Raum",
"%(oneUser)sleft %(repeats)s times": "%(oneUser)sging %(repeats)s mal",
"%(severalUsers)sleft": "%(severalUsers)shaben den Raum verlassen",
"%(oneUser)sleft": "%(oneUser)sging",
"%(severalUsers)sjoined and left %(repeats)s times": "%(severalUsers)straten bei und gingen %(repeats)s mal",
"%(oneUser)sjoined and left %(repeats)s times": "%(oneUser)strat bei und ging %(repeats)s mal",
"%(severalUsers)sjoined and left": "%(severalUsers)straten bei und gingen",
"%(oneUser)sjoined and left": "%(oneUser)strat bei und ging",
"%(severalUsers)sjoined and left %(repeats)s times": "%(severalUsers)shaben den Raum %(repeats)s mal betreten und wieder verlassen",
"%(oneUser)sjoined and left %(repeats)s times": "%(oneUser)shat den Raum %(repeats)s mal betreten und wieder verlassen",
"%(severalUsers)sjoined and left": "%(severalUsers)shaben den Raum betreten und wieder verlassen",
"%(oneUser)sjoined and left": "%(oneUser)shat den Raum betreten und wieder verlassen",
"%(severalUsers)sleft and rejoined %(repeats)s times": "%(severalUsers)shaben den Raum verlassen und %(repeats)s mal neu betreten",
"%(oneUser)sleft and rejoined %(repeats)s times": "%(oneUser)sging und trat %(repeats)s mal erneut bei",
"%(severalUsers)sleft and rejoined": "%(severalUsers)s gingen und traten erneut bei",
"%(oneUser)sleft and rejoined %(repeats)s times": "%(oneUser)shat den Raum %(repeats)s mal verlassen und wieder neu betreten",
"%(severalUsers)sleft and rejoined": "%(severalUsers)shaben den Raum verlassen und wieder neu betreten",
"%(oneUser)sleft left and rejoined": "%(oneUser)sging und trat erneut bei",
"%(severalUsers)srejected their invitations %(repeats)s times": "%(severalUsers)s lehnten %(repeats)s mal ihre Einladung ab",
"%(severalUsers)srejected their invitations %(repeats)s times": "%(severalUsers)shaben ihre Einladung %(repeats)s mal abgelehnt",
"%(oneUser)srejected their invitation %(repeats)s times": "%(oneUser)shat die Einladung %(repeats)s mal abgelehnt",
"%(severalUsers)srejected their invitations": "%(severalUsers)slehnten ihre Einladung ab",
"%(oneUser)srejected their invitation": "%(oneUser)slehnte seine/ihre Einladung ab",
"%(severalUsers)srejected their invitations": "%(severalUsers)shaben ihre Einladung abgelehnt",
"%(oneUser)srejected their invitation": "%(oneUser)shat die Einladung abgelehnt",
"%(severalUsers)shad their invitations withdrawn %(repeats)s times": "%(severalUsers)szogen ihre Einladungen %(repeats)s mal zurück",
"%(oneUser)shad their invitation withdrawn %(repeats)s times": "%(oneUser)szog seine/ihre Einladung %(repeats)s mal zurück",
"%(severalUsers)shad their invitations withdrawn": "%(severalUsers)szogen ihre Einladungen zurück",
@ -688,16 +687,16 @@
"were kicked %(repeats)s times": "wurden %(repeats)s mal gekickt",
"was kicked %(repeats)s times": "wurde %(repeats)s mal gekickt",
"were kicked": "wurden aus dem Raum entfernt",
"%(severalUsers)schanged their name %(repeats)s times": "%(severalUsers)sänderten %(repeats)s mal ihre Namen",
"%(oneUser)schanged their name %(repeats)s times": "%(oneUser)sänderte %(repeats)s mal seinen/ihren Namen",
"%(severalUsers)schanged their name %(repeats)s times": "%(severalUsers)shaben ihren Namen %(repeats)s mal geändert",
"%(oneUser)schanged their name %(repeats)s times": "%(oneUser)shat den Namen %(repeats)s mal geändert",
"%(severalUsers)schanged their name": "%(severalUsers)shaben ihre Namen geändert",
"%(oneUser)schanged their name": "%(oneUser)sänderte seinen/ihren Namen",
"%(oneUser)schanged their name": "%(oneUser)shat den Namen geändert",
"%(severalUsers)schanged their avatar %(repeats)s times": "%(severalUsers)shaben %(repeats)s mal ihr Profilbild geändert",
"%(oneUser)schanged their avatar %(repeats)s times": "%(oneUser)shat %(repeats)s mal das Profilbild geändert",
"%(severalUsers)schanged their avatar": "%(severalUsers)shaben ihr Profilbild geändert",
"%(oneUser)schanged their avatar": "%(oneUser)shat das Profilbild geändert",
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(day)s. %(monthName)s %(fullYear)s %(time)s",
"%(oneUser)sleft and rejoined": "%(oneUser)sverließ den Raum und trat erneut bei",
"%(oneUser)sleft and rejoined": "%(oneUser)shat den Raum verlassen und wieder neu betreten",
"A registered account is required for this action": "Für diese Aktion ist ein registrierter Account notwendig",
"Access Token:": "Zugangs-Token:",
"Always show message timestamps": "Nachrichten-Zeitstempel immer anzeigen",
@ -726,9 +725,9 @@
"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.": "Eine Änderung des Passworts setzt derzeit alle Schlüssel für die E2E-Verschlüsselung auf allen verwendeten Geräten zurück. Bereits verschlüsselte Chat-Inhalte sind somit nur noch lesbar, wenn du zunächst alle Schlüssel exportierst und später wieder importierst. Wir arbeiten an einer Verbesserung dieser momentan noch notwendigen Vorgehensweise.",
"Unmute": "Stummschalten aufheben",
"Invalid file%(extra)s": "Ungültige Datei%(extra)s",
"Remove %(threePid)s?": "Entferne %(threePid)s?",
"Remove %(threePid)s?": "%(threePid)s entfernen?",
"Please select the destination room for this message": "Bitte den Raum auswählen, an den diese Nachricht gesendet werden soll",
"%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s löschte den Raumnamen.",
"%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s hat den Raum-Namen gelöscht.",
"Passphrases must match": "Passphrase muss übereinstimmen",
"Passphrase must not be empty": "Passphrase darf nicht leer sein",
"Export room keys": "Raum-Schlüssel exportieren",
@ -736,7 +735,6 @@
"Confirm passphrase": "Bestätige Passphrase",
"The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "Die Export-Datei wird mit einer Passphrase geschützt sein. Du solltest die Passphrase hier eingeben um die Datei zu entschlüsseln.",
"You must join the room to see its files": "Du musst dem Raum beitreten, um die Raum-Dateien sehen zu können",
"Server may be unavailable, overloaded, or you hit a bug.": "Server ist nicht verfügbar, überlastet oder du bist auf einen Fehler gestoßen.",
"Reject all %(invitedRooms)s invites": "Alle %(invitedRooms)s Einladungen ablehnen",
"Start new Chat": "Starte neuen Chat",
"Guest users can't invite users. Please register.": "Gäste können keine Nutzer einladen. Bitte registrieren.",
@ -786,7 +784,7 @@
"This image cannot be displayed.": "Dieses Bild kann nicht angezeigt werden.",
"Error decrypting video": "Video-Entschlüsselung fehlgeschlagen",
"Import room keys": "Importiere Raum-Schlüssel",
"File to import": "Datei zum Importieren",
"File to import": "Zu importierende Datei",
"Failed to invite the following users to the %(roomName)s room:": "Das Einladen der folgenden Nutzer in den Raum \"%(roomName)s\" ist fehlgeschlagen:",
"Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.": "Bist du sicher, dass du dieses Ereignis entfernen (löschen) möchtest? Wenn du die Änderung eines Raum-Namens oder eines Raum-Themas löscht, kann dies dazu führen, dass die ursprüngliche Änderung rückgängig gemacht wird.",
"This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.": "Dieser Prozess erlaubt es dir, die Schlüssel für in verschlüsselten Räumen empfangene Nachrichten in eine lokale Datei zu exportieren. In Zukunft wird es möglich sein, diese Datei in einen anderen Matrix-Client zu importieren, sodass dieser Client ebenfalls diese Nachrichten entschlüsseln kann.",
@ -828,7 +826,7 @@
"Invited": "Eingeladen",
"Set a Display Name": "Setze einen Anzeigenamen",
"for %(amount)ss": "für %(amount)ss",
"for %(amount)sm": "für %(amount)sm",
"for %(amount)sm": "seit %(amount)smin",
"for %(amount)sh": "für %(amount)sh",
"for %(amount)sd": "für %(amount)sd",
"%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s hat das Raum-Bild entfernt.",
@ -841,17 +839,13 @@
"Default Device": "Standard-Gerät",
"Microphone": "Mikrofon",
"Camera": "Kamera",
"Conference call failed.": "Konferenzgespräch fehlgeschlagen.",
"Conference calling is in development and may not be reliable.": "Konferenzgespräche befinden sich noch in der Entwicklungsphase und sind möglicherweise nicht zuverlässig nutzbar.",
"Device already verified!": "Gerät bereits verifiziert!",
"Export": "Export",
"Failed to register as guest:": "Registrieren als Gast schlug fehl:",
"Guest access is disabled on this Home Server.": "Gastzugang ist auf diesem Heimserver deaktivert.",
"Guest users can't create new rooms. Please register to create room and start a chat.": "Gastnutzer können keine neuen Räume erstellen. Bitte registriere dich um Räume zu erstellen und Chats zu starten.",
"Import": "Import",
"Incorrect username and/or password.": "Inkorrekter Nutzername und/oder Passwort.",
"Results from DuckDuckGo": "Ergebnisse von DuckDuckGo",
"Server unavailable, overloaded, or something else went wrong.": "Server nicht verfügbar, überlastet oder etwas anderes lief falsch.",
"The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.": "Den Signaturschlüssel den du bereitstellst stimmt mit dem Schlüssel den du von %(userId)s's Gerät %(deviceId)s empfangen hast überein. Gerät als verifiziert markiert.",
"Add a topic": "Thema hinzufügen",
"Anyone": "Jeder",
@ -862,8 +856,8 @@
"device id: ": "Geräte-ID: ",
"Device key:": "Geräte-Schlüssel:",
"Email address (optional)": "E-Mail-Adresse (optional)",
"List this room in %(domain)s's room directory?": "Liste diesen Raum in %(domain)s's Raumverzeichnis?",
"Mobile phone number (optional)": "Handynummer (optional)",
"List this room in %(domain)s's room directory?": "Diesen Raum zum Raum-Verzeichnis von %(domain)s hinzufügen?",
"Mobile phone number (optional)": "Mobilfunknummer (optional)",
"Password:": "Passwort:",
"Register": "Registrieren",
"Save": "Speichern",
@ -879,15 +873,43 @@
"Verified key": "Verifizierter Schlüssel",
"WARNING: Device already verified, but keys do NOT MATCH!": "WARNUNG: Gerät bereits verifiziert, aber Schlüssel sind NICHT GLEICH!",
"WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "WARNUNG: SCHLÜSSEL-VERIFIZIERUNG FEHLGESCHLAGEN! Der Signatur-Schlüssel für %(userId)s und Gerät %(deviceId)s ist \"%(fprint)s\" welche nicht dem bereitgestellten Schlüssel \"%(fingerprint)s\" übereinstimmen. Dies kann bedeuten, dass deine Kommunikation abgefangen wird!",
"You are already in a call.": "Du bist bereits in einem Gespräch.",
"You cannot place a call with yourself.": "Du kannst keinen Anruf mit dir selbst starten.",
"You cannot place VoIP calls in this browser.": "Du kannst keine VoIP-Gespräche in diesem Browser starten.",
"You have <a>disabled</a> URL previews by default.": "Du hast die URL-Vorschau standardmäßig <a>deaktiviert</a>.",
"You have <a>enabled</a> URL previews by default.": "Du hast die URL-Vorschau standardmäßig <a>aktiviert</a>.",
"You have entered an invalid contact. Try using their Matrix ID or email address.": "Du hast einen ungültigen Kontakt eingegeben. Versuche es mit der Matrix-ID oder der E-Mail-Adresse.",
"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 <img/>": "$senderDisplayName hat das Raum-Bild geändert zu <img/>",
"%(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",
"Start new chat": "Neuen Chat starten"
"Start new chat": "Neuen Chat starten",
"Disable markdown formatting": "Deaktiviere Markdown-Formatierung",
"Add": "Hinzufügen",
"%(count)s new messages.one": "%(count)s neue Nachricht",
"%(count)s new messages.other": "%(count)s neue Nachrichten",
"Error: Problem communicating with the given homeserver.": "Fehler: Problem beim kommunizieren mit dem angegebenen Heimserver.",
"Failed to fetch avatar URL": "Fehler beim holen der Avatar-URL",
"The phone number entered looks invalid": "Die Telefonnummer, die eingegeben wurde, sieht ungültig aus",
"This room is private or inaccessible to guests. You may be able to join if you register.": "Dieser Raum ist privat oder für Gäste nicht betretbar. Du kannst evtl. beitreten wenn du dich registrierst.",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Es wurde versucht einen spezifischen Punkt in der Chat-Historie zu laden, aber du hast keine Berechtigung diese Nachricht zu sehen.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Es wurde versucht einen spezifischen Punkt in der Chat-Historie zu laden, aber er konnte nicht gefunden werden.",
"Uploading %(filename)s and %(count)s others.zero": "%(filename)s wird hochgeladen",
"Uploading %(filename)s and %(count)s others.one": "%(filename)s und %(count)s weitere Dateien werden hochgeladen",
"Uploading %(filename)s and %(count)s others.other": "%(filename)s und %(count)s weitere Dateien werden hochgeladen",
"You must <a>register</a> to use this functionality": "Du musst dich <a>registrieren</a> um diese Funktionalität zu nutzen",
"<a>Resend all</a> or <a>cancel all</a> now. You can also select individual messages to resend or cancel.": "<a>Sende erneut</a> oder <a>breche alles ab</a>. Du kannst auch auch individuelle Nachrichten erneut senden or abbrechen.",
"Create new room": "Neuen Raum erstellen",
"Welcome page": "Willkommensseite",
"Room directory": "Raum-Verzeichnis",
"Start chat": "Starte Chat",
"New Password": "Neues Passwort",
"Start chatting": "Starte plaudern",
"Start Chatting": "Starte Gespräche",
"Click on the button below to start chatting!": "Klicke den Button unten um das Plaudern zu beginnen!",
"Create a new chat or reuse an existing one": "Erstelle einen neuen Chat oder nutze einen existierenden",
"You already have existing direct chats with this user:": "Du hast bereits direkte Chats mit diesem Nutzer:",
"Username available": "Nutzername verfügbar",
"Username not available": "Nutzername nicht verfügbar",
"Something went wrong!": "Etwas ging schief!",
"This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.": "Dies wird dein Konto-Name auf dem <span></span> Heimserver, oder du kannst einen <a>anderen Server</a> auswählen.",
"If you already have a Matrix account you can <a>log in</a> instead.": "Wenn du bereits ein Matrix-Benutzerkonto hast, kannst du dich stattdessen auch direkt <a>anmelden</a>.",
"Home": "Start",
"Username invalid: %(errMessage)s": "Nutzername falsch: %(errMessage)s"
}

View file

@ -48,7 +48,7 @@
"Authentication": "Πιστοποίηση",
"and": "και",
"An email has been sent to": "Ένα email στάλθηκε σε",
"A new password must be entered.": "Ο νέος κωδικός πρέπει να εισαχθεί",
"A new password must be entered.": "Ο νέος κωδικός πρέπει να εισαχθεί.",
"%(senderName)s answered the call.": "Ο χρήστης %(senderName)s απάντησε.",
"An error has occurred.": "Ένα σφάλμα προέκυψε",
"Anyone": "Oποιοσδήποτε",
@ -265,7 +265,7 @@
"For security, this session has been signed out. Please sign in again.": "Για λόγους ασφαλείας, αυτή η συνεδρία έχει τερματιστεί. Παρακαλώ συνδεθείτε ξανά.",
"For security, logging out will delete any end-to-end encryption keys from this browser. If you want to be able to decrypt your conversation history from future Riot sessions, please export your room keys for safe-keeping.": "Για λόγους ασφαλείας, τα κλειδιά κρυπτογράφησης θα διαγράφονται από τον φυλλομετρητή κατά την αποσύνδεση σας. Εάν επιθυμείτε να αποκρυπτογραφήσετε τις συνομιλίες σας στο μέλλον, εξάγετε τα κλειδιά σας και κρατήστε τα ασφαλή.",
"Found a bug?": "Βρήκατε κάποιο πρόβλημα;",
"Guest users can't upload files. Please register to upload": "Οι επισκέπτες δεν μπορούν να ανεβάσουν αρχεία. Παρακαλώ εγγραφείτε πρώτα",
"Guest users can't upload files. Please register to upload.": "Οι επισκέπτες δεν μπορούν να ανεβάσουν αρχεία. Παρακαλώ εγγραφείτε πρώτα.",
"had": "είχε",
"Hangup": "Κλείσε",
"Historical": "Ιστορικό",

View file

@ -282,6 +282,7 @@
"End-to-end encryption information": "End-to-end encryption information",
"End-to-end encryption is in beta and may not be reliable": "End-to-end encryption is in beta and may not be reliable",
"Enter Code": "Enter Code",
"Enter passphrase": "Enter passphrase",
"Error": "Error",
"Error decrypting attachment": "Error decrypting attachment",
"Error: Problem communicating with the given homeserver.": "Error: Problem communicating with the given homeserver.",
@ -339,6 +340,7 @@
"Hide read receipts": "Hide read receipts",
"Hide Text Formatting Toolbar": "Hide Text Formatting Toolbar",
"Historical": "Historical",
"Home": "Home",
"Homeserver is": "Homeserver is",
"Identity Server is": "Identity Server is",
"I have verified my email address": "I have verified my email address",
@ -546,7 +548,6 @@
"There was a problem logging in.": "There was a problem logging in.",
"This room has no local addresses": "This room has no local addresses",
"This room is not recognised.": "This room is not recognised.",
"This room is private or inaccessible to guests. You may be able to join if you register.": "This room is private or inaccessible to guests. You may be able to join if you register.",
"These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
"The visibility of existing history will be unchanged": "The visibility of existing history will be unchanged",
"This doesn't appear to be a valid email address": "This doesn't appear to be a valid email address",
@ -624,6 +625,7 @@
"%(user)s is a": "%(user)s is a",
"User name": "User name",
"%(userName)s (power %(powerLevelNumber)s)": "%(userName)s (power %(powerLevelNumber)s)",
"Username invalid: %(errMessage)s": "Username invalid: %(errMessage)s",
"Users": "Users",
"User": "User",
"Verification Pending": "Verification Pending",
@ -644,6 +646,7 @@
"Who can read history?": "Who can read history?",
"Who would you like to add to this room?": "Who would you like to add to this room?",
"Who would you like to communicate with?": "Who would you like to communicate with?",
"Searching known users": "Searching known users",
"%(senderName)s withdrew %(targetName)s's invitation.": "%(senderName)s withdrew %(targetName)s's invitation.",
"Would you like to <a>accept</a> or <a>decline</a> this invitation?": "Would you like to <a>accept</a> or <a>decline</a> this invitation?".
"You already have existing direct chats with this user:": "You already have existing direct chats with this user:",
@ -710,7 +713,7 @@
"User names may only contain letters, numbers, dots, hyphens and underscores.": "User names may only contain letters, numbers, dots, hyphens and underscores.",
"An unknown error occurred.": "An unknown error occurred.",
"I already have an account": "I already have an account",
"An error occured: %(error_string)s": "An error occured: %(error_string)s",
"An error occurred: %(error_string)s": "An error occurred: %(error_string)s",
"Topic": "Topic",
"Make Moderator": "Make Moderator",
"Make this room private": "Make this room private",
@ -793,6 +796,11 @@
"%(severalUsers)schanged their avatar": "%(severalUsers)schanged their avatar",
"%(oneUser)schanged their avatar": "%(oneUser)schanged their avatar",
"Please select the destination room for this message": "Please select the destination room for this message",
"Create new room": "Create new room",
"Welcome page": "Welcome page",
"Room directory": "Room directory",
"Start chat": "Start chat",
"New Password": "New Password",
"Start automatically after system login": "Start automatically after system login",
"Desktop specific": "Desktop specific",
"Analytics": "Analytics",
@ -802,7 +810,6 @@
"Passphrases must match": "Passphrases must match",
"Passphrase must not be empty": "Passphrase must not be empty",
"Export room keys": "Export room keys",
"Enter passphrase": "Enter passphrase",
"Confirm passphrase": "Confirm passphrase",
"Import room keys": "Import room keys",
"File to import": "File to import",
@ -811,6 +818,7 @@
"This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.",
"The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.",
"You must join the room to see its files": "You must join the room to see its files",
"Server may be unavailable, overloaded, or you hit a bug.": "Server may be unavailable, overloaded, or you hit a bug.",
"Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites",
"Start new chat": "Start new chat",
"Guest users can't invite users. Please register.": "Guest users can't invite users. Please register.",
@ -876,6 +884,7 @@
"You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?",
"Removed or unknown message type": "Removed or unknown message type",
"Disable URL previews by default for participants in this room": "Disable URL previews by default for participants in this room",
"Disable URL previews for this room (affects only you)": "Disable URL previews for this room (affects only you)",
"URL previews are %(globalDisableUrlPreview)s by default for participants in this room.": "URL previews are %(globalDisableUrlPreview)s by default for participants in this room.",
"URL Previews": "URL Previews",
"Enable URL previews for this room (affects only you)": "Enable URL previews for this room (affects only you)",
@ -889,8 +898,21 @@
"Online": "Online",
"Idle": "Idle",
"Offline": "Offline",
"disabled": "disabled",
"enabled": "enabled",
"Start chatting": "Start chatting",
"Start Chatting": "Start Chatting",
"Click on the button below to start chatting!": "Click on the button below to start chatting!",
"Create a new chat or reuse an existing one": "Create a new chat or reuse an existing one",
"You already have existing direct chats with this user:": "You already have existing direct chats with this user:",
"Start new chat": "Start new chat",
"Disable URL previews for this room (affects only you)": "Disable URL previews for this room (affects only you)",
"$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName changed the room avatar to <img/>",
"%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removed the room avatar.",
"%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s changed the avatar for %(roomName)s"
"%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s changed the avatar for %(roomName)s",
"Username available": "Username available",
"Username not available": "Username not available",
"Something went wrong!": "Something went wrong!",
"This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.": "This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.",
"If you already have a Matrix account you can <a>log in</a> instead.": "If you already have a Matrix account you can <a>log in</a> instead."
}

View file

@ -308,7 +308,7 @@
"Guest access is disabled on this Home Server.": "Guest access is disabled on this Home Server.",
"Guests can't set avatars. Please register.": "Guests can't set avatars. Please register.",
"Guest users can't create new rooms. Please register to create room and start a chat.": "Guest users can't create new rooms. Please register to create room and start a chat.",
"Guest users can't upload files. Please register to upload": "Guest users can't upload files. Please register to upload",
"Guest users can't upload files. Please register to upload.": "Guest users can't upload files. Please register to upload.",
"Guests can't use labs features. Please register.": "Guests can't use labs features. Please register.",
"Guests cannot join this room even if explicitly invited.": "Guests cannot join this room even if explicitly invited.",
"had": "had",
@ -476,7 +476,7 @@
"since the point in time of selecting this option": "since the point in time of selecting this option",
"since they joined": "since they joined",
"since they were invited": "since they were invited",
"Some of your messages have not been sent": "Some of your messages have not been sent",
"Some of your messages have not been sent.": "Some of your messages have not been sent.",
"Someone": "Someone",
"Sorry, this homeserver is using a login which is not recognised ": "Sorry, this homeserver is using a login which is not recognized ",
"Start a chat": "Start a chat",
@ -501,7 +501,6 @@
"There was a problem logging in.": "There was a problem logging in.",
"This room has no local addresses": "This room has no local addresses",
"This room is not recognised.": "This room is not recognized.",
"This room is private or inaccessible to guests. You may be able to join if you register": "This room is private or inaccessible to guests. You may be able to join if you register",
"These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
"The visibility of existing history will be unchanged": "The visibility of existing history will be unchanged",
"This doesn't appear to be a valid email address": "This doesn't appear to be a valid email address",
@ -530,8 +529,8 @@
"to tag as %(tagName)s": "to tag as %(tagName)s",
"to tag direct chat": "to tag direct chat",
"To use it, just wait for autocomplete results to load and tab through them.": "To use it, just wait for autocomplete results to load and tab through them.",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question",
"Tried to load a specific point in this room's timeline, but was unable to find it": "Tried to load a specific point in this room's timeline, but was unable to find it",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Tried to load a specific point in this room's timeline, but was unable to find it.",
"Turn Markdown off": "Turn Markdown off",
"Turn Markdown on": "Turn Markdown on",
"%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).": "%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).",
@ -645,7 +644,7 @@
"User names may only contain letters, numbers, dots, hyphens and underscores.": "User names may only contain letters, numbers, dots, hyphens and underscores.",
"An unknown error occurred.": "An unknown error occurred.",
"I already have an account": "I already have an account",
"An error occured: %(error_string)s": "An error occured: %(error_string)s",
"An error occurred: %(error_string)s": "An error occurred: %(error_string)s",
"Topic": "Topic",
"Make Moderator": "Make Moderator",
"Make this room private": "Make this room private",

View file

@ -282,7 +282,7 @@
"%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s de %(fromPowerLevel)s a %(toPowerLevel)s",
"Guests can't set avatars. Please register.": "Invitados no puedes establecer avatares. Por favor regístrate.",
"Guest users can't create new rooms. Please register to create room and start a chat.": "Usuarios invitados no pueden crear nuevas salas. Por favor regístrate para crear la sala y iniciar la conversación.",
"Guest users can't upload files. Please register to upload": "Usuarios invitados no puedes subir archivos. Por favor regístrate para subir tus archivos",
"Guest users can't upload files. Please register to upload.": "Usuarios invitados no puedes subir archivos. Por favor regístrate para subir tus archivos.",
"Guests can't use labs features. Please register.": "Invitados no puedes usar las características en desarrollo. Por favor regístrate.",
"Guests cannot join this room even if explicitly invited.": "Invitados no pueden unirse a esta sala aun cuando han sido invitados explícitamente.",
"had": "tuvo",

View file

@ -294,7 +294,7 @@
"Found a bug?": "Trouvé un problème ?",
"%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s de %(fromPowerLevel)s à %(toPowerLevel)s",
"Guest users can't create new rooms. Please register to create room and start a chat.": "Les visiteurs ne peuvent créer de nouveaux salons. Merci de vous enregistrer pour commencer une discussion.",
"Guest users can't upload files. Please register to upload": "Les visiteurs ne peuvent telécharger de fichiers. Merci de vous enregistrer pour télécharger",
"Guest users can't upload files. Please register to upload.": "Les visiteurs ne peuvent telécharger de fichiers. Merci de vous enregistrer pour télécharger.",
"had": "avait",
"Hangup": "Raccrocher",
"Hide read receipts": "Cacher les accusés de réception",
@ -457,7 +457,7 @@
"since the point in time of selecting this option": "depuis le moment où cette option a été sélectionnée",
"since they joined": "depuis quils ont rejoint le salon",
"since they were invited": "depuis quils ont été invités",
"Some of your messages have not been sent": "Certains de vos messages nont pas été envoyés",
"Some of your messages have not been sent.": "Certains de vos messages nont pas été envoyés.",
"Someone": "Quelqu'un",
"Sorry, this homeserver is using a login which is not recognised ": "Désolé, ce homeserver utilise un identifiant qui nest pas reconnu ",
"Start a chat": "Démarrer une conversation",
@ -478,7 +478,6 @@
"The remote side failed to pick up": "Le correspondant na pas décroché",
"This room has no local addresses": "Ce salon n'a pas d'adresse locale",
"This room is not recognised.": "Ce salon n'a pas été reconnu.",
"This room is private or inaccessible to guests. You may be able to join if you register": "Ce salon est privé ou non autorisé aux visiteurs. Vous devriez pouvoir le rejoindre si vous vous enregistrez",
"These are experimental features that may break in unexpected ways": "Ces fonctionnalités sont expérimentales et risquent de mal fonctionner",
"The visibility of existing history will be unchanged": "La visibilité de lhistorique existant sera inchangée",
"This doesn't appear to be a valid email address": "Cette adresse na pas lair dêtre valide",
@ -507,8 +506,8 @@
"to tag as %(tagName)s": "pour marquer comme %(tagName)s",
"to tag direct chat": "pour marquer comme conversation directe",
"To use it, just wait for autocomplete results to load and tab through them.": "Pour lutiliser, attendez simplement que les résultats de lauto-complétion saffichent et défilez avec la touche Tab.",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Une tentative de chargement dun point donné dans la chronologie de ce salon a été effectuée, mais vous navez pas la permission de voir le message en question",
"Tried to load a specific point in this room's timeline, but was unable to find it": "Une tentative de chargement dun point donné dans la chronologie de ce salon a été effectuée, mais il na pas été trouvé",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Une tentative de chargement dun point donné dans la chronologie de ce salon a été effectuée, mais vous navez pas la permission de voir le message en question.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Une tentative de chargement dun point donné dans la chronologie de ce salon a été effectuée, mais il na pas été trouvé.",
"Turn Markdown off": "Désactiver le formatage Markdown",
"Turn Markdown on": "Activer le formatage Markdown",
"%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).": "%(senderName)s a activé lencryption bout-en-bout (algorithme %(algorithm)s).",
@ -611,7 +610,7 @@
"User names may only contain letters, numbers, dots, hyphens and underscores.": "Les noms dutilisateurs ne peuvent contenir que des lettres, chiffres, points et tirets hauts ou bas.",
"An unknown error occurred.": "Une erreur inconnue est survenue.",
"I already have an account": "Jai déjà un compte",
"An error occured: %(error_string)s": "Une erreur est survenue : %(error_string)s",
"An error occurred: %(error_string)s": "Une erreur est survenue : %(error_string)s",
"Topic": "Sujet",
"Make Moderator": "Nommer modérateur",
"Make this room private": "Rendre ce salon privé",
@ -827,5 +826,37 @@
"You have <a>disabled</a> URL previews by default.": "Vous avez <a>désactivé</a> les aperçus dURL par défaut.",
"You have <a>enabled</a> URL previews by default.": "Vous avez <a>activé</a> les aperçus dURL par défaut.",
"You have entered an invalid contact. Try using their Matrix ID or email address.": "Vous avez entré un contact invalide. Essayez dutiliser leur identifiant Matrix ou leur adresse email.",
"Hide removed messages": "Cacher les messages supprimés"
"Hide removed messages": "Cacher les messages supprimés",
"Add": "Ajouter",
"%(count)s new messages.one": "%(count)s nouveau message",
"%(count)s new messages.other": "%(count)s nouveaux messages",
"Disable markdown formatting": "Désactiver le formattage markdown",
"Error: Problem communicating with the given homeserver.": "Erreur: Problème de communication avec le homeserveur.",
"Failed to fetch avatar URL": "Échec lors de la récupération de lURL de lavatar",
"The phone number entered looks invalid": "Le numéro de téléphone entré semble être invalide",
"Guest users can't upload files. Please register to upload.": "Les visiteurs ne peuvent pas télécharger de fichier. Veuillez vous enregistrer pour télécharger.",
"Some of your messages have not been sent.": "Certains de vos messages nont pas été envoyés.",
"This room is private or inaccessible to guests. You may be able to join if you register.": "Ce salon est privé ou interdits aux visiteurs. Vous pourrez peut-être le joindre si vous vous enregistrez.",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Un instant donné de la chronologie na pu être chargé car vous navez pas la permission de le visualiser.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Un instant donné de la chronologie na pu être chargé car il na pas pu être trouvé.",
"Uploading %(filename)s and %(count)s others.zero": "Téléchargement de %(filename)s",
"Uploading %(filename)s and %(count)s others.one": "Téléchargement de %(filename)s et %(count)s autre",
"Uploading %(filename)s and %(count)s others.other": "Téléchargement de %(filename)s et %(count)s autres",
"You must <a>register</a> to use this functionality": "Vous devez vous <a>inscrire</a> pour utiliser cette fonctionnalité",
"<a>Resend all</a> or <a>cancel all</a> now. You can also select individual messages to resend or cancel.": "<a>Tout renvoyer</a> or <a>tout annuler</a> maintenant. Vous pouvez aussi sélectionner des messages individuels à envoyer ou annuler.",
"Create new room": "Créer un nouveau salon",
"Welcome page": "Page d'accueil",
"Room directory": "Répertoire des salons",
"Start chat": "Démarrer une discussion",
"New Password": "Nouveau mot de passe",
"Start chatting": "Démarrer une discussion",
"Start Chatting": "Démarrer une discussion",
"Click on the button below to start chatting!": "Cliquer sur le bouton ci-dessous pour commencer une discussion !",
"Create a new chat or reuse an existing one": "Démarrer une nouvelle discussion ou en réutiliser une existante",
"You already have existing direct chats with this user:": "Vous avez déjà des discussions en cours avec cet utilisateur :",
"Username available": "Nom d'utilisateur disponible",
"Username not available": "Nom d'utilisateur indisponible",
"Something went wrong!": "Quelque chose sest mal passé !",
"This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.": "Cela sera le nom de votre compte sur le serveur <span></span>, ou vous pouvez sélectionner un <a>autre serveur</a>.",
"If you already have a Matrix account you can <a>log in</a> instead.": "Si vous avez déjà un compte Matrix vous pouvez vous <a>identifier</a> à la place."
}

View file

@ -1,3 +1,28 @@
{
"Cancel": "Mégse"
"Cancel": "Mégse",
"Search": "Keresés",
"OK": "Rendben",
"Custom Server Options": "Egyedi szerver beállítások",
"Direct Chat": "Közvetlen csevegés",
"Dismiss": "Eltűntet",
"Drop here %(toAction)s": "%(toAction)s -t húzd ide",
"Error": "Hiba",
"Failed to forget room %(errCode)s": "Nem lehet eltávolítani a szobát: %(errCode)s",
"Failed to join the room": "Nem lehet csatlakozni a szobához",
"Favourite": "Kedvenc",
"Mute": "Elnémít",
"Notifications": "Értesítések",
"Operation failed": "Művelet sikertelen",
"Please Register": "Regisztrálj",
"powered by Matrix": "Matrixon alapul",
"Remove": "Töröl",
"Settings": "Beállítások",
"unknown error code": "ismeretlen hiba kód",
"Sunday": "Vasárnap",
"Monday": "Hétfő",
"Tuesday": "Kedd",
"Wednesday": "Szerda",
"Thursday": "Csütörtök",
"Friday": "Péntek",
"Saturday": "Szombat"
}

View file

@ -101,7 +101,7 @@
"Guests cannot join this room even if explicitly invited.": "Visitantes não podem entrar nesta sala, mesmo se forem explicitamente convidadas/os.",
"Guests can't set avatars. Please register.": "Convidados não podem definir uma foto do perfil. Por favor, registre-se.",
"Guests can't use labs features. Please register.": "Convidados não podem usar as funcionalidades de laboratório (lab), por gentileza se registre.",
"Guest users can't upload files. Please register to upload": "Usuários não podem fazer envio de arquivos. Por favor se cadastre para enviar arquivos",
"Guest users can't upload files. Please register to upload.": "Usuários não podem fazer envio de arquivos. Por favor se cadastre para enviar arquivos.",
"had": "teve",
"Hangup": "Desligar",
"Historical": "Histórico",
@ -417,7 +417,7 @@
"User names may only contain letters, numbers, dots, hyphens and underscores.": "Nomes de usuária/o podem conter apenas letras, números, pontos, hífens e linha inferior (_).",
"An unknown error occurred.": "Um erro desconhecido ocorreu.",
"I already have an account": "Eu já tenho uma conta",
"An error occured: %(error_string)s": "Um erro ocorreu: %(error_string)s",
"An error occurred: %(error_string)s": "Um erro ocorreu: %(error_string)s",
"Topic": "Tópico",
"Make this room private": "Tornar esta sala privada",
"Share message history with new users": "Compartilhar histórico de mensagens com novas/os usuárias/os",
@ -627,15 +627,14 @@
"Server may be unavailable, overloaded, or search timed out :(": "O servidor pode estar indisponível, sobrecarregado, ou a busca ultrapassou o tempo limite :(",
"Server may be unavailable, overloaded, or the file too big": "O servidor pode estar indisponível, sobrecarregado, ou o arquivo é muito grande",
"Server unavailable, overloaded, or something else went wrong.": "O servidor pode estar indisponível, sobrecarregado, ou alguma outra coisa não funcionou.",
"Some of your messages have not been sent": "Algumas das suas mensagens não foram enviadas",
"Some of your messages have not been sent.": "Algumas das suas mensagens não foram enviadas.",
"Submit": "Enviar",
"The main address for this room is": "O endereço principal desta sala é",
"This action cannot be performed by a guest user. Please register to be able to do this": "Esta ação não pode ser realizada por um/a usuário/a visitante. Por favor, registre-se para poder fazer isso",
"%(actionVerb)s this person?": "%(actionVerb)s esta pessoa?",
"This room has no local addresses": "Esta sala não tem endereços locais",
"This room is private or inaccessible to guests. You may be able to join if you register": "Esta sala é privada ou inacessível para visitantes. Você poderá ingressar nela se registrar-se",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Tentei carregar um ponto específico na linha do tempo desta sala, mas parece que você não tem permissões para ver a mensagem em questão",
"Tried to load a specific point in this room's timeline, but was unable to find it": "Tentei carregar um ponto específico na linha do tempo desta sala, mas não o encontrei",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Tentei carregar um ponto específico na linha do tempo desta sala, mas parece que você não tem permissões para ver a mensagem em questão.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Tentei carregar um ponto específico na linha do tempo desta sala, mas não o encontrei.",
"Turn Markdown off": "Desabilitar a formatação 'Markdown'",
"Turn Markdown on": "Habilitar a marcação 'Markdown'",
"Unable to load device list": "Não foi possível carregar a lista de dispositivos",

View file

@ -101,7 +101,7 @@
"Guests cannot join this room even if explicitly invited.": "Visitantes não podem entrar nesta sala, mesmo se forem explicitamente convidadas/os.",
"Guests can't set avatars. Please register.": "Convidados não podem definir uma foto do perfil. Por favor, registre-se.",
"Guests can't use labs features. Please register.": "Convidados não podem usar as funcionalidades de laboratório (lab), por gentileza se registre.",
"Guest users can't upload files. Please register to upload": "Usuários não podem fazer envio de arquivos. Por favor se cadastre para enviar arquivos",
"Guest users can't upload files. Please register to upload.": "Usuários não podem fazer envio de arquivos. Por favor se cadastre para enviar arquivos.",
"had": "teve",
"Hangup": "Desligar",
"Historical": "Histórico",
@ -417,7 +417,7 @@
"User names may only contain letters, numbers, dots, hyphens and underscores.": "Nomes de usuária/o podem conter apenas letras, números, pontos, hífens e linha inferior (_).",
"An unknown error occurred.": "Um erro desconhecido ocorreu.",
"I already have an account": "Eu já tenho uma conta",
"An error occured: %(error_string)s": "Um erro ocorreu: %(error_string)s",
"An error occurred: %(error_string)s": "Um erro ocorreu: %(error_string)s",
"Topic": "Tópico",
"Make this room private": "Tornar esta sala privada",
"Share message history with new users": "Compartilhar histórico de mensagens com novas/os usuárias/os",
@ -627,15 +627,14 @@
"Server may be unavailable, overloaded, or search timed out :(": "O servidor pode estar indisponível, sobrecarregado, ou a busca ultrapassou o tempo limite :(",
"Server may be unavailable, overloaded, or the file too big": "O servidor pode estar indisponível, sobrecarregado, ou o arquivo é muito grande",
"Server unavailable, overloaded, or something else went wrong.": "O servidor pode estar indisponível, sobrecarregado, ou alguma outra coisa não funcionou.",
"Some of your messages have not been sent": "Algumas das suas mensagens não foram enviadas",
"Some of your messages have not been sent.": "Algumas das suas mensagens não foram enviadas.",
"Submit": "Enviar",
"The main address for this room is": "O endereço principal desta sala é",
"This action cannot be performed by a guest user. Please register to be able to do this": "Esta ação não pode ser realizada por um/a usuário/a visitante. Por favor, registre-se para poder fazer isso",
"%(actionVerb)s this person?": "%(actionVerb)s esta pessoa?",
"This room has no local addresses": "Esta sala não tem endereços locais",
"This room is private or inaccessible to guests. You may be able to join if you register": "Esta sala é privada ou inacessível para visitantes. Você poderá ingressar nela se registrar-se",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Tentei carregar um ponto específico na linha do tempo desta sala, mas parece que você não tem permissões para ver a mensagem em questão",
"Tried to load a specific point in this room's timeline, but was unable to find it": "Tentei carregar um ponto específico na linha do tempo desta sala, mas não o encontrei",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Tentei carregar um ponto específico na linha do tempo desta sala, mas parece que você não tem permissões para ver a mensagem em questão.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Tentei carregar um ponto específico na linha do tempo desta sala, mas não o encontrei.",
"Turn Markdown off": "Desabilitar a formatação 'Markdown'",
"Turn Markdown on": "Habilitar a marcação 'Markdown'",
"Unable to load device list": "Não foi possível carregar a lista de dispositivos",

View file

@ -84,22 +84,22 @@
"Failed to upload file": "Не удалось закачать файл",
"Favourite": "Избранное",
"favourite": "фаворит",
"Favourites": "Фавориты",
"Favourites": "Избранное",
"Filter room members": "Фильтр участников комнаты",
"Forget room": "Забыть комнату",
"Forgot your password?": "Вы забыли пароль?",
"For security, this session has been signed out. Please sign in again.": "Для обеспечения безопасности, эта сессия была подписана. Войдите в систему еще раз.",
"For security, this session has been signed out. Please sign in again.": "Для обеспечения безопасности эта сессия была завершена. Войдите в систему еще раз.",
"Found a bug?": "Нашли ошибку?",
"had": "имеет",
"Hangup": "Отключение",
"Historical": "Исторический",
"Historical": "История",
"Homeserver is": "Домашний сервер является",
"Identity Server is": "Регистрационный сервер",
"I have verified my email address": "Я проверил мой адрес электронной почты",
"Import E2E room keys": "Импортировать E2E ключ комнаты",
"Invalid Email Address": "Недействительный адрес электронной почты",
"invited": "invited",
"Invite new room members": "Прегласить новых учасников комнаты",
"Invite new room members": "Пригласить новых учасников в комнату",
"Invites": "Приглашать",
"Invites user with given id to current room": "Пригласить пользователя с данным id в текущую комнату",
"is a": "является",
@ -119,13 +119,13 @@
"Logout": "Выход из системы",
"Low priority": "Низкий приоритет",
"made future room history visible to": "made future room history visible to",
"Manage Integrations": "Управление интеграций",
"Manage Integrations": "Управление интеграциями",
"Members only": "Только участники",
"Mobile phone number": "Номер мобильного телефона",
"Moderator": "Ведущий",
"my Matrix ID": "мой Matrix ID",
"Name": "Имя",
"Never send encrypted messages to unverified devices from this device": "Никогда не отправляйте зашифрованные сообщения в непроверенные устройства с этого устройства",
"Never send encrypted messages to unverified devices from this device": "Никогда не отправлять зашифрованные сообщения на неверифицированные устроства с этого устройства",
"Never send encrypted messages to unverified devices in this room from this device": "Никогда не отправляйте зашифрованные сообщения в непроверенные устройства в этой комнате из этого устройства",
"New password": "Новый пароль",
"New passwords must match each other.": "Новые пароли должны соответствовать друг другу.",
@ -153,7 +153,7 @@
"requested a VoIP conference": "requested a VoIP conference",
"Return to login screen": "Return to login screen",
"Send Reset Email": "Send Reset Email",
"sent an image": "sent an image",
"sent an image": "отправил изображение",
"sent an invitation to": "sent an invitation to",
"set a profile picture": "set a profile picture",
"set their display name to": "set their display name to",
@ -190,7 +190,7 @@
"Voice call": "Голосовой вызов",
"VoIP conference finished.": "VoIP конференция закончилась.",
"VoIP conference started.": "VoIP Конференция стартовала.",
"(warning: cannot be disabled again!)": "(предупреждение: не может быть снова отключен!)",
"(warning: cannot be disabled again!)": "(предупреждение: не может быть отключено!)",
"Warning!": "Предупреждение!",
"was banned": "запрещен",
"was invited": "приглашенный",
@ -200,7 +200,7 @@
"were": "быть",
"Who can access this room?": "Кто может получить доступ к этой комнате?",
"Who can read history?": "Кто может читать историю?",
"Who would you like to add to this room?": "Кого хотели бы Вы добавлять к этой комнате?",
"Who would you like to add to this room?": "Кого бы вы хотели пригласить в эту комнату?",
"Who would you like to communicate with?": "С кем хотели бы Вы связываться?",
"withdrawn": "уходить",
"Would you like to": "Хотели бы Вы",
@ -228,7 +228,7 @@
"%(senderName)s banned %(targetName)s.": "%(senderName)s запрещенный %(targetName)s.",
"Call Timeout": "Время ожидания вызова",
"%(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 измененное ихнее фото профиля.",
"%(senderName)s changed their profile picture.": "%(senderName)s изменил фото профиля.",
"%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s уровень мощности изменен на %(powerLevelDiffText)s.",
"%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s имя комнаты измененно на %(roomName)s.",
"%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s измененная тема на %(topic)s.",
@ -254,7 +254,7 @@
"%(targetName)s joined the room.": "%(targetName)s вошёл в комнату.",
"%(senderName)s kicked %(targetName)s.": "%(senderName)s выкинул %(targetName)s.",
"%(targetName)s left the room.": "%(targetName)s покинул комнату.",
"%(senderName)s made future room history visible to": "%(senderName)s история сделаной будущей комнаты, видимая для",
"%(senderName)s made future room history visible to": "%(senderName)s сделал видимой для всех будущую историю комнаты",
"Missing room_id in request": "Отсутствует room_id в запросе",
"Missing user_id in request": "Отсутствует user_id в запросе",
"Must be viewing a room": "Комната должна быть посищена",
@ -336,7 +336,7 @@
"User names may only contain letters, numbers, dots, hyphens and underscores.": "Имена пользователей могут только содержать буквы, числа, точки, дефисы и подчеркивания.",
"An unknown error occurred.": "Произошла неизвестная ошибка.",
"I already have an account": "У меня уже есть учетная запись",
"An error occured: %(error_string)s": "Произошла ошибка: %(error_string)s",
"An error occurred: %(error_string)s": "Произошла ошибка: %(error_string)s",
"Topic": "Тема",
"Make this room private": "Сделать эту комнату частной",
"Share message history with new users": "Поделись историей сообщений с новыми учасниками",
@ -356,8 +356,8 @@
"Saturday": "Суббота",
"Sunday": "Воскресенье",
"%(weekDayName)s %(time)s": "%(weekDayName)s %(time)s",
"Upload an avatar:": "Загрузить аватар",
"You need to be logged in.": "Вы должны быть зарегистрированы",
"Upload an avatar:": "Загрузите аватар:",
"You need to be logged in.": "Вы должны быть зарегистрированы.",
"You need to be able to invite users to do that.": "Вам необходимо пригласить пользователей чтобы сделать это.",
"You cannot place VoIP calls in this browser.": "Вы не можете сделать вызовы VoIP с этим браузером.",
"You are already in a call.": "Вы уже находитесь в разговоре.",
@ -377,7 +377,7 @@
"Oct": "Окт.",
"Nov": "Ноя.",
"Dec": "Дек.",
"%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(time)s",
"%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s, %(day)s %(monthName)s %(time)s",
"Mon": "Пн",
"Sun": "Вс",
"Tue": "Вт",
@ -388,8 +388,8 @@
"You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Вам необходимо снова войти в генерировать сквозное шифрование (е2е) ключей для этого устройства и предоставить публичный ключ Вашему домашнему серверу. Это после выключения; приносим извинения за причиненные неудобства.",
"Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Ваш адрес электронной почты, кажется, не связан с Matrix ID на этом Homeserver.",
"to start a chat with someone": "Начать чат с кем-то",
"to tag direct chat": "отометить прямой чат",
"To use it, just wait for autocomplete results to load and tab through them.": "Для его использования, просто подождите результатов автозаполнения для загрузки на вкладке и через них.",
"to tag direct chat": "отметить прямой чат",
"To use it, just wait for autocomplete results to load and tab through them.": "Для его использования просто подождите загрузки результатов автозаполнения и нажимайте Tab для навигации.",
"%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).": "%(senderName)s включил сквозное шифрование (algorithm %(algorithm)s).",
"Unable to restore previous session": "Невозможно востановить предыдущий сеанс",
"%(senderName)s unbanned %(targetName)s.": "%(senderName)s запрет отменен %(targetName)s.",
@ -478,7 +478,7 @@
"Always show message timestamps": "Всегда показывать время сообщения",
"Authentication": "Авторизация",
"olm version:": "версия olm:",
"%(items)s and %(remaining)s others": "%(items)s и %(remaining)s другие",
"%(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 one other...": "и ещё один...",
@ -491,14 +491,14 @@
"Current password": "Текущий пароль",
"Email": "Электронная почта",
"Failed to kick": "Не удалось выгнать",
"Failed to load timeline position": "Не удалось узнать место во времени",
"Failed to load timeline position": "Не удалось загрузить позицию таймлайна",
"Failed to mute user": "Не удалось заглушить",
"Failed to reject invite": "Не удалось отклонить приглашение",
"Failed to save settings": "Не удалось сохранить настройки",
"Failed to set display name": "Не удалось установить отображаемое имя",
"Failed to toggle moderator status": "Не удалось изменить статус модератора",
"Fill screen": "Заполнить экран",
"Guest users can't upload files. Please register to upload": "Гости не могут посылать файлы. Пожалуйста, зарегистрируйтесь для отправки",
"Guest users can't upload files. Please register to upload.": "Гости не могут посылать файлы. Пожалуйста, зарегистрируйтесь для отправки.",
"Hide read receipts": "Скрыть отметки о прочтении",
"Hide Text Formatting Toolbar": "Скрыть панель форматирования текста",
"Incorrect verification code": "Неверный код подтверждения",
@ -519,7 +519,7 @@
"New passwords don't match": "Пароли не совпадают",
"not set": "не установлено",
"not specified": "не указано",
"No devices with registered encryption keys": "Нет устройств с записанными ключами шифрования",
"No devices with registered encryption keys": "Нет устройств с зарегистрированными ключами шифрования",
"No more results": "Нет больше результатов",
"No results": "Нет результатов",
"OK": "ОК",
@ -535,7 +535,7 @@
"rejected": "отклонено",
"%(targetName)s rejected the invitation.": "%(targetName)s отклонил приглашение.",
"Reject invitation": "Отклонить приглашение",
"Remove Contact Information?": "Убрать контактную информацию?",
"Remove Contact Information?": "Удалить контактную информацию?",
"%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s убрал своё отображаемое имя (%(oldDisplayName)s).",
"%(senderName)s removed their profile picture.": "%(senderName)s убрал своё изображение.",
"%(senderName)s requested a VoIP conference.": "%(senderName)s запросил голосовую конференц-связь.",
@ -567,7 +567,7 @@
"since the point in time of selecting this option": "с момента выбора этой настройки",
"since they joined": "с момента входа",
"since they were invited": "с момента приглашения",
"Some of your messages have not been sent": "Некоторые из ваших сообщений не были отправлены",
"Some of your messages have not been sent.": "Некоторые из ваших сообщений не были отправлены.",
"Someone": "Кто-то",
"Submit": "Отправить",
"Success": "Успех",
@ -583,10 +583,9 @@
"The remote side failed to pick up": "Удалённая сторона не смогла ответить",
"This room has no local addresses": "Эта комната не имеет местного адреса",
"This room is not recognised.": "Эта комната не опознана.",
"This room is private or inaccessible to guests. You may be able to join if you register": "Эта комната личная или недоступна для гостей. Мы может быть войдёте, если зарегистрируйтесь",
"These are experimental features that may break in unexpected ways": "Это экспериментальные функции, которые могут неожиданным образом вызывать ошибки",
"This doesn't appear to be a valid email address": "Не похоже, что это правильный адрес электронной почты",
"This is a preview of this room. Room interactions have been disabled": "Это просмотр данной комнаты. Взаимодействия с ней были отключены.",
"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": "раз",
@ -599,7 +598,7 @@
"Unknown room %(roomId)s": "Неизвестная комната %(roomId)s",
"You have been invited to join this room by %(inviterName)s": "Вы были приглашены войти в эту комнату от %(inviterName)s",
"You seem to be uploading files, are you sure you want to quit?": "Похоже вы передаёте файлы, вы уверены, что хотите выйти?",
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s",
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(day)s %(monthName)s %(fullYear)s %(time)s",
"Make Moderator": "Сделать модератором",
"Room": "Комната",
"Cancel": "Отмена",
@ -607,7 +606,7 @@
"italic": "наклонный",
"strike": "перечёркнутый",
"underline": "подчёркнутый",
"code": "текст",
"code": "код",
"quote": "цитата",
"bullet": "пункт",
"numbullet": "нумерация",
@ -659,7 +658,7 @@
"powered by Matrix": "управляемый с Matrix",
"Add a topic": "Добавить тему",
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Времея отображать в 12 часовом формате (напр. 2:30pm)",
"Use compact timeline layout": "Используйте компактным указанием времени",
"Use compact timeline layout": "Компактное отображение",
"Hide removed messages": "Скрыть удаленное сообщение",
"No Microphones detected": "Микрофоны не обнаружены",
"Unknown devices": "Незнакомое устройство",
@ -673,5 +672,227 @@
"Logged in as:": "Зарегестрирован как:",
"Default Device": "Стандартное устройство",
"No Webcams detected": "Веб-камера не обнаружена",
"VoIP": "VoIP"
"VoIP": "VoIP",
"For security, logging out will delete any end-to-end encryption keys from this browser. If you want to be able to decrypt your conversation history from future Riot sessions, please export your room keys for safe-keeping.": "Для обеспечения безопасности выход из системы удалит все ключи шифроования из этого браузера. Если вы хотите иметь возможность расшифровать переписку в будущем - вы должны экспортирвать ключи вручную.",
"Guest access is disabled on this Home Server.": "Гостевой доступ отключен на этом сервере.",
"Guests can't set avatars. Please register.": "Гости не могут устанавливать аватар. Пожалуйста, зарегистрируйтесь.",
"Guests can't use labs features. Please register.": "Гости не могут использовать экспериментальные возможности. Пожалуйста, зарегистрируйтесь.",
"Guests cannot join this room even if explicitly invited.": "Гости не могут заходить в эту комнату если не были приглашены.",
"Missing Media Permissions, click here to request.": "Отсутствуют разрешения, нажмите для запроса.",
"No media permissions": "Нет медиа разрешений",
"You may need to manually permit Riot to access your microphone/webcam": "Вам необходимо предоставить Riot доступ к микрофону или веб-камере вручную",
"Anyone": "Все",
"Are you sure you want to leave the room '%(roomName)s'?": "Вы уверены, что хотите покинуть '%(roomName)s'?",
"%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s удалил имя комнаты.",
"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.": "Смена пароля также сбросит все ключи шифрования на всех устройствах, сделав зашифрованную историю недоступной, если только вы сначала не экспортируете ключи шифрования и не импортируете их потом. В будущем это будет исправлено.",
"Custom level": "Пользовательский уровень",
"(default: %(userName)s)": "(по-умолчанию: %(userName)s)",
"Device already verified!": "Устройство уже верифицировано!",
"Device ID:": "ID устройства:",
"device id: ": "id устройства: ",
"Device key:": "Ключ устройства:",
"disabled": "отключено",
"Disable markdown formatting": "Отключить форматирование Markdown",
"Email address": "Адрес email",
"Email address (optional)": "Адрем email (не обязательно)",
"enabled": "включено",
"Error decrypting attachment": "Ошибка расшифровки файла",
"Export": "Экспорт",
"Failed to register as guest:": "Ошибка регистрации как гостя:",
"Failed to set avatar.": "Не удалось установить аватар.",
"Import": "Импорт",
"Incorrect username and/or password.": "Неверное имя пользователя и/или пароль.",
"Invalid file%(extra)s": "Неправильный файл%(extra)s",
"Invited": "Приглашен",
"Jump to first unread message.": "Перейти к первому непрочитанному сообщению.",
"List this room in %(domain)s's room directory?": "Показывать эту комнату в списке комнат %(domain)s?",
"Message not sent due to unknown devices being present": "Сообщение не было отправлено из-за присутствия неизвестного устройства",
"Mobile phone number (optional)": "Номер мобильного телефона (не обязательно)",
"Once you&#39;ve followed the link it contains, click below": "Как только вы пройдете по ссылке, нажмите на кнопку ниже",
"Password:": "Пароль:",
"Privacy warning": "Предупреждение приватности",
"Privileged Users": "Привилегированные пользователи",
"Revoke Moderator": "Снять модераторские права",
"Refer a friend to Riot:": "Расскажите другу о Riot:",
"Register": "Регистрация",
"Remote addresses for this room:": "Удаленные адреса для этой комнаты:",
"Remove %(threePid)s?": "Удалить %(threePid)s?",
"Results from DuckDuckGo": "Результаты от DuckDuckGo",
"Save": "Сохранить",
"Searches DuckDuckGo for results": "Ищет результаты через DuckDuckGo",
"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.": "Сервер может быть недоступен, перегружен или произошло что-то страшное.",
"Session ID": "ID сессии",
"%(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": "Установка имени пользователя создаст новую учетную запись",
"Signed Out": "Вышли",
"Sorry, this homeserver is using a login which is not recognised ": "Извините, этот Home Server использует логин, который не удалось распознать ",
"Tagged as: ": "Теги: ",
"The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.": "Ключ, предоставленный вами, совпадает с ключем, полученным от устройства %(userId)s с ID %(deviceId)s. Устройство помечено как верифицированное.",
"%(actionVerb)s this person?": "%(actionVerb)s этого пользователя?",
"The file '%(fileName)s' exceeds this home server's size limit for uploads": "Файл '%(fileName)s' превышает ограничение размера загрузок на этом Home Server'е",
"This Home Server does not support login using email address.": "Этот Home Server не поддерживает вход по адресу email.",
"There was a problem logging in.": "Возникла проблема входа в учетную запись.",
"The visibility of existing history will be unchanged": "Видимость текущей истории не будет изменена",
"this invitation?": "это приглашение?",
"This room is not accessible by remote Matrix servers": "Это комната закрыта для других серверов Matrix",
"To ban users": "Забанить пользователей",
"to browse the directory": "просматривать директорию",
"To configure the room": "Конфигурировать комнату",
"To invite users into the room": "Приглашать пользователей в комнату",
"to join the discussion": "присоединиться к дискуссии",
"To kick users": "Выгонять пользователей",
"To link to a room it must have": "Для создания ссылки на комнату она должна иметь",
"to make a room or": "создать комнату или",
"To remove other users' messages": "Удалять сообщения других пользователей",
"To reset your password, enter the email address linked to your account": "Чтобы сбросить ваш пароль введите адрес email, который используется аккаунтом",
"to tag as %(tagName)s": "отметить как %(tagName)s",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Вы попытались загрузить указанное сообщение в комнате, однако у вас нету разрешений для его просмотра",
"Tried to load a specific point in this room's timeline, but was unable to find it": "Вы попытались загрузить указанное сообщение в комнате, однако сервер не смог его найти",
"Unable to load device list": "Невозможно загрузить список устройств",
"Unknown (user, device) pair:": "Неизвестная пара пользователь-устройство:",
"Unmute": "Разглушить",
"Unrecognised command:": "Неизвестная команда:",
"Unrecognised room alias:": "Неизвестный псевдоним комнаты:",
"Verified key": "Верифицированный ключ",
"WARNING: Device already verified, but keys do NOT MATCH!": "ВНИМАНИЕ: устройство уже было верифицировано, однако ключи НЕ СОВПАДАЮТ!",
"WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "ВНИМАНИЕ: ОШИБКА ВЕРИФИКАЦИИ КЛЮЧЕЙ! Ключ для подписки устройства %(deviceId)s пользователя %(userId)s: \"%(fprint)s\", однако он не совпадает с предоставленным ключем \"%(fingerprint)s\". Это может означать перехват вашего канала коммуникации!",
"You have <a>disabled</a> URL previews by default.": "Предпросмотр ссылок <a>отключен</a> по-умолчанию.",
"You have <a>enabled</a> URL previews by default.": "Предпросмотр ссылок <a>включен</a> по-умолчанию.",
"You have entered an invalid contact. Try using their Matrix ID or email address.": "Вы ввели неправильный адрес. Попробуйте использовать Matrix ID или адрес email.",
"You need to enter a user name.": "Необходимо ввести имя пользователя.",
"You seem to be in a call, are you sure you want to quit?": "Вы учавствуете в звонке, вы уверены, что хотите выйти?",
"You will not be able to undo this change as you are promoting the user to have the same power level as yourself": "Вы не сможете отменить это действие так как даете пользователю такой же уровень доступа как и у вас",
"Set a Display Name": "Установить отображаемое имя",
"(~%(searchCount)s results)": "(~%(searchCount)s результатов)",
"%(severalUsers)shad their invitations withdrawn %(repeats)s times": "%(severalUsers)s отозвали свои приглашения %(repeats)s раз",
"%(oneUser)shad their invitation withdrawn %(repeats)s times": "%(oneUser)s отозвал свои приглашения %(repeats)s раз",
"%(severalUsers)shad their invitations withdrawn": "%(severalUsers)s отозвали свои приглашения",
"%(oneUser)shad their invitation withdrawn": "%(oneUser)s отозвал свое приглашение",
"Please select the destination room for this message": "Выберите комнату назначения для этого сообщения",
"Options": "Настройки",
"Passphrases must match": "Пароли должны совпадать",
"Passphrase must not be empty": "Пароль не должен быть пустым",
"Export room keys": "Экспортировать ключи",
"Enter passphrase": "Введите пароль",
"Confirm passphrase": "Подтвердите пароль",
"Import room keys": "Импортировать ключи",
"File to import": "Файл для импорта",
"This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.": "Этот процесс позволяет вам экспортировать ключи для сообщений, которые вы получили в комнатах с шифрованием, в локальный файл. Вы сможете импортировать эти ключи в другой клиент Matrix чтобы расшифровать эти сообщения.",
"The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.": "Экспортированный файл позволит любому пользователю расшифровать и зашифровать сообщения, которые вы видите, поэтому вы должны быть крайне осторожны и держать файл в надежном месте. Чтобы поспособствовать этому вы должны ввести пароль, который будет использоваться для шифрования ключей. Вы сможете импоортировать ключи только зная этот пароль.",
"This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "Этот процесс позволяем вам импортировать ключи шифрования, которые вы экспортировали ранее из клиента Matrix. После импорта вы сможете читать зашифрованную переписку и отправлять шифрованные сообщения.",
"The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "Экспортированный файл защищен паролем. Вы должны ввести этот пароль для расшифровки.",
"You must join the room to see its files": "Вы должны зайти в комнату для просмотра файлов",
"Reject all %(invitedRooms)s invites": "Отклонить все %(invitedRooms)s приглашения",
"Start new chat": "Начать новый чат",
"Guest users can't invite users. Please register.": "Гости не могут приглашать пользователей. Пожалуйста, зарегистрируйтесь.",
"Failed to invite": "Ошибка приглашения",
"Failed to invite user": "Ошибка приглашения пользователя",
"Failed to invite the following users to the %(roomName)s room:": "Ошибка приглашения следующих пользователей в %(roomName)s:",
"Confirm Removal": "Подтвердите удаление",
"Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.": "Вы уверены, что хотите удалить этот эвент? Обратите внимание, что если это смена имени комнаты или топика, то удаление отменит это изменение.",
"Unknown error": "Неизвестная ошибка",
"Incorrect password": "Неправильный пароль",
"This will make your account permanently unusable. You will not be able to re-register the same user ID.": "Это сделает вашу учетную запись нерабочей. Вы не сможете зарегистрироваться снова с тем же ID.",
"This action is irreversible.": "Это действие необратимо.",
"To continue, please enter your password.": "Для продолжения введите ваш пароль.",
"To verify that this device can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this device matches the key below:": "Для верификации устройства, пожалуйста, свяжитесь с владельцем используя другие методы коммуникации (например, лично или по телефону) и попросите его подтвердить, что он видит такой же ключ как написанный ниже:",
"Device name": "Имя устройства",
"Device key": "Ключ устройства",
"If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.": "Если совпадают, то нажмите кнопку верификации ниже. Если нет, то кто-то перехватил это устройство или ключ и вы, скорее всего, захотите внести его в черный список.",
"In future this verification process will be more sophisticated.": "В будущем процесс верификации будет усложнен.",
"Verify device": "Верифицировать устройство",
"I verify that the keys match": "Я верифицирую - ключи совпадают",
"We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.": "Обнаружена ошибка при восстановлении вашей предыдущей сессии. Вам необходимо зайти снова, шифрованные сообщения будут нечитаемы.",
"Unable to restore session": "Невозможно восстановить сессию",
"If you have previously used a more recent version of Riot, your session may be incompatible with this version. Close this window and return to the more recent version.": "Если вы использовали более новую версию Riot, то ваша сессия может быть несовместима с текущей. Закройте это окно и вернитесь к использованию более новой версии.",
"Continue anyway": "Все равно продолжить",
"Your display name is how you'll appear to others when you speak in rooms. What would you like it to be?": "Отображаемое имя - это то, как вы отображаетесь в чате. Какое имя вы хотите?",
"You are currently blacklisting unverified devices; to send messages to these devices you must verify them.": "Пока что вы вносите неверифицированные устройства в черный список автоматически. Для отправки сообщений на эти устройства вам необходимо их верифицировать.",
"We recommend you go through the verification process for each device to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.": "Рекомендуется сначала верифицировать устройства для подтверждения их владения правильным пользователем, но вы можете отправить сообщение без верификации, если хотите.",
"\"%(RoomName)s\" contains devices that you haven't seen before.": "\"%(RoomName)s\" содержит неизвестные прежде устройства.",
"Unknown Address": "Неизвестный адрес",
"Unblacklist": "Удалить из черного списка",
"Blacklist": "Добавить в черный список",
"Unverify": "Убрать верификацию",
"Verify...": "Верифицировать...",
"ex. @bob:example.com": "например @bob:example.com",
"Add User": "Добавить пользователя",
"This Home Server would like to make sure you are not a robot": "Этот Home Server хочет удостовериться что вы не робот",
"Sign in with CAS": "Войти с помощью CAS",
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.": "Вы можете использовать пользовательские настройки сервера для использования другого Home Server'а при помощи указания его URL.",
"This allows you to use this app with an existing Matrix account on a different home server.": "Это позволяет использовать это приложение с существующей учетной записью на другом Home Server'е.",
"You can also set a custom identity server but this will typically prevent interaction with users based on email address.": "Вы также можете указать пользовательский сервер идентификации, но это обычно ломает возможность общаться с пользователями с помощью адреса email.",
"Please check your email to continue registration.": "Проверьте свою почту для продолжения регистрации.",
"Token incorrect": "Неправильный токен",
"A text message has been sent to": "Текстовое сообщение было отправлено",
"Please enter the code it contains:": "Введите содержащийся код:",
"If you don't specify an email address, you won't be able to reset your password. Are you sure?": "Если вы не укажете адрес email, то вы не сможете сбросить свой пароль в будущем. Вы уверены?",
"You are registering with %(SelectedTeamName)s": "Вы регистрируетесь на %(SelectedTeamName)s",
"Default server": "Сервер по-умолчанию",
"Custom server": "Пользовательский сервер",
"Home server URL": "URL Home Server'а",
"Identity server URL": "URL сервера идентификации",
"What does this mean?": "Что это значит?",
"Error decrypting audio": "Ошибка расшифровки аудио",
"Error decrypting image": "Ошибка расшифровки изображения",
"Image '%(Body)s' cannot be displayed.": "Изображение '%(Body)s' не может быть отображено.",
"This image cannot be displayed.": "Это изображение не может быть отображено.",
"Error decrypting video": "Ошибка расшифровки видео",
"Add an Integration": "Добавить интеграцию",
"You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "Вы будете перенаправлены на внешний сайт, где вы сможете аутентифицировать свою учетную запись для использования с %(integrationsUrl)s. Вы хотите продолжить?",
"Removed or unknown message type": "Удаленный или неизвестный тип сообщения",
"Disable URL previews by default for participants in this room": "Отключить предпросмотр URL для участников этой комнаты по-умолчанию",
"URL previews are %(globalDisableUrlPreview)s by default for participants in this room.": "Предпросмотр URL %(globalDisableUrlPreview)s по-умолчанию для участников этой комнаты.",
"URL Previews": "Предпросмотр URL",
"Enable URL previews for this room (affects only you)": "Включить предпросмотр URL в этой комнате (только для вас)",
"Drop file here to upload": "Перетащите файл сюда для загрузки",
" (unsupported)": " (не поддерживается)",
"Ongoing conference call%(supportedText)s. %(joinText)s": "Идет конференц-звонок%(supportedText)s. %(joinText)s",
"for %(amount)ss": "для %(amount)s",
"for %(amount)sm": "для %(amount)s",
"for %(amount)sh": "для %(amount)s",
"for %(amount)sd": "для %(amount)s",
"Online": "В сети",
"Idle": "Отошел",
"Offline": "Не в сети",
"Disable URL previews for this room (affects only you)": "Отключить предпросмотр URL в этой комнате (только для вас)",
"$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName сменил аватар комнаты на <img/>",
"%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s удалил аватар комнаты.",
"%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s сменил аватар для %(roomName)s",
"Create new room": "Создать комнату",
"Room directory": "Каталог комнат",
"Start chat": "Начать чат",
"Welcome page": "Домашняя страница",
"Add": "Добавить",
"%(count)s new messages.one": "%(count)s новое сообщение",
"%(count)s new messages.other": "%(count)s новых сообщений",
"Error: Problem communicating with the given homeserver.": "Ошибка: проблема коммуникаций с указанным Home Server'ом.",
"Failed to fetch avatar URL": "Ошибка получения аватара",
"The phone number entered looks invalid": "Введенный номер телефона выглядит неправильным",
"Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Ошибка загрузки истории комнаты: недостаточно прав.",
"Tried to load a specific point in this room's timeline, but was unable to find it.": "Ошибка загрузки истории комнаты: запрошенный элемент не найден.",
"Uploading %(filename)s and %(count)s others.zero": "Загрузка %(filename)s",
"Uploading %(filename)s and %(count)s others.one": "Загрузка %(filename)s и %(count)s другой файл",
"Uploading %(filename)s and %(count)s others.other": "Загрузка %(filename)s и %(count)s других файлов",
"Username invalid: %(errMessage)s": "Неверное имя пользователя: %(errMessage)s",
"Searching known users": "Искать известных пользователей",
"You must <a>register</a> to use this functionality": "Вы должны <a>зарегистрироваться</a> для использования этой функции",
"<a>Resend all</a> or <a>cancel all</a> now. You can also select individual messages to resend or cancel.": "<a>Отослать снова</a> или <a>отменить отправку</a>. Вы также можете выбрать на отправку или отмену отдельные сообщения.",
"New Password": "Новый пароль",
"Start chatting": "Начать общение",
"Start Chatting": "Начать общение",
"Click on the button below to start chatting!": "Нажмите на кнопку ниже для того, чтобы начать общение!",
"Create a new chat or reuse an existing one": "Создать новый чат или использовать уже существующий",
"You already have existing direct chats with this user:": "У вас уже есть существующие приватные чаты с этим пользователем:",
"Username available": "Имя пользователя доступно",
"Username not available": "Имя пользователя недоступно",
"Something went wrong!": "Что-то пошло не так!",
"This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.": "Это будет ваше имя пользователя на <span></span>, или вы можете выбрать <a>другой сервер</a>.",
"If you already have a Matrix account you can <a>log in</a> instead.": "Если вы уже имеете учетную запись Matrix, то вы можете <a>войти</a>."
}

View file

@ -25,7 +25,7 @@
"(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\" แล้ว",
"%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s เปลี่ยนหัวข้อเป็น \"%(topic)s\"",
"Decrypt %(text)s": "ถอดรหัส %(text)s",
"Device ID": "ID อุปกรณ์",
"Device ID:": "ID อุปกรณ์:",
@ -96,8 +96,8 @@
"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 %(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...": "และอีกหนึ่งผู้ใช้...",
@ -201,7 +201,7 @@
"Hangup": "วางสาย",
"Historical": "ประวัติแชทเก่า",
"Homeserver is": "เซิร์ฟเวอร์บ้านคือ",
"Identity Server is": "เซิร์ฟเวอร์ยืนยันตัวตนคือ",
"Identity Server is": "เซิร์ฟเวอร์ระบุตัวตนคือ",
"I have verified my email address": "ฉันยืนยันที่อยู่อีเมลแล้ว",
"Import": "นำเข้า",
"Incorrect username and/or password.": "ชื่อผู้ใช้และ/หรือรหัสผ่านไม่ถูกต้อง",
@ -229,7 +229,7 @@
"Leave room": "ออกจากห้อง",
"left and rejoined": "ออกแล้วกลับเข้าร่วมอีกครั้ง",
"left": "ออกไปแล้ว",
"%(targetName)s left the room.": "%(targetName)s ออกจากห้องไปแล้ว",
"%(targetName)s left the room.": "%(targetName)s ออกจากห้องแล้ว",
"List this room in %(domain)s's room directory?": "แสดงห้องนี้ในไดเรกทอรีห้องของ %(domain)s?",
"Logged in as:": "เข้าสู่ระบบในชื่อ:",
"Login as guest": "เข้าสู่ระบบในฐานะแขก",
@ -318,10 +318,165 @@
"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": "เวลา"
"times": "ครั้ง",
"%(oneUser)schanged their name": "%(oneUser)sเปลี่ยนชื่อของเขาแล้ว",
"%(severalUsers)schanged their name %(repeats)s times": "%(severalUsers)sเปลี่ยนชื่อของพวกเขา %(repeats)s ครั้ง",
"%(oneUser)schanged their name %(repeats)s times": "%(oneUser)sเปลี่ยนชื่อของเขา %(repeats)s ครั้ง",
"%(severalUsers)schanged their name": "%(severalUsers)sเปลี่ยนชื่อของพวกเขาแล้ว",
"Create new room": "สร้างห้องใหม่",
"Room directory": "ไดเรกทอรีห้อง",
"Start chat": "เริ่มแชท",
"Welcome page": "หน้าต้อนรับ",
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "ไม่สามารถเชื่อมต่อไปยังเซิร์ฟเวอร์บ้านผ่านทาง HTTP ได้เนื่องจาก URL ที่อยู่บนเบราว์เซอร์เป็น HTTPS กรุณาใช้ HTTPS หรือ<a>เปิดใช้งานสคริปต์ที่ไม่ปลอดภัย</a>.",
"%(count)s new messages.one": "มี %(count)s ข้อความใหม่",
"%(count)s new messages.other": "มี %(count)s ข้อความใหม่",
"Disable inline URL previews by default": "ตั้งค่าเริ่มต้นให้ไม่แสดงตัวอย่าง URL ในแชท",
"Disable markdown formatting": "ปิดใช้งานการจัดรูปแบบ markdown",
"End-to-end encryption information": "ข้อมูลการเข้ารหัสจากปลายทางถึงปลายทาง",
"End-to-end encryption is in beta and may not be reliable": "การเข้ารหัสจากปลายทางถึงปลายทางยังอยู่ในเบต้า และอาจพึ่งพาไม่ได้",
"Error: Problem communicating with the given homeserver.": "ข้อผิดพลาด: มีปัญหาในการติดต่อกับเซิร์ฟเวอร์บ้านที่กำหนด",
"Export E2E room keys": "ส่งออกกุญแจถอดรหัส E2E",
"Failed to change power level": "การเปลี่ยนระดับอำนาจล้มเหลว",
"Import E2E room keys": "นำเข้ากุญแจถอดรหัส E2E",
"to favourite": "ไปยังรายการโปรด",
"to demote": "เพื่อลดขั้น",
"The default role for new room members is": "บทบาทเริ่มต้นของสมาชิกใหม่คือ",
"The phone number entered looks invalid": "ดูเหมือนว่าหมายเลขโทรศัพท์ที่กรอกรมาไม่ถูกต้อง",
"The email address linked to your account must be entered.": "กรุณากรอกที่อยู่อีเมลที่เชื่อมกับบัญชีของคุณ",
"The file '%(fileName)s' exceeds this home server's size limit for uploads": "ไฟล์ '%(fileName)s' มีขนาดใหญ่เกินจำกัดของเซิร์ฟเวอร์บ้าน",
"To send messages": "เพื่อส่งข้อความ",
"to start a chat with someone": "เพื่อเริ่มแชทกับผู้อื่น",
"to tag as %(tagName)s": "เพื่อแท็กว่า %(tagName)s",
"to tag direct chat": "เพื่อแทกว่าแชทตรง",
"Turn Markdown off": "ปิด markdown",
"Turn Markdown on": "เปิด markdown",
"%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).": "%(senderName)s ได้เปิดใช้งานการเข้ารหัสจากปลายทางถึงปลายทาง (อัลกอริทึม%(algorithm)s).",
"Unable to add email address": "ไมาสามารถเพิ่มที่อยู่อีเมล",
"Unable to verify email address.": "ไม่สามารถยืนยันที่อยู่อีเมล",
"Unban": "ปลดแบน",
"%(senderName)s unbanned %(targetName)s.": "%(senderName)s ปลดแบน %(targetName)s แล้ว",
"Unable to capture screen": "ไม่สามารถจับภาพหน้าจอ",
"Unable to enable Notifications": "ไม่สามารถเปิดใช้งานการแจ้งเตือน",
"Unable to load device list": "ไม่สามารถโหลดรายชื่ออุปกรณ์",
"Unencrypted room": "ห้องที่ไม่เข้ารหัส",
"unencrypted": "ยังไม่ได้เข้ารหัส",
"Unknown command": "คำสั่งที่ไม่รู้จัก",
"unknown device": "อุปกรณ์ที่ไม่รู้จัก",
"Unknown room %(roomId)s": "ห้องที่ไม่รู้จัก %(roomId)s",
"Unknown (user, device) pair:": "คู่ (ผู้ใช้, อุปกรณ์) ที่ไม่รู้จัก:",
"unknown": "ไม่รู้จัก",
"Unrecognised command:": "คำสั่งที่ไม่รู้จัก:",
"Unrecognised room alias:": "นามแฝงห้องที่ไม่รู้จัก:",
"Uploading %(filename)s and %(count)s others.zero": "กำลังอัปโหลด %(filename)s",
"Uploading %(filename)s and %(count)s others.one": "กำลังอัปโหลด %(filename)s และอีก %(count)s ไฟล์",
"Uploading %(filename)s and %(count)s others.other": "กำลังอัปโหลด %(filename)s และอีก %(count)s ไฟล์",
"uploaded a file": "อัปโหลดไฟล์",
"Upload Failed": "การอัปโหลดล้มเหลว",
"Upload Files": "อัปโหลดไฟล์",
"Upload file": "อัปโหลดไฟล์",
"Usage": "การใช้งาน",
"User ID": "ID ผู้ใช้",
"User Interface": "อินเตอร์เฟสผู้ใช้",
"User name": "ชื่อผู้ใช้",
"User": "ผู้ใช้",
"Warning!": "คำเตือน!",
"Who can access this room?": "ใครสามารถเข้าถึงห้องนี้ได้?",
"Who can read history?": "ใครสามารถอ่านประวัติแชทได้?",
"Who would you like to add to this room?": "คุณต้องการเพิ่มใครเข้าห้องนี้?",
"Who would you like to communicate with?": "คุณต้องการสื่อสารกับใคร?",
"You're not in any rooms yet! Press": "คุณยังไม่ได้อยู่ในห้องใดเลย! กด",
"You are trying to access %(roomName)s": "คุณกำลังพยายามเข้าสู่ %(roomName)s",
"You have <a>disabled</a> URL previews by default.": "ค่าเริ่มต้นของคุณ<a>ปิดใช้งาน</a>ตัวอย่าง URL เอาไว้",
"You have <a>enabled</a> URL previews by default.": "ค่าเริ่มต้นของคุณ<a>เปิดใช้งาน</a>ตัวอย่าง URL เอาไว้",
"you must be a": "คุณต้องเป็น",
"You must <a>register</a> to use this functionality": "คุณต้อง<a>ลงทะเบียน</a>เพื่อใช้ฟังก์ชันนี้",
"You need to be logged in.": "คุณต้องเข้าสู่ระบบก่อน",
"You need to enter a user name.": "คุณต้องกรอกชื่อผู้ใช้ก่อน",
"Your password has been reset": "รหัสผ่านถูกรีเซ็ตแล้ว",
"Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "การเปลี่ยนรหัสผ่านเสร็จสมบูณณ์ คุณจะไม่ได้รับการแจ้งเตือนบนอุปกรณ์อื่น ๆ จนกว่าคุณจะกลับเข้าสู่ระบบในอุปกรณ์เหล่านั้น",
"Sun": "อา.",
"Mon": "จ.",
"Tue": "อ.",
"Wed": "พ.",
"Thu": "พฤ.",
"Fri": "ศ.",
"Sat": "ส.",
"Jan": "ม.ค.",
"Feb": "ก.พ.",
"Mar": "มี.ค.",
"Apr": "เม.ย.",
"May": "พ.ค.",
"Jun": "มิ.ย.",
"Jul": "ก.ค.",
"Aug": "ส.ค.",
"Sep": "ก.ย.",
"Oct": "ต.ค.",
"Nov": "พ.ย.",
"Dec": "ธ.ค.",
"%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s %(day)s %(monthName)s %(time)s",
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s %(day)s %(monthName)s %(fullYear)s %(time)s",
"%(weekDayName)s %(time)s": "%(weekDayName)s %(time)s",
"Set a display name:": "ตั้งชื่อที่แสดง:",
"Set a Display Name": "ตั้งชื่อที่แสดง",
"Passwords don't match.": "รหัสผ่านไม่ตรงกัน",
"Password too short (min %(MIN_PASSWORD_LENGTH)s).": "รหัสผ่านสั้นเกินไป (ขึ้นต่ำ %(MIN_PASSWORD_LENGTH)s ตัวอักษร)",
"An unknown error occurred.": "เกิดข้อผิดพลาดที่ไม่รู้จัก",
"I already have an account": "ฉันมีบัญชีอยู่แล้ว",
"An error occured: %(error_string)s": "เกิดข้อผิดพลาด: %(error_string)s",
"Topic": "หัวข้อ",
"Make Moderator": "เลื่อนขั้นเป็นผู้ช่วยดูแล",
"Make this room private": "ทำให้ห้องนี้เป็นส่วนตัว",
"Share message history with new users": "แบ่งประวัติแชทให้ผู้ใช้ใหม่",
"Encrypt room": "เข้ารหัสห้อง",
"Room": "ห้อง",
"(~%(searchCount)s results)": "(~%(searchCount)s ผลลัพธ์)",
"or": "หรือ",
"bold": "หนา",
"italic": "เอียง",
"strike": "ขีดทับ",
"underline": "ขีดเส้นใต้",
"code": "โค๊ด",
"quote": "อ้างอิง",
"were kicked %(repeats)s times": "ถูกเตะ %(repeats)s ครั้ง",
"was kicked %(repeats)s times": "ถูกเตะ %(repeats)s ครั้ง",
"were kicked": "ถูกเตะ",
"was kicked": "ถูกเตะ",
"New Password": "รหัสผ่านใหม่",
"Options": "ตัวเลือก",
"Export room keys": "ส่งออกกุณแจห้อง",
"Confirm passphrase": "ยืนยันรหัสผ่าน",
"Import room keys": "นำเข้ากุณแจห้อง",
"File to import": "ไฟล์ที่จะนำเข้า",
"Start new chat": "เริ่มแชทใหม่",
"Failed to invite": "การเชิญล้มเหลว",
"Failed to invite user": "การเชิญผู้ใช้ล้มเหลว",
"Failed to invite the following users to the %(roomName)s room:": "การเชิญผู้ใช้เหล่านี้เข้าสู่ห้อง %(roomName)s ล้มเหลว:",
"Confirm Removal": "ยืนยันการลบ",
"Unknown error": "ข้อผิดพลาดที่ไม่รู้จัก",
"Incorrect password": "รหัสผ่านไม่ถูกต้อง",
"Device name": "ชื่ออุปกรณ์",
"Device key": "Key อุปกรณ์",
"Unknown devices": "อุปกรณ์ที่ไม่รู้จัก",
"Unknown Address": "ที่อยู่ที่ไม่รู้จัก",
"Unblacklist": "ถอดบัญชีดำ",
"Blacklist": "ขึ้นบัญชีดำ",
"ex. @bob:example.com": "เช่น @bob:example.com",
"Add User": "เพิ่มผู้ใช้",
"This Home Server would like to make sure you are not a robot": "เซิร์ฟเวอร์บ้านต้องการยืนยันว่าคุณไม่ใช่หุ่นยนต์",
"Sign in with CAS": "เข้าสู่ระบบด้วย CAS",
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.": "คุณสามารถกำหนดเซิร์ฟเวอร์บ้านเองได้โดยใส่ URL ของเซิร์ฟเวอร์นั้น เพื่อเข้าสู่ระบบของเซิร์ฟเวอร์ Matrix อื่น",
"This allows you to use this app with an existing Matrix account on a different home server.": "ทั้งนี่เพื่อให้คุณสามารถใช้ Riot กับบัญชี Matrix ที่มีอยู่แล้วบนเซิร์ฟเวอร์บ้านอื่น ๆ ได้",
"You can also set a custom identity server but this will typically prevent interaction with users based on email address.": "คุณอาจเลือกเซิร์ฟเวอร์ระบุตัวตนเองด้วยก็ได้ แต่คุณจะไม่สามารถเชิญผู้ใช้อื่นด้วยที่อยู่อีเมล หรือรับคำเชิญจากผู้ใช้อื่นทางที่อยู่อีเมลได้",
"Default server": "เซิร์ฟเวอร์เริ่มต้น",
"Custom server": "เซิร์ฟเวอร์ที่กำหนดเอง",
"Home server URL": "URL เซิร์ฟเวอร์บ้าน",
"Identity server URL": "URL เซิร์ฟเวอร์ระบุตัวตน",
"%(severalUsers)sleft %(repeats)s times": "%(targetName)sออกจากห้อง %(repeats)s ครั้ง",
"%(oneUser)sleft %(repeats)s times": "%(oneUser)sออกจากห้อง %(repeats)s ครั้ง",
"%(severalUsers)sleft": "%(severalUsers)sออกจากห้องแล้ว",
"%(oneUser)sleft": "%(oneUser)sออกจากห้องแล้ว"
}

View file

@ -76,7 +76,7 @@
"%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s 从 %(fromPowerLevel)s 变为 %(toPowerLevel)s",
"Guests can't set avatars. Please register.": "游客不能设置头像。请注册。.",
"Guest users can't create new rooms. Please register to create room and start a chat.": "游客不能创建聊天室。请注册以创建聊天室和聊天.",
"Guest users can't upload files. Please register to upload": "游客不能上传文件。请注册以上传文件",
"Guest users can't upload files. Please register to upload.": "游客不能上传文件。请注册以上传文件",
"Guests can't use labs features. Please register.": "游客不能使用实验性功能。请注册。.",
"Guests cannot join this room even if explicitly invited.": "游客不能加入此聊天室,即使有人主动邀请。.",
"had": "已经",
@ -138,7 +138,7 @@
"since the point in time of selecting this option": "从选择此选项起",
"since they joined": "从他们加入时起",
"since they were invited": "从他们被邀请时起",
"Some of your messages have not been sent": "部分消息发送失败",
"Some of your messages have not been sent.": "部分消息发送失败",
"Someone": "某个用户",
"Sorry, this homeserver is using a login which is not recognised ": "很抱歉,无法识别此主服务器使用的登录方式 ",
"Start a chat": "创建聊天",

View file

@ -194,7 +194,7 @@
"%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s 從 %(fromPowerLevel)s 變為 %(toPowerLevel)s",
"Guests can't set avatars. Please register.": "游客不能設置頭像。請注冊。.",
"Guest users can't create new rooms. Please register to create room and start a chat.": "游客不能創建聊天室。請注冊以創建聊天室和聊天.",
"Guest users can't upload files. Please register to upload": "游客不能上傳文件。請注冊以上傳文件",
"Guest users can't upload files. Please register to upload.": "游客不能上傳文件。請注冊以上傳文件",
"Guests can't use labs features. Please register.": "游客不能使用實驗性功能。請注冊。.",
"Guests cannot join this room even if explicitly invited.": "游客不能加入此聊天室,即使有人主動邀請。.",
"had": "已經",
@ -265,7 +265,7 @@
"since the point in time of selecting this option": "從選擇此選項起",
"since they joined": "從他們加入時起",
"since they were invited": "從他們被邀請時起",
"Some of your messages have not been sent": "部分消息發送失敗",
"Some of your messages have not been sent.": "部分消息發送失敗",
"Someone": "某個用戶",
"Sorry, this homeserver is using a login which is not recognised ": "很抱歉,無法識別此主伺服器使用的登錄方式 ",
"Start a chat": "創建聊天",

View file

@ -0,0 +1,79 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import dis from '../dispatcher';
import {Store} from 'flux/utils';
const INITIAL_STATE = {
deferred_action: null,
};
/**
* A class for storing application state to do with login/registration. This is a simple
* flux store that listens for actions and updates its state accordingly, informing any
* listeners (views) of state changes.
*/
class LifecycleStore extends Store {
constructor() {
super(dis);
// Initialise state
this._state = INITIAL_STATE;
}
_setState(newState) {
this._state = Object.assign(this._state, newState);
this.__emitChange();
}
__onDispatch(payload) {
switch (payload.action) {
case 'do_after_sync_prepared':
this._setState({
deferred_action: payload.deferred_action,
});
break;
case 'cancel_after_sync_prepared':
this._setState({
deferred_action: null,
});
break;
case 'sync_state':
if (payload.state !== 'PREPARED') {
break;
}
if (!this._state.deferred_action) break;
const deferredAction = Object.assign({}, this._state.deferred_action);
this._setState({
deferred_action: null,
});
dis.dispatch(deferredAction);
break;
case 'on_logged_out':
this.reset();
break;
}
}
reset() {
this._state = Object.assign({}, INITIAL_STATE);
}
}
let singletonLifecycleStore = null;
if (!singletonLifecycleStore) {
singletonLifecycleStore = new LifecycleStore();
}
module.exports = singletonLifecycleStore;

205
src/stores/RoomViewStore.js Normal file
View file

@ -0,0 +1,205 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import dis from '../dispatcher';
import {Store} from 'flux/utils';
import MatrixClientPeg from '../MatrixClientPeg';
import sdk from '../index';
import Modal from '../Modal';
import { _t } from '../languageHandler';
const INITIAL_STATE = {
// Whether we're joining the currently viewed room
joining: false,
// Any error occurred during joining
joinError: null,
// The room ID of the room
roomId: null,
// The room alias of the room (or null if not originally specified in view_room)
roomAlias: null,
// Whether the current room is loading
roomLoading: false,
// Any error that has occurred during loading
roomLoadError: null,
};
/**
* A class for storing application state for RoomView. This is the RoomView's interface
* with a subset of the js-sdk.
* ```
*/
class RoomViewStore extends Store {
constructor() {
super(dis);
// Initialise state
this._state = INITIAL_STATE;
}
_setState(newState) {
this._state = Object.assign(this._state, newState);
this.__emitChange();
}
__onDispatch(payload) {
switch (payload.action) {
// view_room:
// - room_alias: '#somealias:matrix.org'
// - room_id: '!roomid123:matrix.org'
case 'view_room':
this._viewRoom(payload);
break;
case 'view_room_error':
this._viewRoomError(payload);
break;
case 'will_join':
this._setState({
joining: true,
});
break;
case 'cancel_join':
this._setState({
joining: false,
});
break;
// join_room:
// - opts: options for joinRoom
case 'join_room':
this._joinRoom(payload);
break;
case 'joined_room':
this._joinedRoom(payload);
break;
case 'join_room_error':
this._joinRoomError(payload);
break;
case 'on_logged_out':
this.reset();
break;
}
}
_viewRoom(payload) {
// Always set the room ID if present
if (payload.room_id) {
this._setState({
roomId: payload.room_id,
roomLoading: false,
roomLoadError: null,
});
} else if (payload.room_alias) {
this._setState({
roomId: null,
roomAlias: payload.room_alias,
roomLoading: true,
roomLoadError: null,
});
MatrixClientPeg.get().getRoomIdForAlias(payload.room_alias).done(
(result) => {
dis.dispatch({
action: 'view_room',
room_id: result.room_id,
room_alias: payload.room_alias,
});
}, (err) => {
dis.dispatch({
action: 'view_room_error',
room_id: null,
room_alias: payload.room_alias,
err: err,
});
});
}
}
_viewRoomError(payload) {
this._setState({
roomId: payload.room_id,
roomAlias: payload.room_alias,
roomLoading: false,
roomLoadError: payload.err,
});
}
_joinRoom(payload) {
this._setState({
joining: true,
});
MatrixClientPeg.get().joinRoom(this._state.roomId, payload.opts).done(() => {
dis.dispatch({
action: 'joined_room',
});
}, (err) => {
dis.dispatch({
action: 'join_room_error',
err: err,
});
const msg = err.message ? err.message : JSON.stringify(err);
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: _t("Failed to join room"),
description: msg,
});
});
}
_joinedRoom(payload) {
this._setState({
joining: false,
});
}
_joinRoomError(payload) {
this._setState({
joining: false,
joinError: payload.err,
});
}
reset() {
this._state = Object.assign({}, INITIAL_STATE);
}
getRoomId() {
return this._state.roomId;
}
getRoomAlias() {
return this._state.roomAlias;
}
isRoomLoading() {
return this._state.roomLoading;
}
getRoomLoadError() {
return this._state.roomLoadError;
}
isJoining() {
return this._state.joining;
}
getJoinError() {
return this._state.joinError;
}
}
let singletonRoomViewStore = null;
if (!singletonRoomViewStore) {
singletonRoomViewStore = new RoomViewStore();
}
module.exports = singletonRoomViewStore;

View file

@ -0,0 +1,88 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import dis from '../dispatcher';
import {Store} from 'flux/utils';
const INITIAL_STATE = {
cachedPassword: localStorage.getItem('mx_pass'),
};
/**
* A class for storing application state to do with the session. This is a simple flux
* store that listens for actions and updates its state accordingly, informing any
* listeners (views) of state changes.
*
* Usage:
* ```
* sessionStore.addListener(() => {
* this.setState({ cachedPassword: sessionStore.getCachedPassword() })
* })
* ```
*/
class SessionStore extends Store {
constructor() {
super(dis);
// Initialise state
this._state = INITIAL_STATE;
}
_update() {
// Persist state to localStorage
if (this._state.cachedPassword) {
localStorage.setItem('mx_pass', this._state.cachedPassword);
} else {
localStorage.removeItem('mx_pass', this._state.cachedPassword);
}
this.__emitChange();
}
_setState(newState) {
this._state = Object.assign(this._state, newState);
this._update();
}
__onDispatch(payload) {
switch (payload.action) {
case 'cached_password':
this._setState({
cachedPassword: payload.cachedPassword,
});
break;
case 'password_changed':
this._setState({
cachedPassword: null,
});
break;
case 'on_logged_out':
this._setState({
cachedPassword: null,
});
break;
}
}
getCachedPassword() {
return this._state.cachedPassword;
}
}
let singletonSessionStore = null;
if (!singletonSessionStore) {
singletonSessionStore = new SessionStore();
}
module.exports = singletonSessionStore;

View file

@ -1,67 +0,0 @@
var React = require('react');
var expect = require('expect');
var sinon = require('sinon');
var ReactDOM = require("react-dom");
var sdk = require('matrix-react-sdk');
var RoomView = sdk.getComponent('structures.RoomView');
var peg = require('../../../src/MatrixClientPeg');
var test_utils = require('../../test-utils');
var q = require('q');
var Skinner = require("../../../src/Skinner");
var stubComponent = require('../../components/stub-component.js');
describe('RoomView', function () {
var sandbox;
var parentDiv;
beforeEach(function() {
test_utils.beforeEach(this);
sandbox = test_utils.stubClient();
parentDiv = document.createElement('div');
this.oldTimelinePanel = Skinner.getComponent('structures.TimelinePanel');
this.oldRoomHeader = Skinner.getComponent('views.rooms.RoomHeader');
Skinner.addComponent('structures.TimelinePanel', stubComponent());
Skinner.addComponent('views.rooms.RoomHeader', stubComponent());
peg.get().credentials = { userId: "@test:example.com" };
});
afterEach(function() {
sandbox.restore();
ReactDOM.unmountComponentAtNode(parentDiv);
Skinner.addComponent('structures.TimelinePanel', this.oldTimelinePanel);
Skinner.addComponent('views.rooms.RoomHeader', this.oldRoomHeader);
});
it('resolves a room alias to a room id', function (done) {
peg.get().getRoomIdForAlias.returns(q({room_id: "!randomcharacters:aser.ver"}));
function onRoomIdResolved(room_id) {
expect(room_id).toEqual("!randomcharacters:aser.ver");
done();
}
ReactDOM.render(<RoomView roomAddress="#alias:ser.ver" onRoomIdResolved={onRoomIdResolved} />, parentDiv);
});
it('joins by alias if given an alias', function (done) {
peg.get().getRoomIdForAlias.returns(q({room_id: "!randomcharacters:aser.ver"}));
peg.get().getProfileInfo.returns(q({displayname: "foo"}));
var roomView = ReactDOM.render(<RoomView roomAddress="#alias:ser.ver" />, parentDiv);
peg.get().joinRoom = function(x) {
expect(x).toEqual('#alias:ser.ver');
done();
};
process.nextTick(function() {
roomView.onJoinButtonClicked();
});
});
});

View file

@ -0,0 +1,105 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const React = require('react');
const ReactDOM = require('react-dom');
const ReactTestUtils = require('react-addons-test-utils');
const expect = require('expect');
const testUtils = require('test-utils');
const sdk = require('matrix-react-sdk');
const Registration = sdk.getComponent('structures.login.Registration');
let rtsClient;
let client;
const TEAM_CONFIG = {
supportEmail: 'support@some.domain',
teamServerURL: 'http://someteamserver.bla',
};
const CREDENTIALS = {userId: '@me:here'};
const MOCK_REG_RESPONSE = {
user_id: CREDENTIALS.userId,
device_id: 'mydevice',
access_token: '2234569864534231',
};
describe('Registration', function() {
beforeEach(function() {
testUtils.beforeEach(this);
client = testUtils.createTestClient();
client.credentials = CREDENTIALS;
// Mock an RTS client that supports one team and naively returns team tokens when
// tracking by mapping email SIDs to team tokens. This is fine because we only
// want to assert the client behaviour such that a user recognised by the
// rtsClient (which would normally talk to the RTS server) as a team member is
// correctly logged in as one (and other such assertions).
rtsClient = testUtils.createTestRtsClient(
{
'myawesometeam123': {
name: 'Team Awesome',
domain: 'team.awesome.net',
},
},
{'someEmailSid1234': 'myawesometeam123'},
);
});
it('should track a referral following successful registration of a team member', function(done) {
const expectedCreds = {
userId: MOCK_REG_RESPONSE.user_id,
deviceId: MOCK_REG_RESPONSE.device_id,
homeserverUrl: client.getHomeserverUrl(),
identityServerUrl: client.getIdentityServerUrl(),
accessToken: MOCK_REG_RESPONSE.access_token,
};
const onLoggedIn = function(creds, teamToken) {
expect(creds).toEqual(expectedCreds);
expect(teamToken).toBe('myawesometeam123');
done();
};
const res = ReactTestUtils.renderIntoDocument(
<Registration
teamServerConfig={TEAM_CONFIG}
onLoggedIn={onLoggedIn}
rtsClient={rtsClient}
/>,
);
res._onUIAuthFinished(true, MOCK_REG_RESPONSE, {emailSid: 'someEmailSid1234'});
});
it('should NOT track a referral following successful registration of a non-team member', function(done) {
const onLoggedIn = expect.createSpy().andCall(function(creds, teamToken) {
expect(teamToken).toNotExist();
done();
});
const res = ReactTestUtils.renderIntoDocument(
<Registration
teamServerConfig={TEAM_CONFIG}
onLoggedIn={onLoggedIn}
rtsClient={rtsClient}
/>,
);
res._onUIAuthFinished(true, MOCK_REG_RESPONSE, {emailSid: 'someOtherEmailSid11'});
});
});

View file

@ -0,0 +1,86 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const React = require('react');
const ReactDOM = require("react-dom");
const ReactTestUtils = require('react-addons-test-utils');
const expect = require('expect');
const testUtils = require('test-utils');
const sdk = require('matrix-react-sdk');
const RegistrationForm = sdk.getComponent('views.login.RegistrationForm');
const TEAM_CONFIG = {
supportEmail: "support@some.domain",
teams: [
{ name: "The Team Org.", domain: "team.ac.uk" },
{ name: "The Super Team", domain: "superteam.ac.uk" },
],
};
function doInputEmail(inputEmail, onTeamSelected) {
const res = ReactTestUtils.renderIntoDocument(
<RegistrationForm
teamsConfig={TEAM_CONFIG}
onTeamSelected={onTeamSelected}
/>,
);
const teamInput = res.refs.email;
teamInput.value = inputEmail;
ReactTestUtils.Simulate.change(teamInput);
ReactTestUtils.Simulate.blur(teamInput);
return res;
}
function expectTeamSelectedFromEmailInput(inputEmail, expectedTeam) {
const onTeamSelected = expect.createSpy();
doInputEmail(inputEmail, onTeamSelected);
expect(onTeamSelected).toHaveBeenCalledWith(expectedTeam);
}
function expectSupportFromEmailInput(inputEmail, isSupportShown) {
const onTeamSelected = expect.createSpy();
const res = doInputEmail(inputEmail, onTeamSelected);
expect(res.state.showSupportEmail).toBe(isSupportShown);
}
describe('RegistrationForm', function() {
beforeEach(function() {
testUtils.beforeEach(this);
});
it('should select a team when a team email is entered', function() {
expectTeamSelectedFromEmailInput("member@team.ac.uk", TEAM_CONFIG.teams[0]);
});
it('should not select a team when an unrecognised team email is entered', function() {
expectTeamSelectedFromEmailInput("member@someunknownteam.ac.uk", null);
});
it('should show support when an unrecognised team email is entered', function() {
expectSupportFromEmailInput("member@someunknownteam.ac.uk", true);
});
it('should NOT show support when an unrecognised non-team email is entered', function() {
expectSupportFromEmailInput("someone@yahoo.com", false);
});
});

View file

@ -0,0 +1,59 @@
import expect from 'expect';
import dis from '../../src/dispatcher';
import RoomViewStore from '../../src/stores/RoomViewStore';
import peg from '../../src/MatrixClientPeg';
import * as testUtils from '../test-utils';
import q from 'q';
const dispatch = testUtils.getDispatchForStore(RoomViewStore);
describe('RoomViewStore', function() {
let sandbox;
beforeEach(function() {
testUtils.beforeEach(this);
sandbox = testUtils.stubClient();
peg.get().credentials = { userId: "@test:example.com" };
// Reset the state of the store
RoomViewStore.reset();
});
afterEach(function() {
sandbox.restore();
});
it('can be used to view a room by ID and join', function(done) {
peg.get().joinRoom = (roomId) => {
expect(roomId).toBe("!randomcharacters:aser.ver");
done();
};
dispatch({ action: 'view_room', room_id: '!randomcharacters:aser.ver' });
dispatch({ action: 'join_room' });
expect(RoomViewStore.isJoining()).toBe(true);
});
it('can be used to view a room by alias and join', function(done) {
peg.get().getRoomIdForAlias.returns(q({room_id: "!randomcharacters:aser.ver"}));
peg.get().joinRoom = (roomId) => {
expect(roomId).toBe("!randomcharacters:aser.ver");
done();
};
RoomViewStore.addListener(() => {
// Wait until the room alias has resolved and the room ID is
if (!RoomViewStore.isRoomLoading()) {
expect(RoomViewStore.getRoomId()).toBe("!randomcharacters:aser.ver");
dispatch({ action: 'join_room' });
expect(RoomViewStore.isJoining()).toBe(true);
}
});
dispatch({ action: 'view_room', room_alias: '#somealias2:aser.ver' });
});
});

View file

@ -4,7 +4,8 @@ import sinon from 'sinon';
import q from 'q';
import ReactTestUtils from 'react-addons-test-utils';
import peg from '../src/MatrixClientPeg.js';
import peg from '../src/MatrixClientPeg';
import dis from '../src/dispatcher';
import jssdk from 'matrix-js-sdk';
const MatrixEvent = jssdk.MatrixEvent;
@ -133,6 +134,21 @@ export function createTestClient() {
sendHtmlMessage: () => q({}),
getSyncState: () => "SYNCING",
generateClientSecret: () => "t35tcl1Ent5ECr3T",
isGuest: () => false,
};
}
export function createTestRtsClient(teamMap, sidMap) {
return {
getTeamsConfig() {
return q(Object.keys(teamMap).map((token) => teamMap[token]));
},
trackReferral(referrer, emailSid, clientSecret) {
return q({team_token: sidMap[emailSid]});
},
getTeam(teamToken) {
return q(teamMap[teamToken]);
},
};
}
@ -275,3 +291,13 @@ export function mkStubRoom(roomId = null) {
},
};
}
export function getDispatchForStore(store) {
// Mock the dispatcher by gut-wrenching. Stores can only __emitChange whilst a
// dispatcher `_isDispatching` is true.
return (payload) => {
dis._isDispatching = true;
dis._callbacks[store._dispatchToken](payload);
dis._isDispatching = false;
};
}