fix: all settings tabs with translations and add quote author link setting

This commit is contained in:
David Ralph
2021-03-18 11:42:00 +00:00
parent b4a1a4bb19
commit 07c9e62205
9 changed files with 47 additions and 30 deletions

View File

@@ -90,10 +90,13 @@ export default class Quote extends React.PureComponent {
return this.doOffline();
}
let authorlink = `https://${this.props.languagecode.split('-')[0]}.wikipedia.org/wiki/${data.author.split(' ').join('_')}`;
if (localStorage.getItem('authorLink') === 'false') authorLink = null;
this.setState({
quote: '"' + data.quote + '"',
author: data.author,
authorlink: `https://${this.props.languagecode}.wikipedia.org/wiki/${data.author.split(' ').join('_')}`
authorlink: authorlink
});
} catch (e) {
// ..and if that fails we load one locally