Skip to content

Commit

Permalink
Copy from toml
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Jun 27, 2019
1 parent 6766436 commit e49583f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
19 changes: 15 additions & 4 deletions src/vector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit e49583f

Please sign in to comment.