Project

General

Profile

Feature #1924

Unify translations and missing table translations

Added by Alexander Watzinger 20 days ago. Updated 5 days ago.

Status:
In Progress
Priority:
Normal
Category:
UI
Target version:
Start date:
2023-01-08
Estimated time:

Description

Enric, who kindly made Spanish and Catalan translations, noticed that translations for table labels are missing.
I already created the translations string in the develop branch and they were added to the translation files:
_('previous')
_('next')
_('show')
_('entries')
_('showing %(first)s to %(last)s of %(all)s entries', first=1, last=25, all=38)

It still has to be implemented so that they show up in the UI. At the moment we are using multiple translation system and it can get confusing:
  • .po files in openatlas/translations
    • used in the Python and HTML files with the _('string_to_translate') notation
    • used for the map and transformed to JavaScript variables in openatlas/templates/map.html
    • used for general UI translations and transformed to JavaScript variables at top of openatlas/templates/layout.html
  • JavaScript form error translations in openatlas/static/js/messages_de.js
    • I noticed it was broken, is fixed in develop and online on demo-dev. I also wrote a test for it to prevent this in the future.
    • It's the only one (I think) that is translated outside of the .po files, we may want to change that
    • Currently only German translations are available but I want to wait to ask e.g. Enric for translations until we decided, if/how we restructure it.

I hope I didn't missed anything.

Assigning this to our fronted expert Andi. It would be great if we could unify this while adding support for table labels translations . e.g.
  • All translations in .po files
  • Transformation to JavaScript at one place

Please let me know if/how we could solve this so that we can discuss it later.


Related issues

Related to OpenAtlas - Bug #1922: Missing user interface translationsClosed2023-01-08Actions

History

#1

Updated by Alexander Watzinger 20 days ago

  • Related to Bug #1922: Missing user interface translations added
#2

Updated by Enric Rodellas 15 days ago

Alex,
If javascript translation must be done in files
  • openatlas/static/js/messages_de.js
  • openatlas/static/js/messages_es.js
  • openatlas/static/js/messages_ca.js
    go ahead and I would do translation for Spanish and Catalan

I will propose an example and do a pull request.

#3

Updated by Alexander Watzinger 15 days ago

Thank you Enric for the pull request, the merge went fine and changes are already in the develop branch.
The changes can be seen on the demo-dev version too, e.g. when inserting a person: https://demo-dev.openatlas.eu/insert/person and submitting the form without providing a name.
We will most likely rewrite the application so that all translation can be done in the .po files. But the provided files will work in the current system and when we do the rewriting, we already have the translations available.

#4

Updated by Alexander Watzinger 13 days ago

  • Subject changed from Unifying translations and missing table translations to Unify translations and missing table translations
#5

Updated by Andreas Olschnögger 6 days ago

  • Status changed from Acknowledged to In Progress
  • Assignee changed from Andreas Olschnögger to Alexander Watzinger

There is now only one file which contains the transformation to javascript (openatlas/templates/util/translations.html). This file is included in the openatlas/templates/layout.html.
It also contains the translations for the form validation, which need to be added to the .po files.
The openatlas/static/js/messages_[language].js files can then be deleted.

Changes are in the branch feature_unify_tanslation.
I assign this issue to Alex to add the missing validation translation to the .po files.

#6

Updated by Andreas Olschnögger 5 days ago

  • Status changed from In Progress to Closed
  • Assignee changed from Alexander Watzinger to Andreas Olschnögger

As discussed we will keep the translation files of jquery validation seperated from the .po files.
Changes are already in develop.

#7

Updated by Alexander Watzinger 5 days ago

  • Status changed from Closed to In Progress

Reopening this issue because I still miss the translations for table navigation, see top of description.
Not sure if this was the right approach but they are already included in the translation files e.g. German "weiter" for "next", but don't show up in the table navigation.

Also available in: Atom PDF