Merge pull request #27 from ninjas-code-official/language-localisation

localisation completed in rider app
This commit is contained in:
usama sattar 2024-01-12 16:29:07 +05:00 committed by GitHub
commit e92ee6a201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 1370 additions and 219 deletions

View File

@ -0,0 +1,4 @@
{
"expoServerPort": 19000,
"packagerPort": 19000
}

View File

@ -4,5 +4,7 @@
"dev": true, "dev": true,
"minify": false, "minify": false,
"urlRandomness": null, "urlRandomness": null,
"https": false "https": false,
"scheme": null,
"devClient": false
} }

View File

@ -7,10 +7,11 @@ import { en } from './translations/en'
import { fr } from './translations/fr' import { fr } from './translations/fr'
import { km } from './translations/km' import { km } from './translations/km'
import { zh } from './translations/zh' import { zh } from './translations/zh'
import { ar } from './translations/ar'
i18n.initAsync = async() => { i18n.initAsync = async() => {
i18n.fallbacks = true i18n.fallbacks = true
i18n.translations = { fr, en, km, zh, de } i18n.translations = { fr, en, km, zh, de, ar }
// i18n.locale = 'km' // i18n.locale = 'km'
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
const lang = await AsyncStorage.getItem('enatega-language') const lang = await AsyncStorage.getItem('enatega-language')

View File

@ -446,10 +446,7 @@ export const reviewOrder = `mutation ReviewOrder(
} }
}`; }`;
//
// use this to push token instead of login, signup mutation?
// needs research
//
export const pushToken = `mutation PushToken($token:String!){ export const pushToken = `mutation PushToken($token:String!){
pushToken(token:$token){ pushToken(token:$token){
_id _id

View File

@ -8,6 +8,7 @@ import { CustomIcon } from '../../CustomIcon'
import { FlashMessage } from '../../FlashMessage/FlashMessage' import { FlashMessage } from '../../FlashMessage/FlashMessage'
import TextDefault from '../../Text/TextDefault/TextDefault' import TextDefault from '../../Text/TextDefault/TextDefault'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../../i18n'
function CartComponent(props) { function CartComponent(props) {
const { colors } = useTheme() const { colors } = useTheme()
@ -18,7 +19,7 @@ function CartComponent(props) {
if (props.stock > quantity) setQuantity(quantity + 1) if (props.stock > quantity) setQuantity(quantity + 1)
else { else {
FlashMessage({ FlashMessage({
message: 'No more items in stock' message: i18n.t('noMoreItems')
}) })
} }
} }

View File

@ -6,6 +6,7 @@ import { alignment } from '../../../utils/alignment'
import { NAVIGATION_SCREEN } from '../../../utils/constant' import { NAVIGATION_SCREEN } from '../../../utils/constant'
import { TextDefault } from '../../Text' import { TextDefault } from '../../Text'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../../i18n'
function DrawerProfile() { function DrawerProfile() {
const styles = useStyle() const styles = useStyle()
@ -22,7 +23,7 @@ function DrawerProfile() {
navigation.navigate(NAVIGATION_SCREEN.CreateAccount) navigation.navigate(NAVIGATION_SCREEN.CreateAccount)
}}> }}>
<TextDefault textColor={styles.whiteFont.color} bold H4> <TextDefault textColor={styles.whiteFont.color} bold H4>
Login/Create Account {i18n.t('loginOrCreateAcc')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
@ -40,7 +41,7 @@ function DrawerProfile() {
medium medium
H5 H5
style={alignment.PLxSmall}> style={alignment.PLxSmall}>
Welcome {i18n.t('welcome')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={styles.whiteFont.color} textColor={styles.whiteFont.color}

View File

@ -10,6 +10,7 @@ import { ICONS_NAME } from '../../../utils/constant'
import { scale } from '../../../utils/scaling' import { scale } from '../../../utils/scaling'
import { CustomIcon } from '../../CustomIcon' import { CustomIcon } from '../../CustomIcon'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../../i18n'
const FdEmailBtn = props => { const FdEmailBtn = props => {
const styles = useStyle() const styles = useStyle()
@ -30,7 +31,7 @@ const FdEmailBtn = props => {
size={scale(19)} size={scale(19)}
/> />
<TextDefault style={alignment.MLxSmall} bold> <TextDefault style={alignment.MLxSmall} bold>
Signup using Email {i18n.t('signupEmail')}
</TextDefault> </TextDefault>
</> </>
)} )}

View File

@ -7,6 +7,7 @@ import TextDefault from '../../../components/Text/TextDefault/TextDefault'
import { alignment } from '../../../utils/alignment' import { alignment } from '../../../utils/alignment'
import { moderateScale } from '../../../utils/scaling' import { moderateScale } from '../../../utils/scaling'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../../i18n'
const FdGoogleBtn = props => { const FdGoogleBtn = props => {
const styles = useStyle() const styles = useStyle()
@ -34,7 +35,7 @@ const FdGoogleBtn = props => {
]} ]}
/> />
<TextDefault style={alignment.MLlarge} bold> <TextDefault style={alignment.MLlarge} bold>
Signup with Google {i18n.t('signupGoogle')}
</TextDefault> </TextDefault>
</> </>
)} )}

View File

@ -13,6 +13,7 @@ import { CustomIcon } from '../../CustomIcon'
import { FlashMessage } from '../../FlashMessage/FlashMessage' import { FlashMessage } from '../../FlashMessage/FlashMessage'
import TextDefault from '../../Text/TextDefault/TextDefault' import TextDefault from '../../Text/TextDefault/TextDefault'
import useStyles from './styles' import useStyles from './styles'
import i18n from '../../../../i18n'
function HeaderIcon({ icon, iconColor, iconSize = scale(20) }) { function HeaderIcon({ icon, iconColor, iconSize = scale(20) }) {
const { colors } = useTheme() const { colors } = useTheme()
@ -127,7 +128,7 @@ function RightButton(props) {
navigation.navigate(NAVIGATION_SCREEN.Cart) navigation.navigate(NAVIGATION_SCREEN.Cart)
} else { } else {
FlashMessage({ FlashMessage({
message: 'Cart is empty.' message: i18n.t('CartIsEmpty')
}) })
} }
}, [cartCount]) }, [cartCount])

View File

@ -9,32 +9,33 @@ import Spinner from "../../Spinner/Spinner";
import TextDefault from "../../Text/TextDefault/TextDefault"; import TextDefault from "../../Text/TextDefault/TextDefault";
import TextError from "../../Text/TextError/TextError"; import TextError from "../../Text/TextError/TextError";
import useStyle from "./styles"; import useStyle from "./styles";
import i18n from "../../../../i18n";
export const orderStatuses = [ export const orderStatuses = [
{ {
key: "PENDING", key: i18n.t('PENDING'),
status: 1, status: 1,
statusText: "Your order is still pending.", statusText: i18n.t('orderPending'),
}, },
{ {
key: "ACCEPTED", key: i18n.t("ACCEPTED"),
status: 2, status: 2,
statusText: "Restaurant is preparing Food.", statusText: i18n.t('prepFood'),
}, },
{ {
key: "PICKED", key: i18n.t("PICKED"),
status: 3, status: 3,
statusText: "Rider is on the way.", statusText: i18n.t('riderOnWay'),
}, },
{ {
key: "DELIVERED", key: i18n.t("DELIVERED"),
status: 4, status: 4,
statusText: "Order is delivered.", statusText: i18n.t('orderDelivered'),
}, },
{ {
key: "COMPLETED", key: i18n.t("COMPLETED"),
status: 5, status: 5,
statusText: "Order is completed.", statusText: i18n.t('completeOrder'),
}, },
]; ];
@ -88,20 +89,20 @@ const StatusCard = () => {
<View key={index} style={styles.statusContainer}> <View key={index} style={styles.statusContainer}>
<View style={styles.textContainer}> <View style={styles.textContainer}>
<TextDefault H5 medium textColor={styles.lightText.color}> <TextDefault H5 medium textColor={styles.lightText.color}>
Your order ID {i18n.t('orderId')}
</TextDefault> </TextDefault>
<TextDefault style={{ ...alignment.PBlarge }} H4 bolder> <TextDefault style={{ ...alignment.PBlarge }} H4 bolder>
{item.order_id} {item.order_id}
</TextDefault> </TextDefault>
<TextDefault H5 textColor={colors.placeHolderColor} medium> <TextDefault H5 textColor={colors.placeHolderColor} medium>
Status {i18n.t('status')}
</TextDefault> </TextDefault>
<TextDefault textColor={"#00b9c6"} H5 medium> <TextDefault textColor={"#00b9c6"} H5 medium>
{item.order_status}{" "} {i18n.t(item.order_status)}{" "}
<TextDefault numberOfLines={2} medium> <TextDefault numberOfLines={2} medium>
{/* {checkStatus(item.order_status).status}.{' '} */}( {/* {checkStatus(item.order_status).status}.{' '} */}(
{checkStatus(item.order_status).statusText}) {checkStatus(i18n.t(item.order_status)).statusText})
</TextDefault> </TextDefault>
</TextDefault> </TextDefault>
</View> </View>

View File

@ -12,6 +12,7 @@ import { moderateScale } from '../../../utils/scaling'
import RadioBtn from '../../FdRadioBtn/RadioBtn' import RadioBtn from '../../FdRadioBtn/RadioBtn'
import TextDefault from '../../Text/TextDefault/TextDefault' import TextDefault from '../../Text/TextDefault/TextDefault'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../../i18n'
const FilterModal = props => { const FilterModal = props => {
const styles = useStyle() const styles = useStyle()
@ -19,6 +20,11 @@ const FilterModal = props => {
const configuration = useContext(ConfigurationContext) const configuration = useContext(ConfigurationContext)
const [filters, setFilters] = useState({}) const [filters, setFilters] = useState({})
const localizedSortData = {};
Object.keys(SORT_DATA).forEach(key => {
localizedSortData[key] = i18n.t(SORT_DATA[key]);
});
useEffect(() => { useEffect(() => {
setFilters({ setFilters({
onSale: false, onSale: false,
@ -82,7 +88,7 @@ const FilterModal = props => {
alignment.PTsmall alignment.PTsmall
]}> ]}>
<TextDefault H5 bold> <TextDefault H5 bold>
Filters {i18n.t('filters')}
</TextDefault> </TextDefault>
<TouchableOpacity <TouchableOpacity
onPress={clearItems} onPress={clearItems}
@ -91,7 +97,7 @@ const FilterModal = props => {
alignItems: 'center' alignItems: 'center'
}}> }}>
<TextDefault H5 bold textColor={colors.buttonBackgroundBlue}> <TextDefault H5 bold textColor={colors.buttonBackgroundBlue}>
Reset {i18n.t('reset')}
</TextDefault> </TextDefault>
<MaterialIcons <MaterialIcons
name="refresh" name="refresh"
@ -109,7 +115,7 @@ const FilterModal = props => {
justifyContent: 'space-between' justifyContent: 'space-between'
}}> }}>
<TextDefault H5 bold textColor={colors.placeHolderColor}> <TextDefault H5 bold textColor={colors.placeHolderColor}>
Show sale items only {i18n.t('showSaleItems')}
</TextDefault> </TextDefault>
<Switch <Switch
trackColor={{ false: '#767577', true: colors.tagColor }} trackColor={{ false: '#767577', true: colors.tagColor }}
@ -127,7 +133,7 @@ const FilterModal = props => {
justifyContent: 'space-between' justifyContent: 'space-between'
}}> }}>
<TextDefault H5 bold textColor={colors.placeHolderColor}> <TextDefault H5 bold textColor={colors.placeHolderColor}>
Show stock items only {i18n.t('showStockItems')}
</TextDefault> </TextDefault>
<Switch <Switch
trackColor={{ false: '#767577', true: colors.tagColor }} trackColor={{ false: '#767577', true: colors.tagColor }}
@ -142,7 +148,7 @@ const FilterModal = props => {
<View style={styles.priceRangeRow}> <View style={styles.priceRangeRow}>
<TextDefault bold H5> <TextDefault bold H5>
Price Range {i18n.t('priceRange')}
</TextDefault> </TextDefault>
<View> <View>
<TextDefault bold H5 center> <TextDefault bold H5 center>
@ -187,7 +193,7 @@ const FilterModal = props => {
</View> </View>
</View> </View>
<TextDefault bold H5 style={alignment.MTlarge}> <TextDefault bold H5 style={alignment.MTlarge}>
Sorting {i18n.t('sorting')}
</TextDefault> </TextDefault>
<View style={[alignment.PLlarge, alignment.PRlarge, alignment.MTmedium]}> <View style={[alignment.PLlarge, alignment.PRlarge, alignment.MTmedium]}>
{keys(SORT_DATA).map(item => { {keys(SORT_DATA).map(item => {
@ -205,7 +211,8 @@ const FilterModal = props => {
? colors.fonfontMainColort ? colors.fonfontMainColort
: colors.placeHolderColor : colors.placeHolderColor
}> }>
{get(SORT_DATA, item)} {/* {get(SORT_DATA, item)} */}
{localizedSortData[item]}
</TextDefault> </TextDefault>
<RadioBtn <RadioBtn
size={10} size={10}
@ -222,13 +229,13 @@ const FilterModal = props => {
<View style={[alignment.PLlarge, alignment.PRlarge]}> <View style={[alignment.PLlarge, alignment.PRlarge]}>
<TouchableOpacity style={styles.applyBtn} onPress={applyFilters}> <TouchableOpacity style={styles.applyBtn} onPress={applyFilters}>
<TextDefault H5 bold textColor={colors.lightBackground}> <TextDefault H5 bold textColor={colors.lightBackground}>
Apply Filter {i18n.t('applyFilter')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => props.closeFilterModal()} onPress={() => props.closeFilterModal()}
style={[styles.width100, alignment.PBlarge, alignment.PTlarge]}> style={[styles.width100, alignment.PBlarge, alignment.PTlarge]}>
<TextDefault center>Close</TextDefault> <TextDefault center>{i18n.t('close')}</TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>

View File

@ -13,6 +13,7 @@ import TextDefault from '../Text/TextDefault/TextDefault'
import TextError from '../Text/TextError/TextError' import TextError from '../Text/TextError/TextError'
import TextLine from '../Text/TextLine/TextLine' import TextLine from '../Text/TextLine/TextLine'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../i18n'
export const orderStatuses = [ export const orderStatuses = [
{ {
@ -65,7 +66,7 @@ const ActiveOrders = ({
if (!pastOrders || (pastOrders && !pastOrders.length)) { if (!pastOrders || (pastOrders && !pastOrders.length)) {
return <TextDefault> </TextDefault> return <TextDefault> </TextDefault>
} }
return <TextLine headerName="Old Order" textWidth="34%" lineWidth="28%" /> return <TextLine headerName={i18n.t('oldOrder')} textWidth="34%" lineWidth="28%" />
} }
const checkStatus = status => { const checkStatus = status => {
@ -77,7 +78,7 @@ const ActiveOrders = ({
return ( return (
<React.Fragment> <React.Fragment>
<TextLine headerName="Active Order" textWidth="40%" lineWidth="26%" /> <TextLine headerName={i18n.t('activeOrder')} textWidth="40%" lineWidth="26%" />
{activeOrders.map((item, index) => ( {activeOrders.map((item, index) => (
<TouchableOpacity <TouchableOpacity
activeOpacity={0.7} activeOpacity={0.7}
@ -97,7 +98,7 @@ const ActiveOrders = ({
</View> </View>
<View style={styles.infoContainer}> <View style={styles.infoContainer}>
<TextDefault H5 bolder style={alignment.MBxSmall}> <TextDefault H5 bolder style={alignment.MBxSmall}>
{'ID: '} {i18n.t('idVar')}
{item.order_id} {item.order_id}
</TextDefault> </TextDefault>
<TextDefault line={3} textColor={colors.tagColor} H5 bold> <TextDefault line={3} textColor={colors.tagColor} H5 bold>
@ -117,7 +118,7 @@ const ActiveOrders = ({
style={alignment.MTxSmall} style={alignment.MTxSmall}
bold bold
center> center>
{item.order_status} {i18n.t(item.order_status)}
</TextDefault> </TextDefault>
</View> </View>
</View> </View>

View File

@ -227,7 +227,7 @@ function Cart() {
await addQuantityContext(key) await addQuantityContext(key)
} else { } else {
FlashMessage({ FlashMessage({
message: 'No more items in stock' message: i18n.t('noMoreItems')
}) })
} }
} }
@ -265,7 +265,7 @@ function Cart() {
} }
if (!paymentMethod) { if (!paymentMethod) {
FlashMessage({ FlashMessage({
message: 'Set payment method before checkout' message: i18n.t('SetPaymentMethod')
}) })
return false return false
} }
@ -549,7 +549,7 @@ function Cart() {
style={{ width: '30%' }} style={{ width: '30%' }}
medium medium
H5> H5>
Total {i18n.t('total')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
numberOfLines={1} numberOfLines={1}
@ -628,7 +628,7 @@ function Cart() {
{i18n.t('deliveryAddress')} {i18n.t('deliveryAddress')}
</TextDefault> </TextDefault>
<TextDefault H5 textColor={colors.buttonBackgroundBlue}> <TextDefault H5 textColor={colors.buttonBackgroundBlue}>
Change {i18n.t('change')}
</TextDefault> </TextDefault>
</View> </View>
{address ? ( {address ? (

View File

@ -21,7 +21,7 @@ function SelectVoucher() {
useLayoutEffect(() => { useLayoutEffect(() => {
navigation.setOptions({ navigation.setOptions({
headerRight: null, headerRight: null,
title: 'My Vouchers' title: i18n.t('myVouchers')
}) })
}, [navigation]) }, [navigation])
@ -33,14 +33,14 @@ function SelectVoucher() {
<WrapperView> <WrapperView>
<View style={styles.container}> <View style={styles.container}>
<TextLine <TextLine
headerName="TYPe voucher code" headerName={i18n.t('typeVoucherCode')}
textWidth="50%" textWidth="50%"
lineWidth="25%" lineWidth="25%"
/> />
<View style={styles.upperContainer}> <View style={styles.upperContainer}>
<View style={{ width: '70%' }}> <View style={{ width: '70%' }}>
<TextField <TextField
label="Enter your voucher code" label={i18n.t('enterVoucherCode')}
labelFontSize={scale(12)} labelFontSize={scale(12)}
fontSize={scale(12)} fontSize={scale(12)}
labelHeight={10} labelHeight={10}

View File

@ -29,6 +29,7 @@ import { NAVIGATION_SCREEN } from "../../utils/constant";
import { scale } from "../../utils/scaling"; import { scale } from "../../utils/scaling";
import useStyle from "./styles"; import useStyle from "./styles";
import ApolloClient from "apollo-client"; import ApolloClient from "apollo-client";
import i18n from "../../../i18n";
const { const {
IOS_CLIENT_ID_GOOGLE, IOS_CLIENT_ID_GOOGLE,
@ -64,7 +65,7 @@ const CreateAccount = () => {
async function onCompleted(data) { async function onCompleted(data) {
if (!data.login.is_active) { if (!data.login.is_active) {
FlashMessage({ FlashMessage({
message: "Can't Login,This Account is Deleted!", message: i18n.t('cantLogin'),
}); });
setLoading(false); setLoading(false);
} else { } else {
@ -167,7 +168,7 @@ const CreateAccount = () => {
color={colors.iconColor} color={colors.iconColor}
/> />
<TextDefault style={alignment.MLsmall} bold> <TextDefault style={alignment.MLsmall} bold>
Signup with Apple {i18n.t('signupApple')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
); );
@ -241,7 +242,7 @@ const CreateAccount = () => {
return ( return (
<WrapperView> <WrapperView>
<View style={[styles.mainContainer, styles.flex]}> <View style={[styles.mainContainer, styles.flex]}>
<RegistrationHeader title={"Get Started"} /> <RegistrationHeader title={i18n.t('getStarted')} />
<View style={styles.subContainer}> <View style={styles.subContainer}>
<View style={[styles.flex, styles.upperContainer]}> <View style={[styles.flex, styles.upperContainer]}>
<EnategaImage <EnategaImage
@ -263,7 +264,7 @@ const CreateAccount = () => {
onPress={() => navigation.navigate(NAVIGATION_SCREEN.Login)} onPress={() => navigation.navigate(NAVIGATION_SCREEN.Login)}
> >
<TextDefault style={[alignment.MLsmall]} bold> <TextDefault style={[alignment.MLsmall]} bold>
Already a member? Log in {i18n.t('alreadyMember')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -114,7 +114,7 @@ function EditAddress() {
function onCompleted(data) { function onCompleted(data) {
FlashMessage({ FlashMessage({
message: 'Address updated' message: i18n.t('addressUpdated')
}) })
// show message here // show message here
navigation.goBack() navigation.goBack()
@ -122,7 +122,7 @@ function EditAddress() {
function onError(error) { function onError(error) {
FlashMessage({ FlashMessage({
message: `An error occured. Please try again ${error}` message: `${i18n.t('AnErrorOccured')} ${error}`
}) })
} }
@ -189,7 +189,7 @@ function EditAddress() {
<View style={styles.labelButtonContainer}> <View style={styles.labelButtonContainer}>
<View style={alignment.PBsmall}> <View style={alignment.PBsmall}>
<TextDefault H5 bold> <TextDefault H5 bold>
Label as {i18n.t('labelAs')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.buttonInline}> <View style={styles.buttonInline}>
@ -220,7 +220,7 @@ function EditAddress() {
} }
bold bold
center> center>
{label.title} {i18n.t(label.title)}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
) )
@ -255,7 +255,7 @@ function EditAddress() {
onBlur={() => { onBlur={() => {
setDeliveryAddressError( setDeliveryAddressError(
!deliveryAddress.trim().length !deliveryAddress.trim().length
? 'Delivery address is required' ? i18n.t('addressReq')
: null : null
) )
}} }}
@ -287,7 +287,7 @@ function EditAddress() {
onBlur={() => { onBlur={() => {
setDeliveryDetailsError( setDeliveryDetailsError(
!deliveryDetails.trim().length !deliveryDetails.trim().length
? 'Delivery details is required' ? i18n.t('deliveryDetailsReq')
: null : null
) )
}} }}
@ -299,10 +299,10 @@ function EditAddress() {
disabled={loading} disabled={loading}
onPress={() => { onPress={() => {
const deliveryAddressError = !deliveryAddress.trim().length const deliveryAddressError = !deliveryAddress.trim().length
? 'Delivery address is required' ? i18n.t('addressReq')
: null : null
const deliveryDetailsError = !deliveryDetails.trim().length const deliveryDetailsError = !deliveryDetails.trim().length
? 'Delivery details is required' ? i18n.t('addressReq')
: null : null
setDeliveryAddressError(deliveryAddressError) setDeliveryAddressError(deliveryAddressError)
@ -346,7 +346,7 @@ function EditAddress() {
activeOpacity={0.7} activeOpacity={0.7}
onPress={() => navigation.goBack()}> onPress={() => navigation.goBack()}>
<TextDefault H4 bold> <TextDefault H4 bold>
{'cancel'} {i18n.t('cancel')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</ScrollView> </ScrollView>

View File

@ -57,7 +57,7 @@ function ForgotPassword() {
} }
function onCompleted(data) { function onCompleted(data) {
FlashMessage({ FlashMessage({
message: 'Reset password link sent on your email' message: i18n.t('ResetPasswordLinkSent')
}) })
} }
function onError(error) { function onError(error) {

View File

@ -7,6 +7,7 @@ import { FlashMessage, TextDefault, WrapperView } from '../../components'
import { NAVIGATION_SCREEN } from '../../utils/constant' import { NAVIGATION_SCREEN } from '../../utils/constant'
import { scale } from '../../utils/scaling' import { scale } from '../../utils/scaling'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../i18n'
const LATITUDE = 33.7001019 const LATITUDE = 33.7001019
const LONGITUDE = 72.9735978 const LONGITUDE = 72.9735978
@ -220,7 +221,7 @@ export default function FullMap() {
setRegion(loc) setRegion(loc)
} else { } else {
FlashMessage({ FlashMessage({
message: 'Location permission not granted' message: i18n.t('LocationPermissionNotGranted')
}) })
} }
} }

View File

@ -10,15 +10,15 @@ import { useTheme } from '@react-navigation/native'
const links = [ const links = [
{ {
title: 'Product Page', title: i18n.t('productPage'),
url: 'https://enatega.com/enatega-single-vendor/' url: 'https://enatega.com/enatega-single-vendor/'
}, },
{ title: 'Docs', url: 'https://enatega.com/docs/enatega-singlevendor-introduction/' }, { title: i18n.t('docs'), url: 'https://enatega.com/docs/enatega-singlevendor-introduction/' },
{ {
title: 'Blog', title: i18n.t('blog'),
url: 'https://enatega.com/blog/' url: 'https://enatega.com/blog/'
}, },
{ title: 'About Us', url: 'https://ninjascode.com/our-team' } { title: i18n.t('aboutUs'), url: 'https://ninjascode.com/our-team' }
] ]
function Help() { function Help() {
const styles = useStyle() const styles = useStyle()

View File

@ -82,7 +82,7 @@ function Login() {
setPasswordError(null); setPasswordError(null);
if (!email) { if (!email) {
setEmailError("Email/Phone is required"); setEmailError(i18n.t('emailphoneReq'));
result = false; result = false;
} else { } else {
const emailRegex = /^\w+([\\.-]?\w+)*@\w+([\\.-]?\w+)*(\.\w{2,3})+$/; const emailRegex = /^\w+([\\.-]?\w+)*@\w+([\\.-]?\w+)*(\.\w{2,3})+$/;
@ -93,7 +93,7 @@ function Login() {
} }
} }
if (!password) { if (!password) {
setPasswordError("Password is required"); setPasswordError(i18n.t('passReq'));
result = false; result = false;
} }
return result; return result;
@ -101,7 +101,7 @@ function Login() {
async function onCompleted(data) { async function onCompleted(data) {
if (!data.login.is_active) { if (!data.login.is_active) {
FlashMessage({ FlashMessage({
message: "Can't Login,This Account is Deleted!", message: i18n.t('cantLogin'),
}); });
setLoading(false); setLoading(false);
} else { } else {
@ -213,7 +213,7 @@ function Login() {
</View> </View>
<View style={styles.width100}> <View style={styles.width100}>
<TextDefault medium textColor={colors.fontSecondColor}> <TextDefault medium textColor={colors.fontSecondColor}>
Enter your Email and Password {i18n.t('enterUsername')}
</TextDefault> </TextDefault>
<View style={styles.marginTop3} /> <View style={styles.marginTop3} />
<FilledTextField <FilledTextField
@ -268,7 +268,7 @@ function Login() {
medium medium
center center
> >
Forgot Password? {i18n.t('forgotPassword')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
<View style={[styles.marginTop3]}>{renderLoginAction()}</View> <View style={[styles.marginTop3]}>{renderLoginAction()}</View>
@ -280,7 +280,7 @@ function Login() {
} }
> >
<TextDefault textColor={colors.fontSecondColor} bold center> <TextDefault textColor={colors.fontSecondColor} bold center>
Create New Account {i18n.t('createNewAcc')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -18,6 +18,7 @@ import { alignment } from "../../utils/alignment";
import { NAVIGATION_SCREEN } from "../../utils/constant"; import { NAVIGATION_SCREEN } from "../../utils/constant";
import { scale } from "../../utils/scaling"; import { scale } from "../../utils/scaling";
import useStyle from "./styles"; import useStyle from "./styles";
import i18n from "../../../i18n";
// constants // constants
const CATEGORIES = gql` const CATEGORIES = gql`
@ -32,7 +33,7 @@ function Menu() {
useLayoutEffect(() => { useLayoutEffect(() => {
navigation.setOptions({ navigation.setOptions({
title: "Home", title: i18n.t('home'),
}); });
}, []); }, []);
@ -42,7 +43,7 @@ function Menu() {
} else if (error) { } else if (error) {
return ( return (
<TextError <TextError
text={error ? error.message : "No Foods"} text={error ? error.message : i18n.t('NoFoods')}
backColor="transparent" backColor="transparent"
/> />
); );
@ -51,7 +52,7 @@ function Menu() {
<View style={styles.emptyContainer}> <View style={styles.emptyContainer}>
<EmptyFood width={scale(250)} height={scale(250)} /> <EmptyFood width={scale(250)} height={scale(250)} />
<TextDefault H4 bold style={alignment.MTlarge}> <TextDefault H4 bold style={alignment.MTlarge}>
No item found {i18n.t('noItems')}
</TextDefault> </TextDefault>
</View> </View>
); );
@ -77,7 +78,7 @@ function Menu() {
{isLoggedIn && profile && <StatusCard />} {isLoggedIn && profile && <StatusCard />}
<TextDefault style={alignment.Psmall} H4 medium> <TextDefault style={alignment.Psmall} H4 medium>
Featured {i18n.t('featured')}
</TextDefault> </TextDefault>
</> </>
); );

View File

@ -31,6 +31,7 @@ import { alignment } from "../../utils/alignment";
import { ICONS_NAME, NAVIGATION_SCREEN, SORT_DATA } from "../../utils/constant"; import { ICONS_NAME, NAVIGATION_SCREEN, SORT_DATA } from "../../utils/constant";
import { moderateScale, scale } from "../../utils/scaling"; import { moderateScale, scale } from "../../utils/scaling";
import useStyle from "./styles"; import useStyle from "./styles";
import i18n from "../../../i18n";
// constants // constants
const FOODS = gql` const FOODS = gql`
@ -73,7 +74,7 @@ function MenuItems() {
async function onAddToCart(food) { async function onAddToCart(food) {
if (food.stock < 1) { if (food.stock < 1) {
FlashMessage({ FlashMessage({
message: "Item out of stock", message: i18n.t('ItemOutOfStock'),
}); });
return; return;
} }
@ -112,7 +113,7 @@ function MenuItems() {
{item.stock < 1 && ( {item.stock < 1 && (
<View style={styles.emtpyStockLabel}> <View style={styles.emtpyStockLabel}>
<TextDefault textColor={styles.whiteFont.color} center> <TextDefault textColor={styles.whiteFont.color} center>
No Stock {i18n.t('NoStock')}
</TextDefault> </TextDefault>
</View> </View>
)} )}
@ -189,7 +190,7 @@ function MenuItems() {
} else if (error) { } else if (error) {
return ( return (
<TextError <TextError
text={error ? error.message : "No Foods"} text={error ? error.message : i18n.t('NoFoods')}
backColor="transparent" backColor="transparent"
/> />
); );
@ -198,7 +199,7 @@ function MenuItems() {
<View style={styles.emptyContainer}> <View style={styles.emptyContainer}>
<EmptyFood width={scale(250)} height={scale(250)} /> <EmptyFood width={scale(250)} height={scale(250)} />
<TextDefault H4 bold style={alignment.MTlarge}> <TextDefault H4 bold style={alignment.MTlarge}>
No food item found {i18n.t('NoFooditemFound')}
</TextDefault> </TextDefault>
</View> </View>
); );

View File

@ -21,8 +21,8 @@ import { ICONS_NAME, NAVIGATION_SCREEN } from "../../utils/constant";
import { scale } from "../../utils/scaling"; import { scale } from "../../utils/scaling";
import useStyle from "./style"; import useStyle from "./style";
const orderStatusActive = ["PENDING", "PICKED", "ACCEPTED"]; const orderStatusActive = [i18n.t("PENDING"), i18n.t("PICKED"), i18n.t("ACCEPTED")];
const orderStatusInactive = ["DELIVERED", "COMPLETED"]; const orderStatusInactive = [i18n.t("DELIVERED"), i18n.t("COMPLETED")];
function MyOrders() { function MyOrders() {
const styles = useStyle(); const styles = useStyle();
@ -86,7 +86,7 @@ function MyOrders() {
</View> </View>
<View style={styles.descriptionEmpty}> <View style={styles.descriptionEmpty}>
<TextDefault bolder center H4> <TextDefault bolder center H4>
No Orders Found {i18n.t('noOrdersFound')}
</TextDefault> </TextDefault>
</View> </View>
<TouchableOpacity <TouchableOpacity
@ -95,7 +95,7 @@ function MyOrders() {
onPress={() => navigation.navigate(NAVIGATION_SCREEN.Menu)} onPress={() => navigation.navigate(NAVIGATION_SCREEN.Menu)}
> >
<TextDefault textColor={colors.buttonText} bold H5 center> <TextDefault textColor={colors.buttonText} bold H5 center>
Start Shopping {i18n.t('startShopping')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
@ -109,7 +109,7 @@ function MyOrders() {
data={ data={
loadingOrders || errorOrders loadingOrders || errorOrders
? [] ? []
: orders.filter((o) => orderStatusInactive.includes(o.order_status)) : orders.filter((o) => orderStatusInactive.includes(i18n.t(o.order_status)))
} }
style={styles.container} style={styles.container}
contentContainerStyle={styles.contentContainer} contentContainerStyle={styles.contentContainer}
@ -118,10 +118,10 @@ function MyOrders() {
<ActiveOrders <ActiveOrders
navigation={navigation} navigation={navigation}
activeOrders={orders.filter((o) => activeOrders={orders.filter((o) =>
orderStatusActive.includes(o.order_status) orderStatusActive.includes(i18n.t(o.order_status))
)} )}
pastOrders={orders.filter((o) => pastOrders={orders.filter((o) =>
orderStatusInactive.includes(o.order_status) orderStatusInactive.includes(i18n.t(o.order_status))
)} )}
loading={loadingOrders} loading={loadingOrders}
error={errorOrders} error={errorOrders}
@ -151,7 +151,7 @@ function MyOrders() {
</View> </View>
<View style={styles.infoContainer}> <View style={styles.infoContainer}>
<TextDefault H5 bold style={alignment.MBxSmall}> <TextDefault H5 bold style={alignment.MBxSmall}>
{"ID: "} {i18n.t('idVar')}
{item.order_id} {item.order_id}
</TextDefault> </TextDefault>
<TextDefault line={3} textColor={colors.tagColor} H5 medium> <TextDefault line={3} textColor={colors.tagColor} H5 medium>

View File

@ -113,7 +113,7 @@ function NewAddress() {
regionChange(loc) regionChange(loc)
} else { } else {
FlashMessage({ FlashMessage({
message: 'Location permission not granted' message: i18n.t('locaPermission')
}) })
} }
} }
@ -139,7 +139,7 @@ function NewAddress() {
function onCompleted(data) { function onCompleted(data) {
FlashMessage({ FlashMessage({
message: 'Address added' message: i18n.t('addressAdded')
}) })
const cartAddress = route.params ? route.params.backScreen : null const cartAddress = route.params ? route.params.backScreen : null
if (cartAddress === NAVIGATION_SCREEN.Cart) { if (cartAddress === NAVIGATION_SCREEN.Cart) {
@ -151,7 +151,7 @@ function NewAddress() {
function onError(error) { function onError(error) {
FlashMessage({ FlashMessage({
message: `An error occured. Please try again. ${error}` message: `${i18n.t('AnErrorOccured')} ${error}`
}) })
} }
@ -211,7 +211,7 @@ function NewAddress() {
<View style={styles.labelButtonContainer}> <View style={styles.labelButtonContainer}>
<View style={styles.labelTitleContainer}> <View style={styles.labelTitleContainer}>
<TextDefault H5 bold> <TextDefault H5 bold>
Label As: {i18n.t('labelAs')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.buttonInline}> <View style={styles.buttonInline}>
@ -242,7 +242,7 @@ function NewAddress() {
} }
bold bold
center> center>
{label.title} {i18n.t(label.title)}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
) )
@ -277,7 +277,7 @@ function NewAddress() {
onBlur={() => { onBlur={() => {
setDeliveryAddressError( setDeliveryAddressError(
!deliveryAddress.trim().length !deliveryAddress.trim().length
? 'Delivery address is required' ? i18n.t('addressReq')
: null : null
) )
}} }}
@ -311,7 +311,7 @@ function NewAddress() {
onBlur={() => { onBlur={() => {
setDeliveryDetailsError( setDeliveryDetailsError(
!deliveryDetails.trim().length !deliveryDetails.trim().length
? 'Delivery details is required' ? i18n.t('deliveryDetailsReq')
: null : null
) )
}} }}
@ -322,10 +322,10 @@ function NewAddress() {
disabled={loading} disabled={loading}
onPress={() => { onPress={() => {
const deliveryAddressError = !deliveryAddress.trim().length const deliveryAddressError = !deliveryAddress.trim().length
? 'Delivery address is required' ? i18n.t('addressReq')
: null : null
const deliveryDetailsError = !deliveryDetails.trim().length const deliveryDetailsError = !deliveryDetails.trim().length
? 'Delivery details is required' ? i18n.t('deliveryDetailsReq')
: null : null
setDeliveryAddressError(deliveryAddressError) setDeliveryAddressError(deliveryAddressError)
@ -368,7 +368,7 @@ function NewAddress() {
activeOpacity={0.7} activeOpacity={0.7}
onPress={() => navigation.goBack()}> onPress={() => navigation.goBack()}>
<TextDefault H5 bold> <TextDefault H5 bold>
{'Cancel'} {i18n.t('cancel')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -51,7 +51,7 @@ function OrderDetail() {
useLayoutEffect(() => { useLayoutEffect(() => {
navigation.setOptions({ navigation.setOptions({
headerTitle: 'Order Detail', headerTitle: i18n.t('orderDetail'),
headerRight: null headerRight: null
}) })
}, [navigation]) }, [navigation])
@ -73,7 +73,7 @@ function OrderDetail() {
<WrapperView> <WrapperView>
<ScrollView style={[styles.flex]}> <ScrollView style={[styles.flex]}>
<View> <View>
{order.order_status === 'PICKED' && order.rider && ( {i18n.t(order.order_status) === i18n.t('PICKED') && order.rider && (
<TrackingRider <TrackingRider
delivery_address={order.delivery_address} delivery_address={order.delivery_address}
id={order.rider._id} id={order.rider._id}
@ -86,14 +86,14 @@ function OrderDetail() {
bolder bolder
H3 H3
style={alignment.MBsmall}> style={alignment.MBsmall}>
Thank You! {i18n.t('thankYou')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.fontSecondColor} textColor={colors.fontSecondColor}
medium medium
H5 H5
style={[alignment.MTsmall]}> style={[alignment.MTsmall]}>
Your order ID is {i18n.t('orderId')}
</TextDefault> </TextDefault>
<TextDefault H4 bolder style={alignment.PTxSmall}> <TextDefault H4 bolder style={alignment.PTxSmall}>
{order.order_id} {order.order_id}
@ -103,20 +103,20 @@ function OrderDetail() {
bold bold
H5 H5
style={[alignment.MTlarge]}> style={[alignment.MTlarge]}>
Status {i18n.t('status')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.buttonBackgroundBlue} textColor={colors.buttonBackgroundBlue}
H4 H4
medium medium
style={[alignment.MBsmall, alignment.MTxSmall]}> style={[alignment.MBsmall, alignment.MTxSmall]}>
{order.order_status}{' '} {i18n.t(order.order_status)}{' '}
<TextDefault medium> <TextDefault medium>
( {checkStatus(order.order_status).statusText}) ( {checkStatus(i18n.t(order.order_status)).statusText})
</TextDefault> </TextDefault>
</TextDefault> </TextDefault>
<TextDefault textColor={colors.fontSecondColor} H5 bold> <TextDefault textColor={colors.fontSecondColor} H5 bold>
Delivery address: {i18n.t('deliveryAddress')}:
</TextDefault> </TextDefault>
<TextDefault style={{ ...alignment.PTxSmall }} H5> <TextDefault style={{ ...alignment.PTxSmall }} H5>
{order.delivery_address.delivery_address} {order.delivery_address.delivery_address}
@ -151,7 +151,7 @@ function OrderDetail() {
textColor={colors.fontMainColor} textColor={colors.fontMainColor}
medium medium
style={{ width: '40%' }}> style={{ width: '40%' }}>
Subtotal {i18n.t('subTotal')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.fontMainColor} textColor={colors.fontMainColor}
@ -169,7 +169,7 @@ function OrderDetail() {
textColor={colors.fontMainColor} textColor={colors.fontMainColor}
medium medium
style={{ width: '40%' }}> style={{ width: '40%' }}>
Delivery fee {i18n.t('deliveryFee')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.fontMainColor} textColor={colors.fontMainColor}
@ -185,7 +185,7 @@ function OrderDetail() {
textColor={colors.fontMainColor} textColor={colors.fontMainColor}
bold bold
style={{ width: '40%' }}> style={{ width: '40%' }}>
Total {i18n.t('total')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.fontMainColor} textColor={colors.fontMainColor}
@ -197,7 +197,7 @@ function OrderDetail() {
</TextDefault> </TextDefault>
</View> </View>
</View> </View>
{order.order_status === 'PICKED' && ( {i18n.t(order.order_status) === i18n.t('PICKED') && (
<View <View
style={{ style={{
...alignment.PLmedium, ...alignment.PLmedium,
@ -240,26 +240,26 @@ function OrderDetail() {
borderRadius: moderateScale(10) borderRadius: moderateScale(10)
}}> }}>
<TextDefault H5 bold textColor={colors.lightBackground}> <TextDefault H5 bold textColor={colors.lightBackground}>
Chat with Rider {i18n.t('chatWithRider')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
)} )}
{(order.order_status === 'DELIVERED' || {(i18n.t(order.order_status) === i18n.t('DELIVERED') ||
order.order_status === 'COMPLETED') && i18n.t(order.order_status) === i18n.t('COMPLETED')) &&
order.review && order.review &&
order.review.rating === 0 && ( order.review.rating === 0 && (
<View style={styles.orderReceipt}> <View style={styles.orderReceipt}>
<TextDefault H3 bolder style={alignment.MBsmall}> <TextDefault H3 bolder style={alignment.MBsmall}>
Any suggestion? {i18n.t('anySuggestion')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.fontSecondColor} textColor={colors.fontSecondColor}
bold bold
style={[alignment.MBsmall, alignment.MTsmall]}> style={[alignment.MBsmall, alignment.MTsmall]}>
Review regarding your order? {i18n.t('reviewRegarding')}
</TextDefault> </TextDefault>
<TouchableOpacity <TouchableOpacity
activeOpacity={0.7} activeOpacity={0.7}
@ -280,7 +280,7 @@ function OrderDetail() {
H5 H5
bold bold
center> center>
Write a review {i18n.t('writeReview')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -53,11 +53,11 @@ function ChangePassword(props) {
if (data.changePassword) { if (data.changePassword) {
clearFields() clearFields()
FlashMessage({ FlashMessage({
message: 'Password Updated' message: i18n.t('passChange')
}) })
props.hideModal() props.hideModal()
} else { } else {
Alert.alert('Error', 'Invalid password') Alert.alert('Error', i18n.t('invalidPass'))
} }
} }
@ -70,7 +70,7 @@ function ChangePassword(props) {
<View style={styles.modalContent}> <View style={styles.modalContent}>
<View style={styles.titleContainer}> <View style={styles.titleContainer}>
<TextDefault bold H4> <TextDefault bold H4>
Change password {i18n.t('changePass')}
</TextDefault> </TextDefault>
</View> </View>
@ -78,7 +78,7 @@ function ChangePassword(props) {
<TextField <TextField
secureTextEntry secureTextEntry
error={oldPasswordError} error={oldPasswordError}
label="Current Password" label={i18n.t('currentPass')}
labelFontSize={scale(12)} labelFontSize={scale(12)}
fontSize={scale(12)} fontSize={scale(12)}
labelHeight={10} labelHeight={10}
@ -89,7 +89,7 @@ function ChangePassword(props) {
labelTextStyle={{ fontSize: scale(12) }} labelTextStyle={{ fontSize: scale(12) }}
onChangeText={setOldPassword} onChangeText={setOldPassword}
onBlur={() => { onBlur={() => {
setOldPasswordError(!oldPassword ? 'Password is required' : '') setOldPasswordError(!oldPassword ? i18n.t('passReq') : '')
}} }}
/> />
</View> </View>
@ -97,7 +97,7 @@ function ChangePassword(props) {
<TextField <TextField
secureTextEntry secureTextEntry
error={newPasswordError} error={newPasswordError}
label="New Password" label={i18n.t('newPass')}
labelFontSize={scale(12)} labelFontSize={scale(12)}
fontSize={scale(12)} fontSize={scale(12)}
labelHeight={10} labelHeight={10}
@ -108,7 +108,7 @@ function ChangePassword(props) {
labelTextStyle={{ fontSize: scale(12) }} labelTextStyle={{ fontSize: scale(12) }}
onChangeText={setNewPassword} onChangeText={setNewPassword}
onBlur={() => { onBlur={() => {
setNewPasswordError(!newPassword ? 'Password is required' : '') setNewPasswordError(!newPassword ? i18n.t('passReq') : '')
}} }}
/> />
</View> </View>
@ -117,9 +117,9 @@ function ChangePassword(props) {
disabled={loading} disabled={loading}
onPress={() => { onPress={() => {
const newPasswordError = const newPasswordError =
newPassword === '' ? 'Password is required' : '' newPassword === '' ? i18n.t('passReq') : ''
const oldPasswordError = const oldPasswordError =
oldPassword === '' ? 'Password is required' : '' oldPassword === '' ? i18n.t('passReq') : ''
setNewPasswordError(newPasswordError) setNewPasswordError(newPasswordError)
setOldPasswordError(oldPasswordError) setOldPasswordError(oldPasswordError)

View File

@ -83,9 +83,9 @@ function Profile() {
useEffect(() => { useEffect(() => {
if (backScreen) { if (backScreen) {
viewHideAndShow(); viewHideAndShow();
setPhoneError("Phone number is required"); setPhoneError(i18n.t('phoneNumberRequired'));
FlashMessage({ FlashMessage({
message: "Phone Number is missing", message: i18n.t('phoneNumberMissing'),
}); });
} }
}, [backScreen]); }, [backScreen]);
@ -97,7 +97,7 @@ function Profile() {
function onCompleted({ updateUser }) { function onCompleted({ updateUser }) {
if (updateUser) { if (updateUser) {
FlashMessage({ FlashMessage({
message: "User's Info Updated", message: i18n.t('userInfoUpdated'),
}); });
if (backScreen) { if (backScreen) {
navigation.goBack(); navigation.goBack();
@ -119,12 +119,12 @@ function Profile() {
let res = true; let res = true;
if (!name.trim()) { if (!name.trim()) {
refName.current.focus(); refName.current.focus();
setNameError("Name is required"); setNameError(i18n.t('nameReq'));
res = false; res = false;
} }
const num = phone.trim().replace(".", ""); const num = phone.trim().replace(".", "");
if (num.length < 11 || num.length > 15 || isNaN(num)) { if (num.length < 11 || num.length > 15 || isNaN(num)) {
setPhoneError("Minimum 11 and maximum 15 characters allowed"); setPhoneError(i18n.t('minWords'));
if (res) { if (res) {
refPhone.current.focus(); refPhone.current.focus();
} }
@ -154,7 +154,7 @@ function Profile() {
label={i18n.t("name")} label={i18n.t("name")}
ref={refName} ref={refName}
editable={false} editable={false}
defaultValue={profile.name} defaultValue={profile.name ? profile.name : null}
labelFontSize={scale(12)} labelFontSize={scale(12)}
fontSize={scale(12)} fontSize={scale(12)}
style={{ style={{
@ -224,7 +224,7 @@ function Profile() {
onPress={() => setModalVisible(true)} onPress={() => setModalVisible(true)}
style={styles.changePassword} style={styles.changePassword}
> >
<TextDefault>Change Password</TextDefault> <TextDefault>{i18n.t('changePass')}</TextDefault>
<MaterialCommunityIcons <MaterialCommunityIcons
name={"pencil"} name={"pencil"}
size={20} size={20}
@ -383,7 +383,7 @@ function Profile() {
bold bold
style={[alignment.MTsmall, alignment.MBsmall]} style={[alignment.MTsmall, alignment.MBsmall]}
> >
{"Cancel"} {i18n.t('cancel')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
@ -394,7 +394,7 @@ function Profile() {
textColor={colors.fontSecondColor} textColor={colors.fontSecondColor}
style={alignment.MBsmall} style={alignment.MBsmall}
> >
All rights are reserved by Enatega {i18n.t('rightsReserved')}
</TextDefault> </TextDefault>
</ScrollView> </ScrollView>
</KeyboardAvoidingView> </KeyboardAvoidingView>

View File

@ -31,6 +31,7 @@ import { ICONS_NAME, NAVIGATION_SCREEN } from '../../utils/constant'
import country_codes from '../../utils/country_codes' import country_codes from '../../utils/country_codes'
import { scale, verticalScale } from '../../utils/scaling' import { scale, verticalScale } from '../../utils/scaling'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../i18n'
const CREATEUSER = gql` const CREATEUSER = gql`
${createUser} ${createUser}
@ -309,7 +310,7 @@ function Register() {
navigation.navigate(NAVIGATION_SCREEN.ForgotPassword) navigation.navigate(NAVIGATION_SCREEN.ForgotPassword)
}> }>
<TextDefault style={alignment.MTsmall} bold center> <TextDefault style={alignment.MTsmall} bold center>
Forgot password? {i18n.t('forgotPassword')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -49,6 +49,7 @@ const languageTypes = [
{ value: "ភាសាខ្មែរ", code: "km", index: 2 }, { value: "ភាសាខ្មែរ", code: "km", index: 2 },
{ value: "中文", code: "zh", index: 3 }, { value: "中文", code: "zh", index: 3 },
{ value: "Deutsche", code: "de", index: 4 }, { value: "Deutsche", code: "de", index: 4 },
{ value: "Arabic", code: "ar", index: 5 },
]; ];
const PUSH_TOKEN = gql` const PUSH_TOKEN = gql`
@ -159,7 +160,14 @@ function Settings() {
"enatega-language", "enatega-language",
languageTypes[languageInd].code languageTypes[languageInd].code
); );
Updates.reloadAsync(); i18n.locale = languageTypes[languageInd].code
const lang = await AsyncStorage.getItem("enatega-language");
console.log(lang)
const defLang = languageTypes.findIndex((el) => el.code === lang);
const langName = languageTypes[defLang].value;
activeRadioSetter(defLang);
languageNameSetter(langName);
// Updates.reloadAsync();
} }
}; };
@ -169,7 +177,7 @@ function Settings() {
function onCompleted() { function onCompleted() {
FlashMessage({ FlashMessage({
message: "Notification Status Updated", message: i18n.t('notificationUpdate'),
}); });
} }
@ -242,7 +250,7 @@ function Settings() {
medium medium
H5 H5
> >
Language {i18n.t('language')}
</TextDefault> </TextDefault>
<TextDefault medium H5> <TextDefault medium H5>
({languageName}) ({languageName})
@ -275,7 +283,7 @@ function Settings() {
textColor={colors.statusSecondColor} textColor={colors.statusSecondColor}
> >
{" "} {" "}
Receive Special Offers{" "} {i18n.t('receiveOffers')}{" "}
</TextDefault> </TextDefault>
<SwitchBtn <SwitchBtn
isEnabled={offerNotification} isEnabled={offerNotification}
@ -298,7 +306,7 @@ function Settings() {
textColor={colors.statusSecondColor} textColor={colors.statusSecondColor}
> >
{" "} {" "}
Get updates on your order status!{" "} {i18n.t('getUpdatesText')}{" "}
</TextDefault> </TextDefault>
<SwitchBtn <SwitchBtn
isEnabled={orderNotification} isEnabled={orderNotification}
@ -317,7 +325,7 @@ function Settings() {
<View style={styles.notificationChekboxContainer}> <View style={styles.notificationChekboxContainer}>
<TextDefault numberOfLines={1} textColor={"red"}> <TextDefault numberOfLines={1} textColor={"red"}>
{" "} {" "}
Delete Account{" "} {i18n.t('delAcc')}{" "}
</TextDefault> </TextDefault>
<CustomIcon <CustomIcon
name={ICONS_NAME.Trash} name={ICONS_NAME.Trash}
@ -328,7 +336,7 @@ function Settings() {
</TouchableOpacity> </TouchableOpacity>
<View style={styles.versionContainer}> <View style={styles.versionContainer}>
<TextDefault textColor={colors.fontSecondColor}> <TextDefault textColor={colors.fontSecondColor}>
Version: {Constants.manifest.version} {/* Version: {Constants.manifest.version} */}
</TextDefault> </TextDefault>
</View> </View>
</View> </View>
@ -373,7 +381,7 @@ function Settings() {
> >
<View style={{ flex: 1, alignItems: "center" }}> <View style={{ flex: 1, alignItems: "center" }}>
<TextDefault bolder H5 style={{ marginTop: 20 }}> <TextDefault bolder H5 style={{ marginTop: 20 }}>
Are you Sure you want to delete Account? {i18n.t('delAccText')}
</TextDefault> </TextDefault>
<TouchableOpacity <TouchableOpacity
activeOpacity={0.7} activeOpacity={0.7}
@ -401,7 +409,7 @@ function Settings() {
style={[styles.width100, alignment.PBlarge, alignment.PTlarge]} style={[styles.width100, alignment.PBlarge, alignment.PTlarge]}
onPress={() => onClose()} onPress={() => onClose()}
> >
<TextDefault center>Cancel</TextDefault> <TextDefault center>{i18n.t('cancel')}</TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</Modalize> </Modalize>

View File

@ -6,6 +6,7 @@ import RadioButton from "../../../components/FdRadioBtn/RadioBtn";
import TextDefault from "../../../components/Text/TextDefault/TextDefault"; import TextDefault from "../../../components/Text/TextDefault/TextDefault";
import { alignment } from "../../../utils/alignment"; import { alignment } from "../../../utils/alignment";
import useStyle from "./styles"; import useStyle from "./styles";
import i18n from '../../../../i18n'
const languageTypes = [ const languageTypes = [
{ value: "English", code: "en", index: 0 }, { value: "English", code: "en", index: 0 },
@ -13,6 +14,7 @@ const languageTypes = [
{ value: "ភាសាខ្មែរ", code: "km", index: 2 }, { value: "ភាសាខ្មែរ", code: "km", index: 2 },
{ value: "中文", code: "zh", index: 3 }, { value: "中文", code: "zh", index: 3 },
{ value: "Deutsche", code: "de", index: 4 }, { value: "Deutsche", code: "de", index: 4 },
{ value: "Arabic", code: "ar", index: 5 },
]; ];
function SettingModal(props) { function SettingModal(props) {
@ -23,7 +25,7 @@ function SettingModal(props) {
return ( return (
<View style={styles.flex}> <View style={styles.flex}>
<TextDefault bolder H5 style={alignment.MTlarge}> <TextDefault bolder H5 style={alignment.MTlarge}>
Select Language {i18n.t('SelectLanguage')}
</TextDefault> </TextDefault>
{languageTypes.map((item, index) => ( {languageTypes.map((item, index) => (
@ -55,7 +57,7 @@ function SettingModal(props) {
onPress={() => props.onSelectedLanguage(activeRadio)} onPress={() => props.onSelectedLanguage(activeRadio)}
> >
<TextDefault textColor={colors.lightBackground} bolder uppercase> <TextDefault textColor={colors.lightBackground} bolder uppercase>
Done {i18n.t('Done')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
@ -63,7 +65,7 @@ function SettingModal(props) {
style={[styles.width100, alignment.PBlarge, alignment.PTlarge]} style={[styles.width100, alignment.PBlarge, alignment.PTlarge]}
onPress={() => props.onClose()} onPress={() => props.onClose()}
> >
<TextDefault center>Cancel</TextDefault> <TextDefault center>{i18n.t('Cancel')}</TextDefault>
</TouchableOpacity> </TouchableOpacity>
{/* </View> */} {/* </View> */}
</View> </View>

View File

@ -0,0 +1,243 @@
export const ar = {
home: 'الصفحة الرئيسية',
title0: 'اللغة المختارة',
subtitle0: 'العربية',
description0:
'اختر أي لغة تريد لتغيير محتوى التطبيق إلى اللغة المطلوبة لديك.',
title1: 'لذيذ',
subtitle1: 'الفطور',
description1:
'الفطور هو كل شيء. البداية، الشيء الأول. إنها اللقمة التي هي الالتزام بيوم جديد، حياة مستمرة.',
title2: 'منعش',
subtitle2: 'المشروبات',
description2:
'الصمت الحقيقي هو راحة العقل، وهو للروح ما النوم للجسم، غذاء وانتعاش.',
title3: 'لذيذ',
subtitle3: 'آيس كريم',
description3:
'العمر لا يقلل من خيبة الأمل الشديدة من سقوط ملعقة من الآيس كريم من المخروط',
getStarted: 'ابدأ!',
welcome:
"مرحبًا بك في Enatega، في بعض الأحيان كل ما تحتاجه هو الحب. لكن القليل من الطعام بين الحين والآخر لا يضر.",
loginBtn: 'تسجيل الدخول',
registerBtn: 'تسجيل',
name: 'الاسم',
phone: 'رقم الهاتف',
email: 'البريد الإلكتروني',
emailphone: 'البريد الإلكتروني أو الهاتف',
password: 'كلمه السر',
deliveryAddress: 'عنوان التسليم',
fullDeliveryAddress: 'عنوان التسليم الكامل',
deliveryDetails: 'التفاصيل المطلوبة - على سبيل المثال الطابق / المبنى',
myAddresses: 'عناويني',
addAddress: 'إضافة عنوان',
editAddress: 'تعديل العنوان',
registerText: 'أو سجل مع',
forgotPassword: 'نسيت كلمة السر؟',
loginText: 'أو تسجيل الدخول مع',
deliveryLocation:
'قم بتشغيل الموقع حتى نتمكن من إرسال إليك طعم لا نهاية له من الطعام اللذيذ.',
locationBtn: 'تشغيل الموقع',
locationPermissionDenied: 'تم رفض إذن الوصول إلى الموقع',
cameraRollPermissionDenied: 'تم رفض إذن الوصول إلى Camera Roll',
locationOff: 'قم بتشغيل الموقع وحاول مرة أخرى',
titleLanguage: 'تغيير اللغة',
titleMenu: 'القائمة',
titleOrders: 'طلباتي',
titleNotifications: 'الإشعارات',
titleReviews: 'المشاركات',
titleProfile: 'الملف الشخصي',
titleSettings: 'الإعدادات',
titleHelp: 'مساعدة',
titleChat: 'الدردشة',
titleLogout: 'تسجيل خروج',
titleCart: 'عربتي',
titlePayment: 'دفع',
totalOrderAmount: 'إجمالي المبلغ المستحق',
reOrder: 'إعادة ترتيب',
unReadNotifications: 'لا توجد إشعارات غير مقروءة',
upload: 'حمل',
saveBtn: 'حفظ التغييرات',
saveContBtn: 'حفظ واستمر',
emailUs: 'أرسل لنا بريدًا إلكترونيًا على',
question1: 'أين نجد الطعام؟',
question2: 'كيف نتصل؟',
question3: 'كيف يمكنني دفع ثمن عامل التوصيل؟',
question4: 'هل الخدمة متوفرة في مدينتي؟',
answer1:
'يمكنك العثور على الطعام في أقرب متجر إليك دون دفع أي شيء لخدمة العملاء. تهمتنا منخفضة للغاية مقارنة بالآخرين.',
answer2: 'يمكنك الاتصال بنا من خلال البريد الإلكتروني أو رقم الهاتف أو موقعنا الإلكتروني.',
answer3:
'يمكنك دفع ثمن عامل التوصيل شخصيًا أو الدفع عبر الإنترنت أيضًا باستخدام بطاقة الائتمان أو الخصم.',
answer4:
'تتوفر هذه الخدمة حاليًا في مدن إسلام آباد وكراتشي يمكنك الاتصال بنا للاستفادة من هذه الخدمة في مدينتك.',
add: 'إضافة',
quantity: 'الكمية',
size: 'الحجم',
addToCart: 'أضف إلى العربة',
orderNow: 'اطلب الآن',
addToCartMessage: 'أضيف إلى العربة',
emptyCart: 'لا يوجد عناصر في العربة',
itemTotal: 'إجمالي العنصر',
delvieryCharges: 'رسوم التوصيل',
total: 'مجموع',
contactInfo: 'معلومات الاتصال',
deliveryAddressmessage: 'تعيين عنوان التسليم',
proceedCheckout: 'المتابعة إلى الدفع',
paymentText: 'كيف ترغب في الدفع؟',
checkout: 'الدفع',
creditCart: 'بطاقة الائتمان / بطاقة الخصم',
paypal: 'باي بال',
cod: 'الدفع عند الاستلام',
thankYou: 'شكرا لك!',
orderConfirmed: 'تم تأكيد طلبك',
orderId: 'معرف الطلب الخاص بك',
orderAmount: 'المبلغ المستحق لطلبك',
orderDetail: 'تفاصيل الطلب',
paymentMethod: 'طريقة الدفع',
trackOrder: 'تتبع الطلب',
backToMenu: 'العودة إلى القائمة',
foodItem: 'صنف غذائي',
deliveredTo: 'تسليم إلى',
writeAReview: 'اكتب مراجعة',
orderReceived: 'استلام الطلب',
orderPicked: 'طلبك في طريقه',
orderDelivered: 'تم التوصيل',
completed: 'اكتمل',
cancelled: 'ألغي',
orderPreparing: 'يتم تحضير طلبك',
delivered: 'تم التوصيل',
rateAndReview: 'التقييم والمراجعة',
reviewPlaceholder: 'تحصل المراجعات الأكثر تفصيلاً على مزيد من الرؤية ...',
submit: 'ارسال',
noWorriesText: 'لا تقلق، دعنا نساعدك!',
yourEmail: 'بريدك الإلكتروني',
send: 'ارسال',
apply: 'تطبيق',
checkEmail: 'تحقق من بريدك الإلكتروني للحصول على رابط إعادة تعيين كلمة المرور',
languageText: 'الرجاء تحديد اللغة المطلوبة',
countryCodePickerTranslation: 'العربية',
countryCodeSelect: 'اختر رمز البلد',
paymentNotSupported: 'طريقة الدفع هذه لا تدعم هذه العملة',
loginOrCreateAccount: 'تسجيل الدخول / إنشاء حساب',
unReadReviews: 'لا توجد مراجعات حتى الآن!',
unReadOrders: 'لا توجد طلبات حتى الآن!',
error: 'خطأ',
noMoreItems: 'لا يوجد المزيد من العناصر في المخزون',
hungry: 'جائع',
emptyCartBtn: 'العودة إلى الطعام',
subTotal: 'المجموع الفرعي',
deliveryFee: 'رسوم التوصيل',
haveVoucher: 'هل لديك قسيمة؟',
remove: 'ازالة',
change: 'تغيير',
condition1: 'باستكمال هذا الطلب، أوافق على جميع الشروط والأحكام.',
condition2:
'أوافق وأطالبك بتنفيذ الخدمة المطلوبة قبل نهاية فترة الإلغاء. أنا أدرك أنه بعد الإكمال الكامل للخدمة أفقد حق التراجع عن الشراء.',
orderBtn: 'تقديم الطلب',
coupanApply: 'تم تطبيق خصم القسيمة',
coupanFailed: 'القسيمة غير متوفرة',
invalidCoupan: 'قسيمة غير صالحة',
validateItems: 'أضف عناصر إلى العربة قبل الدفع',
validateDelivery: 'تعيين عنوان التسليم قبل الدفع',
language: 'اللغة',
getUpdatesText: 'احصل على تحديثات حول حالة طلبك!',
delAcc: 'حذف الحساب',
delAccText: 'هل أنت متأكد أنك تريد حذف الحساب؟',
cancel: 'إلغاء',
receiveOffers: 'تلقي عروض خاصة',
notificationUpdate: "تم تحديث حالة الإشعار",
notificationsNotWorking: "الإشعارات لا تعمل على المحاكاة",
loginOrCreateAcc: "تسجيل الدخول / إنشاء حساب",
welcome: "مرحبا",
noItems: 'لا توجد عناصر',
featured: 'متميز',
filters: 'التصفية',
reset: 'إعادة تعيين',
showSaleItems: 'إظهار العناصر المخفضة فقط',
showStockItems: 'إظهار العناصر المتوفرة فقط',
priceRange: 'نطاق السعر',
sorting: 'الفرز',
applyFilter: 'تطبيق التصفية',
close: 'إغلاق',
phoneNumberRequired: 'رقم الهاتف مطلوب',
phoneNumberMissing: 'رقم الهاتف مفقود',
userInfoUpdated: 'تم تحديث معلومات المستخدم',
nameReq: 'الاسم مطلوب',
minWords: 'يسمح بأقل 11 وأقصى 15 حرفًا',
rightsReserved: 'جميع الحقوق محفوظة لشركة Enatega',
changePass: 'تغيير كلمة المرور',
currentPass: 'كلمة المرور الحالية',
passReq: 'كلمة المرور مطلوبة',
newPass: 'كلمة المرور الجديدة',
invalidPass: 'كلمة مرور غير صالحة',
passChange: 'تم تحديث كلمة المرور',
noOrdersFound: 'لا توجد طلبات',
startShopping: 'ابدأ التسوق',
reOrder: 'إعادة الطلب',
smthWrong: 'هناك خطأ ما',
noOrdersAssigned: 'لا توجد طلبات معينة بعد!',
oldOrder: 'طلب قديم',
activeOrder: 'طلب نشط',
idVar: 'المعرف: ',
addressUpdated: 'تم تحديث العنوان',
labelAs: 'التسمية ك',
addressReq: 'عنوان التسليم مطلوب',
deliveryDetailsReq: 'تفاصيل التسليم مطلوبة',
locaPermission: 'لم يتم منح إذن الموقع',
addressAdded: 'تمت إضافة العنوان',
productPage: 'صفحة المنتج',
docs: 'المستندات',
blog: 'المدونة',
aboutUs: 'عنا',
myVouchers: 'قسائمي',
typeVoucherCode: 'اكتب رمز القسيمة',
enterVoucherCode: 'أدخل رمز القسيمة الخاص بك',
status: 'الحالة',
anySuggestion: 'هل لديك أي اقتراح؟',
reviewRegarding: 'مراجعة بخصوص طلبك؟',
writeReview: 'اكتب مراجعة',
chatWithRider: 'الدردشة مع المتسلم',
signupGoogle: 'التسجيل باستخدام Google',
signupEmail: 'التسجيل باستخدام البريد الإلكتروني',
signup: 'تسجيل',
signupApple: 'التسجيل باستخدام Apple',
alreadyMember: 'عضو بالفعل؟ سجل الدخول',
enterUsername: 'أدخل البريد الإلكتروني وكلمة المرور',
createNewAcc: 'إنشاء حساب جديد',
emailphoneReq: 'البريد الإلكتروني / الهاتف مطلوب',
invalidMail: 'بريد إلكتروني / هاتف غير صالح',
passReq: 'كلمة المرور مطلوبة',
cantLogin: 'لا يمكنك تسجيل الدخول، هذا الحساب محذوف!',
orderPending: 'طلبك لا يزال معلقًا.',
prepFood: 'المطعم يحضر الطعام.',
riderOnWay: 'المتسلم في طريقه.',
orderDelivered: 'تم تسليم الطلب.',
completeOrder: 'تم الانتهاء من الطلب.',
PENDING: 'معلق',
ACCEPTED: 'مقبول',
PICKED: 'مستلم',
DELIVERED: 'مسلم',
COMPLETED: 'اكتمل',
'Default': 'الافتراضي',
'Ascending (A-Z)': 'تصاعدي (أ-ي)',
'Descending (Z-A)': 'تنازلي (ي-أ)',
'Price (Low - High)': 'السعر (منخفض - مرتفع)',
'Price (High - Low)': 'السعر (مرتفع - منخفض)',
Home: 'الرئيسية',
Work: 'العمل',
Other: 'آخر',
NoStock: 'نفاذ الكمية',
ItemOutOfStock: 'العنصر غير متوفر حالياً',
SelectLanguage: 'اختر اللغة',
Done: 'تم',
Cancel: 'إلغاء',
NoFoods: 'لا توجد أطعمة',
CartIsEmpty: 'السلة فارغة.',
SetPaymentMethod: 'يرجى تحديد وسيلة الدفع قبل الخروج',
AnErrorOccured: 'حدث خطأ. الرجاء المحاولة مرة أخرى',
ResetPasswordLinkSent: 'تم إرسال رابط إعادة تعيين كلمة المرور إلى بريدك الإلكتروني',
LocationPermissionNotGranted: 'لم يتم منح إذن الموقع',
NoFooditemFound: 'لم يتم العثور على عنصر طعام',
}

View File

@ -136,5 +136,108 @@ export const de = {
coupanFailed: 'Gutschein nicht verfügbar', coupanFailed: 'Gutschein nicht verfügbar',
invalidCoupan: 'Ungültiger Gutschein', invalidCoupan: 'Ungültiger Gutschein',
validateItems: 'Artikel vor dem Auschecken in den Warenkorb legen', validateItems: 'Artikel vor dem Auschecken in den Warenkorb legen',
validateDelivery: 'Stellen Sie die Lieferadresse vor dem Auschecken ein' validateDelivery: 'Stellen Sie die Lieferadresse vor dem Auschecken ein',
language: 'Sprache',
getUpdatesText: 'Erhalten Sie Updates zum Bestellstatus!',
delAcc: 'Konto löschen',
delAccText: 'Sind Sie sicher, dass Sie das Konto löschen möchten?',
cancel: 'Abbrechen',
receiveOffers: 'Spezielle Angebote erhalten',
notificationUpdate: 'Benachrichtigungsstatus aktualisiert',
notificationsNotWorking: "Benachrichtigungen funktionieren nicht im Simulator",
loginOrCreateAcc: "Anmelden/Konto erstellen",
welcome: "Willkommen",
titleSettings: 'Einstellungen',
home: 'Startseite',
noItems: 'Kein Artikel gefunden',
featured: 'Vorgestellt',
filters: 'Filter',
reset: 'Zurücksetzen',
showSaleItems: 'Nur Verkaufsartikel anzeigen',
showStockItems: 'Nur Lagerartikel anzeigen',
priceRange: 'Preisspanne',
sorting: 'Sortierung',
applyFilter: 'Filter anwenden',
close: 'Schließen',
phoneNumberRequired: "Telefonnummer ist erforderlich",
phoneNumberMissing: "Telefonnummer fehlt",
userInfoUpdated: "Benutzerinformationen aktualisiert",
nameReq: "Name ist erforderlich",
minWords: "Mindestens 11 und maximal 15 Zeichen erlaubt",
rightsReserved: "Alle Rechte vorbehalten von Enatega",
changePass: "Passwort ändern",
currentPass: "Aktuelles Passwort",
passReq: "Passwort ist erforderlich",
newPass: "Neues Passwort",
apply: "Anwenden",
invalidPass: "Ungültiges Passwort",
passChange: "Passwort aktualisiert",
noOrdersFound: "Keine Bestellungen gefunden",
startShopping: "Mit dem Einkaufen beginnen",
reOrder: "Erneut bestellen",
smthWrong: "Etwas ist falsch",
noOrdersAssigned: "Noch keine Bestellungen zugewiesen!",
oldOrder: "Alte Bestellung",
activeOrder: "Aktive Bestellung",
idVar: 'ID: ',
addressUpdated: 'Adresse aktualisiert',
labelAs: 'Als bezeichnen',
addressReq: 'Lieferadresse erforderlich',
deliveryDetailsReq: 'Lieferdetails erforderlich',
locaPermission: 'Standortberechtigung nicht erteilt',
addressAdded: 'Adresse hinzugefügt',
productPage: 'Produktseite',
docs: 'Dokumente',
blog: 'Blog',
aboutUs: 'Über uns',
myVouchers: 'Meine Gutscheine',
typeVoucherCode: "Gutscheincode eingeben",
enterVoucherCode: "Geben Sie Ihren Gutscheincode ein",
status: 'Status',
anySuggestion: 'Irgendwelche Vorschläge?',
reviewRegarding: 'Bewertung zu Ihrer Bestellung?',
writeReview: 'Eine Bewertung schreiben',
chatWithRider: 'Mit dem Fahrer chatten',
signupGoogle: 'Mit Google anmelden',
signupEmail: 'Anmeldung mit E-Mail',
signup: 'Anmelden',
signupApple: 'Mit Apple anmelden',
alreadyMember: 'Bereits Mitglied? Einloggen',
enterUsername: 'Geben Sie Ihre E-Mail-Adresse und Ihr Passwort ein',
createNewAcc: 'Neues Konto erstellen',
emailphoneReq: "E-Mail/Telefonnummer ist erforderlich",
invalidMail: "Ungültige E-Mail/Telefonnummer",
passReq: "Passwort ist erforderlich",
cantLogin: "Anmeldung nicht möglich, dieses Konto wurde gelöscht!",
orderPending: "Ihre Bestellung wird noch bearbeitet.",
prepFood: "Das Restaurant bereitet das Essen vor.",
riderOnWay: "Der Fahrer ist unterwegs.",
orderDelivered: "Die Bestellung wurde geliefert.",
completeOrder: "Die Bestellung ist abgeschlossen.",
PENDING: "AUSSTEHEND",
ACCEPTED: 'AKZEPTIERT',
PICKED: "ABGEHOLT",
DELIVERED: "GELIEFERT",
COMPLETED: "ABGESCHLOSSEN",
'Default': 'Standaard',
'Ascending (A-Z)': 'Oplopend (A-Z)',
'Descending (Z-A)': 'Aflopend (Z-A)',
'Price (Low - High)': 'Prijs (Laag - Hoog)',
'Price (High - Low)': 'Prijs (Hoog - Laag)',
Home: 'Thuis',
Work: 'Werk',
Other: 'Anders',
NoStock: 'Geen Voorraad',
ItemOutOfStock: 'Artikel uit voorraad',
SelectLanguage: 'Selecteer Taal',
Done: 'Voltooid',
Cancel: 'Annuleren',
NoFoods: 'Geen voedsel',
CartIsEmpty: 'Winkelwagen is leeg.',
SetPaymentMethod: 'Stel betalingsmethode in voordat u afrekent',
AnErrorOccured: 'Er is een fout opgetreden. Probeer het opnieuw',
ResetPasswordLinkSent: 'Reset wachtwoordlink verzonden naar uw e-mail',
LocationPermissionNotGranted: 'Locatietoestemming niet verleend',
NoFooditemFound: 'Geen voedingsmiddel gevonden',
} }

View File

@ -139,5 +139,104 @@ export const en = {
coupanFailed: 'Coupon Unavailable', coupanFailed: 'Coupon Unavailable',
invalidCoupan: 'Invalid Coupon', invalidCoupan: 'Invalid Coupon',
validateItems: 'Add items to cart before checkout', validateItems: 'Add items to cart before checkout',
validateDelivery: 'Set delivery address before checkout' validateDelivery: 'Set delivery address before checkout',
language: 'Language',
getUpdatesText: 'Get updates on your order status!',
delAcc: 'Delete Account',
delAccText: 'Are you Sure you want to delete Account?',
cancel:'Cancel',
receiveOffers: 'Receive Special Offers',
notificationUpdate: "Notification Status Updated",
notificationsNotWorking: "Notification do not work on simulator",
loginOrCreateAcc: "Login/Create Account",
welcome: "Welcome",
noItems: 'No item found',
featured: 'Featured',
filters: 'Filters',
reset: 'Reset',
showSaleItems: 'Show sale items only',
showStockItems: 'Show stock items only',
priceRange: 'Price Range',
sorting: 'Sorting',
applyFilter: 'Apply Filter',
close: 'Close',
phoneNumberRequired: "Phone number is required",
phoneNumberMissing: "Phone Number is missing",
userInfoUpdated: "User's Info Updated",
nameReq: "Name is required",
minWords: "Minimum 11 and maximum 15 characters allowed",
rightsReserved: "All rights are reserved by Enatega",
changePass: "Change Password",
currentPass: "Current Password",
passReq: 'Password is required',
newPass: "New Password",
invalidPass: 'Invalid password',
passChange: 'Password Updated',
noOrdersFound: 'No Orders Found',
startShopping: 'Start Shopping',
reOrder: "Re-Order",
smthWrong: "Something is worng",
noOrdersAssigned: "No Orders Assigned yet!",
oldOrder: "Old Order",
activeOrder: "Active Order",
idVar: 'ID: ',
addressUpdated: 'Address updated',
labelAs: 'Label as',
addressReq: 'Delivery address is required',
deliveryDetailsReq: 'Delivery details is required',
locaPermission: 'Location permission not granted',
addressAdded: 'Address added',
productPage: 'Product Page',
docs: 'Docs',
blog: 'Blog',
aboutUs: 'About Us',
myVouchers: 'My Vouchers',
typeVoucherCode: "TYPe voucher code",
enterVoucherCode: "Enter your voucher code",
status: 'Status',
anySuggestion: 'Any suggestion?',
reviewRegarding: 'Review regarding your order?',
writeReview: 'Write a review',
chatWithRider: 'Chat with Rider',
signupGoogle: 'Signup with Google',
signupEmail: 'Signup using Email',
signup: 'Signup',
signupApple: 'Signup with Apple',
alreadyMember: 'Already a member? Log in',
enterUsername: 'Enter your Email and Password',
createNewAcc: 'Create New Account',
emailphoneReq: "Email/Phone is required",
invalidMail: "Invalid Email/Phone",
passReq: "Password is required",
cantLogin: "Can't Login,This Account is Deleted!",
orderPending: "Your order is still pending.",
prepFood: "Restaurant is preparing Food.",
riderOnWay: "Rider is on the way.",
orderDelivered: "Order is delivered.",
completeOrder: "Order is completed.",
PENDING: "PENDING",
ACCEPTED: 'ACCEPTED',
PICKED: "PICKED",
DELIVERED: "DELIVERED",
COMPLETED: "COMPLETED",
'Default': 'Default',
'Ascending (A-Z)': 'Ascending (A-Z)',
'Descending (Z-A)': 'Descending (Z-A)',
'Price (Low - High)': 'Price (Low - High)',
'Price (High - Low)': 'Price (High - Low)',
Home: 'Home',
Work: 'Work',
Other: 'Other',
NoStock: 'No Stock',
ItemOutOfStock: 'Item out of stock',
SelectLanguage: 'Select Language',
Done: 'Done',
Cancel: 'Cancel',
NoFoods: 'No Foods',
CartIsEmpty: 'Cart is empty.',
SetPaymentMethod: 'Set payment method before checkout',
AnErrorOccured: 'An error occured. Please try again',
ResetPasswordLinkSent: 'Reset password link sent on your email',
LocationPermissionNotGranted: 'Location permission not granted',
NoFooditemFound: 'No food item found'
} }

View File

@ -137,5 +137,108 @@ export const fr = {
coupanFailed: 'Coupon non disponible', coupanFailed: 'Coupon non disponible',
invalidCoupan: 'Coupon non valide', invalidCoupan: 'Coupon non valide',
validateItems: 'Ajouter des articles au panier avant le paiement', validateItems: 'Ajouter des articles au panier avant le paiement',
validateDelivery: "Définir l'adresse de livraison avant le paiement" validateDelivery: "Définir l'adresse de livraison avant le paiement",
language: 'Langue',
getUpdatesText: 'Obtenez des mises à jour sur le statut de votre commande !',
delAcc: 'Supprimer le compte',
delAccText: 'Êtes-vous sûr de vouloir supprimer le compte ?',
cancel: 'Annuler',
receiveOffers: 'Recevoir des offres spéciales',
notificationUpdate: 'Statut de notification mis à jour',
notificationsNotWorking: "Les notifications ne fonctionnent pas sur le simulateur",
loginOrCreateAcc: "Connexion/Créer un compte",
welcome: "Bienvenue",
titleSettings: 'Paramètres',
home: 'Accueil',
noItems: 'Aucun élément trouvé',
featured: 'En vedette',
filters: 'Filtres',
reset: 'Réinitialiser',
showSaleItems: 'Afficher uniquement les articles en vente',
showStockItems: 'Afficher uniquement les articles en stock',
priceRange: 'Plage de prix',
sorting: 'Tri',
applyFilter: 'Appliquer le filtre',
close: 'Fermer',
phoneNumberRequired: "Numéro de téléphone requis",
phoneNumberMissing: "Numéro de téléphone manquant",
userInfoUpdated: "Informations de l'utilisateur mises à jour",
nameReq: "Nom requis",
minWords: "Minimum 11 et maximum 15 caractères autorisés",
rightsReserved: "Tous les droits sont réservés par Enatega",
changePass: "Changer le mot de passe",
currentPass: "Mot de passe actuel",
passReq: "Mot de passe requis",
newPass: "Nouveau mot de passe",
apply: "Appliquer",
invalidPass: "Mot de passe invalide",
passChange: "Mot de passe mis à jour",
noOrdersFound: "Aucune commande trouvée",
startShopping: "Commencer les achats",
reOrder: "Recommander",
smthWrong: "Quelque chose ne va pas",
noOrdersAssigned: "Aucune commande attribuée pour le moment !",
oldOrder: "Ancienne commande",
activeOrder: "Commande active",
idVar: 'ID : ',
addressUpdated: 'Adresse mise à jour',
labelAs: 'Étiqueter comme',
addressReq: 'Adresse de livraison requise',
deliveryDetailsReq: 'Détails de livraison requis',
locaPermission: 'Autorisation de localisation non accordée',
addressAdded: 'Adresse ajoutée',
productPage: 'Page produit',
docs: 'Docs',
blog: 'Blog',
aboutUs: 'À propos de nous',
myVouchers: 'Mes bons',
typeVoucherCode: "Saisir le code du bon",
enterVoucherCode: "Entrez votre code de bon",
status: 'Statut',
anySuggestion: 'Des suggestions ?',
reviewRegarding: 'Avis concernant votre commande ?',
writeReview: 'Écrire un avis',
chatWithRider: 'Discuter avec le livreur',
signupGoogle: 'Inscription avec Google',
signupEmail: 'Inscription par e-mail',
signup: 'Sinscrire',
signupApple: 'Inscription avec Apple',
alreadyMember: 'Déjà membre ? Se connecter',
enterUsername: 'Entrez votre adresse e-mail et votre mot de passe',
createNewAcc: 'Créer un nouveau compte',
emailphoneReq: "E-mail/Téléphone requis",
invalidMail: "E-mail/Téléphone invalide",
passReq: "Mot de passe requis",
cantLogin: "Impossible de se connecter, ce compte a été supprimé !",
orderPending: "Votre commande est en attente.",
prepFood: "Le restaurant prépare la nourriture.",
riderOnWay: "Le livreur est en route.",
orderDelivered: "La commande a été livrée.",
completeOrder: "La commande est terminée.",
PENDING: "EN ATTENTE",
ACCEPTED: 'ACCEPTÉE',
PICKED: "ENLEVÉE",
DELIVERED: "LIVRÉE",
COMPLETED: "TERMINÉE",
'Default': 'Par défaut',
'Ascending (A-Z)': 'Croissant (A-Z)',
'Descending (Z-A)': 'Décroissant (Z-A)',
'Price (Low - High)': 'Prix (Bas - Élevé)',
'Price (High - Low)': 'Prix (Élevé - Bas)',
Home: 'Accueil',
Work: 'Travail',
Other: 'Autre',
NoStock: 'Stock épuisé',
ItemOutOfStock: 'Article en rupture de stock',
SelectLanguage: 'Sélectionner la langue',
Done: 'Terminé',
Cancel: 'Annuler',
NoFoods: 'Pas de nourriture',
CartIsEmpty: 'Le panier est vide.',
SetPaymentMethod: 'Définissez le mode de paiement avant de passer à la caisse',
AnErrorOccured: 'Une erreur s\'est produite. Veuillez réessayer',
ResetPasswordLinkSent: 'Lien de réinitialisation du mot de passe envoyé sur votre email',
LocationPermissionNotGranted: 'Permission de localisation non accordée',
NoFooditemFound: 'Aucun article alimentaire trouvé',
} }

View File

@ -132,5 +132,108 @@ export const km = {
coupanFailed: 'គូប៉ុងមិនមានទេ', coupanFailed: 'គូប៉ុងមិនមានទេ',
invalidCoupan: 'គូប៉ុងមិនត្រឹមត្រូវ', invalidCoupan: 'គូប៉ុងមិនត្រឹមត្រូវ',
validateItems: 'បន្ថែមរបស់របរទៅរទេះមុនពេលឆែក', validateItems: 'បន្ថែមរបស់របរទៅរទេះមុនពេលឆែក',
validateDelivery: 'កំណត់អាសយដ្ឋានដឹកជញ្ជូនមុនពេលពិនិត្យចេញ' validateDelivery: 'កំណត់អាសយដ្ឋានដឹកជញ្ជូនមុនពេលពិនិត្យចេញ',
language: 'ភាសា',
getUpdatesText: 'ទទួល​បាន​ការ​ធ្វើ​បច្ចុប្បន្ន​ភាព​លើ​ស្ថាន​ភាព​ការ​បញ្ជាទិញ​របស់​អ្នក!',
delAcc: 'លុប​គណនី',
delAccText: 'តើ​អ្នក​ប្រាកដ​ថា​តើ​ចង់​លុប​គណនី​ឬ​ទេ?',
cancel: 'បោះបង់',
receiveOffers: 'ទទួល​បាន​ការ​ផ្តល់​ជូន​ពិសេស',
notificationUpdate: 'ការ​ប្រកាស​ការ​ជូន​ដំណឹង​ត្រូវបាន​ធ្វើ​បច្ចុប្បន្ន',
notificationsNotWorking: "ការ​ជូន​ដំណឹង​មិន​ដំណើរ​ការ​លើ​ម៉ាស៊ីន​សម្រាប់​ប្រើប្រាស់តំណល",
loginOrCreateAcc: "ចូល​ប្រើ/បង្កើត​គណនី",
welcome: "ស្វាគមន៍",
titleSettings: 'ការ​កំណត់',
home: 'ទំព័រ​ដើម',
noItems: 'រក​មិន​ឃើញ​ទេ',
featured: 'ផ្សេងៗ',
filters: 'តម្រង',
reset: 'កំណត់​ឡើងវិញ',
showSaleItems: 'បង្ហាញ​ទំនិញ​លក់​តែប៉ុណ្ណោះ',
showStockItems: 'បង្ហាញ​ទំនិញ​ស្តុក​តែប៉ុណ្ណោះ',
priceRange: 'ជម្រើស​តម្លៃ',
sorting: 'តម្រៀបតាម',
applyFilter: 'អនុវត្ត​តម្រង',
close: 'បិទ',
phoneNumberRequired: "ត្រូវការលេខទូរស័ព្ទ",
phoneNumberMissing: "ខុសលេខទូរស័ព្ទ",
userInfoUpdated: "ព័ត៌មានអ្នកប្រើប្រាស់ត្រូវបានធ្វើបច្ចុប្បន្នភាព",
nameReq: "ត្រូវការឈ្មោះ",
minWords: "អត្ថបទអប្បាយបន្ទាប់ពី 11 និងអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណអតិបរិមាណ",
rightsReserved: "រក្សាសិទ្ធិទាំងអស់គ្នាដោយ Enatega",
changePass: "ប្ដូរលេខសម្ងាត់",
currentPass: "លេខសម្ងាត់បច្ចុប្បន្ន",
passReq: "ត្រូវការលេខសម្ងាត់",
newPass: "លេខសម្ងាត់ថ្មី",
apply: "អនុវត្ត",
invalidPass: "លេខសម្ងាត់មិនត្រឹមត្រូវ",
passChange: "លេខសម្ងាត់ត្រូវបានធ្វើបច្ចុប្បន្នភាព",
noOrdersFound: "រកមិនឃើញការបញ្ជាទិញ",
startShopping: "ចាប់ផ្តើមទិញ",
reOrder: "កម្មង់ម្តងទៀត",
smthWrong: "មានអ្វីមួយខុស",
noOrdersAssigned: "មិនទាន់បានចាក់ការបញ្ជាទិញទេ!",
oldOrder: "ការបញ្ជាទិញចាស់",
activeOrder: "ការបញ្ជាទិញដែលមានសកម្ម",
idVar: 'លេខសម្គាល់: ',
addressUpdated: 'អាសយដ្ឋានត្រូវបានធ្វើបច្ចុប្បន្នភាព',
labelAs: 'ស្លាកជាដើម',
addressReq: 'អាសយដ្ឋានការដឹកជញ្ជូនត្រូវការ',
deliveryDetailsReq: 'សេចក្ដីលម្អិតនៃការដឹកជញ្ជូនត្រូវការ',
locaPermission: 'ការអនុញ្ញាតឱ្យតាមដានទីតាំងមិនបានទទួលយក',
addressAdded: 'បាន​បន្ថែម​អាសយដ្ឋាន',
productPage: 'ទំព័រផលិតផល',
docs: 'ឯកសារ',
blog: 'ប្លក់',
aboutUs: 'អំពី​យើង',
myVouchers: 'លេខកូដ​វេបសាយ​របស់​ខ្ញុំ',
typeVoucherCode: "បញ្ចូល​លេខកូដ​វេបសាយ",
enterVoucherCode: "បញ្ចូល​លេខកូដ​វេបសាយ​របស់​អ្នក",
status: 'ស្ថានភាព',
anySuggestion: 'មានអំណាចណាស់មែនទេ?',
reviewRegarding: 'ពិនិត្យឡើងវិញអំពីការបញ្ជាទិញរបស់អ្នក?',
writeReview: 'សរសេរពិន្ទុ',
chatWithRider: 'ជជែកជាមួយអ្នកបើកដំណើរ',
signupGoogle: 'ចុះឈ្មោះជាមួយ Google',
signupEmail: 'ចុះឈ្មោះតាមអ៊ីម៉ែល',
signup: 'ចុះឈ្មោះ',
signupApple: 'ចុះឈ្មោះជាមួយ Apple',
alreadyMember: 'រួចហើយរួចចូលក្នុង',
enterUsername: 'បញ្ចូលអ៊ីម៉ែលរបស់អ្នក និងពាក្យសម្ងាត់',
createNewAcc: 'បង្កើតគណនីថ្មី',
emailphoneReq: "ត្រូវការអ៊ីម៉ែល/លេខទូរស័ព្ទ",
invalidMail: "អ៊ីម៉ែល/លេខទូរស័ព្ទ​មិនត្រឹមត្រូវ",
passReq: "ត្រូវការពាក្យសម្ងាត់",
cantLogin: "មិនអាចចូលបានទេ, គណនីនេះត្រូវបានលុប!",
orderPending: "ការបញ្ជាទិញរបស់អ្នកមិនទាន់ទទួលយកទេ។",
prepFood: "ភោជនីដែលកំពុងរៀបចំអាហារ។",
riderOnWay: "អ្នកបើកដំណើរកំពង់កោះមាន់នៅលើផ្លូវ។",
orderDelivered: "ការបញ្ជាទិញបានដឹកជញ្ជូន។",
completeOrder: "ការបញ្ជាទិញបានបញ្ចប់។",
PENDING: "កំពុងរង់ចាំ",
ACCEPTED: 'បានទទួលយក',
PICKED: "បានជូនយក",
DELIVERED: "បានដឹកជញ្ជូន",
COMPLETED: "បានបញ្ចប់",
'Default': 'លំនាំដើម',
'Ascending (A-Z)': 'កើតឡើង (អ ទំ)',
'Descending (Z-A)': 'ចុះឡើង (ទំ អ)',
'Price (Low - High)': 'តម្លៃ (ទាប - ខ្ពស់)',
'Price (High - Low)': 'តម្លៃ (ខ្ពស់ - ទាប)',
Home: 'ទំព័រដើម',
Work: 'ការងារ',
Other: 'ផ្សេងៗ',
NoStock: 'គ្មាន​ស្តុក',
ItemOutOfStock: 'មុខទំនិញ​អស់​ស្តុក',
SelectLanguage: 'ជ្រើសរើសភាសា',
Done: 'រួចរាល់',
Cancel: 'បោះបង់',
NoFoods: 'មិនមានអាហារ',
CartIsEmpty: 'រទេះទម្ងន់។',
SetPaymentMethod: 'កំណត់របស់មុនពេលចេញ',
AnErrorOccured: 'មានកំហុសមិនរួចហើយ។ សូមព្យាយាមម្តងទៀត',
ResetPasswordLinkSent: 'បានផ្ញើតំណរពេលបានប្ដូរពាក្យសម្ងាត់របស់អ្នកហើយ',
LocationPermissionNotGranted: 'មិនបានទទួលស្ថានភាពទីតាំង',
NoFooditemFound: 'មិនបានរកឃើញវាលម្ហូប',
} }

View File

@ -128,5 +128,108 @@ export const zh = {
coupanFailed: '优惠券不可用', coupanFailed: '优惠券不可用',
invalidCoupan: '优惠券无效', invalidCoupan: '优惠券无效',
validateItems: '结帐前将商品添加到购物车', validateItems: '结帐前将商品添加到购物车',
validateDelivery: '结帐前设置送货地址' validateDelivery: '结帐前设置送货地址',
language: '语言',
getUpdatesText: '获取订单状态更新!',
delAcc: '删除账户',
delAccText: '您确定要删除账户吗?',
cancel: '取消',
receiveOffers: '接收特别优惠',
notificationUpdate: '通知状态已更新',
notificationsNotWorking: "通知在模拟器上无法工作",
loginOrCreateAcc: "登录/创建帐户",
welcome: "欢迎",
titleSettings: '设置',
home: '主页',
noItems: '未找到物品',
featured: '特色',
filters: '筛选',
reset: '重置',
showSaleItems: '仅显示特价商品',
showStockItems: '仅显示有库存商品',
priceRange: '价格范围',
sorting: '排序',
applyFilter: '应用筛选',
close: '关闭',
phoneNumberRequired: "需要电话号码",
phoneNumberMissing: "缺少电话号码",
userInfoUpdated: "用户信息已更新",
nameReq: "需要姓名",
minWords: "最少11个字符最多15个字符",
rightsReserved: "版权所有Enatega保留所有权利",
changePass: "更改密码",
currentPass: "当前密码",
passReq: "需要密码",
newPass: "新密码",
apply: "应用",
invalidPass: "无效密码",
passChange: "密码已更新",
noOrdersFound: "未找到订单",
startShopping: "开始购物",
reOrder: "重新下单",
smthWrong: "出现问题",
noOrdersAssigned: "尚未分配订单!",
oldOrder: "旧订单",
activeOrder: "活跃订单",
idVar: 'ID',
addressUpdated: '地址已更新',
labelAs: '标记为',
addressReq: '需要交付地址',
deliveryDetailsReq: '需要交付细节',
locaPermission: '未授予位置权限',
addressAdded: '已添加地址',
productPage: '产品页面',
docs: '文档',
blog: '博客',
aboutUs: '关于我们',
myVouchers: '我的优惠券',
typeVoucherCode: "输入优惠券代码",
enterVoucherCode: "输入您的优惠券代码",
status: '状态',
anySuggestion: '有什么建议吗?',
reviewRegarding: '关于您的订单的评论?',
writeReview: '撰写评论',
chatWithRider: '与骑手聊天',
signupGoogle: '使用 Google 注册',
signupEmail: '使用电子邮件注册',
signup: '注册',
signupApple: '使用 Apple 注册',
alreadyMember: '已经是会员?登录',
enterUsername: '输入您的电子邮件和密码',
createNewAcc: '创建新帐户',
emailphoneReq: "需要电子邮件/电话号码",
invalidMail: "无效的电子邮件/电话号码",
passReq: "需要密码",
cantLogin: "无法登录,此帐户已被删除!",
orderPending: "您的订单仍在等待中。",
prepFood: "餐厅正在准备食物。",
riderOnWay: "骑手正在途中。",
orderDelivered: "订单已送达。",
completeOrder: "订单已完成。",
PENDING: "待处理",
ACCEPTED: '已接受',
PICKED: "已取货",
DELIVERED: "已送达",
COMPLETED: "已完成",
'Default': '默认',
'Ascending (A-Z)': '升序 (A-Z)',
'Descending (Z-A)': '降序 (Z-A)',
'Price (Low - High)': '价格 (低 - 高)',
'Price (High - Low)': '价格 (高 - 低)',
Home: '首页',
Work: '工作',
Other: '其他',
NoStock: '无库存',
ItemOutOfStock: '商品缺货',
SelectLanguage: '选择语言',
Done: '完成',
Cancel: '取消',
NoFoods: '没有食物',
CartIsEmpty: '购物车是空的。',
SetPaymentMethod: '请在结账前设置付款方式',
AnErrorOccured: '发生错误。请重试',
ResetPasswordLinkSent: '重置密码链接已发送到您的电子邮件',
LocationPermissionNotGranted: '未授予位置权限',
NoFooditemFound: '找不到食品项目',
} }

3
RiderApp/.gitignore vendored
View File

@ -1 +1,2 @@
/node_modules /node_modules
/dist

View File

@ -7,10 +7,11 @@ import { fr } from './languages/fr'
import { km } from './languages/km' import { km } from './languages/km'
import { zh } from './languages/zh' import { zh } from './languages/zh'
import { de } from './languages/de' import { de } from './languages/de'
import { ar } from './languages/ar'
i18n.initAsync = async () => { i18n.initAsync = async () => {
i18n.fallbacks = true i18n.fallbacks = true
i18n.translations = { fr, en, km, zh, de } i18n.translations = { fr, en, km, zh, de, ar }
// i18n.locale = 'km' // i18n.locale = 'km'
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
const lang = await AsyncStorage.getItem('enatega-language') const lang = await AsyncStorage.getItem('enatega-language')

153
RiderApp/languages/ar.js Normal file
View File

@ -0,0 +1,153 @@
export const ar = {
title0: 'اللغة المختارة',
subtitle0: 'الإنجليزية',
description0: 'حدد أي لغة تفضلها لتغيير محتوى التطبيق إلى اللغة التي تحتاجها.',
title1: 'لذيذ',
subtitle1: 'الإفطار',
description1:
'الإفطار هو كل شيء. البداية، الشيء الأول. إنها الحضن الذي يعبر عن التزامك بيوم جديد، حياة مستمرة.',
title2: 'منعش',
subtitle2: 'المشروبات',
description2:
'الصمت الحقيقي هو راحة العقل، وهو للروح ما يعنيه النوم للجسم، تغذية وتجديد.',
title3: 'لذيذ',
subtitle3: 'الآيس كريم',
description3:
'العمر لا يقلل من خيبة الأمل الشديدة لسقوط مغرفة من الآيس كريم من السطل',
getStarted: 'ابدأ!',
welcome: 'مرحبًا',
loginBtn: 'تسجيل الدخول',
registerBtn: 'التسجيل',
name: 'الاسم',
phone: 'الهاتف',
email: 'البريد الإلكتروني',
emailphone: 'البريد الإلكتروني أو الهاتف',
username: 'اسم المستخدم',
password: 'كلمة المرور',
deliveryAddress: 'عنوان التسليم',
registerText: 'أو سجل مع',
forgotPassword: 'نسيت كلمة المرور؟',
loginText: 'أو قم بتسجيل الدخول باستخدام',
deliveryLocation: 'قم بتشغيل الموقع لنتمكن من إرسال لك طعمًا لا ينتهي من الطعام اللذيذ.',
locationBtn: 'تشغيل الموقع',
locationPermissionDenied: 'تم رفض إذن الوصول إلى الموقع',
cameraRollPermissionDenied: 'تم رفض إذن الوصول إلى الصور',
locationOff: 'قم بتشغيل الموقع وحاول مرة أخرى',
titleLanguage: 'تغيير اللغة',
titleMenu: 'القائمة',
titleOrders: 'طلباتي',
NewOrders: 'طلبات جديدة',
titleNotifications: 'الإشعارات',
titleReviews: 'التقييمات',
titleSettings: 'الإعدادات',
titleHelp: 'المساعدة',
titleLogout: 'تسجيل الخروج',
titleCart: 'عربة التسوق الخاصة بي',
titlePayment: 'الدفع',
orderId: 'رقم الطلب',
totalOrderAmount: 'مجموع مبلغ الطلب',
reOrder: 'إعادة الطلب',
unReadNotifications: 'لا توجد إشعارات غير مقروءة',
upload: 'تحميل',
saveBtn: 'حفظ',
emailUs: 'راسلنا عبر البريد الإلكتروني على',
question1: 'أين يمكننا العثور على الطعام؟',
question2: 'كيف يمكننا التواصل؟',
question3: 'كيف يمكنني دفع مبلغ التوصيل للشخص؟',
question4: 'هل الخدمة متاحة في مدينتي؟',
answer1:
'يمكنك العثور على الطعام في أقرب متجر دون دفع أي شيء لخدمة العملاء. تكلفتنا منخفضة للغاية مقارنة بالآخرين.',
answer2: 'يمكنك التواصل معنا عبر البريد الإلكتروني، رقم الهاتف أو موقع الويب الخاص بنا.',
answer3:
'يمكنك دفع مبلغ التوصيل شخصيًا أو الدفع عبر الإنترنت أيضًا عبر بطاقة الائتمان أو الخصم.',
answer4:
'حاليًا هذه الخدمة متاحة في مدن إسلام أباد وكراتشي، يمكنك التواصل معنا للاستفادة من هذه الخدمة في مدينتك.',
add: 'إضافة',
quantity: 'الكمية',
size: 'الحجم',
addToCart: 'إضافة إلى العربة',
orderNow: 'طلب الآن',
addToCartMessage: 'تمت الإضافة إلى العربة',
emptyCart: 'لا توجد عناصر في العربة',
itemTotal: 'إجمالي العنصر',
delvieryCharges: 'رسوم التوصيل',
total: 'الإجمالي',
contactInfo: 'معلومات الاتصال',
deliveryAddressmessage: 'تعيين عنوان التسليم',
proceedCheckout: 'المتابعة إلى الدفع',
paymentText: 'كيف ترغب في الدفع؟',
checkout: 'الدفع',
header_title1: 'بطاقة الائتمان/بطاقة الخصم',
header_subscript1: 'الدفع باستخدام بطاقة الائتمان أو الخصم',
header_title2: 'PayPal',
header_subscript2: 'الدفع عبر الإنترنت باستخدام PayPal',
header_title3: 'الدفع عند الاستلام',
header_subscript3: 'الدفع عند استلام العنصر',
thankYou: 'شكرًا لك!',
orderConfirmed: 'تم تأكيد طلبك',
orderAmount: 'مبلغ طلبك',
orderDetail: 'تفاصيل الطلب',
paymentMethod: 'طريقة الدفع',
trackOrder: 'تتبع الطلب',
backToMenu: 'العودة إلى القائمة',
foodItem: 'عنصر طعام',
deliveredTo: 'تم التوصيل إلى',
writeAReview: 'كتابة تقييم',
orderReceived: 'تم استلام الطلب',
cancelled: 'تم الإلغاء',
foodPreparing: 'يتم إعداد الطعام',
Delivered: 'تم التوصيل',
rateAndReview: 'قيم وأكتب تقييمًا',
reviewPlaceholder: 'التقييمات المفصلة تحصل على رؤية أكبر...',
submit: 'إرسال',
noWorriesText: 'لا تقلق، دعنا نساعدك!',
yourEmail: 'بريدك الإلكتروني',
send: 'إرسال',
apply: 'تقديم الطلب',
checkEmail: 'تحقق من بريدك الإلكتروني للحصول على رابط إعادة تعيين كلمة المرور',
languageText: 'الرجاء اختيار اللغة المطلوبة',
countryCodePickerTranslation: 'eng',
countryCodeSelect: 'اختر رمز البلد',
paymentNotSupported: 'لا يدعم هذا الطريقة الدفع هذه العملة',
Orders: 'الطلبات',
deliveryTime: 'وقت التسليم',
myOrders: 'طلباتي',
newOrders: 'طلبات جديدة',
titleChat: 'دردشة',
NoNewOrder: 'لا يوجد طلب جديد',
Somethingisworng: 'هناك خطأ',
PENDING: 'قيد الانتظار',
ACCEPTED: 'تم القبول',
PICKED: 'تم الاختيار',
DELIVERED: 'تم التوصيل',
COMPLETED: 'تم الانتهاء',
YourOrderID: 'رقم طلبك',
ProductPage: 'صفحة المنتج',
Docs: 'وثائق',
Blog: 'مدونة',
AboutUs: 'معلومات عنا',
Done: 'تم',
Cancel: 'إلغاء',
Usernameisrequired: 'اسم المستخدم مطلوب',
Passwordisrequired: 'كلمة المرور مطلوبة',
Loggedin: 'تم تسجيل الدخول',
EnteryourEmailandPassword: 'أدخل بريدك الإلكتروني وكلمة المرور',
EmailorPhone: 'البريد الإلكتروني أو الهاتف',
Password: 'كلمة المرور',
NoOrdersAssignedyet: 'لا توجد طلبات تم تعيينها حتى الآن',
Loadingorders: 'جاري تحميل الطلبات',
Orderassginedtootherrider: 'الطلب تم تعيينه لسائق آخر',
CustomerDetails: 'تفاصيل العميل',
Contact: 'اتصل',
DelvieryLocation: 'موقع التسليم',
OrderDetails: 'تفاصيل الطلب',
Subtotal: 'المجموع الفرعي',
Assigntome: 'تعيين لي',
'About Us': 'عنا',
'Product Page': 'صفحة المنتج',
Order: 'طلب',
OrderMarkedAs: 'تم وضع علامة الطلب كـ',
titleLogin: 'تسجيل الدخول',
Picked: 'تم الاختيار'
}

View File

@ -98,7 +98,7 @@ export const de = {
orderReceived: 'Bestellung erhalten', orderReceived: 'Bestellung erhalten',
cancelled: 'Abgebrochen', cancelled: 'Abgebrochen',
foodPreparing: 'Essen wird zubereitet', foodPreparing: 'Essen wird zubereitet',
delivered: 'Geliefert', Delivered: 'Geliefert',
rateAndReview: 'Bewerten und bewerten', rateAndReview: 'Bewerten und bewerten',
reviewPlaceholder: 'Detaillierte Bewertungen erhalten mehr Sichtbarkeit ...', reviewPlaceholder: 'Detaillierte Bewertungen erhalten mehr Sichtbarkeit ...',
submit: 'einreichen', submit: 'einreichen',
@ -111,5 +111,45 @@ export const de = {
languageText: 'Bitte wählen Sie Ihre gewünschte Sprache', languageText: 'Bitte wählen Sie Ihre gewünschte Sprache',
countryCodePickerTranslation: 'deu', countryCodePickerTranslation: 'deu',
countryCodeSelect: 'Ländercode auswählen', countryCodeSelect: 'Ländercode auswählen',
paymentNotSupported: 'Diese Zahlungsmethode unterstützt diese Währung nicht' paymentNotSupported: 'Diese Zahlungsmethode unterstützt diese Währung nicht',
Orders: 'Bestellingen',
deliveryTime: 'Leveringstijd',
myOrders: 'Mijn bestellingen',
newOrders: 'Nieuwe bestellingen',
titleChat: 'Chat',
NoNewOrder: 'Geen nieuwe bestelling',
Somethingisworng: 'Er is iets mis',
PENDING: 'IN AFWACHTING',
ACCEPTED: 'GEACCEPTEERD',
PICKED: 'OPGEHAALD',
DELIVERED: 'GELEVERD',
COMPLETED: 'VOLTOOID',
YourOrderID: 'Uw bestelnummer',
ProductPage: 'Productpagina',
Docs: 'Documenten',
Blog: 'Blog',
AboutUs: 'Over ons',
Done: 'Klaar',
Cancel: 'Annuleren',
Usernameisrequired: 'Gebruikersnaam is verplicht',
Passwordisrequired: 'Wachtwoord is verplicht',
Loggedin: 'Ingelogd',
EnteryourEmailandPassword: 'Voer uw e-mail en wachtwoord in',
EmailorPhone: 'E-mail of telefoon',
Password: 'Wachtwoord',
NoOrdersAssignedyet: 'Nog geen bestellingen toegewezen',
Loadingorders: 'Bestellingen laden',
Orderassginedtootherrider: 'Bestelling toegewezen aan andere bezorger',
CustomerDetails: 'Klantgegevens',
Contact: 'Contact',
DelvieryLocation: 'Leveringslocatie',
OrderDetails: 'Bestelgegevens',
Subtotal: 'Subtotaal',
Assigntome: 'Toewijzen aan mij',
'About Us': 'Over Ons',
'Product Page': 'Product Pagina',
Order: 'Bestelling',
OrderMarkedAs: 'Bestelling gemarkeerd als',
titleLogin: 'Inloggen',
Picked: 'Gekozen',
} }

View File

@ -98,7 +98,7 @@ export const en = {
orderReceived: 'Order Received', orderReceived: 'Order Received',
cancelled: 'Cancelled', cancelled: 'Cancelled',
foodPreparing: 'Food is being prepared', foodPreparing: 'Food is being prepared',
delivered: 'Delivered', Delivered: 'Delivered',
rateAndReview: 'Rate and Review', rateAndReview: 'Rate and Review',
reviewPlaceholder: 'More detailed reviews get more visibility...', reviewPlaceholder: 'More detailed reviews get more visibility...',
submit: 'Submit', submit: 'Submit',
@ -115,5 +115,40 @@ export const en = {
deliveryTime: 'Delivery Time', deliveryTime: 'Delivery Time',
myOrders: 'My Orders', myOrders: 'My Orders',
newOrders: 'New Orders', newOrders: 'New Orders',
titleChat: 'Chat' titleChat: 'Chat',
NoNewOrder: 'No New Order',
Somethingisworng: 'Something is worng',
PENDING: 'PENDING',
ACCEPTED: 'ACCEPTED',
PICKED: 'PICKED',
DELIVERED: 'DELIVERED',
COMPLETED: 'COMPLETED',
YourOrderID: 'Your Order ID',
ProductPage: 'Product Page',
Docs: 'Docs',
Blog: 'Blog',
AboutUs: 'About Us',
Done: 'Done',
Cancel: 'Cancel',
Usernameisrequired: 'Username is required',
Passwordisrequired: 'Password is required',
Loggedin: 'Logged in',
EnteryourEmailandPassword: 'Enter your Email and Password',
EmailorPhone: 'Email or Phone',
Password: 'Password',
NoOrdersAssignedyet: 'No Orders Assigned yet',
Loadingorders: 'Loading orders',
Orderassginedtootherrider: 'Order assgined to other rider',
CustomerDetails: 'Customer Details',
Contact: 'Contact',
DelvieryLocation: 'Delviery Location',
OrderDetails: 'Order Details',
Subtotal: 'Subtotal',
Assigntome: 'Assign to me',
'About Us': 'About Us',
'Product Page': 'Product Page',
Order: 'Order',
OrderMarkedAs: 'Order marked as',
titleLogin: 'Login',
Picked: 'Picked'
} }

View File

@ -98,7 +98,7 @@ export const fr = {
orderReceived: 'Ordre reçu', orderReceived: 'Ordre reçu',
cancelled: 'Annulé', cancelled: 'Annulé',
foodPreparing: 'La nourriture est en cours de préparation', foodPreparing: 'La nourriture est en cours de préparation',
delivered: 'Livré', Delivered: 'Livré',
rateAndReview: 'Notez et évaluez', rateAndReview: 'Notez et évaluez',
reviewPlaceholder: 'Des revues plus détaillées ont plus de visibilité ...', reviewPlaceholder: 'Des revues plus détaillées ont plus de visibilité ...',
submit: 'Soumettre', submit: 'Soumettre',
@ -111,5 +111,45 @@ export const fr = {
languageText: "S'il vous plaît sélectionnez votre langue requise", languageText: "S'il vous plaît sélectionnez votre langue requise",
countryCodePickerTranslation: 'fra', countryCodePickerTranslation: 'fra',
countryCodeSelect: 'Sélectionnez le code pays', countryCodeSelect: 'Sélectionnez le code pays',
paymentNotSupported: 'Ce mode de paiement ne prend pas en charge cette devise' paymentNotSupported: 'Ce mode de paiement ne prend pas en charge cette devise',
Orders: 'Commandes',
deliveryTime: 'Délai de livraison',
myOrders: 'Mes commandes',
newOrders: 'Nouvelles commandes',
titleChat: 'Chat',
NoNewOrder: 'Pas de nouvelle commande',
Somethingisworng: 'Quelque chose ne va pas',
PENDING: 'EN ATTENTE',
ACCEPTED: 'ACCEPTÉE',
PICKED: 'PRÉLEVÉE',
DELIVERED: 'LIVRÉE',
COMPLETED: 'COMPLÉTÉE',
YourOrderID: 'Votre numéro de commande',
ProductPage: 'Page produit',
Docs: 'Documents',
Blog: 'Blog',
AboutUs: 'À propos de nous',
Done: 'Terminé',
Cancel: 'Annuler',
Usernameisrequired: 'Nom d\'utilisateur requis',
Passwordisrequired: 'Mot de passe requis',
Loggedin: 'Connecté',
EnteryourEmailandPassword: 'Entrez votre e-mail et votre mot de passe',
EmailorPhone: 'E-mail ou téléphone',
Password: 'Mot de passe',
NoOrdersAssignedyet: 'Aucune commande attribuée pour le moment',
Loadingorders: 'Chargement des commandes',
Orderassginedtootherrider: 'Commande attribuée à un autre livreur',
CustomerDetails: 'Détails du client',
Contact: 'Contact',
DelvieryLocation: 'Emplacement de livraison',
OrderDetails: 'Détails de la commande',
Subtotal: 'Sous-total',
Assigntome: 'Attribuer à moi',
'About Us': 'À Propos de Nous',
'Product Page': 'Page Produit',
Order: 'Commande',
OrderMarkedAs: 'Commande marquée comme',
titleLogin: 'Connexion',
Picked: 'Choisi',
} }

View File

@ -96,7 +96,7 @@ export const km = {
orderReceived: 'បញ្ជាទិញដែលទទួលបាន', orderReceived: 'បញ្ជាទិញដែលទទួលបាន',
cancelled: 'បានបោះបង់', cancelled: 'បានបោះបង់',
foodPreparing: 'ម្ហូបកំពុងត្រូវបានរៀបចំ', foodPreparing: 'ម្ហូបកំពុងត្រូវបានរៀបចំ',
delivered: 'បានបញ្ជូន', Delivered: 'បានបញ្ជូន',
rateAndReview: 'វាយតម្លៃនិងពិនិត្យ', rateAndReview: 'វាយតម្លៃនិងពិនិត្យ',
reviewPlaceholder: 'ការពិនិត្យលម្អិតបន្ថែមទៀតទទួលបានភាពមើលឃើញកាន់តែច្រើន ...', reviewPlaceholder: 'ការពិនិត្យលម្អិតបន្ថែមទៀតទទួលបានភាពមើលឃើញកាន់តែច្រើន ...',
submit: 'ដាក់ស្នើ', submit: 'ដាក់ស្នើ',
@ -108,8 +108,44 @@ export const km = {
languageText: 'សូមជ្រើសរើសភាសាដែលអ្នកត្រូវការ', languageText: 'សូមជ្រើសរើសភាសាដែលអ្នកត្រូវការ',
countryCodePickerTranslation: 'eng', countryCodePickerTranslation: 'eng',
countryCodeSelect: 'ជ្រើសរើសលេខកូដប្រទេស', countryCodeSelect: 'ជ្រើសរើសលេខកូដប្រទេស',
paymentNotSupported: 'វិធីសាស្ត្រទូទាត់នេះមិនគាំទ្ររូបិយប័ណ្ណនេះទេ', paymentNotSupported: 'វិធានមិនគាំទ្រប្រចាំរូបិយប័ណ្ណនេះ',
deliveryTime: 'ពេលវេលាដឹកជញ្ជូន', Orders: 'ការបញ្ជាទិញ',
deliveryTime: 'ពេលដឹកជញ្ជាំង',
myOrders: 'ការបញ្ជាទិញរបស់ខ្ញុំ', myOrders: 'ការបញ្ជាទិញរបស់ខ្ញុំ',
newOrders: 'ការបញ្ជាទិញថ្មី' newOrders: 'ការបញ្ជាទិញថ្មី',
titleChat: 'ជជែក',
NoNewOrder: 'គ្មានការបញ្ជាទិញថ្មី',
Somethingisworng: 'មានអ្វីមិនប្រក្រតី',
PENDING: 'រងចាំ',
ACCEPTED: 'បានទទួលយក',
PICKED: 'បានយក',
DELIVERED: 'បានដឹកជញ្ជាំង',
COMPLETED: 'បានបញ្ចប់',
YourOrderID: 'លេខសម្គាល់ការបញ្ជាទិញរបស់អ្នក',
ProductPage: 'ទំព័រផលិតផល',
Docs: 'ឯកសារ',
Blog: 'ប្លក់',
AboutUs: 'អំពី​ពួក​យើង',
Done: 'រួចរាល់',
Cancel: 'លើកអស់',
Usernameisrequired: 'ត្រូវការឈ្មោះអ្នកប្រើ',
Passwordisrequired: 'ត្រូវការពាក្យសម្ងាត់',
Loggedin: 'បានចូលប្រើ',
EnteryourEmailandPassword: 'បញ្ចូលអ៊ីមែល និងពាក្យសម្ងាត់',
EmailorPhone: 'អ៊ីមែល ឬទូរស័ព្ទ',
Password: 'ពាក្យសម្ងាត់',
NoOrdersAssignedyet: 'មិនទាន់មានការបញ្ជាទិញដែលបានផ្ទេរទេ',
Loadingorders: 'កំពុងផ្ទុកការបញ្ជាទិញ',
Orderassginedtootherrider: 'ការបញ្ជាទិញត្រូវបានផ្ទេរទៅហាងផ្សេងៗ',
CustomerDetails: 'ព័ត៌មានអតិថិជន',
Contact: 'ទំនាក់ទំនង',
DelvieryLocation: 'ទីតាំងដឹកជញ្ជាំង',
OrderDetails: 'ព័ត៌មានការបញ្ជាទិញ',
Subtotal: 'សរុបរង',
Assigntome: 'ផ្ដល់ទៅខ្លួនឯង',
'About Us': 'អំពីយើង',
'Product Page': 'ទំព័រផលិតផល',
Order: 'បញ្ជាទិញ',
OrderMarkedAs: 'បញ្ជាតម្រៀបជានៅជិត',
Picked: 'បានជ្រើសរើស',
} }

View File

@ -92,7 +92,7 @@ export const zh = {
orderReceived: '订单已经收到', orderReceived: '订单已经收到',
cancelled: '取消', cancelled: '取消',
foodPreparing: '食物正在准备中', foodPreparing: '食物正在准备中',
delivered: '交付', Delivered: '交付',
rateAndReview: '打分和评论', rateAndReview: '打分和评论',
reviewPlaceholder: '更详细的评论获得更多可见性......', reviewPlaceholder: '更详细的评论获得更多可见性......',
submit: '提交', submit: '提交',
@ -104,5 +104,45 @@ export const zh = {
languageText: '请选择您需要的语言', languageText: '请选择您需要的语言',
countryCodePickerTranslation: 'zho', countryCodePickerTranslation: 'zho',
countryCodeSelect: '选择国家代码', countryCodeSelect: '选择国家代码',
paymentNotSupported: '此付款方式不支持此货币' paymentNotSupported: '此付款方式不支持此货币',
Orders: '订单',
deliveryTime: '交货时间',
myOrders: '我的订单',
newOrders: '新订单',
titleChat: '聊天',
NoNewOrder: '没有新订单',
Somethingisworng: '出现问题',
PENDING: '待处理',
ACCEPTED: '已接受',
PICKED: '已拾取',
DELIVERED: '已交付',
COMPLETED: '已完成',
YourOrderID: '您的订单号',
ProductPage: '产品页面',
Docs: '文档',
Blog: '博客',
AboutUs: '关于我们',
Done: '完成',
Cancel: '取消',
Usernameisrequired: '需要用户名',
Passwordisrequired: '需要密码',
Loggedin: '已登录',
EnteryourEmailandPassword: '输入您的电子邮件和密码',
EmailorPhone: '电子邮件或电话',
Password: '密码',
NoOrdersAssignedyet: '尚未分配订单',
Loadingorders: '加载订单',
Orderassginedtootherrider: '订单已分配给其他骑手',
CustomerDetails: '客户详情',
Contact: '联系',
DelvieryLocation: '交货地点',
OrderDetails: '订单详情',
Subtotal: '小计',
Assigntome: '分配给我',
'About Us': '关于我们',
'Product Page': '产品页面',
Order: '订单',
OrderMarkedAs: '标记为订单',
titleLogin: '登录',
Picked: '已选取',
} }

View File

@ -7,6 +7,7 @@ import UserContext from '../../context/user'
import TextError from '../Text/TextError/TextError' import TextError from '../Text/TextError/TextError'
import { useNavigation } from '@react-navigation/native' import { useNavigation } from '@react-navigation/native'
import { verticalScale } from '../../utilities/scaling' import { verticalScale } from '../../utilities/scaling'
import i18n from '../../../i18n'
export default function Orders() { export default function Orders() {
const navigation = useNavigation() const navigation = useNavigation()
@ -20,10 +21,10 @@ export default function Orders() {
} = useContext(UserContext) } = useContext(UserContext)
if (loadingAssigned) return <Spinner /> if (loadingAssigned) return <Spinner />
if (errorAssigned) return <TextError text="Something is worng" /> if (errorAssigned) return <TextError text={i18n.t('Somethingisworng')} />
function emptyView() { function emptyView() {
return <TextError text="No Orders Assigned yet!" /> return <TextError text={i18n.t('NoOrdersAssignedyet')} />
} }
return ( return (

View File

@ -7,6 +7,7 @@ import UserContext from '../../context/user'
import TextError from '../Text/TextError/TextError' import TextError from '../Text/TextError/TextError'
import { useNavigation } from '@react-navigation/native' import { useNavigation } from '@react-navigation/native'
import { verticalScale } from '../../utilities/scaling' import { verticalScale } from '../../utilities/scaling'
import i18n from '../../../i18n'
export default function Orders() { export default function Orders() {
const navigation = useNavigation() const navigation = useNavigation()
@ -20,11 +21,11 @@ export default function Orders() {
} = useContext(UserContext) } = useContext(UserContext)
function emptyView() { function emptyView() {
return <TextError text="No New Order" /> return <TextError text={i18n.t('NoNewOrder')} />
} }
if (loadingUnAssigned) return <Spinner /> if (loadingUnAssigned) return <Spinner />
if (errorUnAssigned) return <TextError text="Something is worng" /> if (errorUnAssigned) return <TextError text={i18n.t('Somethingisworng')} />
return ( return (
<FlatList <FlatList

View File

@ -60,7 +60,7 @@ function Order(props) {
numberOfLines={2} numberOfLines={2}
bold bold
textColor={colors.placeHolderColor}> textColor={colors.placeHolderColor}>
Your {i18n.t('orderId')} {i18n.t('YourOrderID')}
</TextDefault> </TextDefault>
<TextDefault H4 bolder> <TextDefault H4 bolder>
{props.orderId} {props.orderId}
@ -77,7 +77,7 @@ function Order(props) {
bold bold
uppercase uppercase
style={{ ...alignment.PLxSmall, ...alignment.PRxSmall }}> style={{ ...alignment.PLxSmall, ...alignment.PRxSmall }}>
{props.orderStatus} {i18n.t(props.orderStatus)}
</TextDefault> </TextDefault>
</View> </View>
<View style={{ paddingLeft: '5%' }}> <View style={{ paddingLeft: '5%' }}>
@ -106,13 +106,13 @@ function Order(props) {
textColor={colors.placeHolderColor} textColor={colors.placeHolderColor}
bold bold
style={{ ...alignment.MTxSmall }}> style={{ ...alignment.MTxSmall }}>
Payment method {i18n.t('paymentMethod')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
textColor={colors.placeHolderColor} textColor={colors.placeHolderColor}
bold bold
style={{ ...alignment.MTxSmall }}> style={{ ...alignment.MTxSmall }}>
Delivery Time {i18n.t('deliveryTime')}
</TextDefault> </TextDefault>
</View> </View>
<View> <View>

View File

@ -1,6 +1,6 @@
import { Feather, FontAwesome } from '@expo/vector-icons' import { Feather, FontAwesome } from '@expo/vector-icons'
import { useNavigation } from '@react-navigation/native' import { useNavigation } from '@react-navigation/native'
import React, { useCallback, useEffect, useState } from 'react' import React, { useCallback, useEffect, useState, useLayoutEffect } from 'react'
import { Keyboard, View } from 'react-native' import { Keyboard, View } from 'react-native'
import { import {
Bubble, Bubble,
@ -13,6 +13,7 @@ import { alignment } from '../../utilities/alignment'
import colors from '../../utilities/colors' import colors from '../../utilities/colors'
import { scale } from '../../utilities/scaling' import { scale } from '../../utilities/scaling'
import useStyle from './styles' import useStyle from './styles'
import i18n from '../../../i18n'
const UserInfo = { const UserInfo = {
_id: 1, _id: 1,
@ -42,7 +43,7 @@ function Chat() {
useEffect(() => { useEffect(() => {
navigation.setOptions({ navigation.setOptions({
title: 'Chat' headerTitle: i18n.t('titleChat')
}) })
setMessages([ setMessages([
{ {

View File

@ -42,7 +42,7 @@ function Help() {
style={styles.itemContainer} style={styles.itemContainer}
key={index}> key={index}>
<TextDefault textColor={colors.fontMainColor} H4> <TextDefault textColor={colors.fontMainColor} H4>
{title} {i18n.t(title)}
</TextDefault> </TextDefault>
<AntDesign name="arrowright" size={scale(20)} /> <AntDesign name="arrowright" size={scale(20)} />
</TouchableOpacity> </TouchableOpacity>

View File

@ -2,6 +2,7 @@ import { useNavigation, useRoute } from '@react-navigation/native'
import React, { useLayoutEffect } from 'react' import React, { useLayoutEffect } from 'react'
import { WebView } from 'react-native-webview' import { WebView } from 'react-native-webview'
import { MainWrapper, Spinner } from '../../components' import { MainWrapper, Spinner } from '../../components'
import i18n from '../../../i18n'
function HelpBrowser() { function HelpBrowser() {
const navigation = useNavigation() const navigation = useNavigation()
@ -11,7 +12,7 @@ function HelpBrowser() {
useLayoutEffect(() => { useLayoutEffect(() => {
navigation.setOptions({ navigation.setOptions({
headerRight: null, headerRight: null,
headerTitle: title headerTitle: i18n.t(title)
}) })
}, [navigation]) }, [navigation])

View File

@ -18,7 +18,8 @@ const languageTypes = [
{ value: 'français', code: 'fr', index: 1 }, { value: 'français', code: 'fr', index: 1 },
{ value: 'ភាសាខ្មែរ', code: 'km', index: 2 }, { value: 'ភាសាខ្មែរ', code: 'km', index: 2 },
{ value: '中文', code: 'zh', index: 3 }, { value: '中文', code: 'zh', index: 3 },
{ value: 'Deutsche', code: 'de', index: 4 } { value: 'Deutsche', code: 'de', index: 4 },
{ value: 'Arabic', code: 'ar', index: 5 }
] ]
function Language() { function Language() {
@ -113,7 +114,7 @@ function Language() {
justifyContent: 'center' justifyContent: 'center'
}}> }}>
<TextDefault H5 bold textColor={colors.fontSecondColor}> <TextDefault H5 bold textColor={colors.fontSecondColor}>
Done {i18n.t('Done')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
@ -127,7 +128,7 @@ function Language() {
justifyContent: 'center' justifyContent: 'center'
}}> }}>
<TextDefault H5 bold textColor={colors.fontMainColor}> <TextDefault H5 bold textColor={colors.fontMainColor}>
Cancel {i18n.t('Cancel')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -4,7 +4,7 @@ import { useNavigation } from '@react-navigation/native'
import Constants from 'expo-constants' import Constants from 'expo-constants'
import * as Notifications from 'expo-notifications' import * as Notifications from 'expo-notifications'
import gql from 'graphql-tag' import gql from 'graphql-tag'
import React, { useContext, useEffect, useState } from 'react' import React, { useContext, useEffect, useState,useLayoutEffect } from 'react'
import { import {
KeyboardAvoidingView, KeyboardAvoidingView,
Platform, Platform,
@ -38,11 +38,13 @@ export default function Login() {
const { setTokenAsync } = useContext(AuthContext) const { setTokenAsync } = useContext(AuthContext)
useEffect(() => {
useLayoutEffect(() => {
navigation.setOptions({ navigation.setOptions({
headerLeft: null headerRight: null,
headerTitle: i18n.t('titleHelp')
}) })
}, []) }, [navigation])
const [mutate, { loading }] = useMutation(RIDER_LOGIN, { const [mutate, { loading }] = useMutation(RIDER_LOGIN, {
onCompleted, onCompleted,
@ -55,11 +57,11 @@ export default function Login() {
setPasswordError('') setPasswordError('')
if (!username) { if (!username) {
setUsernameError('Username is required') setUsernameError(i18n.t('Usernameisrequired'))
res = false res = false
} }
if (!password) { if (!password) {
setPasswordError('Password is required') setPasswordError(i18n.t('Passwordisrequired'))
res = false res = false
} }
return res return res
@ -67,23 +69,23 @@ export default function Login() {
async function onCompleted(data) { async function onCompleted(data) {
FlashMessage({ FlashMessage({
message: 'Logged in' message: i18n.t('Loggedin')
}) })
await AsyncStorage.setItem('rider-id', data.riderLogin.userId) await AsyncStorage.setItem('rider-id', data.riderLogin.userId)
setTokenAsync(data.riderLogin.token) setTokenAsync(data.riderLogin.token)
} }
function onError({ networkError, graphQLErrors }) { function onError({ networkError, graphQLErrors }) {
console.log('errors', networkError, graphQLErrors) console.log('errors', networkError, graphQLErrors)
// let message = '' let message = ''
// if (!!graphQLErrors && graphQLErrors.length) { if (!!graphQLErrors && graphQLErrors.length) {
// message = graphQLErrors[0].message message = graphQLErrors[0].message
// } }
// if (!!networkError) { if (!!networkError) {
// message = networkError.result.errors[0].message message = networkError.result.errors[0].message
// } }
// FlashMessage({ FlashMessage({
// message: message message: message
// }) })
} }
return ( return (
@ -100,13 +102,13 @@ export default function Login() {
<TextDefault <TextDefault
style={alignment.MBmedium} style={alignment.MBmedium}
textColor={colors.placeHolderColor}> textColor={colors.placeHolderColor}>
Enter your Email and Password {i18n.t('EnteryourEmailandPassword')}
</TextDefault> </TextDefault>
<FilledTextField <FilledTextField
defaultValue={'rider'} defaultValue={'rider'}
error={usernameError} error={usernameError}
keyboardType={'email-address'} keyboardType={'email-address'}
label={'Email or Phone'} label={i18n.t('EmailorPhone')}
labelFontSize={scale(12)} labelFontSize={scale(12)}
fontSize={scale(12)} fontSize={scale(12)}
activeLineWidth={0} activeLineWidth={0}
@ -126,7 +128,7 @@ export default function Login() {
<FilledTextField <FilledTextField
defaultValue={'123123'} defaultValue={'123123'}
error={passwordError} error={passwordError}
label={'Password'} label={i18n.t('Password')}
secureTextEntry secureTextEntry
labelFontSize={scale(12)} labelFontSize={scale(12)}
fontSize={scale(12)} fontSize={scale(12)}

View File

@ -6,6 +6,7 @@ import UserContext from '../../context/user'
import styles from './style' import styles from './style'
import { TextError, Spinner } from '../../components' import { TextError, Spinner } from '../../components'
import { useNavigation } from '@react-navigation/native' import { useNavigation } from '@react-navigation/native'
import i18n from '../../../i18n'
export default function Orders() { export default function Orders() {
const navigation = useNavigation() const navigation = useNavigation()
@ -19,11 +20,11 @@ export default function Orders() {
} = useContext(UserContext) } = useContext(UserContext)
function emptyView() { function emptyView() {
return <TextError text="No New Order" /> return <TextError text={i18n.t('NoNewOrder')} />
} }
if (loadingUnAssigned) return <Spinner /> if (loadingUnAssigned) return <Spinner />
if (errorUnAssigned) return <TextError text="Something is worng" /> if (errorUnAssigned) return <TextError text={i18n.t('Somethingisworng')} />
return ( return (
<View style={styles.flex}> <View style={styles.flex}>

View File

@ -20,6 +20,7 @@ import colors from "../../utilities/colors";
import { linkToMapsApp } from "../../utilities/links"; import { linkToMapsApp } from "../../utilities/links";
import { scale } from "../../utilities/scaling"; import { scale } from "../../utilities/scaling";
import styles from "./styles"; import styles from "./styles";
import i18n from "../../../i18n";
const CONFIGURATION = gql` const CONFIGURATION = gql`
${configuration} ${configuration}
@ -70,13 +71,13 @@ function OrderDetail() {
useLayoutEffect(() => { useLayoutEffect(() => {
if (!selectedOrder) return; if (!selectedOrder) return;
navigation.setOptions({ navigation.setOptions({
title: `Order ${selectedOrder.order_id}`, title: `${i18n.t('Order')} ${selectedOrder.order_id}`,
}); });
}, [selectedOrder]); }, [selectedOrder]);
async function onCompleted({ updateOrderStatusRider, assignOrder }) { async function onCompleted({ updateOrderStatusRider, assignOrder }) {
if (updateOrderStatusRider) { if (updateOrderStatusRider) {
FlashMessage({ FlashMessage({
message: `Order marked as ${updateOrderStatusRider.order_status}`, message: `${i18n.t('OrderMarkedAs')} ${i18n.t(updateOrderStatusRider.order_status)}`,
}); });
if (updateOrderStatusRider.order_status === "DELIVERED") { if (updateOrderStatusRider.order_status === "DELIVERED") {
navigation.goBack(); navigation.goBack();
@ -172,17 +173,17 @@ function OrderDetail() {
} }
if (loadingAssigned || loadingUnAssigned) { if (loadingAssigned || loadingUnAssigned) {
return <TextError text="Loading orders" />; return <TextError text={i18n.t('Loadingorders')} />;
} }
if (loadingConfig) { if (loadingConfig) {
return <Spinner />; return <Spinner />;
} }
if (errorConfig) { if (errorConfig) {
return <TextError text="Something is worng" />; return <TextError text={i18n.t('Somethingisworng')} />;
} }
if (!selectedOrder) { if (!selectedOrder) {
return ( return (
<TextError text="Order assgined to other rider,(something like that)" /> <TextError text={i18n.t('Orderassginedtootherrider')} />
); );
} }
@ -202,7 +203,7 @@ function OrderDetail() {
textColor={colors.tagColor} textColor={colors.tagColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Customer Details {i18n.t('CustomerDetails')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.customerContent}> <View style={styles.customerContent}>
@ -214,7 +215,7 @@ function OrderDetail() {
textColor={colors.placeHolderColor} textColor={colors.placeHolderColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Name {i18n.t('name')}
</TextDefault> </TextDefault>
<TextDefault bolder style={{ ...alignment.PBxSmall }}> <TextDefault bolder style={{ ...alignment.PBxSmall }}>
{selectedOrder.user.name} {selectedOrder.user.name}
@ -228,7 +229,7 @@ function OrderDetail() {
textColor={colors.placeHolderColor} textColor={colors.placeHolderColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Contact {i18n.t('Contact')}
</TextDefault> </TextDefault>
<TextDefault bolder style={{ ...alignment.PBxSmall }}> <TextDefault bolder style={{ ...alignment.PBxSmall }}>
{selectedOrder.user.phone} {selectedOrder.user.phone}
@ -242,7 +243,7 @@ function OrderDetail() {
textColor={colors.placeHolderColor} textColor={colors.placeHolderColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Delviery Location {i18n.t('DelvieryLocation')}
</TextDefault> </TextDefault>
<TextDefault <TextDefault
numberOfLines={2} numberOfLines={2}
@ -266,7 +267,7 @@ function OrderDetail() {
textColor={colors.tagColor} textColor={colors.tagColor}
style={{ ...alignment.PTmedium }} style={{ ...alignment.PTmedium }}
> >
Order Details {i18n.t('OrderDetails')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.orderSpacer} /> <View style={styles.orderSpacer} />
@ -284,7 +285,7 @@ function OrderDetail() {
bolder bolder
style={{ ...alignment.PTmedium, ...alignment.PLmedium }} style={{ ...alignment.PTmedium, ...alignment.PLmedium }}
> >
Subtotal {i18n.t('Subtotal')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.orderTextRight}> <View style={styles.orderTextRight}>
@ -311,7 +312,7 @@ function OrderDetail() {
bolder bolder
style={{ ...alignment.PLmedium }} style={{ ...alignment.PLmedium }}
> >
Delivery Charges {i18n.t('delvieryCharges')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.orderTextRight}> <View style={styles.orderTextRight}>
@ -331,7 +332,7 @@ function OrderDetail() {
<View style={styles.orderSubRow}> <View style={styles.orderSubRow}>
<View style={styles.orderTextLeft}> <View style={styles.orderTextLeft}>
<TextDefault H4 bolder> <TextDefault H4 bolder>
Total {i18n.t('total')}
</TextDefault> </TextDefault>
</View> </View>
<View style={styles.orderTextRight}> <View style={styles.orderTextRight}>
@ -423,7 +424,7 @@ function OrderDetail() {
bold bold
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Assign to me {i18n.t('Assigntome')}
</TextDefault> </TextDefault>
)} )}
</TouchableOpacity> </TouchableOpacity>
@ -449,7 +450,7 @@ function OrderDetail() {
bold bold
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Picked {i18n.t('Picked')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
)} )}
@ -468,7 +469,7 @@ function OrderDetail() {
bold bold
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }} style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
> >
Delivered {i18n.t('Delivered')}
</TextDefault> </TextDefault>
</TouchableOpacity> </TouchableOpacity>
)} )}

View File

@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react' import React, { useEffect, useState, useLayoutEffect } from 'react'
import { useNavigation } from '@react-navigation/native'
import { import {
ImageBackground, ImageBackground,
StatusBar, StatusBar,
@ -15,11 +16,19 @@ const BACKGROUND_IMAGE = require('../../../assets/images/ui/BG.png')
export default function Orders() { export default function Orders() {
const styles = useStyle() const styles = useStyle()
const [isNewOrderSelected, setIsNewOrderSelected] = useState(false) const [isNewOrderSelected, setIsNewOrderSelected] = useState(false)
const navigation = useNavigation()
useEffect(() => { useEffect(() => {
StatusBar.setBarStyle('light-content') StatusBar.setBarStyle('light-content')
}, [isNewOrderSelected]) }, [isNewOrderSelected])
useLayoutEffect(() => {
navigation.setOptions({
headerRight: null,
headerTitle: i18n.t('Orders')
})
}, [navigation])
return ( return (
<View style={[styles.flex, styles.bottom]}> <View style={[styles.flex, styles.bottom]}>
<ImageBackground style={styles.imageContainer} source={BACKGROUND_IMAGE}> <ImageBackground style={styles.imageContainer} source={BACKGROUND_IMAGE}>