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

View file

@ -58,22 +58,36 @@ var StatesCA = LookupTable{
// StatesDE maps common abbreviations for German states. // StatesDE maps common abbreviations for German states.
var StatesDE = LookupTable{ var StatesDE = LookupTable{
"BW": "Baden-Württemberg", "BW": "Baden-Württemberg",
"BY": "Bayern", "Baden-Wurttemberg": "Baden-Württemberg",
"BE": "Berlin", "BY": "Bayern",
"BB": "Brandenburg", "Bavaria": "Bayern",
"HB": "Bremen", "BE": "Berlin",
"HH": "Hamburg", "BER": "Berlin",
"HE": "Hessen", "BB": "Brandenburg",
"NI": "Niedersachsen", "HB": "Bremen",
"MV": "Mecklenburg-Vorpommern", "HH": "Hamburg",
"NW": "Nordrhein-Westfalen", "HE": "Hessen",
"RP": "Rheinland-Pfalz", "NI": "Niedersachsen",
"SL": "Saarland", "Lower Saxony": "Niedersachsen",
"SN": "Sachsen", "Lower-Saxony": "Niedersachsen",
"ST": "Sachsen-Anhalt", "MV": "Mecklenburg-Vorpommern",
"SH": "Schleswig-Holstein", "NW": "Nordrhein-Westfalen",
"TH": "Thüringen", "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. // StatesUS maps common abbreviations for US states.