Copy from toml

This commit is contained in:
Travis Ralston 2019-06-27 12:09:58 -06:00
parent 67664365bd
commit e49583f8e0
2 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,6 @@
{ {
"Your Riot configuration has invalid JSON in it. Please correct the problem and reload the page. The message from the parser is: %(message)s": "Your Riot configuration has invalid JSON in it. Please correct the problem and reload the page. The message from the parser is: %(message)s", "Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.",
"The message from the parser is: %(message)s": "The message from the parser is: %(message)s",
"Invalid JSON": "Invalid JSON", "Invalid JSON": "Invalid JSON",
"Your Riot is misconfigured": "Your Riot is misconfigured", "Your Riot is misconfigured": "Your Riot is misconfigured",
"Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.", "Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.",

View File

@ -304,10 +304,21 @@ async function loadApp() {
// Now that we've loaded the theme (CSS), display the config syntax error if needed. // Now that we've loaded the theme (CSS), display the config syntax error if needed.
if (configSyntaxError) { if (configSyntaxError) {
const errorMessage = _t( const errorMessage = (
"Your Riot configuration has invalid JSON in it. Please correct the problem and reload the page. " + <div>
"The message from the parser is: %(message)s", <p>
{message: configError.err.message || _t("Invalid JSON")}, {_t(
"Your Riot configuration contains invalid JSON. Please correct the problem " +
"and reload the page.",
)}
</p>
<p>
{_t(
"The message from the parser is: %(message)s",
{message: configError.err.message || _t("Invalid JSON")},
)}
</p>
</div>
); );
const GenericErrorPage = sdk.getComponent("structures.GenericErrorPage"); const GenericErrorPage = sdk.getComponent("structures.GenericErrorPage");