Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incrementor function doesn't work for Internationalisation #26

Closed
zoometh opened this issue Jun 19, 2023 · 5 comments
Closed

Incrementor function doesn't work for Internationalisation #26

zoometh opened this issue Jun 19, 2023 · 5 comments

Comments

@zoometh
Copy link
Member

zoometh commented Jun 19, 2023

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

  • Indefini
    image

This error is linked with the issue #27 , #30

@zoometh zoometh changed the title EAMENA ID function doesn't work for Internationalisation Incrementor function doesn't work for Internationalisation Jun 19, 2023
@zoometh
Copy link
Member Author

zoometh commented Jun 26, 2023

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

@ads04r
Copy link
Collaborator

ads04r commented Jul 17, 2023

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
Copy link
Member Author

zoometh commented Jul 18, 2023

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
Copy link
Member

michaeltfisher commented Jul 18, 2023 via email

@zoometh
Copy link
Member Author

zoometh commented Jul 24, 2023

@nsheldrick says it works now.

@zoometh zoometh closed this as completed Jul 24, 2023
ads04r added a commit to eamena-project/eamena that referenced this issue Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants