1+ import i18n from 'i18next' ;
2+ import { initReactI18next } from 'react-i18next' ;
3+ // import Backend from 'i18next-http-backend';
4+ import LanguageDetector from 'i18next-browser-languagedetector' ;
5+
6+
7+ i18n
8+ // .use(Backend)
9+ // detect user language
10+ // learn more: https://github.com/i18next/i18next-browser-languageDetector
11+ . use ( LanguageDetector )
12+ // pass the i18n instance to react-i18next.
13+ . use ( initReactI18next )
14+ // init i18next
15+ // for all options read: https://www.i18next.com/overview/configuration-options
16+ . init ( {
17+ debug : true ,
18+ fallbackLng : 'en' ,
19+ interpolation : {
20+ escapeValue : false , // not needed for react as it escapes by default
21+ } ,
22+ resources : {
23+ en : {
24+ translation : {
25+ // here we will place our translations...
26+ header : {
27+ docs_link : 'API Docs'
28+ } ,
29+ jobs : {
30+ latest_tab : 'LATEST RUN' ,
31+ history_tab : 'RUN HISTORY' ,
32+ location : 'LOCATION' ,
33+ empty_title : 'No Run Information Available' ,
34+ empty_body : 'Try adding some runs for this job.' ,
35+ runinfo_subhead : 'FACETS' ,
36+ runs_subhead : 'FACETS'
37+ } ,
38+ search : {
39+ search : 'Search' ,
40+ jobs : 'Jobs' ,
41+ and : 'and' ,
42+ datasets : 'Datasets'
43+ } ,
44+ lineage : {
45+ empty_title : 'No node selected' ,
46+ empty_body : 'Try selecting a node through search or the jobs or datasets page.'
47+ }
48+ }
49+ } ,
50+ fr : {
51+ translation : {
52+ header : {
53+ docs_link : 'API Docs'
54+ } ,
55+ jobs : {
56+ latest_tab : 'DERNIÈRE COURSE' ,
57+ history_tab : "HISTORIQUE D'EXECUTION" ,
58+ location : 'EMPLACEMENT' ,
59+ empty_title : 'Pas de Course les Informations Disponibles' ,
60+ empty_body : "Essayez d'ajouter quelques exécutions pour ce travail." ,
61+ runinfo_subhead : 'FACETTES' ,
62+ runs_subhead : 'FACETTES' ,
63+ } ,
64+ search : {
65+ search : 'Recherche' ,
66+ jobs : "d'Emplois" ,
67+ and : 'et' ,
68+ datasets : "d'Ensembles de Données"
69+ } ,
70+ lineage : {
71+ empty_title : 'Aucun nœud sélectionné' ,
72+ empty_body : 'Essayez de sélectionner un nœud via la recherche ou la page des travaux ou des ensembles de données.'
73+ }
74+ }
75+ } ,
76+ es : {
77+ translation : {
78+ header : {
79+ docs_link : 'API Docs'
80+ } ,
81+ jobs : {
82+ latest_tab : 'ÚLTIMA EJECUCIÓN' ,
83+ history_tab : 'HISTORIAL DE EJECUCIONES' ,
84+ location : 'UBICACIÓN' ,
85+ empty_title : 'No hay Información de Ejecución Disponible' ,
86+ empty_body : 'Intente agregar algunas ejecuciones para este trabajo.' ,
87+ runinfo_subhead : 'FACETAS' ,
88+ runs_subhead : 'FACETAS'
89+ } ,
90+ search : {
91+ search : 'Buscar' ,
92+ jobs : 'Trabajos' ,
93+ and : 'y' ,
94+ datasets : 'Conjuntos de Datos'
95+ } ,
96+ lineage : {
97+ empty_title : 'Ningún nodo seleccionado' ,
98+ empty_body : 'Intente seleccionar un nodo mediante la búsqueda o la página de trabajos o conjuntos de datos.'
99+ }
100+ }
101+ } ,
102+ pl : {
103+ translation : {
104+ header : {
105+ docs_link : 'API Dokumenty'
106+ } ,
107+ jobs : {
108+ latest_tab : 'OSTATNI BIEG' ,
109+ history_tab : 'BIEGAĆ HISTORIA' ,
110+ location : 'LOKALIZACJA' ,
111+ empty_title : 'Brak dostępnych informacji o przebiegu' ,
112+ empty_body : 'Spróbuj dodać kilka przebiegów dla tego zadania.' ,
113+ runinfo_subhead : 'ASPECTY' ,
114+ runs_subhead : 'ASPECTY'
115+ } ,
116+ search : {
117+ search : 'Wyszukaj Oferty' ,
118+ jobs : 'Pracy' ,
119+ and : 'i' ,
120+ datasets : 'Zestawy Danych'
121+ } ,
122+ lineage : {
123+ empty_title : 'Nie wybrano węzła' ,
124+ empty_body : 'Spróbuj wybrać węzeł za pomocą wyszukiwania lub strony zadań lub zestawów danych.'
125+ }
126+ }
127+ }
128+
129+ }
130+ } ) ;
131+
132+ export default i18n ;
0 commit comments