forked from mampfes/hacs_waste_collection_schedule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_tranlsations.py
252 lines (241 loc) · 8.33 KB
/
default_tranlsations.py
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
import json
from typing import Iterable
DEFAULT_PARAM_TRANSLATIONS = {
"en": {
"abf_hausnr": "House Number",
"abf_strasse": "Street",
"abf_suche": "Search",
"address_name_number": "Address Name or Number",
"bezirk": "District",
"gemeinde": "Municipality",
"hausnr": "House Number",
"hausnummer": "House Number",
"hnr": "House Number",
"houseNo": "House Number",
"housenameornumber": "House Name or Number",
"housenumber": "House Number",
"housenumberorname": "House Number or Name",
"hpid": "HPID",
"kommune": "Municipality",
"ladeort": "Loading Location",
"lat": "Latitude",
"lon": "Longitude",
"ort": "City",
"ortsgemeinde": "Local Community",
"ortsteil": "District",
"params": "Parameters",
"postCode": "Postcode",
"post_code": "Postcode",
"postcode": "Postcode",
"stadt": "City",
"stadtteil": "District",
"strasse": "Street",
"teilgebiet": "Subarea",
"turnus": "Cycle",
"uprn": "UPRN",
"zipCode": "ZIP Code",
"zip_code": "ZIP Code",
"zipcode": "ZIP Code",
"zusatz": "Addition",
},
"de": {
"Calendar": "Kalender",
"addition": "Zusatz",
"address_postcode": "Postleitzahl",
"address_street": "Straße",
"address": "Addresse",
"adress": "Addresse",
"area": "Gebiet",
"bill_number": "Rechnungsnummer",
"city": "Stadt",
"city_id": "Stadt ID",
"client": "Kunde",
"community": "Gemeinde",
"company": "Unternehmen",
"customer": "Kunde",
"district": "Bezirk",
"email": "E-Mail",
"hausnr": "Hausnummer",
"house": "Haus",
"houseNo": "Hausnummer",
"house_name": "Hausname",
"house_number": "Hausnummer",
"house_number_or_name": "Hausnummer oder Name",
"housenumber": "Hausnummer",
"housenumberorname": "Hausnummer oder Name",
"lat": "Breitengrad",
"location": "Position",
"lon": "Längengrad",
"method": "Methode",
"municipal": "Gemeinde",
"municipality": "Gemeinde",
"number": "Nummer",
"password": "Passwort",
"phone": "Telefon",
"plz": "PLZ",
"postCode": "PLZ",
"post_code": "PLZ",
"postcode": "PLZ",
"property_no": "Grundstück Nr.",
"strasse": "Straße",
"street": "Straße",
"streetId": "Straßen ID",
"street_id": "Straßen ID",
"street_name": "Straßenname",
"subdomain": "Subdomain",
"terretory": "Gebiet",
"town": "Stadt",
"types": "Typen",
"uprn": "UPRN",
"url": "URL",
"username": "Benutzername",
"values": "Werte",
"version": "Version",
"village": "Ort",
"voivodship": "Woiwodschaft",
"zipCode": "PLZ",
"zip_code": "PLZ",
"zipcode": "PLZ",
"zone": "Zone",
},
"it": {
"addressNo": "Indirizzo Numero",
"api_key": "Chiave API",
"bill_number": "Numero della bolletta",
"building_number": "Numero Edificio",
"calendar": "Calendario",
"calendar_splitter": "Calendar Splitter",
"calendar_title": "Nome Calendario",
"city": "Città",
"city_id": "ID Città",
"city_part": "Parte della Città",
"client": "Cliente",
"community": "Comunità",
"company": "Compagnia",
"council": "Consiglio",
"count": "Conteggio",
"county_id": "ID Paese",
"customer": "Cliente",
"dates": "Date",
"district": "Distretto",
"district_id": "ID Distretto",
"door_num": "Numero Interno",
"email": "Email",
"excludes": "Escludi",
"file": "Nome File",
"frequency": "Frequenza",
"house": "Casa",
"houseID": "ID Casa",
"houseNo": "Civico",
"house_letter": "Lettera Casa",
"house_name": "Nome Casa",
"house_number": "Civico",
"housenameornumber": "Numero o Nome Casa",
"housenumber": "Civico",
"housenumberorname": "Numero o Nome Casa",
"ignored_containers": "Ignored Containers",
"interval": "Intervallo",
"ladeort": "Ladeort",
"location": "Posizione",
"location_id": "ID Posizione",
"method": "Metodo",
"municipality": "Municipality",
"municipality_id": "Municipality ID",
"name": "Nome",
"number": "Numero",
"operator": "Operatore",
"p_collect_cycle": "P Collect Cycle",
"params": "Parametri",
"phone": "Telefono",
"pid": "PID",
"postCode": "Codice Postale CAP",
"post_code": "Codice Postale CAP",
"postal_code": "Codice Postale CAP",
"postcode": "Codice Postale CAP",
"predict": "Predict",
"prem_code": "Premises Code",
"premises_id": "Premises ID",
"project_id": "Project ID",
"property": "Proprietà",
"propertyID": "ID Proprietà",
"property_id": "ID Proprietà",
"property_location": "Posizione Proprietà",
"property_no": "Proprietà Numero",
"r_collect_cycle": "R Collect Cycle",
"radius": "Raggio",
"region": "Regione",
"road": "Strada",
"road_name": "Nome Strada",
"sector": "Settore",
"service": "Servizio",
"service_id": "ID Servizio",
"service_provider": "Fornitore di Servizi",
"show_nights": "Mostra Notti",
"start": "Inizio",
"state": "Stato",
"street": "Strada",
"streetId": "ID Strada",
"streetIndex": "Indice Strada",
"streetName": "Nome della Strada",
"street_address": "Indirizzo Strada",
"street_code": "Codice Strada",
"street_id": "ID Strada",
"street_name": "Nome Strada",
"street_number": "Numero Strada",
"street_town": "Città Strada",
"suffix": "Suffisso",
"territory": "Territorio",
"town": "Città",
"unit_number": "Numero Interno",
"until": "Fino",
"uprn": "UPRN",
"values": "Valori",
"verify_ssl": "Verifica SSL",
"version": "Versione",
"village": "Villaggio",
"weekdays": "Giorni feriali",
"zipCode": "Codice Postale CAP",
"zip_code": "Codice Postale CAP",
"zipcode": "Codice Postale CAP",
"zone": "Zona",
"zoneID": "ID Zona",
"zone_id": "ID Zona",
},
}
DEFAULT_PARAM_DESCRIPTIONS = {
"en": {
"uprn": "An easy way to discover your Unique Property Reference Number (UPRN) is by going to https://www.findmyaddress.co.uk/ and entering in your address details.",
},
"de": {
"uprn": "Eine einfache Möglichkeit, Ihre Unique Property Reference Number (UPRN) zu finden, besteht darin, auf https://www.findmyaddress.co.uk/ zu gehen und Ihre Adressdaten einzugeben.",
},
"it": {
"uprn": "Un modo facile per scoprire il tuo Numero di Riferimento Proprietà Unica (UPRN) è andare su https://www.findmyaddress.co.uk/ e inserire i dettagli del tuo indirizzo.",
},
}
def default_translations(args: Iterable[str]) -> dict[str, dict[str, str]]:
translation: dict[str, dict[str, str]] = {}
for arg in args:
for lang, translations in DEFAULT_PARAM_TRANSLATIONS.items():
if not lang in translation:
translation[lang] = {}
if arg in translations:
translation[lang][arg] = translations[arg]
return translation
def default_descriptions(args: Iterable[str]) -> dict[str, dict[str, str]]:
translation: dict[str, dict[str, str]] = {}
for arg in args:
for lang, translations in DEFAULT_PARAM_DESCRIPTIONS.items():
if not lang in translation:
translation[lang] = {}
if arg in translations:
translation[lang][arg] = translations[arg]
return translation
def sort_translations():
for lang in DEFAULT_PARAM_TRANSLATIONS:
DEFAULT_PARAM_TRANSLATIONS[lang] = dict(
sorted(DEFAULT_PARAM_TRANSLATIONS[lang].items())
)
print(json.dumps(DEFAULT_PARAM_TRANSLATIONS, indent=4, ensure_ascii=False))
if __name__ == "__main__":
sort_translations()