Added internationalization support, and translated to nb-NO.
This commit is contained in:
@@ -4,6 +4,7 @@ import { withStyles } from '@material-ui/core/styles';
|
||||
import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
import { withRoomContext } from '../../../RoomContext';
|
||||
import { useIntl } from 'react-intl';
|
||||
import ListItem from '@material-ui/core/ListItem';
|
||||
import ListItemText from '@material-ui/core/ListItemText';
|
||||
import ListItemIcon from '@material-ui/core/ListItemIcon';
|
||||
@@ -85,6 +86,8 @@ const ListLobbyPeer = (props) =>
|
||||
classes
|
||||
} = props;
|
||||
|
||||
const intl = useIntl();
|
||||
|
||||
const picture = peer.picture || EmptyAvatar;
|
||||
|
||||
return (
|
||||
@@ -100,7 +103,12 @@ const ListLobbyPeer = (props) =>
|
||||
<ListItemText
|
||||
primary={peer.displayName}
|
||||
/>
|
||||
<Tooltip title='Click to let them in'>
|
||||
<Tooltip
|
||||
title={intl.formatMessage({
|
||||
id : 'tooltip.admitFromLobby',
|
||||
defaultMessage : 'Click to let them in'
|
||||
})}
|
||||
>
|
||||
<ListItemIcon
|
||||
className={classnames(classes.button, 'promote', {
|
||||
disabled : peer.promotionInProgress
|
||||
|
||||
@@ -8,6 +8,7 @@ import { withStyles } from '@material-ui/core/styles';
|
||||
import { withRoomContext } from '../../../RoomContext';
|
||||
import * as roomActions from '../../../actions/roomActions';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import Dialog from '@material-ui/core/Dialog';
|
||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||
import DialogActions from '@material-ui/core/DialogActions';
|
||||
@@ -75,7 +76,12 @@ const LockDialog = ({
|
||||
paper : classes.dialogPaper
|
||||
}}
|
||||
>
|
||||
<DialogTitle id='form-dialog-title'>Lobby administration</DialogTitle>
|
||||
<DialogTitle id='form-dialog-title'>
|
||||
<FormattedMessage
|
||||
id='room.lobbyAdministration'
|
||||
defaultMessage='Lobby administration'
|
||||
/>
|
||||
</DialogTitle>
|
||||
{/*
|
||||
<FormControl component='fieldset' className={classes.formControl}>
|
||||
<FormLabel component='legend'>Room lock</FormLabel>
|
||||
@@ -129,7 +135,10 @@ const LockDialog = ({
|
||||
dense
|
||||
subheader={
|
||||
<ListSubheader component='div'>
|
||||
Participants in Lobby
|
||||
<FormattedMessage
|
||||
id='room.peersInLobby'
|
||||
defaultMessage='Participants in Lobby'
|
||||
/>
|
||||
</ListSubheader>
|
||||
}
|
||||
>
|
||||
@@ -143,13 +152,19 @@ const LockDialog = ({
|
||||
:
|
||||
<DialogContent>
|
||||
<DialogContentText gutterBottom>
|
||||
There are currently no one in the lobby.
|
||||
<FormattedMessage
|
||||
id='room.lobbyEmpty'
|
||||
defaultMessage='There are currently no one in the lobby'
|
||||
/>
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
}
|
||||
<DialogActions>
|
||||
<Button onClick={() => handleCloseLockDialog({ lockDialogOpen: false })} color='primary'>
|
||||
Close
|
||||
<FormattedMessage
|
||||
id='label.close'
|
||||
defaultMessage='Close'
|
||||
/>
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
Reference in New Issue
Block a user