Places: Add state name normalizations for Germany #1664

This commit is contained in:
Michael Mayer 2021-11-11 17:10:52 +01:00
parent f30e5d2903
commit 0575ab2276
2 changed files with 34 additions and 16 deletions

View file

@ -27,6 +27,7 @@ build: generate build-js build-go
install: install-bin install-assets
test: test-js test-go
test-go: reset-testdb run-test-go
test-pkg: reset-testdb run-test-pkg
test-api: reset-testdb run-test-api
test-short: reset-testdb run-test-short
acceptance-private-run-chromium: acceptance-private-restart acceptance-private acceptance-private-stop
@ -164,6 +165,9 @@ run-test-short:
run-test-go:
$(info Running all Go unit tests...)
$(GOTEST) -parallel 1 -count 1 -cpu 1 -tags slow -timeout 20m ./pkg/... ./internal/...
run-test-pkg:
$(info Running all Go unit tests in '/pkg'...)
$(GOTEST) -parallel 2 -count 1 -cpu 2 -tags slow -timeout 20m ./pkg/...
run-test-api:
$(info Running all API unit tests...)
$(GOTEST) -parallel 2 -count 1 -cpu 2 -tags slow -timeout 20m ./internal/api/...

View file

@ -59,21 +59,35 @@ var StatesCA = LookupTable{
// StatesDE maps common abbreviations for German states.
var StatesDE = LookupTable{
"BW": "Baden-Württemberg",
"Baden-Wurttemberg": "Baden-Württemberg",
"BY": "Bayern",
"Bavaria": "Bayern",
"BE": "Berlin",
"BER": "Berlin",
"BB": "Brandenburg",
"HB": "Bremen",
"HH": "Hamburg",
"HE": "Hessen",
"NI": "Niedersachsen",
"Lower Saxony": "Niedersachsen",
"Lower-Saxony": "Niedersachsen",
"MV": "Mecklenburg-Vorpommern",
"NW": "Nordrhein-Westfalen",
"NRW": "Nordrhein-Westfalen",
"North Rhine-Westphalia": "Nordrhein-Westfalen",
"RP": "Rheinland-Pfalz",
"Rhineland-Palatinate": "Rheinland-Pfalz",
"SL": "Saarland",
"SN": "Sachsen",
"Saxony": "Sachsen",
"ST": "Sachsen-Anhalt",
"Saxony-Anhalt": "Sachsen-Anhalt",
"Saxony Anhalt": "Sachsen-Anhalt",
"Sachsen Anhalt": "Sachsen-Anhalt",
"SH": "Schleswig-Holstein",
"TH": "Thüringen",
"Thuringia": "Thüringen",
"Thuringen": "Thüringen",
}
// StatesUS maps common abbreviations for US states.