django-address icon indicating copy to clipboard operation
django-address copied to clipboard

Many times added the same country, State, locality if using many languages

Open hisie opened this issue 7 years ago • 6 comments

If I add an address with web browser configured in English the plugin works fine. It adds the Country, the State or equivalent entity, the Locality and generate the correct Address. If other user, with the web browser configured in Spanish add the same address the result is that the plugin add another Country [(1, "Spain", "ES"), (2, "España", "ES")], another State [(1, "Castilla y León", "CL", 1), (2, "Castilla y León", "CL", 2)], another locality... This is not fine, because if i want to filter all address by Country, or other grouping entity, it will not work.

Other question. Is this project still active? If not, any recommended fork?

Thank you.

hisie avatar Feb 23 '17 09:02 hisie

Same here. Looks like a design issue, language is not even part of the data model :(

This leads to too many and wrong results in value helps.

There was an attempt to repair (lookup comments for something like 'duplicate key issue with key IT

f-re avatar Mar 30 '17 13:03 f-re

...(enter /comment-end unintended) ') that prevents crashes with duplicate keys, but adds a data consistency problem because unawareness of different results from Google Maps with different languages set. I don't see a solution other than a major redesign of underlying tables.

f-re avatar Mar 30 '17 13:03 f-re

Hi @hisie, are you using the dev or master branch? The master branch was designed around Australian address structure, the dev branch was a rebuild which works with multiple objects, and as such works very differently.

bendog avatar Mar 30 '17 22:03 bendog

@bendog Thanks for fielding questions! @hisie Yeah, clearly I've not given this project the attention it needs, my apologies. As @bendog says, the master branch was written specifically with Australian addressing in mind. The dev branch was an attempt to make the system more global, and involves leveraging a more general structre from Google's geocoding system. This change gives a lot more internationalisation support, but makes the software much more complicated.

furious-luke avatar Aug 06 '17 00:08 furious-luke

I've Added a note to the model architecture update notes about this issue here.

I believe that the javascript geocoder plugin needs to be configurable to a single browser's language. That way if you have users entering data from multiple language settings the same response should be received from Google Maps.

I've added this to a new milestone, Future Features, for now.

banagale avatar Apr 19 '20 15:04 banagale

@banagale Im also running into an issue with Spanish users adding their address in the Spanish language. I have to change it to English manually in the admin every time. Any indication when this can be picked up?

mrxsal avatar Oct 15 '21 08:10 mrxsal