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