mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +02:00
Adds sitemap.xml. Adds 'Help Translate' to translatable strings. Error messages and fn name cleanups. (#136)
* added a note about needing more than one language to be enabled to allow for a drop down * Removing debug statements * Add 'Help Translate' to translatable strings, improves error messages around missing translated strings, calls write-translations on some routes * Adds sitemap.xml to live server and build. Versioning not supported. -- Also did some file name and module cache cleanups.
This commit is contained in:
parent
30eea17a24
commit
bcba05ae03
19 changed files with 495 additions and 245 deletions
|
@ -33,12 +33,11 @@ function translate(str) {
|
|||
!translation[language]["pages-strings"][str]
|
||||
) {
|
||||
throw new Error(
|
||||
"Text that you've identified for translation hasn't been added to the global list in 'en.json'. To solve this problem run 'yarn write-translations'."
|
||||
"Text that you've identified for translation ('" +
|
||||
str +
|
||||
"') hasn't been added to the global list in 'en.json'. To solve this problem run 'yarn write-translations'."
|
||||
);
|
||||
}
|
||||
console.log(translation[language]);
|
||||
console.log(translation[language]["pages-strings"]);
|
||||
console.log(translation[language]["pages-strings"][str]);
|
||||
return parseEscapeSequences(translation[language]["pages-strings"][str]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue