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:
Eric Nakagawa 2017-10-18 12:55:58 -07:00 committed by Joel Marcey
parent 30eea17a24
commit bcba05ae03
19 changed files with 495 additions and 245 deletions

View file

@ -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]);
}