django-cities-light
django-cities-light copied to clipboard
Alternate Names not created for regions
Hello, this is possibly a bug or I'm doing something wrong here. My settings:
CITIES_LIGHT_TRANSLATION_LANGUAGES = ['de']
CITIES_LIGHT_INCLUDE_COUNTRIES = ['DE']
CITIES_LIGHT_INCLUDE_CITY_TYPES = ['PPL', 'PPLA', 'PPLA2', 'PPLA3', 'PPLA4', 'PPLC', 'PPLF', 'PPLG', 'PPLL', 'PPLR', 'PPLS',]
CITIES_LIGHT_CITY_SOURCES = ['http://download.geonames.org/export/dump/cities500.zip']
After running manage.py cities_light without any errors i had a look into the database:
python manage.py shell
>>> from cities_light.models import Country, Region, City
>>> c = Country.objects.first()
>>> c.name
'Germany'
>>> c.alternate_names
'Bundesrepublik Deutschland'
>>> r = Region.objects.filter(name="Bavaria").first()
>>> r.name
Bavaria
>>> r.alternate_names
''
So the alternate name for the country is created, but not for the regions. But actually the translation is given in the dataset from geonames.org:
https://download.geonames.org/export/dump/admin1CodesASCII.txt
DE.02 Bavaria Bavaria 2951839
https://download.geonames.org/export/dump/alternateNames.zip
1894550 2951839 de Bayern 1 1
Any idea if this is a bug or why this is not working?
I am facing the same thing.
CITIES_LIGHT_APP_NAME = 'cities_light'
CITIES_LIGHT_TRANSLATION_LANGUAGES = ['en', "ar", "es"]
CITIES_LIGHT_INCLUDE_COUNTRIES = ['KW']
CITIES_LIGHT_INCLUDE_CITY_TYPES = ['PPL', 'PPLA', 'PPLA2', 'PPLA3', 'PPLA4', 'PPLC', 'PPLF', 'PPLG', 'PPLL', 'PPLR', 'PPLS', 'STLMT',]
The names only shows in weird English e.g., Abraq Khayţān, Abū Ḩalīfah
Thanks to @ahmad88me we have a new fix for the subregion issue with Alternate names. Can @mi01 verify if that solves his issue?