mirror of
https://github.com/mue/mue.git
synced 2026-07-13 20:13:47 +02:00
fix translation support on event greetings
This commit is contained in:
@@ -15,9 +15,9 @@ export default class Greeting extends React.PureComponent {
|
||||
const m = time.getMonth();
|
||||
const d = time.getDate();
|
||||
|
||||
if (m === 11 && d === 25) message = 'Merry Christmas'; // If it's December 25th, set the greeting string to "Merry Christmas"
|
||||
else if (m === 0 && d === 1) message = 'Happy new year'; // If the date is January 1st, set the greeting string to "Happy new year"
|
||||
else if (m === 9 && d === 31) message = 'Happy Halloween'; // If it's October 31st, set the greeting string to "Happy Halloween"
|
||||
if (m === 11 && d === 25) message = this.props.language.christmas; // If it's December 25th, set the greeting string to "Merry Christmas"
|
||||
else if (m === 0 && d === 1) message = this.props.language.newyear; // If the date is January 1st, set the greeting string to "Happy new year"
|
||||
else if (m === 9 && d === 31) message = this.props.language.halloween; // If it's October 31st, set the greeting string to "Happy Halloween"
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -76,9 +76,11 @@ export default class Quote extends React.PureComponent {
|
||||
}
|
||||
|
||||
render() {
|
||||
const copy = (localStorage.getItem('copyButton') === 'false') ? null : <FileCopy className='copyButton' onClick={() => this.copyQuote()}></FileCopy>;
|
||||
const tweet = (localStorage.getItem('tweetButton') === 'false') ? null :
|
||||
<TwitterIcon className='copyButton' onClick={() => window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus()}/>;
|
||||
let copy = <FileCopy className='copyButton' onClick={() => this.copyQuote()}></FileCopy>;
|
||||
if (localStorage.getItem('copyButton') === 'false') copy = null;
|
||||
|
||||
let tweet = <TwitterIcon className='copyButton' onClick={() => window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus()}/>
|
||||
if (localStorage.getItem('tweetButton') === 'false') tweet = null;
|
||||
|
||||
return (
|
||||
<div className='quotediv'>
|
||||
|
||||
Reference in New Issue
Block a user