mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
add translateable strings and allow overriding of english strings (#158)
This commit is contained in:
parent
65a5e02ec2
commit
58613545b6
2 changed files with 35 additions and 2 deletions
|
@ -8,6 +8,15 @@
|
|||
const React = require("react");
|
||||
const Marked = require("./Marked.js");
|
||||
|
||||
const translate = require("../server/translate.js").translate;
|
||||
|
||||
const editThisDoc = translate(
|
||||
"Edit this Doc|recruitment message asking to edit the doc source"
|
||||
);
|
||||
const translateThisDoc = translate(
|
||||
"Translate this Doc|recruitment message asking to translate the docs"
|
||||
);
|
||||
|
||||
// inner doc component for article itself
|
||||
class Doc extends React.Component {
|
||||
render() {
|
||||
|
@ -17,7 +26,7 @@ class Doc extends React.Component {
|
|||
className="edit-page-link button"
|
||||
href={this.props.config.editUrl + this.props.source}
|
||||
target="_blank">
|
||||
Edit this Doc
|
||||
{editThisDoc}
|
||||
</a>
|
||||
);
|
||||
if (this.props.language != "en") {
|
||||
|
@ -31,7 +40,7 @@ class Doc extends React.Component {
|
|||
this.props.language
|
||||
}
|
||||
target="_blank">
|
||||
Translate this Doc
|
||||
{translateThisDoc}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue