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

Incrementor function doesn't work for Internationalisation #26

Closed zoometh closed 1 year ago

zoometh commented 1 year ago

The Incrementor function doesn't create a new EAMENA ID number when the first Add (green button) is done in the Arabic or French localisation of the DB. It will create an ID labeled "undefined":

-غير محدد image

This error is linked with the issue #27 , https://github.com/eamena-project/eamena-arches-dev/issues/30

zoometh commented 1 year ago

It seems to be only a display problem during recording of an HP but not once registration is validated

ads04r commented 1 year ago

I believe I've now fixed this. Or at least, I have as I understand it. The Incrementor function was generating an i18n string, as it is supposed to, but it was only in English. I assumed (wrongly) that the new resource screen would spot this and just use the English string where none exists in other languages, as all other parts of Arches do. However, this wasn't happening.

I've replaced a small chunk of code in the incrementor.py file for one that generates an i18n explicitly containing an identical "EAMENA-xxxx" string for every activated language (as defined in settings.py). This stops the 'undefined' string from appearing, although we now have a left-to-right string as a default label in a right-to-left language (Arabic) so I'd be grateful if someone who speaks Arabic could try to create a heritage place in that language and let me know if it's acceptable or not.

The new version of the function is on the live database now, but can be rolled back easily if there is a problem. If it's OK then I'll push to the github repo.

zoometh commented 1 year ago

I'd be grateful if someone who speaks Arabic could try to create a heritage place in that language and let me know if it's acceptable or not

I'll ask one of our colleagues

michaeltfisher commented 1 year ago

So, there is updated code for the incrementor function from Farallon. Let me know if you want it, or if yours is working now.

Best, -Mike


Dr. Michael Fisher Group Leader of Digital Archaeology Department of Archaeology Max Planck Institute of Geoanthropology Kahlaische Straße 10 07745 Jena, Germany +49 3641 686779

On Jul 18, 2023, at 10:44 AM, Thomas Huet @.***> wrote:

I'd be grateful if someone who speaks Arabic could try to create a heritage place in that language and let me know if it's acceptable or not

I'll ask one of our colleagues

— Reply to this email directly, view it on GitHubhttps://github.com/eamena-project/eamena-arches-dev/issues/26#issuecomment-1639793735, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJZP47TDWNZ46J2PBIPOF5DXQZEFFANCNFSM6AAAAAAZMAQYHY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

zoometh commented 1 year ago

@nsheldrick says it works now.