bruvellu / cifonauta

Marine biology image database by CEBIMar/USP
http://cifonauta.cebimar.usp.br
GNU General Public License v3.0
21 stars 5 forks source link

Keep only cities, states, and countries with media #307

Open bruvellu opened 2 weeks ago

bruvellu commented 2 weeks ago

I was revising our translation pipeline and ran into an issue—the large number of cities in our database.

City names are currently translatable fields (New York, Nova Iorque) and these translatable model fields are synchronized with the locale PO files from time to time. With that many cities, this synchronization process takes very long.

That made me wonder, do we even need all these cities? Most will never have any media associated with them. It's just bloat to the database, making location queries slower.

We have all the Brazilian cities in the database for the metadata to be filled without mistakes. That works, but perhaps there's a better way?

There are probably libraries that provide this information. The metadata form can fetch this information dynamically and autocomplete. I'll compile the options here to see which might work best for our use case.

Meanwhile, I'll just disable translations for cities, for now.