Adding a new translation tag like <translate>hello</translate> without running docusaurus-write-translations results in a cryptic runtime error when running docusaurus-start. Would be nice to get explicit instructions on next steps.
TypeError: Cannot read property 'replace' of undefined
at parseEscapeSequences (/path/to/website/node_modules/docusaurus/lib/server/translate.js:16:10)
at translate (/path/to/website/node_modules/docusaurus/lib/server/translate.js:32:10)
at Index.render (/path/to/website/node_modules/docusaurus/lib/pages/en/tempindex.js:204:15)
at /path/to/website/node_modules/react-dom/lib/ReactCompositeComponent.js:793:21
at measureLifeCyclePerf (/path/to/website/node_modules/react-dom/lib/ReactCompositeComponent.js:73:12)
at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (/path/to/website/node_modules/react-dom/lib/ReactCompositeComponent.js:792:25)
at ReactCompositeComponentWrapper._renderValidatedComponent (/path/to/website/node_modules/react-dom/lib/ReactCompositeComponent.js:819:32)
at ReactCompositeComponentWrapper.performInitialMount (/path/to/website/node_modules/react-dom/lib/ReactCompositeComponent.js:359:30)
at ReactCompositeComponentWrapper.mountComponent (/path/to/website/node_modules/react-dom/lib/ReactCompositeComponent.js:255:21)
at Object.mountComponent (/path/to/website/node_modules/react-dom/lib/ReactReconciler.js:43:35)
Thanks for reporting this. We need a better error message -- and perhaps force running docusaurus-write-translations on each build or server start.
Needing to run write-translations was a small stumbling block early on. Having it run implicitly would be nice!
Though I really love the speed and simplicity of the current sever starting process. It'd be nice if it's kept as fast =)
@chenglou I've further expanded support for strings and docs that may not exist when localization is enabled. https://github.com/facebookexperimental/Docusaurus/pull/151 and https://github.com/facebookexperimental/Docusaurus/pull/148