mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Feat: Added locales for Settings
This commit is contained in:
1 parent
b3e6cc0c6e
commit
fb0a402292
2 files changed
+19
-8
No files matched your search
@@ -12,6 +12,7 @@ import { List } from '../../../ui/components/List';
|
|||||||
import { useSimcard } from '../../../os/simcard/hooks/useSimcard';
|
import { useSimcard } from '../../../os/simcard/hooks/useSimcard';
|
||||||
import { useApp } from '../../../os/apps/hooks/useApps';
|
import { useApp } from '../../../os/apps/hooks/useApps';
|
||||||
import { SettingItem } from './SettingItem';
|
import { SettingItem } from './SettingItem';
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Brush,
|
Brush,
|
||||||
@@ -37,6 +38,8 @@ export const SettingsApp = () => {
|
|||||||
const { setSettings, settings } = useSettings();
|
const { setSettings, settings } = useSettings();
|
||||||
const simcard = useSimcard();
|
const simcard = useSimcard();
|
||||||
|
|
||||||
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const wallpapers = config.wallpapers.map(
|
const wallpapers = config.wallpapers.map(
|
||||||
MapStringOptions(settings.wallpaper, (val: string) =>
|
MapStringOptions(settings.wallpaper, (val: string) =>
|
||||||
setSettings('wallpaper', val)
|
setSettings('wallpaper', val)
|
||||||
@@ -71,12 +74,12 @@ export const SettingsApp = () => {
|
|||||||
<AppContent backdrop={isMenuOpen} onClickBackdrop={closeMenu}>
|
<AppContent backdrop={isMenuOpen} onClickBackdrop={closeMenu}>
|
||||||
<List disablePadding subheader={<SubHeaderComp text='Phone' />}>
|
<List disablePadding subheader={<SubHeaderComp text='Phone' />}>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Phone Number'
|
label={t('APPS_SETTINGS_PHONE_NUMBER')}
|
||||||
value={simcard.number}
|
value={simcard.number}
|
||||||
icon={<Phone />}
|
icon={<Phone />}
|
||||||
/>
|
/>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Ringtone'
|
label={t('APPS_SETTINGS_OPTION_RINGTONE')}
|
||||||
value={settings.ringtone}
|
value={settings.ringtone}
|
||||||
options={ringtones}
|
options={ringtones}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
@@ -87,7 +90,7 @@ export const SettingsApp = () => {
|
|||||||
// * Probably want to make it a slider in the future. Ignore hardcoded for the meantime
|
// * Probably want to make it a slider in the future. Ignore hardcoded for the meantime
|
||||||
}
|
}
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Ringtone Volume'
|
label={t('APPS_SETTINGS_OPTION_RINGTONEVOL')}
|
||||||
value='100%'
|
value='100%'
|
||||||
options={['100%', '80%', '70%']}
|
options={['100%', '80%', '70%']}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
@@ -96,28 +99,28 @@ export const SettingsApp = () => {
|
|||||||
</List>
|
</List>
|
||||||
<List disablePadding subheader={<SubHeaderComp text='Appearance' />}>
|
<List disablePadding subheader={<SubHeaderComp text='Appearance' />}>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Theme'
|
label={t('APPS_SETTINGS_OPTION_THEME')}
|
||||||
value={settings.theme}
|
value={settings.theme}
|
||||||
options={themes}
|
options={themes}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
icon={<Brush />}
|
icon={<Brush />}
|
||||||
/>
|
/>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Wallpaper'
|
label={t('APPS_SETTINGS_OPTION_WALLPAPER')}
|
||||||
value={settings.wallpaper}
|
value={settings.wallpaper}
|
||||||
options={wallpapers}
|
options={wallpapers}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
icon={<Wallpaper />}
|
icon={<Wallpaper />}
|
||||||
/>
|
/>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Frame'
|
label={t('APPS_SETTINGS_OPTION_FRAME')}
|
||||||
value={settings.frame}
|
value={settings.frame}
|
||||||
options={frames}
|
options={frames}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
icon={<Smartphone />}
|
icon={<Smartphone />}
|
||||||
/>
|
/>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label='Zoom'
|
label={t('APPS_SETTINGS_OPTION_ZOOM')}
|
||||||
value={settings.zoom}
|
value={settings.zoom}
|
||||||
options={zoomOptions}
|
options={zoomOptions}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
|
|||||||
@@ -69,6 +69,14 @@
|
|||||||
"APPS_CONTACT_UPDATE_SUCCESS": "Successfully updated contact!",
|
"APPS_CONTACT_UPDATE_SUCCESS": "Successfully updated contact!",
|
||||||
"APPS_CONTACT_UPDATE_FAILED": "Failed to update contact!",
|
"APPS_CONTACT_UPDATE_FAILED": "Failed to update contact!",
|
||||||
"APPS_CONTACT_DELETE_SUCCESS": "Successfully deleted contact!",
|
"APPS_CONTACT_DELETE_SUCCESS": "Successfully deleted contact!",
|
||||||
"APPS_CONTACT_DELETE_FAILED": "Failed to delete contact!"
|
"APPS_CONTACT_DELETE_FAILED": "Failed to delete contact!",
|
||||||
|
|
||||||
|
"APPS_SETTINGS_PHONE_NUMBER": "Phone Number",
|
||||||
|
"APPS_SETTINGS_OPTION_WALLPAPER": "Wallpaper",
|
||||||
|
"APPS_SETTINGS_OPTION_FRAME": "Frame",
|
||||||
|
"APPS_SETTINGS_OPTION_THEME": "Theme",
|
||||||
|
"APPS_SETTINGS_OPTION_ZOOM": "Zoom",
|
||||||
|
"APPS_SETTINGS_OPTION_RINGTONE": "Ringtone",
|
||||||
|
"APPS_SETTINGS_OPTION_RINGTONEVOL": "Ringtone Volume"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user