i18n'ed all over the plaace
This commit is contained in:
parent
7ee5f7ba38
commit
6225e402cc
3 changed files with 45 additions and 25 deletions
|
@ -28,7 +28,7 @@ import BridgeSettingsTab from "../settings/tabs/room/BridgeSettingsTab";
|
||||||
import sdk from "../../../index";
|
import sdk from "../../../index";
|
||||||
import MatrixClientPeg from "../../../MatrixClientPeg";
|
import MatrixClientPeg from "../../../MatrixClientPeg";
|
||||||
import dis from "../../../dispatcher";
|
import dis from "../../../dispatcher";
|
||||||
import SettingsStore from "../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
|
||||||
export default class RoomSettingsDialog extends React.Component {
|
export default class RoomSettingsDialog extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|
|
@ -52,28 +52,31 @@ export default class BridgeSettingsTab extends React.Component {
|
||||||
const { channel, network } = content;
|
const { channel, network } = content;
|
||||||
const protocolName = content.protocol.displayname || content.protocol.id;
|
const protocolName = content.protocol.displayname || content.protocol.id;
|
||||||
const channelName = channel.displayname || channel.id;
|
const channelName = channel.displayname || channel.id;
|
||||||
const networkName = network ? network.displayname || network.id : "";
|
const networkName = network ? network.displayname || network.id : protocolName;
|
||||||
|
|
||||||
let creator = null;
|
let creator = null;
|
||||||
if (content.creator) {
|
if (content.creator) {
|
||||||
creator = (<p>
|
const pill = <Pill
|
||||||
This bridge was provisioned by <Pill
|
|
||||||
type={Pill.TYPE_USER_MENTION}
|
type={Pill.TYPE_USER_MENTION}
|
||||||
room={room}
|
room={room}
|
||||||
url={makeUserPermalink(content.creator)}
|
url={makeUserPermalink(content.creator)}
|
||||||
shouldShowPillAvatar={true}
|
shouldShowPillAvatar={true}
|
||||||
/>
|
/>;
|
||||||
</p>);
|
creator = (<p>{
|
||||||
|
_t("This bridge was provisioned by %(pill)s", {
|
||||||
|
pill,
|
||||||
|
})
|
||||||
|
} </p>);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bot = (<p>
|
const bot = (<p> {_t("This bridge is managed by the %(pill)s bot user.", {
|
||||||
The bridge is managed by the <Pill
|
pill: <Pill
|
||||||
type={Pill.TYPE_USER_MENTION}
|
type={Pill.TYPE_USER_MENTION}
|
||||||
room={room}
|
room={room}
|
||||||
url={makeUserPermalink(event.getSender())}
|
url={makeUserPermalink(event.getSender())}
|
||||||
shouldShowPillAvatar={true}
|
shouldShowPillAvatar={true}
|
||||||
/> bot user.</p>
|
/>,
|
||||||
);
|
})} </p>);
|
||||||
let channelLink = channelName;
|
let channelLink = channelName;
|
||||||
if (channel.external_url) {
|
if (channel.external_url) {
|
||||||
channelLink = <a target="_blank" href={channel.external_url}>{channelName}</a>;
|
channelLink = <a target="_blank" href={channel.external_url}>{channelName}</a>;
|
||||||
|
@ -85,7 +88,11 @@ export default class BridgeSettingsTab extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
const chanAndNetworkInfo = (
|
const chanAndNetworkInfo = (
|
||||||
<p> Bridged into {channelLink} {networkLink}, on {protocolName}</p>
|
(_t("Bridged into %(channelLink)s %(networkLink)s, on %(protocolName)s", {
|
||||||
|
channelLink,
|
||||||
|
networkLink,
|
||||||
|
protocolName,
|
||||||
|
}))
|
||||||
);
|
);
|
||||||
|
|
||||||
let networkIcon = null;
|
let networkIcon = null;
|
||||||
|
@ -111,14 +118,21 @@ export default class BridgeSettingsTab extends React.Component {
|
||||||
url={ avatarUrl } />;
|
url={ avatarUrl } />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const heading = _t("Connected to %(channelIcon)s %(channelName)s on %(networkIcon)s %(networkName)s", {
|
||||||
|
channelIcon,
|
||||||
|
channelName,
|
||||||
|
networkName,
|
||||||
|
networkIcon,
|
||||||
|
});
|
||||||
|
|
||||||
return (<li key={event.stateKey}>
|
return (<li key={event.stateKey}>
|
||||||
<div>
|
<div>
|
||||||
<h3>{channelIcon} {channelName} {networkName ? ` on ${networkName}` : ""} {networkIcon}</h3>
|
<h3> {heading} </h3>
|
||||||
<p> Connected via {protocolName} </p>
|
<p>{_t("Connected via %(protocolName)s", { protocolName })}</p>
|
||||||
<details>
|
<details>
|
||||||
{creator}
|
{creator}
|
||||||
{bot}
|
{bot}
|
||||||
{chanAndNetworkInfo}
|
<p>{chanAndNetworkInfo}</p>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
</li>);
|
</li>);
|
||||||
|
@ -146,7 +160,7 @@ export default class BridgeSettingsTab extends React.Component {
|
||||||
<div className="mx_SettingsTab">
|
<div className="mx_SettingsTab">
|
||||||
<div className="mx_SettingsTab_heading">{_t("Bridge Info")}</div>
|
<div className="mx_SettingsTab_heading">{_t("Bridge Info")}</div>
|
||||||
<div className='mx_SettingsTab_section mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_section mx_SettingsTab_subsectionText'>
|
||||||
<p> Below is a list of bridges connected to this room. </p>
|
<p>{ _t("Below is a list of bridges connected to this room.") }</p>
|
||||||
<ul className="mx_RoomSettingsDialog_BridgeList">
|
<ul className="mx_RoomSettingsDialog_BridgeList">
|
||||||
{ bridgeEvents.map((event) => this._renderBridgeCard(event, room)) }
|
{ bridgeEvents.map((event) => this._renderBridgeCard(event, room)) }
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -342,6 +342,7 @@
|
||||||
"Send verification requests in direct message, including a new verification UX in the member panel.": "Send verification requests in direct message, including a new verification UX in the member panel.",
|
"Send verification requests in direct message, including a new verification UX in the member panel.": "Send verification requests in direct message, including a new verification UX in the member panel.",
|
||||||
"Enable cross-signing to verify per-user instead of per-device (in development)": "Enable cross-signing to verify per-user instead of per-device (in development)",
|
"Enable cross-signing to verify per-user instead of per-device (in development)": "Enable cross-signing to verify per-user instead of per-device (in development)",
|
||||||
"Enable local event indexing and E2EE search (requires restart)": "Enable local event indexing and E2EE search (requires restart)",
|
"Enable local event indexing and E2EE search (requires restart)": "Enable local event indexing and E2EE search (requires restart)",
|
||||||
|
"Show info about bridges in room settings": "Show info about bridges in room settings",
|
||||||
"Use the new, faster, composer for writing messages": "Use the new, faster, composer for writing messages",
|
"Use the new, faster, composer for writing messages": "Use the new, faster, composer for writing messages",
|
||||||
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
||||||
"Use compact timeline layout": "Use compact timeline layout",
|
"Use compact timeline layout": "Use compact timeline layout",
|
||||||
|
@ -725,7 +726,13 @@
|
||||||
"Room version:": "Room version:",
|
"Room version:": "Room version:",
|
||||||
"Developer options": "Developer options",
|
"Developer options": "Developer options",
|
||||||
"Open Devtools": "Open Devtools",
|
"Open Devtools": "Open Devtools",
|
||||||
|
"This bridge was provisioned by %(pill)s": "This bridge was provisioned by %(pill)s",
|
||||||
|
"This bridge is managed by the %(pill)s bot user.": "This bridge is managed by the %(pill)s bot user.",
|
||||||
|
"Bridged into %(channelLink)s %(networkLink)s, on %(protocolName)s": "Bridged into %(channelLink)s %(networkLink)s, on %(protocolName)s",
|
||||||
|
"Connected to %(channelIcon)s %(channelName)s on %(networkIcon)s %(networkName)s": "Connected to %(channelIcon)s %(channelName)s on %(networkIcon)s %(networkName)s",
|
||||||
|
"Connected via %(protocolName)s": "Connected via %(protocolName)s",
|
||||||
"Bridge Info": "Bridge Info",
|
"Bridge Info": "Bridge Info",
|
||||||
|
"Below is a list of bridges connected to this room.": "Below is a list of bridges connected to this room.",
|
||||||
"Room Addresses": "Room Addresses",
|
"Room Addresses": "Room Addresses",
|
||||||
"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?",
|
||||||
"URL Previews": "URL Previews",
|
"URL Previews": "URL Previews",
|
||||||
|
@ -1932,6 +1939,5 @@
|
||||||
"If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.",
|
"If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.",
|
||||||
"Failed to set direct chat tag": "Failed to set direct chat tag",
|
"Failed to set direct chat tag": "Failed to set direct chat tag",
|
||||||
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
|
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
|
||||||
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
|
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room"
|
||||||
"Show info about bridges in room settings": "Show info about bridges in room settings"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue