YaroslavBerkuta
2 years ago
15 changed files with 86 additions and 123 deletions
@ -1,27 +1,11 @@
@@ -1,27 +1,11 @@
|
||||
import {OnSettingLocale} from '../../types/onSettings'; |
||||
export const settingTranslation: OnSettingLocale.OnSettingLocale = { |
||||
setting1: { |
||||
title: 'Purchases!', |
||||
}, |
||||
setting2: { |
||||
title: 'Language', |
||||
}, |
||||
setting3: { |
||||
title: 'Write to us', |
||||
}, |
||||
setting4: { |
||||
title: 'Rate us', |
||||
}, |
||||
setting5: { |
||||
title: 'Share app', |
||||
}, |
||||
setting6: { |
||||
title: 'Privacy policy', |
||||
}, |
||||
setting7: { |
||||
title: 'Terms and conditions', |
||||
}, |
||||
setting8: { |
||||
title: 'Information', |
||||
}, |
||||
import {SettingLocale} from '../../types/settings.types'; |
||||
export const settingTranslation: SettingLocale.core = { |
||||
purchases: 'Purchases!', |
||||
language: 'Language', |
||||
write: 'Write to us', |
||||
rate: 'Rate us', |
||||
share: 'Share app', |
||||
policy: 'Privacy policy', |
||||
term: 'Terms and conditions', |
||||
information: 'Information', |
||||
}; |
||||
|
@ -1,27 +1,11 @@
@@ -1,27 +1,11 @@
|
||||
import {OnSettingLocale} from '../../types/onSettings'; |
||||
export const settingTranslation: OnSettingLocale.OnSettingLocale = { |
||||
setting1: { |
||||
title: 'Магазин!', |
||||
}, |
||||
setting2: { |
||||
title: 'Мова', |
||||
}, |
||||
setting3: { |
||||
title: 'Напишіть нам', |
||||
}, |
||||
setting4: { |
||||
title: 'Оцініть нас', |
||||
}, |
||||
setting5: { |
||||
title: 'Поділитися програмою', |
||||
}, |
||||
setting6: { |
||||
title: 'Політика конфіденційності', |
||||
}, |
||||
setting7: { |
||||
title: 'Правила та умови', |
||||
}, |
||||
setting8: { |
||||
title: 'Інформація', |
||||
}, |
||||
import {SettingLocale} from '../../types/settings.types'; |
||||
export const settingTranslation: SettingLocale.core = { |
||||
purchases: 'Магазин!', |
||||
language: 'Мова', |
||||
write: 'Напишіть нам', |
||||
rate: 'Оцініть нас', |
||||
share: 'Поділитися програмою', |
||||
policy: 'Політика конфіденційності', |
||||
term: 'Правила та умови', |
||||
information: 'Інформація', |
||||
}; |
||||
|
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
import {OnBoardingLocale} from './onBoarding'; |
||||
import { OnSettingLocale } from './onSettings'; |
||||
import {OnBoardingLocale} from './onBoarding.types'; |
||||
import { SettingLocale } from './settings.types'; |
||||
export interface MainLocaleModule { |
||||
stepTranslation: OnBoardingLocale.OnboardingSteps; |
||||
settingTranslation: OnSettingLocale.OnSettingLocale; |
||||
settingTranslation: SettingLocale.core; |
||||
} |
||||
|
@ -1,15 +0,0 @@
@@ -1,15 +0,0 @@
|
||||
export namespace OnSettingLocale { |
||||
export interface IStep { |
||||
title: string; |
||||
} |
||||
export interface OnSettingLocale { |
||||
setting1: IStep; |
||||
setting2: IStep; |
||||
setting3: IStep; |
||||
setting4: IStep; |
||||
setting5: IStep; |
||||
setting6: IStep; |
||||
setting7: IStep; |
||||
setting8: IStep; |
||||
} |
||||
} |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
export namespace SettingLocale { |
||||
export interface core { |
||||
purchases: string; |
||||
language: string; |
||||
write: string; |
||||
rate: string; |
||||
share: string; |
||||
policy: string; |
||||
term: string; |
||||
information: string; |
||||
} |
||||
} |
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
import ImageHearts from '../../../assets/image/hearts.svg'; |
||||
import ImageGlass from '../../../assets/image/glass.svg'; |
||||
import ImageCup from '../../../assets/image/winners-cup.svg'; |
||||
import {OnBoardingLocale} from '../../../i18n/types/onBoarding'; |
||||
import {OnBoardingLocale} from '../../../i18n/types/onBoarding.types'; |
||||
const translatePath = ( |
||||
itemKey: keyof OnBoardingLocale.OnboardingSteps, |
||||
key: keyof OnBoardingLocale.IStep, |
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
||||
import React, {FC} from 'react'; |
||||
import React from 'react'; |
||||
import {StyleSheet, Text, View} from 'react-native'; |
||||
import {useTranslation} from 'react-i18next'; |
||||
|
||||
export const LanguageSelect = () => { |
||||
export const SelectedLanguage = () => { |
||||
const {t, i18n} = useTranslation(); |
||||
return ( |
||||
<View style={styles.curentLang}> |
@ -1,43 +0,0 @@
@@ -1,43 +0,0 @@
|
||||
import React from 'react'; |
||||
import {LanguageSelect} from '../atoms/LanguageSelect'; |
||||
import {OnSettingLocale} from '../../../i18n/types/onSettings'; |
||||
const translatePath = ( |
||||
itemKey: keyof OnSettingLocale.OnSettingLocale, |
||||
key: keyof OnSettingLocale.IStep, |
||||
) => `settingTranslation.${itemKey}.${key}`; |
||||
|
||||
export const SettingsData = [ |
||||
{ |
||||
title: translatePath('setting1', 'title'), |
||||
image: 'purchases', |
||||
}, |
||||
{ |
||||
title: translatePath('setting2', 'title'), |
||||
image: 'lang', |
||||
component: () => <LanguageSelect />, |
||||
}, |
||||
{ |
||||
title: translatePath('setting3', 'title'), |
||||
image: 'message', |
||||
}, |
||||
{ |
||||
title: translatePath('setting4', 'title'), |
||||
image: 'rate', |
||||
}, |
||||
{ |
||||
title: translatePath('setting5', 'title'), |
||||
image: 'share', |
||||
}, |
||||
{ |
||||
title: translatePath('setting6', 'title'), |
||||
image: 'privacy-policy', |
||||
}, |
||||
{ |
||||
title: translatePath('setting7', 'title'), |
||||
image: 'terms-&-cond', |
||||
}, |
||||
{ |
||||
title: translatePath('setting8', 'title'), |
||||
image: 'information', |
||||
}, |
||||
]; |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
import React from 'react'; |
||||
import {SelectedLanguage} from '../atoms/selectedLanguage-inSettings.atom'; |
||||
import {SettingLocale} from '../../../i18n/types/settings.types'; |
||||
const translatePath = (itemKey: keyof SettingLocale.core) => |
||||
`settingTranslation.${itemKey}`; |
||||
|
||||
export const SettingsData = [ |
||||
{ |
||||
title: translatePath('purchases'), |
||||
image: 'purchases', |
||||
}, |
||||
{ |
||||
title: translatePath('language'), |
||||
image: 'lang', |
||||
component: () => <SelectedLanguage />, |
||||
}, |
||||
{ |
||||
title: translatePath('write'), |
||||
image: 'message', |
||||
}, |
||||
{ |
||||
title: translatePath('rate'), |
||||
image: 'rate', |
||||
}, |
||||
{ |
||||
title: translatePath('share'), |
||||
image: 'share', |
||||
}, |
||||
{ |
||||
title: translatePath('policy'), |
||||
image: 'privacy-policy', |
||||
}, |
||||
{ |
||||
title: translatePath('term'), |
||||
image: 'terms-&-cond', |
||||
}, |
||||
{ |
||||
title: translatePath('information'), |
||||
image: 'information', |
||||
}, |
||||
]; |
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export * from './buttons'; |
||||
export * from './layout/layout.component'; |
||||
export * from "./Header/Header.component" |
||||
export * from "./Icon/Icon.component" |
||||
export * from "./header/header.component" |
||||
export * from "./icon/icon.component" |
Loading…
Reference in new issue