mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 23:31:28 +03:00
First round
This commit is contained in:
parent
8add074dbf
commit
d2e766e4f0
9 changed files with 43 additions and 13 deletions
|
@ -18,6 +18,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as Roles from '../../../Roles';
|
import * as Roles from '../../../Roles';
|
||||||
|
import { _t } from '../../../languageHandler';
|
||||||
|
|
||||||
var LEVEL_ROLE_MAP = {};
|
var LEVEL_ROLE_MAP = {};
|
||||||
var reverseRoles = {};
|
var reverseRoles = {};
|
||||||
|
@ -116,7 +117,7 @@ module.exports = React.createClass({
|
||||||
text: Roles.textualPowerLevel(level, 0),
|
text: Roles.textualPowerLevel(level, 0),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
options.push({ value: "Custom", text: "Custom level" });
|
options.push({ value: "Custom", text: _t("Custom level") });
|
||||||
options = options.map((op) => {
|
options = options.map((op) => {
|
||||||
return <option value={op.value} key={op.value}>{op.text}</option>;
|
return <option value={op.value} key={op.value}>{op.text}</option>;
|
||||||
});
|
});
|
||||||
|
|
|
@ -129,8 +129,8 @@ export const PasswordAuthEntry = React.createClass({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>To continue, please enter your password.</p>
|
<p>{_t("To continue, please enter your password.")}</p>
|
||||||
<p>Password:</p>
|
<p>{_t("Password:")}</p>
|
||||||
<form onSubmit={this._onSubmit}>
|
<form onSubmit={this._onSubmit}>
|
||||||
<input
|
<input
|
||||||
ref="passwordField"
|
ref="passwordField"
|
||||||
|
@ -380,7 +380,7 @@ export const MsisdnAuthEntry = React.createClass({
|
||||||
onChange={this._onTokenChange}
|
onChange={this._onTokenChange}
|
||||||
/>
|
/>
|
||||||
<br />
|
<br />
|
||||||
<input type="submit" value="Submit"
|
<input type="submit" value={_t("Submit")}
|
||||||
className={submitClasses}
|
className={submitClasses}
|
||||||
disabled={!enableSubmit}
|
disabled={!enableSubmit}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -230,7 +230,7 @@ module.exports = React.createClass({
|
||||||
remote_aliases_section = (
|
remote_aliases_section = (
|
||||||
<div>
|
<div>
|
||||||
<div className="mx_RoomSettings_aliasLabel">
|
<div className="mx_RoomSettings_aliasLabel">
|
||||||
Remote addresses for this room:
|
{_t("Remote addresses for this room:")}
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_RoomSettings_aliasesTable">
|
<div className="mx_RoomSettings_aliasesTable">
|
||||||
{ this.state.remoteDomains.map((domain, i) => {
|
{ this.state.remoteDomains.map((domain, i) => {
|
||||||
|
|
|
@ -20,7 +20,7 @@ var MatrixClientPeg = require('../../../MatrixClientPeg');
|
||||||
var sdk = require("../../../index");
|
var sdk = require("../../../index");
|
||||||
var Modal = require("../../../Modal");
|
var Modal = require("../../../Modal");
|
||||||
var UserSettingsStore = require('../../../UserSettingsStore');
|
var UserSettingsStore = require('../../../UserSettingsStore');
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t, _tJsx } from '../../../languageHandler';
|
||||||
|
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
|
@ -131,12 +131,24 @@ module.exports = React.createClass({
|
||||||
</label>;
|
</label>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let urlPreviewText = null;
|
||||||
|
if (UserSettingsStore.getUrlPreviewsDisabled()) {
|
||||||
|
urlPreviewText = (
|
||||||
|
_tJsx("You have <a>disabled</a> URL previews by default.", /<a>(.*?)<\/a>/, (sub)=><a href="#/settings">{sub}</a>)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
urlPreviewText = (
|
||||||
|
_tJsx("You have <a>enabled</a> URL previews by default.", /<a>(.*?)<\/a>/, (sub)=><a href="#/settings">{sub}</a>)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomSettings_toggles">
|
<div className="mx_RoomSettings_toggles">
|
||||||
<h3>{_t("URL Previews")}</h3>
|
<h3>{_t("URL Previews")}</h3>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
You have <a href="#/settings">{ UserSettingsStore.getUrlPreviewsDisabled() ? 'disabled' : 'enabled' }</a> URL previews by default.
|
{urlPreviewText}
|
||||||
</label>
|
</label>
|
||||||
{ disableRoomPreviewUrls }
|
{ disableRoomPreviewUrls }
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
|
import { _t } from '../../../languageHandler';
|
||||||
|
|
||||||
export default class MemberDeviceInfo extends React.Component {
|
export default class MemberDeviceInfo extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -49,7 +50,7 @@ export default class MemberDeviceInfo extends React.Component {
|
||||||
// add the deviceId as a titletext to help with debugging
|
// add the deviceId as a titletext to help with debugging
|
||||||
return (
|
return (
|
||||||
<div className="mx_MemberDeviceInfo"
|
<div className="mx_MemberDeviceInfo"
|
||||||
title={"device id: " + this.props.device.deviceId} >
|
title={_t("device id: ") + this.props.device.deviceId} >
|
||||||
<div className="mx_MemberDeviceInfo_deviceInfo">
|
<div className="mx_MemberDeviceInfo_deviceInfo">
|
||||||
<div className="mx_MemberDeviceInfo_deviceId">
|
<div className="mx_MemberDeviceInfo_deviceId">
|
||||||
{deviceName}
|
{deviceName}
|
||||||
|
|
|
@ -188,7 +188,11 @@ module.exports = React.createClass({
|
||||||
'm.room.name', user_id
|
'm.room.name', user_id
|
||||||
);
|
);
|
||||||
|
|
||||||
save_button = <AccessibleButton className="mx_RoomHeader_textButton" onClick={this.props.onSaveClick}>Save</AccessibleButton>;
|
save_button = (
|
||||||
|
<AccessibleButton className="mx_RoomHeader_textButton" onClick={this.props.onSaveClick}>
|
||||||
|
{_t("Save")}
|
||||||
|
</AccessibleButton>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.onCancelClick) {
|
if (this.props.onCancelClick) {
|
||||||
|
|
|
@ -726,7 +726,7 @@ module.exports = React.createClass({
|
||||||
if (canSetTag || self.state.tags) {
|
if (canSetTag || self.state.tags) {
|
||||||
var tagsSection =
|
var tagsSection =
|
||||||
<div className="mx_RoomSettings_tags">
|
<div className="mx_RoomSettings_tags">
|
||||||
Tagged as: { canSetTag ?
|
{_t("Tagged as: ")}{ canSetTag ?
|
||||||
(tags.map(function(tag, i) {
|
(tags.map(function(tag, i) {
|
||||||
return (<label key={ i }>
|
return (<label key={ i }>
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
|
@ -844,7 +844,7 @@ module.exports = React.createClass({
|
||||||
<input type="checkbox" disabled={ !roomState.mayClientSendStateEvent("m.room.aliases", cli) }
|
<input type="checkbox" disabled={ !roomState.mayClientSendStateEvent("m.room.aliases", cli) }
|
||||||
onChange={ this._onToggle.bind(this, "isRoomPublished", true, false)}
|
onChange={ this._onToggle.bind(this, "isRoomPublished", true, false)}
|
||||||
checked={this.state.isRoomPublished}/>
|
checked={this.state.isRoomPublished}/>
|
||||||
List this room in { MatrixClientPeg.get().getDomain() }'s room directory?
|
{_t("List this room in %(domain)s's room directory?", { domain: MatrixClientPeg.get().getDomain() })}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_RoomSettings_settings">
|
<div className="mx_RoomSettings_settings">
|
||||||
|
@ -854,7 +854,7 @@ module.exports = React.createClass({
|
||||||
disabled={ !roomState.mayClientSendStateEvent("m.room.history_visibility", cli) }
|
disabled={ !roomState.mayClientSendStateEvent("m.room.history_visibility", cli) }
|
||||||
checked={historyVisibility === "world_readable"}
|
checked={historyVisibility === "world_readable"}
|
||||||
onChange={this._onHistoryRadioToggle} />
|
onChange={this._onHistoryRadioToggle} />
|
||||||
Anyone
|
{_t("Anyone")}
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="historyVis" value="shared"
|
<input type="radio" name="historyVis" value="shared"
|
||||||
|
|
|
@ -18,6 +18,7 @@ limitations under the License.
|
||||||
|
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var sdk = require('../../../index');
|
var sdk = require('../../../index');
|
||||||
|
import { _t } from "../../../languageHandler";
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'RoomTopicEditor',
|
displayName: 'RoomTopicEditor',
|
||||||
|
@ -43,7 +44,7 @@ module.exports = React.createClass({
|
||||||
<EditableText ref="editor"
|
<EditableText ref="editor"
|
||||||
className="mx_RoomHeader_topic mx_RoomHeader_editable"
|
className="mx_RoomHeader_topic mx_RoomHeader_editable"
|
||||||
placeholderClassName="mx_RoomHeader_placeholder"
|
placeholderClassName="mx_RoomHeader_placeholder"
|
||||||
placeholder="Add a topic"
|
placeholder={_t("Add a topic")}
|
||||||
blurToCancel={ false }
|
blurToCancel={ false }
|
||||||
initialValue={ this._initialTopic }/>
|
initialValue={ this._initialTopic }/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -126,6 +126,7 @@
|
||||||
"%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.",
|
"%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.",
|
||||||
"Account": "Account",
|
"Account": "Account",
|
||||||
"Access Token:": "Access Token:",
|
"Access Token:": "Access Token:",
|
||||||
|
"Add a topic": "Add a topic",
|
||||||
"Add email address": "Add email address",
|
"Add email address": "Add email address",
|
||||||
"Add phone number": "Add phone number",
|
"Add phone number": "Add phone number",
|
||||||
"Admin": "Admin",
|
"Admin": "Admin",
|
||||||
|
@ -160,6 +161,7 @@
|
||||||
"%(senderName)s answered the call.": "%(senderName)s answered the call.",
|
"%(senderName)s answered the call.": "%(senderName)s answered the call.",
|
||||||
"anyone": "anyone",
|
"anyone": "anyone",
|
||||||
"An error has occurred.": "An error has occurred.",
|
"An error has occurred.": "An error has occurred.",
|
||||||
|
"Anyone": "Anyone",
|
||||||
"Anyone who knows the room's link, apart from guests": "Anyone who knows the room's link, apart from guests",
|
"Anyone who knows the room's link, apart from guests": "Anyone who knows the room's link, apart from guests",
|
||||||
"Anyone who knows the room's link, including guests": "Anyone who knows the room's link, including guests",
|
"Anyone who knows the room's link, including guests": "Anyone who knows the room's link, including guests",
|
||||||
"Are you sure?": "Are you sure?",
|
"Are you sure?": "Are you sure?",
|
||||||
|
@ -214,6 +216,7 @@
|
||||||
"Cryptography": "Cryptography",
|
"Cryptography": "Cryptography",
|
||||||
"Current password": "Current password",
|
"Current password": "Current password",
|
||||||
"Curve25519 identity key": "Curve25519 identity key",
|
"Curve25519 identity key": "Curve25519 identity key",
|
||||||
|
"Custom level": "Custom level",
|
||||||
"/ddg is not a command": "/ddg is not a command",
|
"/ddg is not a command": "/ddg is not a command",
|
||||||
"Deactivate Account": "Deactivate Account",
|
"Deactivate Account": "Deactivate Account",
|
||||||
"Deactivate my account": "Deactivate my account",
|
"Deactivate my account": "Deactivate my account",
|
||||||
|
@ -226,6 +229,7 @@
|
||||||
"Default": "Default",
|
"Default": "Default",
|
||||||
"Device already verified!": "Device already verified!",
|
"Device already verified!": "Device already verified!",
|
||||||
"Device ID": "Device ID",
|
"Device ID": "Device ID",
|
||||||
|
"device id: ": "device id: ",
|
||||||
"Devices": "Devices",
|
"Devices": "Devices",
|
||||||
"Devices will not yet be able to decrypt history from before they joined the room": "Devices will not yet be able to decrypt history from before they joined the room",
|
"Devices will not yet be able to decrypt history from before they joined the room": "Devices will not yet be able to decrypt history from before they joined the room",
|
||||||
"Direct Chat": "Direct Chat",
|
"Direct Chat": "Direct Chat",
|
||||||
|
@ -343,6 +347,7 @@
|
||||||
"left": "left",
|
"left": "left",
|
||||||
"%(targetName)s left the room.": "%(targetName)s left the room.",
|
"%(targetName)s left the room.": "%(targetName)s left the room.",
|
||||||
"Level": "Level",
|
"Level": "Level",
|
||||||
|
"List this room in %(domain)s's room directory?": "List this room in %(domain)s's room directory?",
|
||||||
"Local addresses for this room:": "Local addresses for this room:",
|
"Local addresses for this room:": "Local addresses for this room:",
|
||||||
"Logged in as:": "Logged in as:",
|
"Logged in as:": "Logged in as:",
|
||||||
"Login as guest": "Login as guest",
|
"Login as guest": "Login as guest",
|
||||||
|
@ -389,6 +394,7 @@
|
||||||
"Only people who have been invited": "Only people who have been invited",
|
"Only people who have been invited": "Only people who have been invited",
|
||||||
"Operation failed": "Operation failed",
|
"Operation failed": "Operation failed",
|
||||||
"Password": "Password",
|
"Password": "Password",
|
||||||
|
"Password:": "Password:",
|
||||||
"Passwords can't be empty": "Passwords can't be empty",
|
"Passwords can't be empty": "Passwords can't be empty",
|
||||||
"People": "People",
|
"People": "People",
|
||||||
"Permissions": "Permissions",
|
"Permissions": "Permissions",
|
||||||
|
@ -408,6 +414,7 @@
|
||||||
"rejected": "rejected",
|
"rejected": "rejected",
|
||||||
"%(targetName)s rejected the invitation.": "%(targetName)s rejected the invitation.",
|
"%(targetName)s rejected the invitation.": "%(targetName)s rejected the invitation.",
|
||||||
"Reject invitation": "Reject invitation",
|
"Reject invitation": "Reject invitation",
|
||||||
|
"Remote addresses for this room:": "Remote addresses for this room:",
|
||||||
"Remove Contact Information?": "Remove Contact Information?",
|
"Remove Contact Information?": "Remove Contact Information?",
|
||||||
"%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s removed their display name (%(oldDisplayName)s).",
|
"%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s removed their display name (%(oldDisplayName)s).",
|
||||||
"%(senderName)s removed their profile picture.": "%(senderName)s removed their profile picture.",
|
"%(senderName)s removed their profile picture.": "%(senderName)s removed their profile picture.",
|
||||||
|
@ -427,6 +434,7 @@
|
||||||
"Room Colour": "Room Colour",
|
"Room Colour": "Room Colour",
|
||||||
"Room name (optional)": "Room name (optional)",
|
"Room name (optional)": "Room name (optional)",
|
||||||
"Rooms": "Rooms",
|
"Rooms": "Rooms",
|
||||||
|
"Save": "Save",
|
||||||
"Scroll to bottom of page": "Scroll to bottom of page",
|
"Scroll to bottom of page": "Scroll to bottom of page",
|
||||||
"Scroll to unread messages": "Scroll to unread messages",
|
"Scroll to unread messages": "Scroll to unread messages",
|
||||||
"Search": "Search",
|
"Search": "Search",
|
||||||
|
@ -468,6 +476,7 @@
|
||||||
"Success": "Success",
|
"Success": "Success",
|
||||||
"tag as %(tagName)s": "tag as %(tagName)s",
|
"tag as %(tagName)s": "tag as %(tagName)s",
|
||||||
"tag direct chat": "tag direct chat",
|
"tag direct chat": "tag direct chat",
|
||||||
|
"Tagged as: ": "Tagged as: ",
|
||||||
"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",
|
||||||
"The main address for this room is": "The main address for this room is",
|
"The main address for this room is": "The main address for this room is",
|
||||||
"The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.": "The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.",
|
"The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.": "The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.",
|
||||||
|
@ -577,6 +586,8 @@
|
||||||
"You do not have permission to post to this room": "You do not have permission to post to this room",
|
"You do not have permission to post to this room": "You do not have permission to post to this room",
|
||||||
"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",
|
||||||
"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",
|
||||||
|
"You have <a>disabled</a> URL previews by default.": "You have <a>disabled</a> URL previews by default.",
|
||||||
|
"You have <a>enabled</a> URL previews by default.": "You have <a>enabled</a> URL previews by default.",
|
||||||
"You have no visible notifications": "You have no visible notifications",
|
"You have no visible notifications": "You have no visible notifications",
|
||||||
"you must be a": "you must be a",
|
"you must be a": "you must be a",
|
||||||
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
|
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
|
||||||
|
|
Loading…
Reference in a new issue