fix: more translation support for settings and feedback

This commit is contained in:
David Ralph
2021-04-06 22:34:47 +01:00
parent d02da12d3f
commit 670f897a80
8 changed files with 38 additions and 28 deletions

View File

@@ -6,6 +6,7 @@ export default class ErrorBoundary extends React.PureComponent {
this.state = {
error: false
};
this.language = window.language.modals.main.error_boundary;
}
static getDerivedStateFromError(error) {
@@ -19,9 +20,9 @@ export default class ErrorBoundary extends React.PureComponent {
if (this.state.error) {
return (
<div style={{'textAlign': 'center'}}>
<h1>Error</h1>
<p>Failed to load this component of Mue.</p>
<button className='refresh' onClick={() => window.location.reload()}>Refresh</button>
<h1>{this.language.title}</h1>
<p>{this.language.message}</p>
<button className='refresh' onClick={() => window.location.reload()}>{this.language.refresh}</button>
</div>
);
}