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