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