eamena-project / eamena-arches-dev

development repository of the EAMENA Arches-powered database platform
https://eamena.org/home
GNU Affero General Public License v3.0
5 stars 3 forks source link

Change Arabic Country names to English Country Names as PrefLabels #13

Open zoometh opened 1 year ago

zoometh commented 1 year ago

The automatic audit of the DB, created by @ads04r, https://mareastats.drashsmith.com/, shows that a little number of Heritage Places, and Grids, have their Country names in Arabic instead of English. For example تونس instead of Tunisia.:

We want to turn these values to their English version

image

This is an Advanced Search on Country = Tunisia (it is not possible to search تونس) and limit the search to Heritage Places

https://database.eamena.org/en/search?paging-filter=1&tiles=true&format=tilecsv&precision=6&total=188104&resource-type-filter=%5B%7B%22graphid%22%3A%2234cfe98e-c2c0-11ea-9026-02e7594ce0a0%22%2C%22name%22%3A%22Heritage%20Place%22%2C%22inverted%22%3Afalse%7D%5D&advanced-search=%5B%7B%22op%22%3A%22and%22%2C%2234cfea69-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea43-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%227793d769-5541-4e17-8121-97c019226105%22%7D%2C%2234cfea5d-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea73-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea95-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22~%22%2C%22val%22%3A%22%22%7D%7D%5D

Copy paste the previous URL into the DB or click here Gives:

image

There is different UUID in this previous URL:

Let's find the UUID of the Country with the whatisthis Arches function (back-end), starting with the first ones:

python manage.py whatisthis 34cfea69-c2c0-11ea-9026-02e7594ce0a0

Gives fieldname = SiteShape

python manage.py whatisthis 58b0fe44-feff-40d0-b031-abe9aab377b4

Gives value = Tunisia

Now we found that 58b0fe44-feff-40d0-b031-abe9aab377b4 is the value of Tunisia, to get the value of تونس, we run this SQL in pgAdmin:

SELECT valueid FROM values
WHERE value like 'تونس'

Gives: valueid = 7793d769-5541-4e17-8121-97c019226105

So, we modify the URL, swaping 58b0fe44-feff-40d0-b031-abe9aab377b4 with 7793d769-5541-4e17-8121-97c019226105:

New URL:

https://database.eamena.org/en/search?paging-filter=1&tiles=true&format=tilecsv&precision=6&total=188104&resource-type-filter=%5B%7B%22graphid%22%3A%2234cfe98e-c2c0-11ea-9026-02e7594ce0a0%22%2C%22name%22%3A%22Heritage%20Place%22%2C%22inverted%22%3Afalse%7D%5D&advanced-search=%5B%7B%22op%22%3A%22and%22%2C%2234cfea69-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea43-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%227793d769-5541-4e17-8121-97c019226105%22%7D%2C%2234cfea5d-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea73-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea95-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22~%22%2C%22val%22%3A%22%22%7D%7D%5D

Copy paste the previous URL into the DB or click here

image