openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
176 stars 65 forks source link

`default_journal_language` has no effect #4313

Open joemull opened 4 months ago

joemull commented 4 months ago

Problem

The default_journal_language setting (core.models.Setting) is not used to determine what language to put the content in, so far as I can tell. This is done by Django's translation.get_language based on the user's browser settings.

However, get_language also relies on cookies to detect the last language. This causes problems in cases where English is the last-used language. For example, here's a user story:

I browse a non-Janeway website in English. Then I navigate to a Janeway journal with Spanish as the only designated language. On this journal site, English should not come into play unless there is a translation missing for a bit of text on the page. However, Janeway detects that I was just on an English site, so it puts the journal in English for me, even though the journal editor wanted the journal to be available only in Spanish, and has no plan to provide English translations. This means the nav bar comes through in English, but the content is in Spanish. I am confused.

To summarize, there are two problems for the end user:

Solution

StephDriver commented 1 day ago

From Backlog Refinement