Copy from toml

pull/10193/head
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",
"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.",

View File

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