remaining headers added with localisation
This commit is contained in:
parent
8c829be3df
commit
4fe9049c1e
|
@ -1 +1,2 @@
|
||||||
/node_modules
|
/node_modules
|
||||||
|
/dist
|
|
@ -147,5 +147,9 @@ export const de = {
|
||||||
Subtotal: 'Subtotaal',
|
Subtotal: 'Subtotaal',
|
||||||
Assigntome: 'Toewijzen aan mij',
|
Assigntome: 'Toewijzen aan mij',
|
||||||
'About Us': 'Over Ons',
|
'About Us': 'Over Ons',
|
||||||
'Product Page': 'Product Pagina',
|
'Product Page': 'Product Pagina',
|
||||||
|
Order: 'Bestelling',
|
||||||
|
OrderMarkedAs: 'Bestelling gemarkeerd als',
|
||||||
|
titleLogin: 'Inloggen',
|
||||||
|
Picked: 'Gekozen',
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,5 +146,9 @@ export const en = {
|
||||||
Subtotal: 'Subtotal',
|
Subtotal: 'Subtotal',
|
||||||
Assigntome: 'Assign to me',
|
Assigntome: 'Assign to me',
|
||||||
'About Us': 'About Us',
|
'About Us': 'About Us',
|
||||||
'Product Page': 'Product Page'
|
'Product Page': 'Product Page',
|
||||||
|
Order: 'Order',
|
||||||
|
OrderMarkedAs: 'Order marked as',
|
||||||
|
titleLogin: 'Login',
|
||||||
|
Picked: 'Picked'
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,5 +147,9 @@ export const fr = {
|
||||||
Subtotal: 'Sous-total',
|
Subtotal: 'Sous-total',
|
||||||
Assigntome: 'Attribuer à moi',
|
Assigntome: 'Attribuer à moi',
|
||||||
'About Us': 'À Propos de Nous',
|
'About Us': 'À Propos de Nous',
|
||||||
'Product Page': 'Page Produit',
|
'Product Page': 'Page Produit',
|
||||||
|
Order: 'Commande',
|
||||||
|
OrderMarkedAs: 'Commande marquée comme',
|
||||||
|
titleLogin: 'Connexion',
|
||||||
|
Picked: 'Choisi',
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,5 +144,8 @@ export const km = {
|
||||||
Subtotal: 'សរុបរង',
|
Subtotal: 'សរុបរង',
|
||||||
Assigntome: 'ផ្ដល់ទៅខ្លួនឯង',
|
Assigntome: 'ផ្ដល់ទៅខ្លួនឯង',
|
||||||
'About Us': 'អំពីយើង',
|
'About Us': 'អំពីយើង',
|
||||||
'Product Page': 'ទំព័រផលិតផល',
|
'Product Page': 'ទំព័រផលិតផល',
|
||||||
|
Order: 'បញ្ជាទិញ',
|
||||||
|
OrderMarkedAs: 'បញ្ជាតម្រៀបជានៅជិត',
|
||||||
|
Picked: 'បានជ្រើសរើស',
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,4 +141,8 @@ export const zh = {
|
||||||
Assigntome: '分配给我',
|
Assigntome: '分配给我',
|
||||||
'About Us': '关于我们',
|
'About Us': '关于我们',
|
||||||
'Product Page': '产品页面',
|
'Product Page': '产品页面',
|
||||||
|
Order: '订单',
|
||||||
|
OrderMarkedAs: '标记为订单',
|
||||||
|
titleLogin: '登录',
|
||||||
|
Picked: '已选取',
|
||||||
}
|
}
|
||||||
|
|
|
@ -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([
|
||||||
{
|
{
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -71,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')} ${updateOrderStatusRider.order_status}`,
|
||||||
});
|
});
|
||||||
if (updateOrderStatusRider.order_status === "DELIVERED") {
|
if (updateOrderStatusRider.order_status === "DELIVERED") {
|
||||||
navigation.goBack();
|
navigation.goBack();
|
||||||
|
|
|
@ -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}>
|
||||||
|
|
Loading…
Reference in New Issue