humboldtdigital / ProHD

A web application built with TEI Publisher
https://dossierdigital.ohc.cu/
GNU General Public License v3.0
6 stars 7 forks source link

Localization of the interface #5

Closed arojascastro closed 2 years ago

arojascastro commented 3 years ago

We would like to enable access to the collection of texts in three languages: English, German and Spanish.

At the moment, the default interface is partially localized into those languages, but some important parts are missing:

Some screenshots here:

Browsing area

browsing area

Footer

footer

Pages

about

Metadata and menu

bar_metadata

arojascastro commented 3 years ago

I have tried to localize some parts of the interface:

However, the results are not the expected ones. I will read again the documentation in the meating. Do you know what I am doing wrong @tuurma ?

arojascastro commented 3 years ago

I have declared the path here <pb-page data-template="pages:pb-page" unresolved="unresolved" locales="resources/i18n/{{ns}}/{{lng}}.json"> and now it seems it is working. I will keep localizing following this method.

I keep this ticket open, because I am sure I will have new doubts or questions.

arojascastro commented 3 years ago

In committ afe1baa42192941818a4b9ed86a5f8453144130b I have internationalized with pb-i18n the text contained in HTML elements and in c22cb991902268726078648a941a314b5400e26f I have provided a translation into es, en, de.

To do:

I do not know how to do this... yet.

tuurma commented 3 years ago

Facets - see my recent commits

I've left the Subjects to port to translations for you, let me know if you need assistance

image image

tuurma commented 3 years ago

Static pages (about) mostly done with c0236fba32ef65fe9d1d81c5a850bd2857e58180. TOC remains to be updated when changing the language

arojascastro commented 3 years ago

Thank you.

I have updated the server installation with your last changes. I will have a look at your changes and try to finish the subjects and the translation into Spanish in the following days.

arojascastro commented 3 years ago

Hello @tuurma I have translated the content of the static pages into three languages - you chan check the server installation or my latest commits here.

However, I am failing to find out how to change the code in order to display the headings of each document on the left side. I have attached a screenshot.

contents

I have looked at view-grid-prohd.html and the odd (the div element), but I cannot figure out. Can you help me here when possible? Thank you!

arojascastro commented 3 years ago

Also I have translated the subject labels and add the output to config.xqm (https://github.com/humboldtdigital/ProHD/commit/027fa63cc23daa047200b3f35ed9cffb1c3383cd and this https://github.com/humboldtdigital/ProHD/commit/5ec85b6a7330eb39a7b82773813d71c2479be0dd) but the display of the subects is now missing -- see screenshot.

missing_subjects

arojascastro commented 3 years ago

The facet problem was solved thanks to @tuurma -- thanks a lot

arojascastro commented 3 years ago

Sadly, now, the display of the static pages in different languages is giving me an error sometimes:

the server did not return any content

La solicitud al servidor ha fallado.: It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 2.5.4 SequenceType Matching. checking function parameter 1 in call util:node-id($doc): XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: util:node-id($node as node()) xs:string. Expected cardinality: exactly one, got 0. [at line 87 of /db/apps/ProHD/modules/map.xql]

But If I change the language, it works. Perhaps has something to do with 9c84faf5a30cebb0d15858b730329c75ae65868e @tuurma ?

arojascastro commented 2 years ago

Closing here for now; we may work on the abstract in the future. Thank you @tuurma for your help !