Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Weblate 2017-11-01 17:44:09 +00:00
commit fe495db6e2
14 changed files with 207 additions and 241 deletions

View file

@ -68,10 +68,8 @@ module.exports = {
const names = whoIsTyping.map(function(m) { const names = whoIsTyping.map(function(m) {
return m.name; return m.name;
}); });
if (othersCount==1) { if (othersCount>=1) {
return _t('%(names)s and one other are typing', {names: names.slice(0, limit - 1).join(', ')}); return _t('%(names)s and %(count)s others are typing', {names: names.slice(0, limit - 1).join(', '), count: othersCount});
} else if (othersCount>1) {
return _t('%(names)s and %(count)s others are typing', {names: names.slice(0, limit - 1).join(', '), count: othersCount});
} else { } else {
const lastPerson = names.pop(); const lastPerson = names.pop();
return _t('%(names)s and %(lastPerson)s are typing', {names: names.join(', '), lastPerson: lastPerson}); return _t('%(names)s and %(lastPerson)s are typing', {names: names.join(', '), lastPerson: lastPerson});

View file

@ -166,7 +166,7 @@ module.exports = React.createClass({
} else if (this.state.progress === "sent_email") { } else if (this.state.progress === "sent_email") {
resetPasswordJsx = ( resetPasswordJsx = (
<div> <div>
{ _t('An email has been sent to') } { this.state.email }. { _t("Once you've followed the link it contains, click below") }. { _t("An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.", { emailAddress: this.state.email }) }
<br /> <br />
<input className="mx_Login_submit" type="button" onClick={this.onVerify} <input className="mx_Login_submit" type="button" onClick={this.onVerify}
value={_t('I have verified my email address')} /> value={_t('I have verified my email address')} />

View file

@ -36,6 +36,7 @@ export default React.createClass({
// group member object. Supply either this or 'member' // group member object. Supply either this or 'member'
groupMember: GroupMemberType, groupMember: GroupMemberType,
action: React.PropTypes.string.isRequired, // eg. 'Ban' action: React.PropTypes.string.isRequired, // eg. 'Ban'
title: React.PropTypes.string.isRequired, // eg. 'Ban this user?'
// Whether to display a text field for a reason // Whether to display a text field for a reason
// If true, the second argument to onFinished will // If true, the second argument to onFinished will
@ -75,7 +76,6 @@ export default React.createClass({
const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar"); const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar");
const BaseAvatar = sdk.getComponent("views.avatars.BaseAvatar"); const BaseAvatar = sdk.getComponent("views.avatars.BaseAvatar");
const title = _t("%(actionVerb)s this person?", { actionVerb: this.props.action});
const confirmButtonClass = classnames({ const confirmButtonClass = classnames({
'mx_Dialog_primary': true, 'mx_Dialog_primary': true,
'danger': this.props.danger, 'danger': this.props.danger,
@ -113,7 +113,7 @@ export default React.createClass({
return ( return (
<BaseDialog className="mx_ConfirmUserActionDialog" onFinished={this.props.onFinished} <BaseDialog className="mx_ConfirmUserActionDialog" onFinished={this.props.onFinished}
onEnterPressed={this.onOk} onEnterPressed={this.onOk}
title={title} title={this.props.title}
> >
<div className="mx_Dialog_content"> <div className="mx_Dialog_content">
<div className="mx_ConfirmUserActionDialog_avatar"> <div className="mx_ConfirmUserActionDialog_avatar">

View file

@ -86,7 +86,6 @@ module.exports = React.createClass({
const summaries = orderedTransitionSequences.map((transitions) => { const summaries = orderedTransitionSequences.map((transitions) => {
const userNames = eventAggregates[transitions]; const userNames = eventAggregates[transitions];
const nameList = this._renderNameList(userNames); const nameList = this._renderNameList(userNames);
const plural = userNames.length > 1;
const splitTransitions = transitions.split(','); const splitTransitions = transitions.split(',');
@ -101,13 +100,13 @@ module.exports = React.createClass({
const descs = coalescedTransitions.map((t) => { const descs = coalescedTransitions.map((t) => {
return this._getDescriptionForTransition( return this._getDescriptionForTransition(
t.transitionType, plural, t.repeats, t.transitionType, userNames.length, t.repeats,
); );
}); });
const desc = this._renderCommaSeparatedList(descs); const desc = this._renderCommaSeparatedList(descs);
return nameList + " " + desc; return _t('%(nameList)s %(transitionList)s', { nameList: nameList, transitionList: desc });
}); });
if (!summaries) { if (!summaries) {
@ -208,148 +207,75 @@ module.exports = React.createClass({
* For a certain transition, t, describe what happened to the users that * For a certain transition, t, describe what happened to the users that
* underwent the transition. * underwent the transition.
* @param {string} t the transition type. * @param {string} t the transition type.
* @param {boolean} plural whether there were multiple users undergoing the same * @param {integer} userCount number of usernames
* transition.
* @param {number} repeats the number of times the transition was repeated in a row. * @param {number} repeats the number of times the transition was repeated in a row.
* @returns {string} the written Human Readable equivalent of the transition. * @returns {string} the written Human Readable equivalent of the transition.
*/ */
_getDescriptionForTransition(t, plural, repeats) { _getDescriptionForTransition(t, userCount, repeats) {
// The empty interpolations 'severalUsers' and 'oneUser' // The empty interpolations 'severalUsers' and 'oneUser'
// are there only to show translators to non-English languages // are there only to show translators to non-English languages
// that the verb is conjugated to plural or singular Subject. // that the verb is conjugated to plural or singular Subject.
let res = null; let res = null;
switch(t) { switch(t) {
case "joined": case "joined":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)sjoined %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)sjoined %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)sjoined %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)sjoined %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)sjoined", { severalUsers: "" })
: _t("%(oneUser)sjoined", { oneUser: "" });
}
break; break;
case "left": case "left":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)sleft %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)sleft %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)sleft %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)sleft %(repeats)s times", { oneUser: "", repeats: repeats }); break;
} else {
res = (plural)
? _t("%(severalUsers)sleft", { severalUsers: "" })
: _t("%(oneUser)sleft", { oneUser: "" });
}
break;
case "joined_and_left": case "joined_and_left":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)sjoined and left %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)sjoined and left %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)sjoined and left %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)sjoined and left %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)sjoined and left", { severalUsers: "" })
: _t("%(oneUser)sjoined and left", { oneUser: "" });
}
break; break;
case "left_and_joined": case "left_and_joined":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)sleft and rejoined %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)sleft and rejoined %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)sleft and rejoined %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)sleft and rejoined %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)sleft and rejoined", { severalUsers: "" })
: _t("%(oneUser)sleft and rejoined", { oneUser: "" });
}
break; break;
case "invite_reject": case "invite_reject":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)srejected their invitations %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)srejected their invitations %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)srejected their invitation %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)srejected their invitation %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)srejected their invitations", { severalUsers: "" })
: _t("%(oneUser)srejected their invitation", { oneUser: "" });
}
break; break;
case "invite_withdrawal": case "invite_withdrawal":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)shad their invitations withdrawn %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)shad their invitations withdrawn %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)shad their invitation withdrawn %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)shad their invitation withdrawn %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)shad their invitations withdrawn", { severalUsers: "" })
: _t("%(oneUser)shad their invitation withdrawn", { oneUser: "" });
}
break; break;
case "invited": case "invited":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("were invited %(count)s times", { count: repeats })
? _t("were invited %(repeats)s times", { repeats: repeats }) : _t("was invited %(count)s times", { count: repeats });
: _t("was invited %(repeats)s times", { repeats: repeats });
} else {
res = (plural)
? _t("were invited")
: _t("was invited");
}
break; break;
case "banned": case "banned":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("were banned %(count)s times", { count: repeats })
? _t("were banned %(repeats)s times", { repeats: repeats }) : _t("was banned %(count)s times", { count: repeats });
: _t("was banned %(repeats)s times", { repeats: repeats });
} else {
res = (plural)
? _t("were banned")
: _t("was banned");
}
break; break;
case "unbanned": case "unbanned":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("were unbanned %(count)s times", { count: repeats })
? _t("were unbanned %(repeats)s times", { repeats: repeats }) : _t("was unbanned %(count)s times", { count: repeats });
: _t("was unbanned %(repeats)s times", { repeats: repeats });
} else {
res = (plural)
? _t("were unbanned")
: _t("was unbanned");
}
break; break;
case "kicked": case "kicked":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("were kicked %(count)s times", { count: repeats })
? _t("were kicked %(repeats)s times", { repeats: repeats }) : _t("was kicked %(count)s times", { count: repeats });
: _t("was kicked %(repeats)s times", { repeats: repeats });
} else {
res = (plural)
? _t("were kicked")
: _t("was kicked");
}
break; break;
case "changed_name": case "changed_name":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)schanged their name %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)schanged their name %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)schanged their name %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)schanged their name %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)schanged their name", { severalUsers: "" })
: _t("%(oneUser)schanged their name", { oneUser: "" });
}
break; break;
case "changed_avatar": case "changed_avatar":
if (repeats > 1) { res = (userCount > 1)
res = (plural) ? _t("%(severalUsers)schanged their avatar %(count)s times", { severalUsers: "", count: repeats })
? _t("%(severalUsers)schanged their avatar %(repeats)s times", { severalUsers: "", repeats: repeats }) : _t("%(oneUser)schanged their avatar %(count)s times", { oneUser: "", count: repeats });
: _t("%(oneUser)schanged their avatar %(repeats)s times", { oneUser: "", repeats: repeats });
} else {
res = (plural)
? _t("%(severalUsers)schanged their avatar", { severalUsers: "" })
: _t("%(oneUser)schanged their avatar", { oneUser: "" });
}
break; break;
} }
@ -376,11 +302,9 @@ module.exports = React.createClass({
return ""; return "";
} else if (items.length === 1) { } else if (items.length === 1) {
return items[0]; return items[0];
} else if (remaining) { } else if (remaining > 0) {
items = items.slice(0, itemLimit); items = items.slice(0, itemLimit);
return (remaining > 1) return _t("%(items)s and %(count)s others", { items: items.join(', '), count: remaining } )
? _t("%(items)s and %(remaining)s others", { items: items.join(', '), remaining: remaining } )
: _t("%(items)s and one other", { items: items.join(', ') });
} else { } else {
const lastItem = items.pop(); const lastItem = items.pop();
return _t("%(items)s and %(lastItem)s", { items: items.join(', '), lastItem: lastItem }); return _t("%(items)s and %(lastItem)s", { items: items.join(', '), lastItem: lastItem });

View file

@ -85,6 +85,8 @@ module.exports = React.createClass({
Modal.createDialog(ConfirmUserActionDialog, { Modal.createDialog(ConfirmUserActionDialog, {
groupMember: this.props.groupMember, groupMember: this.props.groupMember,
action: this.state.isUserInvited ? _t('Disinvite') : _t('Remove from community'), action: this.state.isUserInvited ? _t('Disinvite') : _t('Remove from community'),
title: this.state.isUserInvited ? _t('Disinvite this user from community?')
: _t('Remove this user from community?'),
danger: true, danger: true,
onFinished: (proceed) => { onFinished: (proceed) => {
if (!proceed) return; if (!proceed) return;

View file

@ -20,7 +20,7 @@ import url from 'url';
import classnames from 'classnames'; import classnames from 'classnames';
import sdk from '../../../index'; import sdk from '../../../index';
import { _t } from '../../../languageHandler'; import { _t, _tJsx } from '../../../languageHandler';
/* This file contains a collection of components which are used by the /* This file contains a collection of components which are used by the
* InteractiveAuth to prompt the user to enter the information needed * InteractiveAuth to prompt the user to enter the information needed
@ -256,7 +256,7 @@ export const EmailIdentityAuthEntry = React.createClass({
} else { } else {
return ( return (
<div> <div>
<p>{ _t("An email has been sent to") } <i>{ this.props.inputs.emailAddress }</i></p> <p>{ _tJsx("An email has been sent to %(emailAddress)s", /%\(emailAddress\)s/, (sub) => <i>{this.props.inputs.emailAddress}</i>) }</p>
<p>{ _t("Please check your email to continue registration.") }</p> <p>{ _t("Please check your email to continue registration.") }</p>
</div> </div>
); );
@ -370,7 +370,7 @@ export const MsisdnAuthEntry = React.createClass({
}); });
return ( return (
<div> <div>
<p>{ _t("A text message has been sent to") } +<i>{ this._msisdn }</i></p> <p>{ _tJsx("A text message has been sent to %(msisdn)s", /%\(msisdn\)s/, (sub) => <i>{this._msisdn}</i>) }</p>
<p>{ _t("Please enter the code it contains:") }</p> <p>{ _t("Please enter the code it contains:") }</p>
<div className="mx_InteractiveAuthEntryComponents_msisdnWrapper"> <div className="mx_InteractiveAuthEntryComponents_msisdnWrapper">
<form onSubmit={this._onFormSubmit}> <form onSubmit={this._onFormSubmit}>

View file

@ -19,6 +19,7 @@
import React from 'react'; import React from 'react';
import sdk from '../../../index'; import sdk from '../../../index';
import Flair from '../elements/Flair.js'; import Flair from '../elements/Flair.js';
import { _tJsx } from '../../../languageHandler';
export default function SenderProfile(props) { export default function SenderProfile(props) {
const EmojiText = sdk.getComponent('elements.EmojiText'); const EmojiText = sdk.getComponent('elements.EmojiText');
@ -30,23 +31,39 @@ export default function SenderProfile(props) {
return <span />; // emote message must include the name so don't duplicate it return <span />; // emote message must include the name so don't duplicate it
} }
// Name + flair
const nameElem = [
<EmojiText key='name' className="mx_SenderProfile_name">{ name || '' }</EmojiText>,
props.enableFlair ?
<Flair key='flair'
userId={mxEvent.getSender()}
roomId={mxEvent.getRoomId()}
showRelated={true} />
: null,
];
let content = '';
if(props.text) {
// Replace senderName, and wrap surrounding text in spans with the right class
content = _tJsx(props.text, /^(.*)\%\(senderName\)s(.*)$/m, (p1, p2) => [
p1 ? <span className='mx_SenderProfile_aux'>{ p1 }</span> : null,
nameElem,
p2 ? <span className='mx_SenderProfile_aux'>{ p2 }</span> : null,
]);
} else {
content = nameElem;
}
return ( return (
<div className="mx_SenderProfile" dir="auto" onClick={props.onClick}> <div className="mx_SenderProfile" dir="auto" onClick={props.onClick}>
<EmojiText className="mx_SenderProfile_name">{ name || '' }</EmojiText> { content }
{ props.enableFlair ?
<Flair
userId={mxEvent.getSender()}
roomId={mxEvent.getRoomId()}
showRelated={true} />
: null
}
{ props.aux ? <EmojiText className="mx_SenderProfile_aux"> { props.aux }</EmojiText> : null }
</div> </div>
); );
} }
SenderProfile.propTypes = { SenderProfile.propTypes = {
mxEvent: React.PropTypes.object.isRequired, // event whose sender we're showing mxEvent: React.PropTypes.object.isRequired, // event whose sender we're showing
aux: React.PropTypes.string, // stuff to go after the sender name, if anything text: React.PropTypes.string, // Text to show. Defaults to sender name
onClick: React.PropTypes.func, onClick: React.PropTypes.func,
}; };

View file

@ -19,7 +19,7 @@ limitations under the License.
const React = require('react'); const React = require('react');
const classNames = require("classnames"); const classNames = require("classnames");
import { _t } from '../../../languageHandler'; import { _t, _td } from '../../../languageHandler';
const Modal = require('../../../Modal'); const Modal = require('../../../Modal');
const sdk = require('../../../index'); const sdk = require('../../../index');
@ -502,12 +502,12 @@ module.exports = withMatrixClient(React.createClass({
} }
if (needsSenderProfile) { if (needsSenderProfile) {
let aux = null; let text = null;
if (!this.props.tileShape) { if (!this.props.tileShape) {
if (msgtype === 'm.image') aux = _t('sent an image'); if (msgtype === 'm.image') text = _td('%(senderName)s sent an image');
else if (msgtype === 'm.video') aux = _t('sent a video'); else if (msgtype === 'm.video') text = _td('%(senderName)s sent a video');
else if (msgtype === 'm.file') aux = _t('uploaded a file'); else if (msgtype === 'm.file') text = _td('%(senderName)s uploaded a file');
sender = <SenderProfile onClick={this.onSenderProfileClick} mxEvent={this.props.mxEvent} enableFlair={!aux} aux={aux} />; sender = <SenderProfile onClick={this.onSenderProfileClick} mxEvent={this.props.mxEvent} enableFlair={!text} text={text} />;
} else { } else {
sender = <SenderProfile mxEvent={this.props.mxEvent} enableFlair={true} />; sender = <SenderProfile mxEvent={this.props.mxEvent} enableFlair={true} />;
} }

View file

@ -256,11 +256,11 @@ module.exports = withMatrixClient(React.createClass({
onKick: function() { onKick: function() {
const membership = this.props.member.membership; const membership = this.props.member.membership;
const kickLabel = membership === "invite" ? _t("Disinvite") : _t("Kick");
const ConfirmUserActionDialog = sdk.getComponent("dialogs.ConfirmUserActionDialog"); const ConfirmUserActionDialog = sdk.getComponent("dialogs.ConfirmUserActionDialog");
Modal.createTrackedDialog('Confirm User Action Dialog', 'onKick', ConfirmUserActionDialog, { Modal.createTrackedDialog('Confirm User Action Dialog', 'onKick', ConfirmUserActionDialog, {
member: this.props.member, member: this.props.member,
action: kickLabel, action: membership === "invite" ? _t("Disinvite") : _t("Kick"),
title: membership === "invite" ? _t("Disinvite this user?") : _t("Kick this user?"),
askReason: membership === "join", askReason: membership === "join",
danger: true, danger: true,
onFinished: (proceed, reason) => { onFinished: (proceed, reason) => {
@ -294,6 +294,7 @@ module.exports = withMatrixClient(React.createClass({
Modal.createTrackedDialog('Confirm User Action Dialog', 'onBanOrUnban', ConfirmUserActionDialog, { Modal.createTrackedDialog('Confirm User Action Dialog', 'onBanOrUnban', ConfirmUserActionDialog, {
member: this.props.member, member: this.props.member,
action: this.props.member.membership === 'ban' ? _t("Unban") : _t("Ban"), action: this.props.member.membership === 'ban' ? _t("Unban") : _t("Ban"),
title: this.props.member.membership === 'ban' ? _t("Unban this user?") : _t("Ban this user?"),
askReason: this.props.member.membership !== 'ban', askReason: this.props.member.membership !== 'ban',
danger: this.props.member.membership !== 'ban', danger: this.props.member.membership !== 'ban',
onFinished: (proceed, reason) => { onFinished: (proceed, reason) => {

View file

@ -34,27 +34,18 @@ const Receipt = require('../../../utils/Receipt');
const HIDE_CONFERENCE_CHANS = true; const HIDE_CONFERENCE_CHANS = true;
function phraseForSection(section) { function phraseForSection(section) {
// These would probably be better as individual strings,
// but for some reason we have translations for these strings
// as-is, so keeping it like this for now.
let verb;
switch (section) { switch (section) {
case 'm.favourite': case 'm.favourite':
verb = _t('to favourite'); return _t('Drop here to favourite');
break;
case 'im.vector.fake.direct': case 'im.vector.fake.direct':
verb = _t('to tag direct chat'); return _t('Drop here to tag direct chat');
break;
case 'im.vector.fake.recent': case 'im.vector.fake.recent':
verb = _t('to restore'); return _t('Drop here to restore');
break;
case 'm.lowpriority': case 'm.lowpriority':
verb = _t('to demote'); return _t('Drop here to demote');
break;
default: default:
return _t('Drop here to tag %(section)s', {section: section}); return _t('Drop here to tag %(section)s', {section: section});
} }
return _t('Drop here %(toAction)s', {toAction: verb});
} }
module.exports = React.createClass({ module.exports = React.createClass({

View file

@ -83,10 +83,8 @@ module.exports = React.createClass({
} }
}, },
_roomNameElement: function(fallback) { _roomNameElement: function() {
fallback = fallback || _t('a room'); return this.props.room ? this.props.room.name : (this.props.room_alias || "");
const name = this.props.room ? this.props.room.name : (this.props.room_alias || "");
return name ? name : fallback;
}, },
render: function() { render: function() {
@ -150,7 +148,7 @@ module.exports = React.createClass({
</div> </div>
); );
} else if (kicked || banned) { } else if (kicked || banned) {
const roomName = this._roomNameElement(_t('This room')); const roomName = this._roomNameElement();
const kickerMember = this.props.room.currentState.getMember( const kickerMember = this.props.room.currentState.getMember(
myMember.events.member.getSender(), myMember.events.member.getSender(),
); );
@ -167,9 +165,17 @@ module.exports = React.createClass({
let actionText; let actionText;
if (kicked) { if (kicked) {
actionText = _t("You have been kicked from %(roomName)s by %(userName)s.", {roomName: roomName, userName: kickerName}); if(roomName) {
actionText = _t("You have been kicked from %(roomName)s by %(userName)s.", {roomName: roomName, userName: kickerName});
} else {
actionText = _t("You have been kicked from this room by %(userName)s.", {userName: kickerName});
}
} else if (banned) { } else if (banned) {
actionText = _t("You have been banned from %(roomName)s by %(userName)s.", {roomName: roomName, userName: kickerName}); if(roomName) {
actionText = _t("You have been banned from %(roomName)s by %(userName)s.", {roomName: roomName, userName: kickerName});
} else {
actionText = _t("You have been banned from this room by %(userName)s.", {userName: kickerName});
}
} // no other options possible due to the kicked || banned check above. } // no other options possible due to the kicked || banned check above.
joinBlock = ( joinBlock = (
@ -203,7 +209,7 @@ module.exports = React.createClass({
joinBlock = ( joinBlock = (
<div> <div>
<div className="mx_RoomPreviewBar_join_text"> <div className="mx_RoomPreviewBar_join_text">
{ _t('You are trying to access %(roomName)s.', {roomName: name}) } { name ? _t('You are trying to access %(roomName)s.', {roomName: name}) : _t('You are trying to access a room.') }
<br /> <br />
{ _tJsx("<a>Click here</a> to join the discussion!", { _tJsx("<a>Click here</a> to join the discussion!",
/<a>(.*?)<\/a>/, /<a>(.*?)<\/a>/,

View file

@ -71,6 +71,7 @@ const BannedUser = React.createClass({
Modal.createTrackedDialog('Confirm User Action Dialog', 'onUnbanClick', ConfirmUserActionDialog, { Modal.createTrackedDialog('Confirm User Action Dialog', 'onUnbanClick', ConfirmUserActionDialog, {
member: this.props.member, member: this.props.member,
action: _t('Unban'), action: _t('Unban'),
title: _t('Unban this user?'),
danger: false, danger: false,
onFinished: (proceed) => { onFinished: (proceed) => {
if (!proceed) return; if (!proceed) return;
@ -866,21 +867,21 @@ module.exports = React.createClass({
disabled={!roomState.mayClientSendStateEvent("m.room.history_visibility", cli)} disabled={!roomState.mayClientSendStateEvent("m.room.history_visibility", cli)}
checked={historyVisibility === "shared"} checked={historyVisibility === "shared"}
onChange={this._onHistoryRadioToggle} /> onChange={this._onHistoryRadioToggle} />
{ _t('Members only') } ({ _t('since the point in time of selecting this option') }) { _t('Members only (since the point in time of selecting this option)') }
</label> </label>
<label> <label>
<input type="radio" name="historyVis" value="invited" <input type="radio" name="historyVis" value="invited"
disabled={!roomState.mayClientSendStateEvent("m.room.history_visibility", cli)} disabled={!roomState.mayClientSendStateEvent("m.room.history_visibility", cli)}
checked={historyVisibility === "invited"} checked={historyVisibility === "invited"}
onChange={this._onHistoryRadioToggle} /> onChange={this._onHistoryRadioToggle} />
{ _t('Members only') } ({ _t('since they were invited') }) { _t('Members only (since they were invited)') }
</label> </label>
<label > <label >
<input type="radio" name="historyVis" value="joined" <input type="radio" name="historyVis" value="joined"
disabled={!roomState.mayClientSendStateEvent("m.room.history_visibility", cli)} disabled={!roomState.mayClientSendStateEvent("m.room.history_visibility", cli)}
checked={historyVisibility === "joined"} checked={historyVisibility === "joined"}
onChange={this._onHistoryRadioToggle} /> onChange={this._onHistoryRadioToggle} />
{ _t('Members only') } ({ _t('since they joined') }) { _t('Members only (since they joined)') }
</label> </label>
</div> </div>
</div> </div>

View file

@ -153,8 +153,8 @@
"Communities": "Communities", "Communities": "Communities",
"Message Pinning": "Message Pinning", "Message Pinning": "Message Pinning",
"%(displayName)s is typing": "%(displayName)s is typing", "%(displayName)s is typing": "%(displayName)s is typing",
"%(names)s and one other are typing": "%(names)s and one other are typing",
"%(names)s and %(count)s others are typing|other": "%(names)s and %(count)s others are typing", "%(names)s and %(count)s others are typing|other": "%(names)s and %(count)s others are typing",
"%(names)s and %(count)s others are typing|one": "%(names)s and one other is typing",
"%(names)s and %(lastPerson)s are typing": "%(names)s and %(lastPerson)s are typing", "%(names)s and %(lastPerson)s are typing": "%(names)s and %(lastPerson)s are typing",
"Failure to create room": "Failure to create room", "Failure to create room": "Failure to create room",
"Server may be unavailable, overloaded, or you hit a bug.": "Server may be unavailable, overloaded, or you hit a bug.", "Server may be unavailable, overloaded, or you hit a bug.": "Server may be unavailable, overloaded, or you hit a bug.",
@ -210,9 +210,9 @@
" (unsupported)": " (unsupported)", " (unsupported)": " (unsupported)",
"Join as <voiceText>voice</voiceText> or <videoText>video</videoText>.": "Join as <voiceText>voice</voiceText> or <videoText>video</videoText>.", "Join as <voiceText>voice</voiceText> or <videoText>video</videoText>.": "Join as <voiceText>voice</voiceText> or <videoText>video</videoText>.",
"Ongoing conference call%(supportedText)s.": "Ongoing conference call%(supportedText)s.", "Ongoing conference call%(supportedText)s.": "Ongoing conference call%(supportedText)s.",
"sent an image": "sent an image", "%(senderName)s sent an image": "%(senderName)s sent an image",
"sent a video": "sent a video", "%(senderName)s sent a video": "%(senderName)s sent a video",
"uploaded a file": "uploaded a file", "%(senderName)s uploaded a file": "%(senderName)s uploaded a file",
"Options": "Options", "Options": "Options",
"Undecryptable": "Undecryptable", "Undecryptable": "Undecryptable",
"Encrypted by a verified device": "Encrypted by a verified device", "Encrypted by a verified device": "Encrypted by a verified device",
@ -225,9 +225,13 @@
"device id: ": "device id: ", "device id: ": "device id: ",
"Disinvite": "Disinvite", "Disinvite": "Disinvite",
"Kick": "Kick", "Kick": "Kick",
"Disinvite this user?": "Disinvite this user?",
"Kick this user?": "Kick this user?",
"Failed to kick": "Failed to kick", "Failed to kick": "Failed to kick",
"Unban": "Unban", "Unban": "Unban",
"Ban": "Ban", "Ban": "Ban",
"Unban this user?": "Unban this user?",
"Ban this user?": "Ban this user?",
"Failed to ban user": "Failed to ban user", "Failed to ban user": "Failed to ban user",
"Failed to mute user": "Failed to mute user", "Failed to mute user": "Failed to mute user",
"Failed to toggle moderator status": "Failed to toggle moderator status", "Failed to toggle moderator status": "Failed to toggle moderator status",
@ -314,12 +318,11 @@
"Forget room": "Forget room", "Forget room": "Forget room",
"Search": "Search", "Search": "Search",
"Show panel": "Show panel", "Show panel": "Show panel",
"to favourite": "to favourite", "Drop here to favourite": "Drop here to favourite",
"to tag direct chat": "to tag direct chat", "Drop here to tag direct chat": "Drop here to tag direct chat",
"to restore": "to restore", "Drop here to restore": "Drop here to restore",
"to demote": "to demote", "Drop here to demote": "Drop here to demote",
"Drop here to tag %(section)s": "Drop here to tag %(section)s", "Drop here to tag %(section)s": "Drop here to tag %(section)s",
"Drop here %(toAction)s": "Drop here %(toAction)s",
"Press <StartChatButton> to start a chat with someone": "Press <StartChatButton> to start a chat with someone", "Press <StartChatButton> to start a chat with someone": "Press <StartChatButton> to start a chat with someone",
"You're not in any rooms yet! Press <CreateRoomButton> to make a room or <RoomDirectoryButton> to browse the directory": "You're not in any rooms yet! Press <CreateRoomButton> to make a room or <RoomDirectoryButton> to browse the directory", "You're not in any rooms yet! Press <CreateRoomButton> to make a room or <RoomDirectoryButton> to browse the directory": "You're not in any rooms yet! Press <CreateRoomButton> to make a room or <RoomDirectoryButton> to browse the directory",
"Invites": "Invites", "Invites": "Invites",
@ -329,20 +332,22 @@
"Low priority": "Low priority", "Low priority": "Low priority",
"Historical": "Historical", "Historical": "Historical",
"Unnamed Room": "Unnamed Room", "Unnamed Room": "Unnamed Room",
"a room": "a room",
"Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.", "Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.",
"This invitation was sent to an email address which is not associated with this account:": "This invitation was sent to an email address which is not associated with this account:", "This invitation was sent to an email address which is not associated with this account:": "This invitation was sent to an email address which is not associated with this account:",
"You may wish to login with a different account, or add this email to this account.": "You may wish to login with a different account, or add this email to this account.", "You may wish to login with a different account, or add this email to this account.": "You may wish to login with a different account, or add this email to this account.",
"You have been invited to join this room by %(inviterName)s": "You have been invited to join this room by %(inviterName)s", "You have been invited to join this room by %(inviterName)s": "You have been invited to join this room by %(inviterName)s",
"Would you like to <acceptText>accept</acceptText> or <declineText>decline</declineText> this invitation?": "Would you like to <acceptText>accept</acceptText> or <declineText>decline</declineText> this invitation?", "Would you like to <acceptText>accept</acceptText> or <declineText>decline</declineText> this invitation?": "Would you like to <acceptText>accept</acceptText> or <declineText>decline</declineText> this invitation?",
"This room": "This room",
"Reason: %(reasonText)s": "Reason: %(reasonText)s", "Reason: %(reasonText)s": "Reason: %(reasonText)s",
"Rejoin": "Rejoin", "Rejoin": "Rejoin",
"You have been kicked from %(roomName)s by %(userName)s.": "You have been kicked from %(roomName)s by %(userName)s.", "You have been kicked from %(roomName)s by %(userName)s.": "You have been kicked from %(roomName)s by %(userName)s.",
"You have been kicked from this room by %(userName)s.": "You have been kicked from this room by %(userName)s.",
"You have been banned from %(roomName)s by %(userName)s.": "You have been banned from %(roomName)s by %(userName)s.", "You have been banned from %(roomName)s by %(userName)s.": "You have been banned from %(roomName)s by %(userName)s.",
"You have been banned from this room by %(userName)s.": "You have been banned from this room by %(userName)s.",
"This room": "This room",
"%(roomName)s does not exist.": "%(roomName)s does not exist.", "%(roomName)s does not exist.": "%(roomName)s does not exist.",
"%(roomName)s is not accessible at this time.": "%(roomName)s is not accessible at this time.", "%(roomName)s is not accessible at this time.": "%(roomName)s is not accessible at this time.",
"You are trying to access %(roomName)s.": "You are trying to access %(roomName)s.", "You are trying to access %(roomName)s.": "You are trying to access %(roomName)s.",
"You are trying to access a room.": "You are trying to access a room.",
"<a>Click here</a> to join the discussion!": "<a>Click here</a> to join the discussion!", "<a>Click here</a> to join the discussion!": "<a>Click here</a> to join the discussion!",
"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 is a preview of this room. Room interactions have been disabled": "This is a preview of this room. Room interactions have been disabled",
"To change the room's avatar, you must be a": "To change the room's avatar, you must be a", "To change the room's avatar, you must be a": "To change the room's avatar, you must be a",
@ -387,10 +392,9 @@
"Publish this room to the public in %(domain)s's room directory?": "Publish this room to the public in %(domain)s's room directory?", "Publish this room to the public in %(domain)s's room directory?": "Publish this room to the public in %(domain)s's room directory?",
"Who can read history?": "Who can read history?", "Who can read history?": "Who can read history?",
"Anyone": "Anyone", "Anyone": "Anyone",
"Members only": "Members only", "Members only (since the point in time of selecting this option)": "Members only (since the point in time of selecting this option)",
"since the point in time of selecting this option": "since the point in time of selecting this option", "Members only (since they were invited)": "Members only (since they were invited)",
"since they were invited": "since they were invited", "Members only (since they joined)": "Members only (since they joined)",
"since they joined": "since they joined",
"Room Colour": "Room Colour", "Room Colour": "Room Colour",
"Permissions": "Permissions", "Permissions": "Permissions",
"The default role for new room members is": "The default role for new room members is", "The default role for new room members is": "The default role for new room members is",
@ -463,10 +467,10 @@
"Dismiss": "Dismiss", "Dismiss": "Dismiss",
"To continue, please enter your password.": "To continue, please enter your password.", "To continue, please enter your password.": "To continue, please enter your password.",
"Password:": "Password:", "Password:": "Password:",
"An email has been sent to": "An email has been sent to", "An email has been sent to %(emailAddress)s": "An email has been sent to %(emailAddress)s",
"Please check your email to continue registration.": "Please check your email to continue registration.", "Please check your email to continue registration.": "Please check your email to continue registration.",
"Token incorrect": "Token incorrect", "Token incorrect": "Token incorrect",
"A text message has been sent to": "A text message has been sent to", "A text message has been sent to %(msisdn)s": "A text message has been sent to %(msisdn)s",
"Please enter the code it contains:": "Please enter the code it contains:", "Please enter the code it contains:": "Please enter the code it contains:",
"Start authentication": "Start authentication", "Start authentication": "Start authentication",
"powered by Matrix": "powered by Matrix", "powered by Matrix": "powered by Matrix",
@ -488,6 +492,8 @@
"Identity server URL": "Identity server URL", "Identity server URL": "Identity server URL",
"What does this mean?": "What does this mean?", "What does this mean?": "What does this mean?",
"Remove from community": "Remove from community", "Remove from community": "Remove from community",
"Disinvite this user from community?": "Disinvite this user from community?",
"Remove this user from community?": "Remove this user from community?",
"Failed to withdraw invitation": "Failed to withdraw invitation", "Failed to withdraw invitation": "Failed to withdraw invitation",
"Failed to remove user from community": "Failed to remove user from community", "Failed to remove user from community": "Failed to remove user from community",
"Filter community members": "Filter community members", "Filter community members": "Filter community members",
@ -517,56 +523,57 @@
"Integrations Error": "Integrations Error", "Integrations Error": "Integrations Error",
"Could not connect to the integration server": "Could not connect to the integration server", "Could not connect to the integration server": "Could not connect to the integration server",
"Manage Integrations": "Manage Integrations", "Manage Integrations": "Manage Integrations",
"%(severalUsers)sjoined %(repeats)s times": "%(severalUsers)sjoined %(repeats)s times", "%(nameList)s %(transitionList)s": "%(nameList)s %(transitionList)s",
"%(oneUser)sjoined %(repeats)s times": "%(oneUser)sjoined %(repeats)s times", "%(severalUsers)sjoined %(count)s times|other": "%(severalUsers)sjoined %(count)s times",
"%(severalUsers)sjoined": "%(severalUsers)sjoined", "%(severalUsers)sjoined %(count)s times|one": "%(severalUsers)sjoined",
"%(oneUser)sjoined": "%(oneUser)sjoined", "%(oneUser)sjoined %(count)s times|other": "%(oneUser)sjoined %(count)s times",
"%(severalUsers)sleft %(repeats)s times": "%(severalUsers)sleft %(repeats)s times", "%(oneUser)sjoined %(count)s times|one": "%(oneUser)sjoined",
"%(oneUser)sleft %(repeats)s times": "%(oneUser)sleft %(repeats)s times", "%(severalUsers)sleft %(count)s times|other": "%(severalUsers)sleft %(count)s times",
"%(severalUsers)sleft": "%(severalUsers)sleft", "%(severalUsers)sleft %(count)s times|one": "%(severalUsers)sleft",
"%(oneUser)sleft": "%(oneUser)sleft", "%(oneUser)sleft %(count)s times|other": "%(oneUser)sleft %(count)s times",
"%(severalUsers)sjoined and left %(repeats)s times": "%(severalUsers)sjoined and left %(repeats)s times", "%(oneUser)sleft %(count)s times|one": "%(oneUser)sleft",
"%(oneUser)sjoined and left %(repeats)s times": "%(oneUser)sjoined and left %(repeats)s times", "%(severalUsers)sjoined and left %(count)s times|other": "%(severalUsers)sjoined and left %(count)s times",
"%(severalUsers)sjoined and left": "%(severalUsers)sjoined and left", "%(severalUsers)sjoined and left %(count)s times|one": "%(severalUsers)sjoined and left",
"%(oneUser)sjoined and left": "%(oneUser)sjoined and left", "%(oneUser)sjoined and left %(count)s times|other": "%(oneUser)sjoined and left %(count)s times",
"%(severalUsers)sleft and rejoined %(repeats)s times": "%(severalUsers)sleft and rejoined %(repeats)s times", "%(oneUser)sjoined and left %(count)s times|one": "%(oneUser)sjoined and left",
"%(oneUser)sleft and rejoined %(repeats)s times": "%(oneUser)sleft and rejoined %(repeats)s times", "%(severalUsers)sleft and rejoined %(count)s times|other": "%(severalUsers)sleft and rejoined %(count)s times",
"%(severalUsers)sleft and rejoined": "%(severalUsers)sleft and rejoined", "%(severalUsers)sleft and rejoined %(count)s times|one": "%(severalUsers)sleft and rejoined",
"%(oneUser)sleft and rejoined": "%(oneUser)sleft and rejoined", "%(oneUser)sleft and rejoined %(count)s times|other": "%(oneUser)sleft and rejoined %(count)s times",
"%(severalUsers)srejected their invitations %(repeats)s times": "%(severalUsers)srejected their invitations %(repeats)s times", "%(oneUser)sleft and rejoined %(count)s times|one": "%(oneUser)sleft and rejoined",
"%(oneUser)srejected their invitation %(repeats)s times": "%(oneUser)srejected their invitation %(repeats)s times", "%(severalUsers)srejected their invitations %(count)s times|other": "%(severalUsers)srejected their invitations %(count)s times",
"%(severalUsers)srejected their invitations": "%(severalUsers)srejected their invitations", "%(severalUsers)srejected their invitations %(count)s times|one": "%(severalUsers)srejected their invitations",
"%(oneUser)srejected their invitation": "%(oneUser)srejected their invitation", "%(oneUser)srejected their invitation %(count)s times|other": "%(oneUser)srejected their invitation %(count)s times",
"%(severalUsers)shad their invitations withdrawn %(repeats)s times": "%(severalUsers)shad their invitations withdrawn %(repeats)s times", "%(oneUser)srejected their invitation %(count)s times|one": "%(oneUser)srejected their invitation",
"%(oneUser)shad their invitation withdrawn %(repeats)s times": "%(oneUser)shad their invitation withdrawn %(repeats)s times", "%(severalUsers)shad their invitations withdrawn %(count)s times|other": "%(severalUsers)shad their invitations withdrawn %(count)s times",
"%(severalUsers)shad their invitations withdrawn": "%(severalUsers)shad their invitations withdrawn", "%(severalUsers)shad their invitations withdrawn %(count)s times|one": "%(severalUsers)shad their invitations withdrawn",
"%(oneUser)shad their invitation withdrawn": "%(oneUser)shad their invitation withdrawn", "%(oneUser)shad their invitation withdrawn %(count)s times|other": "%(oneUser)shad their invitation withdrawn %(count)s times",
"were invited %(repeats)s times": "were invited %(repeats)s times", "%(oneUser)shad their invitation withdrawn %(count)s times|one": "%(oneUser)shad their invitation withdrawn",
"was invited %(repeats)s times": "was invited %(repeats)s times", "were invited %(count)s times|other": "were invited %(count)s times",
"were invited": "were invited", "were invited %(count)s times|one": "were invited",
"was invited": "was invited", "was invited %(count)s times|other": "was invited %(count)s times",
"were banned %(repeats)s times": "were banned %(repeats)s times", "was invited %(count)s times|one": "was invited",
"was banned %(repeats)s times": "was banned %(repeats)s times", "were banned %(count)s times|other": "were banned %(count)s times",
"were banned": "were banned", "were banned %(count)s times|one": "were banned",
"was banned": "was banned", "was banned %(count)s times|other": "was banned %(count)s times",
"were unbanned %(repeats)s times": "were unbanned %(repeats)s times", "was banned %(count)s times|one": "was banned",
"was unbanned %(repeats)s times": "was unbanned %(repeats)s times", "were unbanned %(count)s times|other": "were unbanned %(count)s times",
"were unbanned": "were unbanned", "were unbanned %(count)s times|one": "were unbanned",
"was unbanned": "was unbanned", "was unbanned %(count)s times|other": "was unbanned %(count)s times",
"were kicked %(repeats)s times": "were kicked %(repeats)s times", "was unbanned %(count)s times|one": "was unbanned",
"was kicked %(repeats)s times": "was kicked %(repeats)s times", "were kicked %(count)s times|other": "were kicked %(count)s times",
"were kicked": "were kicked", "were kicked %(count)s times|one": "were kicked",
"was kicked": "was kicked", "was kicked %(count)s times|other": "was kicked %(count)s times",
"%(severalUsers)schanged their name %(repeats)s times": "%(severalUsers)schanged their name %(repeats)s times", "was kicked %(count)s times|one": "was kicked",
"%(oneUser)schanged their name %(repeats)s times": "%(oneUser)schanged their name %(repeats)s times", "%(severalUsers)schanged their name %(count)s times|other": "%(severalUsers)schanged their name %(count)s times",
"%(severalUsers)schanged their name": "%(severalUsers)schanged their name", "%(severalUsers)schanged their name %(count)s times|one": "%(severalUsers)schanged their name",
"%(oneUser)schanged their name": "%(oneUser)schanged their name", "%(oneUser)schanged their name %(count)s times|other": "%(oneUser)schanged their name %(count)s times",
"%(severalUsers)schanged their avatar %(repeats)s times": "%(severalUsers)schanged their avatar %(repeats)s times", "%(oneUser)schanged their name %(count)s times|one": "%(oneUser)schanged their name",
"%(oneUser)schanged their avatar %(repeats)s times": "%(oneUser)schanged their avatar %(repeats)s times", "%(severalUsers)schanged their avatar %(count)s times|other": "%(severalUsers)schanged their avatar %(count)s times",
"%(severalUsers)schanged their avatar": "%(severalUsers)schanged their avatar", "%(severalUsers)schanged their avatar %(count)s times|one": "%(severalUsers)schanged their avatar",
"%(oneUser)schanged their avatar": "%(oneUser)schanged their avatar", "%(oneUser)schanged their avatar %(count)s times|other": "%(oneUser)schanged their avatar %(count)s times",
"%(items)s and %(remaining)s others": "%(items)s and %(remaining)s others", "%(oneUser)schanged their avatar %(count)s times|one": "%(oneUser)schanged their avatar",
"%(items)s and one other": "%(items)s and one other", "%(items)s and %(count)s others|other": "%(items)s and %(count)s others",
"%(items)s and %(count)s others|one": "%(items)s and one other",
"%(items)s and %(lastItem)s": "%(items)s and %(lastItem)s", "%(items)s and %(lastItem)s": "%(items)s and %(lastItem)s",
"Custom level": "Custom level", "Custom level": "Custom level",
"Room directory": "Room directory", "Room directory": "Room directory",
@ -588,7 +595,6 @@
"Start Chatting": "Start Chatting", "Start Chatting": "Start Chatting",
"Confirm Removal": "Confirm Removal", "Confirm Removal": "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.": "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.", "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.": "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.",
"%(actionVerb)s this person?": "%(actionVerb)s this person?",
"Community IDs may only contain characters a-z, 0-9, or '=_-./'": "Community IDs may only contain characters a-z, 0-9, or '=_-./'", "Community IDs may only contain characters a-z, 0-9, or '=_-./'": "Community IDs may only contain characters a-z, 0-9, or '=_-./'",
"Something went wrong whilst creating your community": "Something went wrong whilst creating your community", "Something went wrong whilst creating your community": "Something went wrong whilst creating your community",
"Create Community": "Create Community", "Create Community": "Create Community",
@ -832,7 +838,7 @@
"A new password must be entered.": "A new password must be entered.", "A new password must be entered.": "A new password must be entered.",
"New passwords must match each other.": "New passwords must match each other.", "New passwords must match each other.": "New passwords must match each other.",
"Resetting 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.": "Resetting 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.", "Resetting 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.": "Resetting 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.",
"Once you've followed the link it contains, click below": "Once you've followed the link it contains, click below", "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.": "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.",
"I have verified my email address": "I have verified my email address", "I have verified my email address": "I have verified my email address",
"Your password has been reset": "Your password has been reset", "Your password has been reset": "Your password has been reset",
"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": "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", "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": "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",

View file

@ -252,6 +252,26 @@ function getLangsJson() {
}); });
} }
function weblateToCounterpart(inTrs) {
const outTrs = {};
for (const key of Object.keys(inTrs)) {
const keyParts = key.split('|', 2);
if (keyParts.length === 2) {
let obj = outTrs[keyParts[0]];
if (obj === undefined) {
obj = {};
outTrs[keyParts[0]] = obj;
}
obj[keyParts[1]] = inTrs[key];
} else {
outTrs[key] = inTrs[key];
}
}
return outTrs;
}
function getLanguage(langPath) { function getLanguage(langPath) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
request( request(
@ -261,7 +281,7 @@ function getLanguage(langPath) {
reject({err: err, response: response}); reject({err: err, response: response});
return; return;
} }
resolve(JSON.parse(body)); resolve(weblateToCounterpart(JSON.parse(body)));
}, },
); );
}); });