Everything but src/components/views/rooms
This commit is contained in:
parent
0f4028da07
commit
1c58a9cd5e
17 changed files with 80 additions and 30 deletions
|
@ -165,7 +165,7 @@ export default WithMatrixClient(React.createClass({
|
|||
</div>
|
||||
</div>
|
||||
<div className="mx_UserSettings_threepidButton mx_filterFlipColor">
|
||||
<input type="image" value="Add" src="img/plus.svg" width="14" height="14" />
|
||||
<input type="image" value={_t("Add")} src="img/plus.svg" width="14" height="14" />
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
var React = require('react');
|
||||
var MatrixClientPeg = require("../../../MatrixClientPeg");
|
||||
var sdk = require('../../../index');
|
||||
import { _t } from '../../../languageHandler';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'ChangeAvatar',
|
||||
|
@ -105,7 +106,7 @@ module.exports = React.createClass({
|
|||
|
||||
onError: function(error) {
|
||||
this.setState({
|
||||
errorText: "Failed to upload profile picture!"
|
||||
errorText: _t("Failed to upload profile picture!")
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -127,7 +128,7 @@ module.exports = React.createClass({
|
|||
if (this.props.showUploadSection) {
|
||||
uploadSection = (
|
||||
<div className={this.props.className}>
|
||||
Upload new:
|
||||
{_t("Upload new:")}
|
||||
<input type="file" accept="image/*" onChange={this.onFileSelected}/>
|
||||
{this.state.errorText}
|
||||
</div>
|
||||
|
|
|
@ -18,6 +18,7 @@ limitations under the License.
|
|||
var React = require('react');
|
||||
var sdk = require('../../../index');
|
||||
var MatrixClientPeg = require("../../../MatrixClientPeg");
|
||||
import { _t } from '../../../languageHandler';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'ChangeDisplayName',
|
||||
|
@ -52,7 +53,7 @@ module.exports = React.createClass({
|
|||
return (
|
||||
<EditableTextContainer
|
||||
getInitialValue={this._getDisplayName}
|
||||
placeholder="No display name"
|
||||
placeholder={_t("No display name")}
|
||||
blurToSubmit={true}
|
||||
onSubmit={this._changeDisplayName} />
|
||||
);
|
||||
|
|
|
@ -48,7 +48,7 @@ module.exports = React.createClass({
|
|||
onCheckPassword: function(oldPass, newPass, confirmPass) {
|
||||
if (newPass !== confirmPass) {
|
||||
return {
|
||||
error: _t("New passwords don't match") + "."
|
||||
error: _t("New passwords don't match")
|
||||
};
|
||||
} else if (!newPass || newPass.length === 0) {
|
||||
return {
|
||||
|
|
|
@ -19,6 +19,7 @@ import classNames from 'classnames';
|
|||
|
||||
import sdk from '../../../index';
|
||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||
import { _t } from '../../../languageHandler';
|
||||
|
||||
|
||||
export default class DevicesPanel extends React.Component {
|
||||
|
@ -54,10 +55,10 @@ export default class DevicesPanel extends React.Component {
|
|||
var errtxt;
|
||||
if (error.httpStatus == 404) {
|
||||
// 404 probably means the HS doesn't yet support the API.
|
||||
errtxt = "Your home server does not support device management.";
|
||||
errtxt = _t("Your home server does not support device management.");
|
||||
} else {
|
||||
console.error("Error loading devices:", error);
|
||||
errtxt = "Unable to load device list.";
|
||||
errtxt = _t("Unable to load device list");
|
||||
}
|
||||
this.setState({deviceLoadError: errtxt});
|
||||
}
|
||||
|
@ -127,9 +128,9 @@ export default class DevicesPanel extends React.Component {
|
|||
return (
|
||||
<div className={classes}>
|
||||
<div className="mx_DevicesPanel_header">
|
||||
<div className="mx_DevicesPanel_deviceId">ID</div>
|
||||
<div className="mx_DevicesPanel_deviceName">Name</div>
|
||||
<div className="mx_DevicesPanel_deviceLastSeen">Last seen</div>
|
||||
<div className="mx_DevicesPanel_deviceId">{_t("Device ID")}</div>
|
||||
<div className="mx_DevicesPanel_deviceName">{_t("Device Name")}</div>
|
||||
<div className="mx_DevicesPanel_deviceLastSeen">{_t("Last seen")}</div>
|
||||
<div className="mx_DevicesPanel_deviceButtons"></div>
|
||||
</div>
|
||||
{devices.map(this._renderDevice)}
|
||||
|
|
|
@ -18,6 +18,7 @@ limitations under the License.
|
|||
var React = require("react");
|
||||
var Notifier = require("../../../Notifier");
|
||||
var dis = require("../../../dispatcher");
|
||||
import { _t } from '../../../languageHandler';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'EnableNotificationsButton',
|
||||
|
@ -60,13 +61,13 @@ module.exports = React.createClass({
|
|||
if (this.enabled()) {
|
||||
return (
|
||||
<button className="mx_EnableNotificationsButton" onClick={this.onClick}>
|
||||
Disable Notifications
|
||||
{_t("Disable Notifications")}
|
||||
</button>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<button className="mx_EnableNotificationsButton" onClick={this.onClick}>
|
||||
Enable Notifications
|
||||
{_t("Enable Notifications")}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue