mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
Move references to languages and translated strings out of siteConfig.js into new translation.js module
This commit is contained in:
parent
48916d9f39
commit
099a13a264
9 changed files with 52 additions and 112 deletions
|
@ -11,6 +11,7 @@ const React = require("react");
|
|||
const HeaderNav = require("./nav/HeaderNav.js");
|
||||
const Head = require("./Head.js");
|
||||
const Footer = require(process.cwd() + "/core/Footer.js");
|
||||
const translation = require("../server/translation.js");
|
||||
|
||||
class Site extends React.Component {
|
||||
/*
|
||||
|
@ -48,8 +49,8 @@ class Site extends React.Component {
|
|||
*/
|
||||
|
||||
render() {
|
||||
const tagline = this.props.config[this.props.language]
|
||||
? this.props.config[this.props.language]["localized-strings"].tagline
|
||||
const tagline = translation[this.props.language]
|
||||
? translation[this.props.language]["localized-strings"].tagline
|
||||
: this.props.config.tagline;
|
||||
const title = this.props.title
|
||||
? this.props.title + " · " + this.props.config.title
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue