mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
Add comments
This commit is contained in:
parent
df0f95e36f
commit
43ef3c8142
22 changed files with 114 additions and 62 deletions
|
@ -61,6 +61,7 @@ class SideNav extends React.Component {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
// return appropriately translated category string
|
||||
getLocalizedCategoryString(category) {
|
||||
let categoryString = translation[this.props.language]
|
||||
? translation[this.props.language]["localized-strings"][category] ||
|
||||
|
@ -68,6 +69,7 @@ class SideNav extends React.Component {
|
|||
: category;
|
||||
return categoryString;
|
||||
}
|
||||
// return appropriately translated label to use for doc/blog in sidebar
|
||||
getLocalizedString(metadata) {
|
||||
let localizedString;
|
||||
const i18n = translation[this.props.language];
|
||||
|
@ -85,6 +87,7 @@ class SideNav extends React.Component {
|
|||
}
|
||||
return localizedString;
|
||||
}
|
||||
// return link to doc in sidebar
|
||||
getLink(metadata) {
|
||||
if (metadata.permalink) {
|
||||
if (metadata.permalink.match(/^https?:/)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue