Allow mute/unmute playback controls to be translated
This commit is contained in:
@ -1,20 +1,21 @@
|
|||||||
|
|
||||||
import React, { memo } from 'react';
|
import React, { memo } from 'react';
|
||||||
import Icon from '../Icon';
|
import Icon from '../Icon';
|
||||||
|
import { I18n } from '../../locale';
|
||||||
|
|
||||||
export default memo((props) => {
|
export default memo((props) => {
|
||||||
if (props.mute) {
|
if (props.mute) {
|
||||||
return (
|
return (
|
||||||
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(false)}>
|
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(false)}>
|
||||||
<Icon className="red-text" name="volume_off" />
|
<Icon className="red-text" name="volume_off" />
|
||||||
{props.noTooltip ? null : <span className="tooltip__content">Unmute</span>}
|
{props.noTooltip ? null : <span className="tooltip__content"><I18n path="playback_controls.unmute"/></span>}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(true)}>
|
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(true)}>
|
||||||
<Icon className="muted" name="volume_mute" />
|
<Icon className="muted" name="volume_mute" />
|
||||||
{props.noTooltip ? null : <span className="tooltip__content">Mute</span>}
|
{props.noTooltip ? null : <span className="tooltip__content"><I18n path="playback_controls.mute"/></span>}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -174,6 +174,8 @@ playback_controls:
|
|||||||
shuffle: Shuffle
|
shuffle: Shuffle
|
||||||
repeat: Repeat
|
repeat: Repeat
|
||||||
no_outputs: No outputs
|
no_outputs: No outputs
|
||||||
|
mute: Mute
|
||||||
|
unmute: Unmute
|
||||||
snapcast:
|
snapcast:
|
||||||
enabled: Enabled
|
enabled: Enabled
|
||||||
show_disconnected_clients: Show disconnected clients
|
show_disconnected_clients: Show disconnected clients
|
||||||
|
|||||||
Reference in New Issue
Block a user