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

This commit is contained in:
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); const roomToLeave = MatrixClientPeg.get().getRoom(roomId);
Modal.createDialog(QuestionDialog, { Modal.createDialog(QuestionDialog, {
title: "Leave room", title: _t("Leave room"),
description: <span>Are you sure you want to leave the room <i>{roomToLeave.name}</i>?</span>, description: (
<span>
{_t("Are you sure you want to leave the room ")}
<i>{roomToLeave.name}</i>?
</span>
),
onFinished: (shouldLeave) => { onFinished: (shouldLeave) => {
if (shouldLeave) { if (shouldLeave) {
const d = MatrixClientPeg.get().leave(roomId); const d = MatrixClientPeg.get().leave(roomId);

View file

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

View file

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

View file

@ -490,7 +490,7 @@ module.exports = React.createClass({
var error; var error;
var addressSelector; var addressSelector;
if (this.state.error) { 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 { } else {
const addressSelectorHeader = <div className="mx_ChatInviteDialog_addressSelectHeader"> const addressSelectorHeader = <div className="mx_ChatInviteDialog_addressSelectHeader">
Searching known users Searching known users

View file

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

View file

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

View file

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

View file

@ -282,7 +282,7 @@ module.exports = React.createClass({
const emailSection = ( const emailSection = (
<div> <div>
<input type="text" ref="email" <input type="text" ref="email"
autoFocus={true} placeholder="Email address (optional)" autoFocus={true} placeholder={_t("Email address (optional)")}
defaultValue={this.props.defaultEmail} defaultValue={this.props.defaultEmail}
className={this._classForField(FIELD_EMAIL, 'mx_Login_field')} className={this._classForField(FIELD_EMAIL, 'mx_Login_field')}
onBlur={function() {self.validateField(FIELD_EMAIL);}} onBlur={function() {self.validateField(FIELD_EMAIL);}}
@ -321,7 +321,7 @@ module.exports = React.createClass({
showPrefix={true} showPrefix={true}
/> />
<input type="text" ref="phoneNumber" <input type="text" ref="phoneNumber"
placeholder="Mobile phone number (optional)" placeholder={_t("Mobile phone number (optional)")}
defaultValue={this.props.defaultPhoneNumber} defaultValue={this.props.defaultPhoneNumber}
className={this._classForField( className={this._classForField(
FIELD_PHONE_NUMBER, FIELD_PHONE_NUMBER,
@ -339,9 +339,9 @@ module.exports = React.createClass({
<input className="mx_Login_submit" type="submit" value="Register" /> <input className="mx_Login_submit" type="submit" value="Register" />
); );
let placeholderUserName = "User name"; let placeholderUserName = _t("User name");
if (this.props.guestUsername) { if (this.props.guestUsername) {
placeholderUserName += " (default: " + this.props.guestUsername + ")"; placeholderUserName += " " + _t("(default: %(userName)s)", {userName: this.props.guestUsername});
} }
return ( return (
@ -356,15 +356,15 @@ module.exports = React.createClass({
onBlur={function() {self.validateField(FIELD_USERNAME);}} /> onBlur={function() {self.validateField(FIELD_USERNAME);}} />
<br /> <br />
{ this.props.guestUsername ? { 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" <input type="password" ref="password"
className={this._classForField(FIELD_PASSWORD, 'mx_Login_field')} className={this._classForField(FIELD_PASSWORD, 'mx_Login_field')}
onBlur={function() {self.validateField(FIELD_PASSWORD);}} onBlur={function() {self.validateField(FIELD_PASSWORD);}}
placeholder="Password" defaultValue={this.props.defaultPassword} /> placeholder={_t("Password")} defaultValue={this.props.defaultPassword} />
<br /> <br />
<input type="password" ref="passwordConfirm" <input type="password" ref="passwordConfirm"
placeholder="Confirm password" placeholder={_t("Confirm password")}
className={this._classForField(FIELD_PASSWORD_CONFIRM, 'mx_Login_field')} className={this._classForField(FIELD_PASSWORD_CONFIRM, 'mx_Login_field')}
onBlur={function() {self.validateField(FIELD_PASSWORD_CONFIRM);}} onBlur={function() {self.validateField(FIELD_PASSWORD_CONFIRM);}}
defaultValue={this.props.defaultPassword} /> 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, 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?",
"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 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?", "Are you sure you want to upload the following files?": "Are you sure you want to upload the following files?",
"Attachment": "Attachment", "Attachment": "Attachment",
@ -223,13 +224,16 @@
"decline": "decline", "decline": "decline",
"Decrypt %(text)s": "Decrypt %(text)s", "Decrypt %(text)s": "Decrypt %(text)s",
"Decryption error": "Decryption error", "Decryption error": "Decryption error",
"(default: %(userName)s)": "(default: %(userName)s)",
"Delete": "Delete", "Delete": "Delete",
"demote": "demote", "demote": "demote",
"Deops user with given id": "Deops user with given id", "Deops user with given id": "Deops user with given id",
"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:",
"device id: ": "device id: ", "device id: ": "device id: ",
"Device key:": "Device key:",
"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",
@ -246,6 +250,7 @@
"Ed25519 fingerprint": "Ed25519 fingerprint", "Ed25519 fingerprint": "Ed25519 fingerprint",
"Email": "Email", "Email": "Email",
"Email address": "Email address", "Email address": "Email address",
"Email address (optional)": "Email address (optional)",
"Email, name or matrix ID": "Email, name or matrix ID", "Email, name or matrix ID": "Email, name or matrix ID",
"Emoji": "Emoji", "Emoji": "Emoji",
"Enable encryption": "Enable encryption", "Enable encryption": "Enable encryption",
@ -363,6 +368,7 @@
"Missing room_id in request": "Missing room_id in request", "Missing room_id in request": "Missing room_id in request",
"Missing user_id in request": "Missing user_id in request", "Missing user_id in request": "Missing user_id in request",
"Mobile phone number": "Mobile phone number", "Mobile phone number": "Mobile phone number",
"Mobile phone number (optional)": "Mobile phone number (optional)",
"Moderator": "Moderator", "Moderator": "Moderator",
"Must be viewing a room": "Must be viewing a room", "Must be viewing a room": "Must be viewing a room",
"Mute": "Mute", "Mute": "Mute",
@ -410,6 +416,7 @@
"Reason": "Reason", "Reason": "Reason",
"Revoke Moderator": "Revoke Moderator", "Revoke Moderator": "Revoke Moderator",
"Refer a friend to Riot:": "Refer a friend to Riot:", "Refer a friend to Riot:": "Refer a friend to Riot:",
"Register": "Register",
"Registration required": "Registration required", "Registration required": "Registration required",
"rejected": "rejected", "rejected": "rejected",
"%(targetName)s rejected the invitation.": "%(targetName)s rejected the invitation.", "%(targetName)s rejected the invitation.": "%(targetName)s rejected the invitation.",
@ -458,6 +465,7 @@
"Session ID": "Session ID", "Session ID": "Session ID",
"%(senderName)s set a profile picture.": "%(senderName)s set a profile picture.", "%(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.", "%(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", "Settings": "Settings",
"Show panel": "Show panel", "Show panel": "Show panel",
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)", "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 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>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 <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 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.",