diff --git a/RiderApp/languages/de.js b/RiderApp/languages/de.js
index cfd0b92..8fce2b6 100644
--- a/RiderApp/languages/de.js
+++ b/RiderApp/languages/de.js
@@ -111,5 +111,39 @@ export const de = {
languageText: 'Bitte wählen Sie Ihre gewünschte Sprache',
countryCodePickerTranslation: 'deu',
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',
}
diff --git a/RiderApp/languages/en.js b/RiderApp/languages/en.js
index 040c76a..da1ddc4 100644
--- a/RiderApp/languages/en.js
+++ b/RiderApp/languages/en.js
@@ -115,5 +115,34 @@ export const en = {
deliveryTime: 'Delivery Time',
myOrders: 'My 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',
}
diff --git a/RiderApp/languages/fr.js b/RiderApp/languages/fr.js
index 2a8d2a1..a9d7ae8 100644
--- a/RiderApp/languages/fr.js
+++ b/RiderApp/languages/fr.js
@@ -111,5 +111,40 @@ export const fr = {
languageText: "S'il vous plaît sélectionnez votre langue requise",
countryCodePickerTranslation: 'fra',
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',
+
}
diff --git a/RiderApp/languages/km.js b/RiderApp/languages/km.js
index 18c87df..4e8b290 100644
--- a/RiderApp/languages/km.js
+++ b/RiderApp/languages/km.js
@@ -108,8 +108,40 @@ export const km = {
languageText: 'សូមជ្រើសរើសភាសាដែលអ្នកត្រូវការ',
countryCodePickerTranslation: 'eng',
countryCodeSelect: 'ជ្រើសរើសលេខកូដប្រទេស',
- paymentNotSupported: 'វិធីសាស្ត្រទូទាត់នេះមិនគាំទ្ររូបិយប័ណ្ណនេះទេ',
- deliveryTime: 'ពេលវេលាដឹកជញ្ជូន',
+ paymentNotSupported: 'វិធានមិនគាំទ្រប្រចាំរូបិយប័ណ្ណនេះ',
+ Orders: 'ការបញ្ជាទិញ',
+ deliveryTime: 'ពេលដឹកជញ្ជាំង',
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: 'ផ្ដល់ទៅខ្លួនឯង',
+
}
diff --git a/RiderApp/languages/zh.js b/RiderApp/languages/zh.js
index 5846e37..c0ed340 100644
--- a/RiderApp/languages/zh.js
+++ b/RiderApp/languages/zh.js
@@ -104,5 +104,40 @@ export const zh = {
languageText: '请选择您需要的语言',
countryCodePickerTranslation: 'zho',
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: '分配给我',
+
}
diff --git a/RiderApp/src/components/AssignedOrders/AssignedOrders.js b/RiderApp/src/components/AssignedOrders/AssignedOrders.js
index 4c72815..835d1b3 100644
--- a/RiderApp/src/components/AssignedOrders/AssignedOrders.js
+++ b/RiderApp/src/components/AssignedOrders/AssignedOrders.js
@@ -7,6 +7,7 @@ import UserContext from '../../context/user'
import TextError from '../Text/TextError/TextError'
import { useNavigation } from '@react-navigation/native'
import { verticalScale } from '../../utilities/scaling'
+import i18n from '../../../i18n'
export default function Orders() {
const navigation = useNavigation()
@@ -20,10 +21,10 @@ export default function Orders() {
} = useContext(UserContext)
if (loadingAssigned) return
- if (errorAssigned) return
+ if (errorAssigned) return
function emptyView() {
- return
+ return
}
return (
diff --git a/RiderApp/src/components/NewOrders/NewOrders.js b/RiderApp/src/components/NewOrders/NewOrders.js
index e51f842..8431cc4 100644
--- a/RiderApp/src/components/NewOrders/NewOrders.js
+++ b/RiderApp/src/components/NewOrders/NewOrders.js
@@ -7,6 +7,7 @@ import UserContext from '../../context/user'
import TextError from '../Text/TextError/TextError'
import { useNavigation } from '@react-navigation/native'
import { verticalScale } from '../../utilities/scaling'
+import i18n from '../../../i18n'
export default function Orders() {
const navigation = useNavigation()
@@ -20,11 +21,11 @@ export default function Orders() {
} = useContext(UserContext)
function emptyView() {
- return
+ return
}
if (loadingUnAssigned) return
- if (errorUnAssigned) return
+ if (errorUnAssigned) return
return (
- Your {i18n.t('orderId')}
+ {i18n.t('YourOrderID')}
{props.orderId}
@@ -77,7 +77,7 @@ function Order(props) {
bold
uppercase
style={{ ...alignment.PLxSmall, ...alignment.PRxSmall }}>
- {props.orderStatus}
+ {i18n.t(props.orderStatus)}
@@ -106,13 +106,13 @@ function Order(props) {
textColor={colors.placeHolderColor}
bold
style={{ ...alignment.MTxSmall }}>
- Payment method
+ {i18n.t('paymentMethod')}
- Delivery Time
+ {i18n.t('deliveryTime')}
diff --git a/RiderApp/src/screens/Help/Help.js b/RiderApp/src/screens/Help/Help.js
index 6aa646a..98f132a 100644
--- a/RiderApp/src/screens/Help/Help.js
+++ b/RiderApp/src/screens/Help/Help.js
@@ -10,17 +10,17 @@ import styles from './styles'
const links = [
{
- title: 'Product Page',
+ title: i18n.t('ProductPage'),
url:
'https://enatega.com/enatega-single-vendor/'
},
- { title: 'Docs', url: 'https://enatega.com/docs/enatega-singlevendor-rider-app-introduction/' },
+ { title: i18n.t('Docs'), url: 'https://enatega.com/docs/enatega-singlevendor-rider-app-introduction/' },
{
- title: 'Blog',
+ title: i18n.t('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() {
const navigation = useNavigation()
diff --git a/RiderApp/src/screens/Language/Language.js b/RiderApp/src/screens/Language/Language.js
index ea8d981..f35ce55 100644
--- a/RiderApp/src/screens/Language/Language.js
+++ b/RiderApp/src/screens/Language/Language.js
@@ -113,7 +113,7 @@ function Language() {
justifyContent: 'center'
}}>
- Done
+ {i18n.t('Done')}
- Cancel
+ {i18n.t('Cancel')}
diff --git a/RiderApp/src/screens/Login/Login.js b/RiderApp/src/screens/Login/Login.js
index 70dedaf..f981619 100644
--- a/RiderApp/src/screens/Login/Login.js
+++ b/RiderApp/src/screens/Login/Login.js
@@ -55,11 +55,11 @@ export default function Login() {
setPasswordError('')
if (!username) {
- setUsernameError('Username is required')
+ setUsernameError(i18n.t('Usernameisrequired'))
res = false
}
if (!password) {
- setPasswordError('Password is required')
+ setPasswordError(i18n.t('Passwordisrequired'))
res = false
}
return res
@@ -67,23 +67,23 @@ export default function Login() {
async function onCompleted(data) {
FlashMessage({
- message: 'Logged in'
+ message: i18n.t('Loggedin')
})
await AsyncStorage.setItem('rider-id', data.riderLogin.userId)
setTokenAsync(data.riderLogin.token)
}
function onError({ networkError, graphQLErrors }) {
console.log('errors', networkError, graphQLErrors)
- // let message = ''
- // if (!!graphQLErrors && graphQLErrors.length) {
- // message = graphQLErrors[0].message
- // }
- // if (!!networkError) {
- // message = networkError.result.errors[0].message
- // }
- // FlashMessage({
- // message: message
- // })
+ let message = ''
+ if (!!graphQLErrors && graphQLErrors.length) {
+ message = graphQLErrors[0].message
+ }
+ if (!!networkError) {
+ message = networkError.result.errors[0].message
+ }
+ FlashMessage({
+ message: message
+ })
}
return (
@@ -100,13 +100,13 @@ export default function Login() {
- Enter your Email and Password
+ {i18n.t('EnteryourEmailandPassword')}
+ return
}
if (loadingUnAssigned) return
- if (errorUnAssigned) return
+ if (errorUnAssigned) return
return (
diff --git a/RiderApp/src/screens/OrderDetail/OrderDetail.js b/RiderApp/src/screens/OrderDetail/OrderDetail.js
index 721598e..bdb64b4 100644
--- a/RiderApp/src/screens/OrderDetail/OrderDetail.js
+++ b/RiderApp/src/screens/OrderDetail/OrderDetail.js
@@ -20,6 +20,7 @@ import colors from "../../utilities/colors";
import { linkToMapsApp } from "../../utilities/links";
import { scale } from "../../utilities/scaling";
import styles from "./styles";
+import i18n from "../../../i18n";
const CONFIGURATION = gql`
${configuration}
@@ -172,17 +173,17 @@ function OrderDetail() {
}
if (loadingAssigned || loadingUnAssigned) {
- return ;
+ return ;
}
if (loadingConfig) {
return ;
}
if (errorConfig) {
- return ;
+ return ;
}
if (!selectedOrder) {
return (
-
+
);
}
@@ -202,7 +203,7 @@ function OrderDetail() {
textColor={colors.tagColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Customer Details
+ {i18n.t('CustomerDetails')}
@@ -214,7 +215,7 @@ function OrderDetail() {
textColor={colors.placeHolderColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Name
+ {i18n.t('name')}
{selectedOrder.user.name}
@@ -228,7 +229,7 @@ function OrderDetail() {
textColor={colors.placeHolderColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Contact
+ {i18n.t('Contact')}
{selectedOrder.user.phone}
@@ -242,7 +243,7 @@ function OrderDetail() {
textColor={colors.placeHolderColor}
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Delviery Location
+ {i18n.t('DelvieryLocation')}
- Order Details
+ {i18n.t('OrderDetails')}
@@ -284,7 +285,7 @@ function OrderDetail() {
bolder
style={{ ...alignment.PTmedium, ...alignment.PLmedium }}
>
- Subtotal
+ {i18n.t('Subtotal')}
@@ -311,7 +312,7 @@ function OrderDetail() {
bolder
style={{ ...alignment.PLmedium }}
>
- Delivery Charges
+ {i18n.t('delvieryCharges')}
@@ -331,7 +332,7 @@ function OrderDetail() {
- Total
+ {i18n.t('total')}
@@ -423,7 +424,7 @@ function OrderDetail() {
bold
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Assign to me
+ {i18n.t('Assigntome')}
)}
@@ -449,7 +450,7 @@ function OrderDetail() {
bold
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Picked
+ {i18n.t('Picked')}
)}
@@ -468,7 +469,7 @@ function OrderDetail() {
bold
style={{ ...alignment.PTxSmall, ...alignment.PBxSmall }}
>
- Delivered
+ {i18n.t('Delivered')}
)}