mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
fix(phone/dialer): missing translation
This commit is contained in:
1 parent
48e0dd2443
commit
dab4c1eaf7
3 files changed
+12
-4
No files matched your search
@@ -7,6 +7,7 @@ import { DialInputCtx, IDialInputCtx } from '../context/InputContext';
|
||||
import Nui from '../../../os/nui-events/utils/Nui';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { CallEvents } from '../../../../../typings/call';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
root: {
|
||||
@@ -30,6 +31,7 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||
export const DialerInput = () => {
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { inputVal, set } = useContext<IDialInputCtx>(DialInputCtx);
|
||||
|
||||
@@ -46,7 +48,7 @@ export const DialerInput = () => {
|
||||
return (
|
||||
<Box component={Paper} className={classes.root}>
|
||||
<InputBase
|
||||
placeholder="Enter a number"
|
||||
placeholder={t('APPS_DIALER_INPUT_PLACEHOLDER')}
|
||||
className={classes.input}
|
||||
value={inputVal}
|
||||
onChange={(e) => set(e.target.value)}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||
import PhoneIcon from '@material-ui/icons/Phone';
|
||||
import PersonIcon from '@material-ui/icons/Person';
|
||||
import HistoryIcon from '@material-ui/icons/History';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
root: {
|
||||
@@ -20,6 +21,7 @@ const DialerNavBar = () => {
|
||||
const classes = useStyles();
|
||||
const { pathname } = useLocation();
|
||||
const [page, setPage] = useState(pathname);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleChange = (_e, newPage) => {
|
||||
setPage(newPage);
|
||||
@@ -28,14 +30,14 @@ const DialerNavBar = () => {
|
||||
return (
|
||||
<BottomNavigation value={page} onChange={handleChange} showLabels className={classes.root}>
|
||||
<BottomNavigationAction
|
||||
label="History"
|
||||
label={t('APPS_DIALER_NAVBAR_HISTORY')}
|
||||
value="/phone"
|
||||
component={NavLink}
|
||||
icon={<HistoryIcon />}
|
||||
to="/phone"
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label="Dial"
|
||||
label={t('APPS_DIALER_NAVBAR_DIAL')}
|
||||
value="/phone/dial"
|
||||
color="secondary"
|
||||
component={NavLink}
|
||||
@@ -43,7 +45,7 @@ const DialerNavBar = () => {
|
||||
to="/phone/dial"
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label="Contacts"
|
||||
label={t('APPS_DIALER_NAVBAR_CONTACTS')}
|
||||
value="/phone/contacts"
|
||||
color="secondary"
|
||||
component={NavLink}
|
||||
|
||||
@@ -56,7 +56,11 @@
|
||||
"APPS_DIALER_ACCEPT_CALL": "Accept",
|
||||
"APPS_DIALER_REJECT_CALL": "Reject",
|
||||
"APPS_DIALER_END_CALL": "End",
|
||||
"APPS_DIALER_INPUT_PLACEHOLDER": "Enter a number",
|
||||
"APPS_DIALER_NO_HISTORY": "You have no call history",
|
||||
"APPS_DIALER_NAVBAR_HISTORY": "History",
|
||||
"APPS_DIALER_NAVBAR_DIAL": "Dial",
|
||||
"APPS_DIALER_NAVBAR_CONTACTS": "Contacts",
|
||||
|
||||
"APPS_TWITTER_TWEET": "Tweet",
|
||||
"APPS_TWITTER_TWEET_MESSAGE_PLACEHOLDER": "What's happening?",
|
||||
|
||||
Reference in new issue
Block a user