forked from Project-OSRM/osrm-text-instructions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
languages.js
executable file
·126 lines (121 loc) · 5.12 KB
/
languages.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
// Load all language files explicitly to allow integration
// with bundling tools like webpack and browserify
var instructionsAr = require('./languages/translations/ar.json');
var instructionsCa = require('./languages/translations/ca.json');
var instructionsDa = require('./languages/translations/da.json');
var instructionsDe = require('./languages/translations/de.json');
var instructionsEn = require('./languages/translations/en.json');
var instructionsEo = require('./languages/translations/eo.json');
var instructionsEs = require('./languages/translations/es.json');
var instructionsEsEs = require('./languages/translations/es-ES.json');
var instructionsFi = require('./languages/translations/fi.json');
var instructionsFr = require('./languages/translations/fr.json');
var instructionsHe = require('./languages/translations/he.json');
var instructionsHu = require('./languages/translations/hu.json');
var instructionsId = require('./languages/translations/id.json');
var instructionsIt = require('./languages/translations/it.json');
var instructionsJa = require('./languages/translations/ja.json');
var instructionsKo = require('./languages/translations/ko.json');
var instructionsMy = require('./languages/translations/my.json');
var instructionsNl = require('./languages/translations/nl.json');
var instructionsNo = require('./languages/translations/no.json');
var instructionsPl = require('./languages/translations/pl.json');
var instructionsPtBr = require('./languages/translations/pt-BR.json');
var instructionsPtPt = require('./languages/translations/pt-PT.json');
var instructionsRo = require('./languages/translations/ro.json');
var instructionsRu = require('./languages/translations/ru.json');
var instructionsSl = require('./languages/translations/sl.json');
var instructionsSv = require('./languages/translations/sv.json');
var instructionsTr = require('./languages/translations/tr.json');
var instructionsUk = require('./languages/translations/uk.json');
var instructionsVi = require('./languages/translations/vi.json');
var instructionsYo = require('./languages/translations/yo.json');
var instructionsZhHans = require('./languages/translations/zh-Hans.json');
// Load all grammar files
var grammarDa = require('./languages/grammar/da.json');
var grammarFr = require('./languages/grammar/fr.json');
var grammarHu = require('./languages/grammar/hu.json');
var grammarRu = require('./languages/grammar/ru.json');
// Load all abbreviations files
var abbreviationsBg = require('./languages/abbreviations/bg.json');
var abbreviationsCa = require('./languages/abbreviations/ca.json');
var abbreviationsDa = require('./languages/abbreviations/da.json');
var abbreviationsDe = require('./languages/abbreviations/de.json');
var abbreviationsEn = require('./languages/abbreviations/en.json');
var abbreviationsEs = require('./languages/abbreviations/es.json');
var abbreviationsFr = require('./languages/abbreviations/fr.json');
var abbreviationsHe = require('./languages/abbreviations/he.json');
var abbreviationsHu = require('./languages/abbreviations/hu.json');
var abbreviationsLt = require('./languages/abbreviations/lt.json');
var abbreviationsNl = require('./languages/abbreviations/nl.json');
var abbreviationsRu = require('./languages/abbreviations/ru.json');
var abbreviationsSl = require('./languages/abbreviations/sl.json');
var abbreviationsSv = require('./languages/abbreviations/sv.json');
var abbreviationsUk = require('./languages/abbreviations/uk.json');
var abbreviationsVi = require('./languages/abbreviations/vi.json');
// Create a list of supported codes
var instructions = {
'ar': instructionsAr,
'ca': instructionsCa,
'da': instructionsDa,
'de': instructionsDe,
'en': instructionsEn,
'eo': instructionsEo,
'es': instructionsEs,
'es-ES': instructionsEsEs,
'fi': instructionsFi,
'fr': instructionsFr,
'he': instructionsHe,
'hu': instructionsHu,
'id': instructionsId,
'it': instructionsIt,
'ja': instructionsJa,
'ko': instructionsKo,
'my': instructionsMy,
'nl': instructionsNl,
'no': instructionsNo,
'pl': instructionsPl,
'pt-BR': instructionsPtBr,
'pt-PT': instructionsPtPt,
'ro': instructionsRo,
'ru': instructionsRu,
'sl': instructionsSl,
'sv': instructionsSv,
'tr': instructionsTr,
'uk': instructionsUk,
'vi': instructionsVi,
'yo': instructionsYo,
'zh-Hans': instructionsZhHans
};
// Create list of supported grammar
var grammars = {
'da': grammarDa,
'fr': grammarFr,
'hu': grammarHu,
'ru': grammarRu
};
// Create list of supported abbrevations
var abbreviations = {
'bg': abbreviationsBg,
'ca': abbreviationsCa,
'da': abbreviationsDa,
'de': abbreviationsDe,
'en': abbreviationsEn,
'es': abbreviationsEs,
'fr': abbreviationsFr,
'he': abbreviationsHe,
'hu': abbreviationsHu,
'lt': abbreviationsLt,
'nl': abbreviationsNl,
'ru': abbreviationsRu,
'sl': abbreviationsSl,
'sv': abbreviationsSv,
'uk': abbreviationsUk,
'vi': abbreviationsVi
};
module.exports = {
supportedCodes: Object.keys(instructions),
instructions: instructions,
grammars: grammars,
abbreviations: abbreviations
};