Feat: Added locales for Settings

This commit is contained in:
Taso committed 2021-01-06 03:24:56 -05:00
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 { useApp } from '../../../os/apps/hooks/useApps';
import { SettingItem } from './SettingItem';
import { useTranslation } from "react-i18next";
import {
Brush,
@@ -37,6 +38,8 @@ export const SettingsApp = () => {
const { setSettings, settings } = useSettings();
const simcard = useSimcard();
const { t } = useTranslation()
const wallpapers = config.wallpapers.map(
MapStringOptions(settings.wallpaper, (val: string) =>
setSettings('wallpaper', val)
@@ -71,12 +74,12 @@ export const SettingsApp = () => {
<AppContent backdrop={isMenuOpen} onClickBackdrop={closeMenu}>
<List disablePadding subheader={<SubHeaderComp text='Phone' />}>
<SettingItem
label='Phone Number'
label={t('APPS_SETTINGS_PHONE_NUMBER')}
value={simcard.number}
icon={<Phone />}
/>
<SettingItem
label='Ringtone'
label={t('APPS_SETTINGS_OPTION_RINGTONE')}
value={settings.ringtone}
options={ringtones}
onClick={openMenu}
@@ -87,7 +90,7 @@ export const SettingsApp = () => {
// * Probably want to make it a slider in the future. Ignore hardcoded for the meantime
}
<SettingItem
label='Ringtone Volume'
label={t('APPS_SETTINGS_OPTION_RINGTONEVOL')}
value='100%'
options={['100%', '80%', '70%']}
onClick={openMenu}
@@ -96,28 +99,28 @@ export const SettingsApp = () => {
</List>
<List disablePadding subheader={<SubHeaderComp text='Appearance' />}>
<SettingItem
label='Theme'
label={t('APPS_SETTINGS_OPTION_THEME')}
value={settings.theme}
options={themes}
onClick={openMenu}
icon={<Brush />}
/>
<SettingItem
label='Wallpaper'
label={t('APPS_SETTINGS_OPTION_WALLPAPER')}
value={settings.wallpaper}
options={wallpapers}
onClick={openMenu}
icon={<Wallpaper />}
/>
<SettingItem
label='Frame'
label={t('APPS_SETTINGS_OPTION_FRAME')}
value={settings.frame}
options={frames}
onClick={openMenu}
icon={<Smartphone />}
/>
<SettingItem
label='Zoom'
label={t('APPS_SETTINGS_OPTION_ZOOM')}
value={settings.zoom}
options={zoomOptions}
onClick={openMenu}
+9 -1
View File
@@ -69,6 +69,14 @@
"APPS_CONTACT_UPDATE_SUCCESS": "Successfully updated contact!",
"APPS_CONTACT_UPDATE_FAILED": "Failed to update 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"
}
}