-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathi18n.js
224 lines (219 loc) · 6.23 KB
/
i18n.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
import i18n from "i18next";
import * as Localization from "expo-localization";
// creating a language detection plugin using expo
// http://i18next.com/docs/ownplugin/#languagedetector
const languageDetector = {
type: "languageDetector",
async: true, // flags below detection to be async
detect: callback => {
return Localization.getLocalizationAsync().then(({ locale }) => {
callback(locale);
});
},
init: () => {},
cacheUserLanguage: () => {}
};
i18n.use(languageDetector).init({
fallbackLng: "en",
resources: {
en: {
signIn: {
title: "Please sign in",
signIn: "Sign in",
name: "Name",
stationId: "Station ID",
facilityId: "Facility ID",
error: "Please enter all details"
},
home: {
title: "Patient tracker",
home: "Home",
station: "Station",
facility: "Facility",
update: "Update",
patients: "Patients",
inQueue: "in queue,",
completed: "completed",
startedAt: "Started at",
edit: "Edit"
},
edit: {
editPatient: "Edit patient?",
cancel: "Cancel",
update: "Update",
finish: "finish"
},
settings: {
language: "Language",
details: "Server details",
address: "Address",
password: "Password",
update: "Update",
patientsCompleted: "completed patients ready to upload",
upload: "Upload",
uploading: "Uploading",
incorrectPassword: "Incorrect password",
couldNotFind: "Could not find server at that address",
genericError:
"An error occurred. Ensure you are connected to the internet and check above details"
},
qr: {
add: "Add manually",
requesting: "Requesting camera permission",
noAccess: "No access to camera"
},
enter: {
enterID: "Enter Patient ID?",
id: "Patient ID",
cancel: "Cancel",
continue: "Continue"
},
add: {
addHeader: "Add patient to queue?",
comments: "Comments",
cancel: "Cancel",
addAction: "Add to queue"
},
complete: {
completedPatient: "Completed patient",
comments: "Comments",
back: "Back"
}
},
ht: {
signIn: {
title: "Tanpri konekte.",
signIn: "Konekte",
name: "Non",
stationId: "Non seksyon",
facilityId: "Seksyon pou ede",
error: "Tanpri antre tout detay yo"
},
home: {
title: "Chèche pasyan",
home: "Akèy",
station: "Pòs",
facility: "Èd",
update: "Aktyalize",
patients: "Pasyan",
inQueue: "annatant,",
completed: "fini",
startedAt: "Te Komanse nan",
edit: "Chanje"
},
edit: {
editPatient: "Chanje enfomasyon pasyan?",
cancel: "Anile",
update: "Aktyalize",
finish: "Fini"
},
settings: {
language: "Lang",
details: "Detay sèvè",
address: "Adrès",
password: "Kòd sekrè",
update: "Aktyalize",
patientsCompleted: "Kantite pasyan ki pare pou telechaje",
upload: "Telechaje",
uploading: "Telechajman",
incorrectPassword: "Kòd la pa kòrèk",
couldNotFind: "Pa ka jwenn sèvè a nan adrès sa a",
genericError:
"Yon erè te fèt. Asire ou ke ou konekte nan entènèt epi tcheke detay yo ki pi wo a"
},
qr: {
add: "Rantre ak men",
requesting: "Mande otorizasyon kamera",
noAccess: "Pa gen aksè pou kamera"
},
enter: {
enterID: "Rantre kòd pasyan?",
id: "Kòd pasyan",
cancel: "Anile",
continue: "Kontinye"
},
add: {
addHeader: "Mete pasyan sou lis atant?",
comments: "Komantè",
cancel: "Anile",
addAction: "Mete sou atant"
},
complete: {
completedPatient: "Swivi pasyan fini",
comments: "Komantè",
back: "Tounen"
}
},
fr: {
signIn: {
title: "Connectez-vous",
signIn: "Se connecter",
name: "Nom",
stationId: "Nom du poste",
facilityId: "Bureau d’assistance",
error: "Entrer toutes les informations"
},
home: {
title: "Localiser le patient",
home: "Accueil",
station: "Poste",
facility: "Aide",
update: "Actualiser",
patients: "Patient",
inQueue: "en cours,",
completed: "terminé",
startedAt: "A commencer à",
edit: "Modifier"
},
edit: {
editPatient: "Modifier informations patient?",
cancel: "Annuler",
update: "Actualiser",
finish: "Terminer"
},
settings: {
language: "Langue",
details: "Détails du serveur",
address: "Adresse",
password: "Mot de passe",
update: "Actualiser",
patientsCompleted: "de patients terminés prêts à être téléchargés",
upload: "Télécharger",
uploading: "Téléchargement",
incorrectPassword: "Mot de passe incorrect",
couldNotFind: "Impossible de trouver le serveur à cette adresse",
genericError:
"Une erreur est survenue. Assurez-vous d'être connecté à Internet et vérifiez les détails ci-dessus"
},
qr: {
add: "Compléter manuellement",
requesting: "Demander l’autorisation de la caméra",
noAccess: "Pas d’accès à la caméra"
},
enter: {
enterID: "Insérer code patient?",
id: "Code patient",
cancel: "Annuler",
continue: "Continuer"
},
add: {
addHeader: "Ajouter le patient à la liste d’attente?",
comments: "Commentaires",
cancel: "Annuler",
addAction: "Ajouter à la liste d’attente"
},
complete: {
completedPatient: "Suivi du patient terminé",
comments: "Commentaires",
back: "Retour"
}
}
},
// have a common namespace used around the full app
ns: ["common"],
defaultNS: "common",
interpolation: {
escapeValue: false // not needed for react as it does escape per default to prevent xss!
}
});
export default i18n;