Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Prior to DSpace 7, the DSpace XML and JSP User interfaces had different catalogs of interface messages. Unified on a single user interface, the DSpace community is transitioning to a single catalog of interfaces messages and better tools for translators.

Originating in the Linux world, the GNU gettext tools and the PO file format is also the backbone of localization support in Wordpress, django and Drupal

The DSpace community is actively seeking contributors to aid in the translation of DSpace interface messages, to ensure that DSpace 7 can benefit from the most extensive localization support in the history of the project.

...

Make yourself familiar with the new .pot json5 catalog of DSpace messages, as well the .po file format with the translations for the catalog.

  • 2019-05-20 DRAFT dspace.pot => TODO UPDATE LINK ONCE PR MERGED !!!!!!!!
    • In this catalog, all msgstr entries are empty. This is because the catalog is the authoritative place for the original keys, not for any translations.
  • 2019-05-20 DRAFT en.po or the older DRAFT de.po => TODO UPDATE LINK ONCE PR MERGED !!!!!!!!
    • Both the msgids and the msgstr entries are in English in en.po.
    • The msgids are in English, and the msgstr are in German in de.po
    • Purely as comment, the old intermediate keys are still referenced in comments

Explore tools that can help you with the management of .pot and .po files. https://poedit.net/ is one widely used desktop application.

2019-07-25 State of development

The key challenges that are still being tackled are:

2019-05-20 State of development

As part of preview release 1, the developers are still using en.json catalogs. Once Pull Request 366 is accepted, the migration to the new .POT and .PO standard files will be official.

As long as DSpace 7 is still in development, it is expected that the dspace.pot catalog, as well as the different translations, will continue to be extended and evolved.

Together, we aim to release as many, as complete translations as possible, as part of the official DSpace 7.0 release.

  • https://github.com/DSpace/dspace-angular/blob/master/resources/i18n/en.json5
    • This English master file is the authoritative source for the list of keys that are used in the angular interface, as well as the associated English messages
  • Example link Dutch catalog
    • As one example of the translated catalog, you will see in the dutch catalog that the English original messages are still present as comments. 

2019-10-29 State of development

...

Volunteer!

Please list your name, email address alongside any of the languages to which you wish to contribute. Also feel free to join the channel #translation on the DuraSpace Slack for assistance and discussion around DSpace 7 translations. 

Dutch (nl.

...

json5)

Bram Luyten - bram@atmire.com

German (de.json5)

Claudia Jürgen - claudia.juergen@tu-dortmund.de - German (de.po) 

Translator documentation

Translation files (.po)

...

Code Block
languagebash
app/+community-page/delete-community-page/delete-community-page.component.html:5: <h2 id="header" class="border-bottom pb-2">{{ 'community.delete.head' | translate
app/+community-page/delete-community-page/delete-community-page.component.html:7: <p class="pb-2">{{ 'community.delete.text' | translate:{ dso: dso.name } }}</p>
app/+community-page/delete-community-page/delete-community-page.component.html:12: <button class="btn btn-primary" (click)="onCancel(dso)">{{'community.delete.cancel' | translate}}
app/+community-page/edit-community-page/edit-community-page.component.html:4: <h2 id="header" class="border-bottom pb-2">{{ 'community.edit.head' | translate }}</h2>


Future work

Message Context - msgctxt

Apart from comments, starting with #, the msgid lines representing the key, and the msgstr lines, representing the translations, an entry can also contain a msgctxt line.

Originally, in linux gettext, they are being used to disambiguate messages. Let's say you have two different places in the application where you are using "Person" in English, you sometimes need the ability to give both of these occurences a different translation in another language. 

This is why uniqueness is actually not enforced on the uniqueness of the msgid, but on the uniqueness of the combination between msgid, and another directive, msgctxt.

Here's an example, outside of DSpace, showing that "Normal" requires different grammar in another language, depending on the context in which it is used.

Code Block
languagebash
titleGeneral gettext / PO example of msgctxt
#: utils/katestyletreewidget.cpp:132
msgctxt "Text style"
msgid "Normal"
msgstr "običan"
⁠
#: utils/kateautoindent.cpp:78
msgctxt "Autoindent mode"
msgid "Normal"
msgstr "obično"

At the time of writing, 2019-06-01, the NGX-Translate implementation of the support of po files that DSpace is relying on, actually prevails the translations from being rendered correctly if a msgctxt is also part of the entry. This means that right now, we can only have a single translation for a single string. This is also why the catalog and the en.po translation file don't contain msgctxt entries.

ICU Expressions and Pluralization

Instead of relying on different messages for singular and plural forms, the community hopes to conform the messages to the ICU Message Format as specified in the CLDR Plural rules

What happened to the objective to leverage .po and gettext as new standard?

Originating in the Linux world, the GNU gettext tools and the PO file format is also the backbone of localization support in Wordpress, django and Drupal

The Angular i18n framework we use, NGX translate, has a 3rd party PO file loader: https://github.com/biesbjerg/ngx-translate-po-http-loader 

...

As a result, the community settled for:

  • JSON6 JSON5 as the format for the message catalog
  • Reverting to a flat list of keys, instead of a hierarchical tree. This now makes it possible again to search on a particular key, which was not possible anymore in the hierarchical format

2019-07-25 State of development (OLD)

The key challenges that are still being tackled are:

2019-05-20 State of development (OLD)

As part of preview release 1, the developers are still using en.json catalogs. Once Pull Request 366 is accepted, the migration to the new .POT and .PO standard files will be official.

As long as DSpace 7 is still in development, it is expected that the dspace.pot catalog, as well as the different translations, will continue to be extended and evolved.

Together, we aim to release as many, as complete translations as possible, as part of the official DSpace 7.0 release.