Merge pull request #4122 from vector-im/kegan/translation-macaque

Finish translations for vector-im/riot-web
This commit is contained in:
Matthew Hodgson 2017-06-01 00:36:54 +01:00 committed by GitHub
commit 6f9d94f72f
8 changed files with 85 additions and 32 deletions

View File

@ -182,7 +182,7 @@ module.exports = React.createClass({
if (content.msgtype && content.msgtype !== 'm.bad.encrypted' && content.hasOwnProperty('body')) {
forwardButton = (
<div className="mx_MessageContextMenu_field" onClick={this.onForwardClick}>
Forward Message
{ _t('Forward Message') }
</div>
);
}

View File

@ -17,6 +17,7 @@ limitations under the License.
import React from 'react';
import sdk from 'matrix-react-sdk';
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
export default class BugReportDialog extends React.Component {
constructor(props, context) {
@ -49,12 +50,12 @@ export default class BugReportDialog extends React.Component {
const userText = this.state.text;
if (!sendLogs && userText.trim().length === 0) {
this.setState({
err: "Please describe the bug and/or send logs.",
err: _t("Please describe the bug and/or send logs."),
});
return;
}
this.setState({ busy: true, progress: null, err: null });
this._sendProgressCallback("Loading bug report module");
this._sendProgressCallback(_t("Loading bug report module"));
require(['../../../vector/submit-rageshake'], (s) => {
s(SdkConfig.get().bug_report_endpoint_url, {
@ -69,8 +70,9 @@ export default class BugReportDialog extends React.Component {
}, (err) => {
if (!this._unmounted) {
this.setState({
busy: false, progress: null,
err: `Failed to send report: ${err.message}`,
busy: false,
progress: null,
err: _t("Failed to send report: ") + `${err.message}`,
});
}
});
@ -105,7 +107,7 @@ export default class BugReportDialog extends React.Component {
let cancelButton = null;
if (!this.state.busy) {
cancelButton = <button onClick={this._onCancel}>
Cancel
{ _t("Cancel") }
</button>;
}
@ -122,25 +124,27 @@ export default class BugReportDialog extends React.Component {
return (
<div className="mx_BugReportDialog">
<div className="mx_Dialog_title">
Report a bug
{ _t("Report a bug") }
</div>
<div className="mx_Dialog_content">
<p>Please describe the bug. What did you do?
What did you expect to happen?
What actually happened?</p>
<p>
{ _t("Please describe the bug. What did you do? What did you expect to happen? What actually happened?") }
</p>
<textarea
className="mx_BugReportDialog_input"
rows={5}
onChange={this._onTextChange}
value={this.state.text}
placeholder="Describe your problem here."
placeholder={_t("Describe your problem here.")}
/>
<p>In order to diagnose problems, logs from this client will be sent with
this bug report.
If you would prefer to only send the text above, please untick:</p>
<p>
{ _t("In order to diagnose problems, logs from this client will be sent with this bug report. If you would prefer to only send the text above, please untick:") }
</p>
<input type="checkbox" checked={this.state.sendLogs}
onChange={this._onSendLogsChange} id="mx_BugReportDialog_logs"/>
<label htmlFor="mx_BugReportDialog_logs">Send logs</label>
<label htmlFor="mx_BugReportDialog_logs">
{ _t("Send logs") }
</label>
{progress}
{error}
</div>
@ -151,7 +155,7 @@ export default class BugReportDialog extends React.Component {
autoFocus={true}
disabled={this.state.busy}
>
Send
{ _t("Send") }
</button>
{cancelButton}

View File

@ -17,6 +17,7 @@
import React from 'react';
import sdk from 'matrix-react-sdk';
import request from 'browser-request';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
const REPOS = ['vector-im/vector-web', 'matrix-org/matrix-react-sdk', 'matrix-org/matrix-js-sdk'];
@ -70,16 +71,16 @@ export default class ChangelogDialog extends React.Component {
const content = (
<div className="mx_ChangelogDialog_content">
{this.props.version == null || this.props.newVersion == null ? <h2>Unavailable</h2> : logs}
{this.props.version == null || this.props.newVersion == null ? <h2>{_t("Unavailable")}</h2> : logs}
</div>
);
return (
<QuestionDialog
title="Changelog"
title={_t("Changelog")}
description={content}
button="Update"
button={_t("Update")}
onFinished={this.props.onFinished}
/>
)

View File

@ -15,7 +15,8 @@ limitations under the License.
*/
var React = require('react');
var dis = require('matrix-react-sdk/lib/dispatcher')
var dis = require('matrix-react-sdk/lib/dispatcher');
import { _tJsx } from 'matrix-react-sdk/lib/languageHandler';
module.exports = React.createClass({
displayName: 'GuestWarningBar',
@ -34,7 +35,17 @@ module.exports = React.createClass({
<div className="mx_GuestWarningBar">
<img className="mx_GuestWarningBar_warning" src="img/warning.svg" width="24" height="23" alt="/!\"/>
<div>
You are Rioting as a guest. <a onClick={this.onRegisterClicked}>Register</a> or <a onClick={this.onLoginClicked}>sign in</a> to access more rooms and features.
{ _tJsx(
"You are Rioting as a guest. <a>Register</a> or <a>sign in</a> to access more rooms and features!",
[
/<a>(.*?)<\/a>/,
/<a>(.*?)<\/a>/
],
[
(sub) => <a onClick={this.onRegisterClicked}>{sub}</a>,
(sub) => <a onClick={this.onLoginClicked}>{sub}</a>
]
) }
</div>
</div>
);

View File

@ -20,6 +20,7 @@ import React from 'react';
import sdk from 'matrix-react-sdk';
import Modal from 'matrix-react-sdk/lib/Modal';
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
/**
* Check a version string is compatible with the Changelog
@ -40,9 +41,9 @@ export default React.createClass({
displayReleaseNotes: function(releaseNotes) {
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
Modal.createDialog(QuestionDialog, {
title: "What's New",
title: _t("What's New"),
description: <pre className="changelog_text">{releaseNotes}</pre>,
button: "Update",
button: _t("Update"),
onFinished: (update) => {
if(update && PlatformPeg.get()) {
PlatformPeg.get().installUpdate();
@ -75,17 +76,29 @@ export default React.createClass({
// automatically tells you what's changed (provided the versions
// are in the right format)
if (this.props.releaseNotes) {
action_button = <button className="mx_MatrixToolbar_action" onClick={this.displayReleaseNotes}>What's new?</button>;
action_button = (
<button className="mx_MatrixToolbar_action" onClick={this.displayReleaseNotes}>
{ _t("What's new?") }
</button>
);
} else if (checkVersion(this.props.version) && checkVersion(this.props.newVersion)) {
action_button = <button className="mx_MatrixToolbar_action" onClick={this.displayChangelog}>What's new?</button>;
action_button = (
<button className="mx_MatrixToolbar_action" onClick={this.displayChangelog}>
{ _t("What's new?") }
</button>
);
} else if (PlatformPeg.get()) {
action_button = <button className="mx_MatrixToolbar_action" onClick={this.onUpdateClicked}>Update</button>;
action_button = (
<button className="mx_MatrixToolbar_action" onClick={this.onUpdateClicked}>
{ _t("Update") }
</button>
);
}
return (
<div className="mx_MatrixToolbar">
<img className="mx_MatrixToolbar_warning" src="img/warning.svg" width="24" height="23" alt="/!\"/>
<div className="mx_MatrixToolbar_content">
A new version of Riot is available.
{_t("A new version of Riot is available.")}
</div>
{action_button}
</div>

View File

@ -15,6 +15,7 @@ limitations under the License.
*/
var React = require("react");
var sanitizeHtml = require("sanitize-html");
import { _t } from 'matrix-react-sdk/lib/languageHandler';
module.exports = React.createClass({
@ -30,7 +31,7 @@ module.exports = React.createClass({
{ _t('Custom Server Options') }
</div>
<div className="mx_Dialog_content">
<span dangerouslySetInnerHTML={{__html: _t('customServer_text')}} />
<span dangerouslySetInnerHTML={{__html: sanitizeHtml(_t('customServer_text'))}} />
</div>
<div className="mx_Dialog_buttons">
<button onClick={this.props.onFinished} autoFocus={true}>

View File

@ -21,6 +21,7 @@ var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
var sdk = require('matrix-react-sdk');
var classNames = require('classnames');
var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton');
import { _t } from "matrix-react-sdk/lib/languageHandler";
module.exports = React.createClass({
displayName: 'SearchBar',
@ -59,10 +60,10 @@ module.exports = React.createClass({
return (
<div className="mx_SearchBar">
<input ref="search_term" className="mx_SearchBar_input" type="text" autoFocus={true} placeholder="Search..." onKeyDown={this.onSearchChange}/>
<AccessibleButton className={ searchButtonClasses } onClick={this.onSearch}><img src="img/search-button.svg" width="37" height="37" alt="Search"/></AccessibleButton>
<AccessibleButton className={ thisRoomClasses } onClick={this.onThisRoomClick}>This Room</AccessibleButton>
<AccessibleButton className={ allRoomsClasses } onClick={this.onAllRoomsClick}>All Rooms</AccessibleButton>
<input ref="search_term" className="mx_SearchBar_input" type="text" autoFocus={true} placeholder={_t("Search…")} onKeyDown={this.onSearchChange}/>
<AccessibleButton className={ searchButtonClasses } onClick={this.onSearch}><img src="img/search-button.svg" width="37" height="37" alt={_t("Search")}/></AccessibleButton>
<AccessibleButton className={ thisRoomClasses } onClick={this.onThisRoomClick}>{_t("This Room")}</AccessibleButton>
<AccessibleButton className={ allRoomsClasses } onClick={this.onAllRoomsClick}>{_t("All Rooms")}</AccessibleButton>
<AccessibleButton className="mx_SearchBar_cancel" onClick={this.props.onCancelClick}><img src="img/cancel.svg" width="18" height="18" /></AccessibleButton>
</div>
);

View File

@ -1,15 +1,19 @@
{
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s via %(browserName)s on %(osName)s",
"<a href=\"http://apple.com/safari\">Safari</a> and <a href=\"http://opera.com\">Opera</a> work too.": "<a href=\"http://apple.com/safari\">Safari</a> and <a href=\"http://opera.com\">Opera</a> work too.",
"A new version of Riot is available.": "A new version of Riot is available.",
"Add an email address above to configure email notifications": "Add an email address above to configure email notifications",
"Advanced notification settings": "Advanced notification settings",
"All messages": "All messages",
"All messages (loud)": "All messages (loud)",
"All Rooms": "All Rooms",
"All notifications are currently disabled for all targets.": "All notifications are currently disabled for all targets.",
"An error occurred whilst saving your email notification preferences.": "An error occurred whilst saving your email notification preferences.",
"Call invitation": "Call invitation",
"Cancel": "Cancel",
"Cancel Sending": "Cancel Sending",
"Can't update user notification settings": "Can't update user notification settings",
"Changelog": "Changelog",
"Close": "Close",
"Collapse panel": "Collapse panel",
"Collecting app version information": "Collecting app version information",
@ -20,6 +24,7 @@
"customServer_text": "You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.",
"delete the alias": "delete the alias",
"Delete the room alias %(alias)s and remove %(name)s from the directory?": "Delete the room alias %(alias)s and remove %(name)s from the directory?",
"Describe your problem here.": "Describe your problem here.",
"Direct Chat": "Direct Chat",
"Directory": "Directory",
"Dismiss": "Dismiss",
@ -44,6 +49,7 @@
"Failed to get public room list": "Failed to get public room list",
"Failed to join the room": "Failed to join the room",
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
"Failed to send report: ": "Failed to send report: ",
"Failed to set direct chat tag": "Failed to set direct chat tag",
"Failed to set Direct Message status of room": "Failed to set Direct Message status of room",
"Favourite": "Favourite",
@ -51,13 +57,16 @@
"Files": "Files",
"Filter room names": "Filter room names",
"Forget": "Forget",
"Forward Message": "Forward Message",
" from room": " from room",
"Guests can join": "Guests can join",
"Guest users can't invite users. Please register to invite": "Guest users can't invite users. Please register to invite",
"I understand the risks and wish to continue": "I understand the risks and wish to continue",
"In order to diagnose problems, logs from this client will be sent with this bug report. If you would prefer to only send the text above, please untick:": "In order to diagnose problems, logs from this client will be sent with this bug report. If you would prefer to only send the text above, please untick:",
"Invite to this room": "Invite to this room",
"Keywords": "Keywords",
"Leave": "Leave",
"Loading bug report module": "Loading bug report module",
"Low Priority": "Low Priority",
"Members": "Members",
"Mentions only": "Mentions only",
@ -80,6 +89,8 @@
"On": "On",
"Operation failed": "Operation failed",
"Permalink": "Permalink",
"Please describe the bug. What did you do? What did you expect to happen? What actually happened?": "Please describe the bug. What did you do? What did you expect to happen? What actually happened?",
"Please describe the bug and/or send logs.": "Please describe the bug and/or send logs.",
"Please install <a href=\"https://www.google.com/chrome\">Chrome</a> or <a href=\"https://getfirefox.com\">Firefox</a> for the best experience.": "Please install <a href=\"https://www.google.com/chrome\">Chrome</a> or <a href=\"https://getfirefox.com\">Firefox</a> for the best experience.",
"Please Register": "Please Register",
"powered by Matrix": "powered by Matrix",
@ -90,6 +101,7 @@
"Remove": "Remove",
"remove %(name)s from the directory": "remove %(name)s from the directory",
"Remove from Directory": "Remove from Directory",
"Report a bug": "Report a bug",
"Resend": "Resend",
"Riot Desktop on %(platformName)": "Riot Desktop on %(platformName)",
"Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network",
@ -97,7 +109,11 @@
"Riot uses many advanced browser features, some of which are not available or experimental in your current browser.": "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.",
"Room directory": "Room directory",
"Room not found": "Room not found",
"Search": "Search",
"Search…": "Search…",
"Search for a room": "Search for a room",
"Send": "Send",
"Send logs": "Send logs",
"Settings": "Settings",
"Source URL": "Source URL",
"Sorry, your browser is <b>not</b> able to run Riot.": "Sorry, your browser is <b>not</b> able to run Riot.",
@ -105,25 +121,31 @@
"The Home Server may be too old to support third party networks": "The Home Server may be too old to support third party networks",
"There are advanced notifications which are not shown here": "There are advanced notifications which are not shown here",
"The server may be unavailable or overloaded": "The server may be unavailable or overloaded",
"This Room": "This Room",
"This room is inaccessible to guests. You may be able to join if you register": "This room is inaccessible to guests. You may be able to join if you register",
" to room": " to room",
"Unable to fetch notification target list": "Unable to fetch notification target list",
"Unable to join network": "Unable to join network",
"Unable to look up room ID from server": "Unable to look up room ID from server",
"Unavailable": "Unavailable",
"Unhide Preview": "Unhide Preview",
"Unknown device": "Unknown device",
"unknown error code": "unknown error code",
"Unnamed room": "Unnamed room",
"Update": "Update",
"Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s",
"Uploading report": "Uploading report",
"View Decrypted Source": "View Decrypted Source",
"View Source": "View Source",
"What's New": "What's New",
"What's new?": "What's new?",
"Waiting for response from server": "Waiting for response from server",
"When I'm invited to a room": "When I'm invited to a room",
"World readable": "World readable",
"You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)",
"You cannot delete this message. (%(code)s)": "You cannot delete this message. (%(code)s)",
"You are not receiving desktop notifications": "You are not receiving desktop notifications",
"You are Rioting as a guest. <a>Register</a> or <a>sign in</a> to access more rooms and features!": "You are Rioting as a guest. <a>Register</a> or <a>sign in</a> to access more rooms and features!",
"You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply": "You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply",
"Sunday": "Sunday",
"Monday": "Monday",