louislam / uptime-kuma

A fancy self-hosted monitoring tool

Home Page:https://uptime.kuma.pet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with detecting language with 3 letter code

searinminecraft opened this issue Β· comments

πŸ“‘ I have found these related issues/pull requests

I don't seem to find any related issue.

πŸ›‘οΈ Security Policy

Description

When the system or web browser is set to a language with three letters (e.g. Filipino, which is fil), it only parses the first two (fi) and would automatically assume it's that language (which is Finnish in this case) and chooses that one instead. Since there is no Filipino translation yet, I would expect it to fall back to English, but not in this case because of the issue.

Screenshot:
image

πŸ‘Ÿ Reproduction steps

As far as I know, only Chromium has the option for the Filipino language, so use that instead if you can

  1. Set the preferred language to Filipino on chrome://settings/languages, make sure its at the very top.
  2. Visit any Uptime Kuma instance, like https://status.codeberg.eu or the demo version provided in the README

πŸ‘€ Expected behavior

Since there is no Filipino translation yet, it should fall back to English

πŸ˜“ Actual Behavior

Uses the Finnish language instead

🐻 Uptime-Kuma Version

1.23.12

πŸ’» Operating System and Arch

Arch Linux

🌐 Browser

Chromium 122.0.6261.111

πŸ–₯️ Deployment Environment

Not applicable

πŸ“ Relevant log output

No response

Who would have thought that language detection is such a hard problem.
You got to be kidding me..

I don't think the problems are solved yet, suddenly uptime is showing the UI in Polish every time I reload when I need English.

Unsurprising as the PR that fixed the issue #4692 is not yet released to allow for fixing the proxy/metrics issues at the same time.