kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
112 stars 55 forks source link

library.kiwix.org seems to use italian as the language for non-language specific UI elements #1038

Closed IMayBeABitShy closed 5 months ago

IMayBeABitShy commented 6 months ago

Hi,

It seems like library.kiwix.org has the language configured wrongly: screenshot_kiwix_library

As you can see in the provided screenshot, some text elements like "select category" appear to be written italian (?). Other examples include "select language" and the placeholder text in the search field. I'd assume that said words are intended to be in english or dependent on the currently selected language.

I've tested this with multiple browsers and multiple devices. Kiwix appears to properly detect my prefered language (german), but said texts still continue to be in italian.

kelson42 commented 6 months ago

On the top right corner of the page you can choose the UI language. I guess there is "italiano" chosen (probably the language configured in your Browser). In such a scenario, the only strange thing is why we see "Search" (in English). But the explanation is pretty simple: the translateion of kiwix-serve in Italian is not over, see https://translatewiki.net/w/i.php?title=Special:Translate&group=kiwix-serve&language=it&filter=%21translated&action=translate. Maybe @IMayBeABitShy or @nemobis can help to complete?!

IMayBeABitShy commented 6 months ago

Thank you for your response. The UI seems to indeed be set to italian. However, this is weird in itself. I've tested this on multiple devices and browsers, some of which have never accessed the website before. None of these devices and browsers are configured in any way to use italian (all being set to either english or (rarely) german). So why would italian be set by default?

Maybe @IMayBeABitShy or @nemobis can help to complete?!

I'd love to help, but I am afraid that italian is not among the few languages I speak...

kelson42 commented 6 months ago

@veloman-yunkan Might that be that something is wrong with the language detection?

nemobis commented 6 months ago

I don't know how the language detection is supposed to work, but if I visit https://library.kiwix.org/ with a browser with Accept-Language: it I get redirected to https://library.kiwix.org/#lang=ita and the interface stays in English, while the content is mostly about Italian language wikis with Italian descriptions.

Screenshot_20240101_121518

kelson42 commented 6 months ago

@nemobis This is a bug, see https://github.com/kiwix/libkiwix/issues/1039 (just have open it) @IMayBeABitShy This is unfortunate and I can not reproduce your behaviour (English as browser language but Italian as Kiwix serve UI language automatically chosen). Do you have the same behaviour in private mode? Would you be able if confirmed to share with us a similar screenshot, so we can see which exact HTTP header you have: image

mgautierfr commented 6 months ago

Please also share the stored cookies.

IMayBeABitShy commented 6 months ago

Ok, this is getting a bit weird... For the past couple of days, I've been unable to replicate this issue and was about to close it, but I've just experienced it again.

Browser: Google chrome

URL: https://library.kiwix.org, redirected to https://library.kiwix.org/#lang=deu (though UI is still in another language)

So, headers:

:authority: library.kiwix.org
:method: GET
:path: /
:scheme: https
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: _pk_ref.5.e203=%5B%22%22%2C%22%22%2C1694788991%2C%22https%3A%2F%2Fold.reddit.com%2F%22%5D; _pk_id.5.e203=61d352465d9d4c7a.1694788991.
If-None-Match: "1703556771294441577.461423/z"
Sec-Ch-Ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Linux"
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Cookies: (sorry for the formatting)

_pk_ref.5.e203  %5B%22%22%2C%22%22%2C1694788991%2C%22https%3A%2F%2Fold.reddit.com%2F%22%5D  .kiwix.org  /   2024-03-16T02:43:10.000Z    88          Lax     Medium
_pk_id.5.e203   61d352465d9d4c7a.1694788991.    .kiwix.org  /   2024-10-12T14:43:11.000Z    41          Lax     Medium

Upon further inspection, chrome is filtering out a couple of cookies because the URL does not match or is not a subdomain:

_pk_ref.1.9b71  %5B%22%22%2C%22%22%2C1694789132%2C%22https%3A%2F%2Fwww.google.com%2F%22%5D  
wiki.kiwix.org  /   2024-03-16T02:45:32.000Z    88          Lax     Medium
_pk_id.1.9b71   9250a054c1b1e7d1.1694789132.    
wiki.kiwix.org  /   2024-10-12T14:45:32.000Z    41          Lax     Medium

Screenshot:

kiwix_chrome

When debugging a bit (to check if there really isn't a cookie set by manually setting the language to german), I've noticed an error message (see the top right corner of the next screenshot):

kiwix_error

I am currently not able to replicate the issue in firefox or in a private mode chrome tab.