uwazi icon indicating copy to clipboard operation
uwazi copied to clipboard

Names of languages are not translatable

Open llfinch opened this issue 2 years ago • 0 comments

Describe the bug There are three main areas of Uwazi where a user is confronted with a list of languages:

  • In Settings --> Languages, where an admin can activate different UI languages for their instance
  • In the top navigation menu, where a visitor can select from the dropdown a different UI language
  • In an entity with a Primary Document attached, Uwazi automatically detects the language of the document and applies a descriptive label. If an admin user wants to modify the label, they can click "Edit" and select a different language from the dropdown list.

These languages have different presentations:

  • In Settings --> Languages, they are rendered in English followed by the language code in parentheses. For example:

Spanish (es)

  • In the top navigation menu dropdown, language names are rendered in the language itself. For example:

Español

  • In an entity with a Primary Document attached, the label for the document's language is rendered in English and without any sort of capitalization (which is grammatically incorrect, by the norms of English-language grammar): For example:

spanish

  • In an entity with a Primary Document attached, in the dropdown list with all possible languages, the language is rendered first in the language itself followed by the name of the language in English in parentheses. For example:

Español (Spanish)

When it comes to the top navigation menu dropdown, I think as it works now (the name hardcoded in the language itself) serves users well. And I think it's very useful that in the case of the Primary Document dropdown list, we have the name of the language rendered in the language itself.

However, in the other cases where there is an English rendering of the language name, it would be useful to be able to translate it because we have many admins with instances whose default language is not English, and we have many visitors to instances with UIs available in non-English languages. In both cases, a translation of a language name into English doesn't serve them particularly well.

Unfortunately, currently, these terms are not translatable, neither by Settings --> Translations --> User Interface nor by the Live Translate Feature. The only term at the moment that is translatable by Settings --> Translations --> User Interface is the term "Other" which appears in the Primary Document's language dropdown list and is also used as a document language label. (I assume that means that the remaining language labels would be translatable too in theory, but I asked in #4495 previously about this.)

The ideal would be to add these terms to the Settings --> Translations --> User Interface list. An additional nice-to-have would be to correct the default capitalization on the document language label in English: languages are proper nouns and as such they should be capitalized (e.g. Spanish, not spanish).

Expected behavior If I have a non-English-language UI activated on my Uwazi instance, I would expect that all parts of the instance are correctly rendered in the language in which I'm currently navigating.

Screenshots In the screenshots below, I've highlighted in green the part of the term that ideally would be translatable in the Settings --> Translations --> User Interface list.

Dropdown list of languages for a Primary Document: primary document language dropdown

Language label on a Primary Document: primary document language label

List of system languages in Settings --> Languages: settings - languages - available languages

llfinch avatar Jul 20 '22 10:07 llfinch