From f54c182eb19c711dc228efc582d18c99f775ace3 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 2 Jun 2017 10:47:08 +0100 Subject: [PATCH] Add remaining strings for vector-im/riot-web#4151 --- src/components/structures/MatrixChat.js | 9 +++++++-- src/components/structures/UserSettings.js | 4 ++-- src/components/structures/login/ForgotPassword.js | 2 +- src/components/views/dialogs/ChatInviteDialog.js | 2 +- .../views/dialogs/NeedToRegisterDialog.js | 4 ++-- src/components/views/dialogs/QuestionDialog.js | 2 +- src/components/views/login/PasswordLogin.js | 2 +- src/components/views/login/RegistrationForm.js | 14 +++++++------- src/i18n/strings/en_EN.json | 9 +++++++++ 9 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index f53128fba9..e82427ee3f 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -684,8 +684,13 @@ module.exports = React.createClass({ const roomToLeave = MatrixClientPeg.get().getRoom(roomId); Modal.createDialog(QuestionDialog, { - title: "Leave room", - description: Are you sure you want to leave the room {roomToLeave.name}?, + title: _t("Leave room"), + description: ( + + {_t("Are you sure you want to leave the room ")} + {roomToLeave.name}? + + ), onFinished: (shouldLeave) => { if (shouldLeave) { const d = MatrixClientPeg.get().leave(roomId); diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 7300d82541..e4087d6bf6 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -715,8 +715,8 @@ module.exports = React.createClass({

{ _t("Cryptography") }

{ importExportButtons }
diff --git a/src/components/structures/login/ForgotPassword.js b/src/components/structures/login/ForgotPassword.js index 6e7cda1365..18a9dca5dd 100644 --- a/src/components/structures/login/ForgotPassword.js +++ b/src/components/structures/login/ForgotPassword.js @@ -229,7 +229,7 @@ module.exports = React.createClass({
- Return to login + {_t('Return to login screen')} { _t('Create an account') } diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js index aea69bfdeb..7dd5b05041 100644 --- a/src/components/views/dialogs/ChatInviteDialog.js +++ b/src/components/views/dialogs/ChatInviteDialog.js @@ -490,7 +490,7 @@ module.exports = React.createClass({ var error; var addressSelector; if (this.state.error) { - error =
You have entered an invalid contact. Try using their Matrix ID or email address.
; + error =
{_t("You have entered an invalid contact. Try using their Matrix ID or email address.")}
; } else { const addressSelectorHeader =
Searching known users diff --git a/src/components/views/dialogs/NeedToRegisterDialog.js b/src/components/views/dialogs/NeedToRegisterDialog.js index 4a07a65529..8b5980164d 100644 --- a/src/components/views/dialogs/NeedToRegisterDialog.js +++ b/src/components/views/dialogs/NeedToRegisterDialog.js @@ -60,10 +60,10 @@ module.exports = React.createClass({
diff --git a/src/components/views/dialogs/QuestionDialog.js b/src/components/views/dialogs/QuestionDialog.js index bd7046232b..ec9b95d7f7 100644 --- a/src/components/views/dialogs/QuestionDialog.js +++ b/src/components/views/dialogs/QuestionDialog.js @@ -51,7 +51,7 @@ export default React.createClass({ const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); const cancelButton = this.props.hasCancelButton ? ( ) : null; return ( diff --git a/src/components/views/login/PasswordLogin.js b/src/components/views/login/PasswordLogin.js index dff6fb0b58..972516b553 100644 --- a/src/components/views/login/PasswordLogin.js +++ b/src/components/views/login/PasswordLogin.js @@ -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 /> diff --git a/src/components/views/login/RegistrationForm.js b/src/components/views/login/RegistrationForm.js index f567c80bfd..daabb7cb61 100644 --- a/src/components/views/login/RegistrationForm.js +++ b/src/components/views/login/RegistrationForm.js @@ -282,7 +282,7 @@ module.exports = React.createClass({ const emailSection = (
); - 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);}} />
{ this.props.guestUsername ? -
Setting a user name will create a fresh account
: null +
{_t("Setting a user name will create a fresh account")}
: null } + placeholder={_t("Password")} defaultValue={this.props.defaultPassword} />
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9aa05d246c..b5b027abae 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -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
disabled URL previews by default.": "You have disabled URL previews by default.", "You have enabled URL previews by default.": "You have enabled 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.",