Add remaining strings for vector-im/riot-web#4151

pull/21833/head
Kegan Dougal 2017-06-02 10:47:08 +01:00
parent d2e766e4f0
commit f54c182eb1
9 changed files with 31 additions and 17 deletions

View File

@ -684,8 +684,13 @@ module.exports = React.createClass({
const roomToLeave = MatrixClientPeg.get().getRoom(roomId);
Modal.createDialog(QuestionDialog, {
title: "Leave room",
description: <span>Are you sure you want to leave the room <i>{roomToLeave.name}</i>?</span>,
title: _t("Leave room"),
description: (
<span>
{_t("Are you sure you want to leave the room ")}
<i>{roomToLeave.name}</i>?
</span>
),
onFinished: (shouldLeave) => {
if (shouldLeave) {
const d = MatrixClientPeg.get().leave(roomId);

View File

@ -715,8 +715,8 @@ module.exports = React.createClass({
<h3>{ _t("Cryptography") }</h3>
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
<ul>
<li><label>Device ID:</label> <span><code>{deviceId}</code></span></li>
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
<li><label>{_t("Device ID:")}</label> <span><code>{deviceId}</code></span></li>
<li><label>{_t("Device key:")}</label> <span><code><b>{identityKey}</b></code></span></li>
</ul>
{ importExportButtons }
</div>

View File

@ -229,7 +229,7 @@ module.exports = React.createClass({
<div className="mx_Login_error">
</div>
<a className="mx_Login_create" onClick={this.props.onLoginClick} href="#">
Return to login
{_t('Return to login screen')}
</a>
<a className="mx_Login_create" onClick={this.props.onRegisterClick} href="#">
{ _t('Create an account') }

View File

@ -490,7 +490,7 @@ module.exports = React.createClass({
var error;
var addressSelector;
if (this.state.error) {
error = <div className="mx_ChatInviteDialog_error">You have entered an invalid contact. Try using their Matrix ID or email address.</div>;
error = <div className="mx_ChatInviteDialog_error">{_t("You have entered an invalid contact. Try using their Matrix ID or email address.")}</div>;
} else {
const addressSelectorHeader = <div className="mx_ChatInviteDialog_addressSelectHeader">
Searching known users

View File

@ -60,10 +60,10 @@ module.exports = React.createClass({
</div>
<div className="mx_Dialog_buttons">
<button className="mx_Dialog_primary" onClick={this.props.onFinished} autoFocus={true}>
Cancel
{_t("Cancel")}
</button>
<button onClick={this.onRegisterClicked}>
Register
{_t("Register")}
</button>
</div>
</BaseDialog>

View File

@ -51,7 +51,7 @@ export default React.createClass({
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
const cancelButton = this.props.hasCancelButton ? (
<button onClick={this.onCancel}>
Cancel
{_t("Cancel")}
</button>
) : null;
return (

View File

@ -150,7 +150,7 @@ class PasswordLogin extends React.Component {
type="text"
name="phoneNumber"
onChange={this.onPhoneNumberChanged}
placeholder="Mobile phone number"
placeholder={_t("Mobile phone number")}
value={this.state.phoneNumber}
autoFocus
/>

View File

@ -282,7 +282,7 @@ module.exports = React.createClass({
const emailSection = (
<div>
<input type="text" ref="email"
autoFocus={true} placeholder="Email address (optional)"
autoFocus={true} placeholder={_t("Email address (optional)")}
defaultValue={this.props.defaultEmail}
className={this._classForField(FIELD_EMAIL, 'mx_Login_field')}
onBlur={function() {self.validateField(FIELD_EMAIL);}}
@ -321,7 +321,7 @@ module.exports = React.createClass({
showPrefix={true}
/>
<input type="text" ref="phoneNumber"
placeholder="Mobile phone number (optional)"
placeholder={_t("Mobile phone number (optional)")}
defaultValue={this.props.defaultPhoneNumber}
className={this._classForField(
FIELD_PHONE_NUMBER,
@ -339,9 +339,9 @@ module.exports = React.createClass({
<input className="mx_Login_submit" type="submit" value="Register" />
);
let placeholderUserName = "User name";
let placeholderUserName = _t("User name");
if (this.props.guestUsername) {
placeholderUserName += " (default: " + this.props.guestUsername + ")";
placeholderUserName += " " + _t("(default: %(userName)s)", {userName: this.props.guestUsername});
}
return (
@ -356,15 +356,15 @@ module.exports = React.createClass({
onBlur={function() {self.validateField(FIELD_USERNAME);}} />
<br />
{ this.props.guestUsername ?
<div className="mx_Login_fieldLabel">Setting a user name will create a fresh account</div> : null
<div className="mx_Login_fieldLabel">{_t("Setting a user name will create a fresh account")}</div> : null
}
<input type="password" ref="password"
className={this._classForField(FIELD_PASSWORD, 'mx_Login_field')}
onBlur={function() {self.validateField(FIELD_PASSWORD);}}
placeholder="Password" defaultValue={this.props.defaultPassword} />
placeholder={_t("Password")} defaultValue={this.props.defaultPassword} />
<br />
<input type="password" ref="passwordConfirm"
placeholder="Confirm password"
placeholder={_t("Confirm password")}
className={this._classForField(FIELD_PASSWORD_CONFIRM, 'mx_Login_field')}
onBlur={function() {self.validateField(FIELD_PASSWORD_CONFIRM);}}
defaultValue={this.props.defaultPassword} />

View File

@ -165,6 +165,7 @@
"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",
"Are you sure?": "Are you sure?",
"Are you sure you want to leave the room ": "Are you sure you want to leave the room ",
"Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?",
"Are you sure you want to upload the following files?": "Are you sure you want to upload the following files?",
"Attachment": "Attachment",
@ -223,13 +224,16 @@
"decline": "decline",
"Decrypt %(text)s": "Decrypt %(text)s",
"Decryption error": "Decryption error",
"(default: %(userName)s)": "(default: %(userName)s)",
"Delete": "Delete",
"demote": "demote",
"Deops user with given id": "Deops user with given id",
"Default": "Default",
"Device already verified!": "Device already verified!",
"Device ID": "Device ID",
"Device ID:": "Device ID:",
"device id: ": "device id: ",
"Device key:": "Device key:",
"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",
"Direct Chat": "Direct Chat",
@ -246,6 +250,7 @@
"Ed25519 fingerprint": "Ed25519 fingerprint",
"Email": "Email",
"Email address": "Email address",
"Email address (optional)": "Email address (optional)",
"Email, name or matrix ID": "Email, name or matrix ID",
"Emoji": "Emoji",
"Enable encryption": "Enable encryption",
@ -363,6 +368,7 @@
"Missing room_id in request": "Missing room_id in request",
"Missing user_id in request": "Missing user_id in request",
"Mobile phone number": "Mobile phone number",
"Mobile phone number (optional)": "Mobile phone number (optional)",
"Moderator": "Moderator",
"Must be viewing a room": "Must be viewing a room",
"Mute": "Mute",
@ -410,6 +416,7 @@
"Reason": "Reason",
"Revoke Moderator": "Revoke Moderator",
"Refer a friend to Riot:": "Refer a friend to Riot:",
"Register": "Register",
"Registration required": "Registration required",
"rejected": "rejected",
"%(targetName)s rejected the invitation.": "%(targetName)s rejected the invitation.",
@ -458,6 +465,7 @@
"Session ID": "Session ID",
"%(senderName)s set a profile picture.": "%(senderName)s set a profile picture.",
"%(senderName)s set their display name to %(displayName)s.": "%(senderName)s set their display name to %(displayName)s.",
"Setting a user name will create a fresh account": "Setting a user name will create a fresh account",
"Settings": "Settings",
"Show panel": "Show panel",
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)",
@ -588,6 +596,7 @@
"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 entered an invalid contact. Try using their Matrix ID or email address.": "You have entered an invalid contact. Try using their Matrix ID or email address.",
"You have no visible notifications": "You have no visible notifications",
"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.",