mozilla-vpn-client icon indicating copy to clipboard operation
mozilla-vpn-client copied to clipboard

[QT Linux] Special chars are not correctly displayed

Open data-sync-user opened this issue 1 year ago • 8 comments

Important details:

  • This is not reproducing on regular Linux builds;
  • This is not reproducing on other platforms while using QT builds.

Version/build found in:

  • 2.22.0 (2.22.0~build20240418-static1);

Reproducible on:

  • Linux QT builds;

Prerequisites:

  • Have the Mozilla VPN client installed;
  • Have an account with subscription for Mozilla VPN;

Steps to reproduce:

  1. Go to Settings - App preferences - Languages;
  2. Search for Japanese or scroll through the languages;
  3. Observed the language name;

Expected result:

  • Language name has no display issues;

Actual results:

  • The special chars are not read.

Notes:

  • Reproducing for Chinese, Lao, Punjabi, Persian.

┆Issue is synchronized with this Jira Bug ┆Reporter: Valentina Virlics

data-sync-user avatar Apr 19 '24 12:04 data-sync-user

➤ Lesley Norton commented:

Valentina Virlics I’m trying to narrow down what might be happening here and i’m curious: if you change the app language to one of these languages (Chino simplificado, for instance), does this happen everywhere or only in some places?

data-sync-user avatar Apr 29 '24 20:04 data-sync-user

➤ Lesley Norton commented:

Notes to self after some hair pulling today:

  • Inter does not support Chinese, Lao, Punjabi, or Persian (source ( https://rsms.me/inter/#languages )). Could it be that the Linux static app is unable to pull system fonts that do support these locales? Valentina Virlics just to verify, this is not reproducible on the same Linux machine with the ‘regular Linux builds’ ?
  • We ran into something similar previously with WASM https://mozilla-hub.atlassian.net/browse/VPN-109?focusedCommentId=483248 ( https://mozilla-hub.atlassian.net/browse/VPN-109?focusedCommentId=483248|smart-link ) (Baku’s last comment)

data-sync-user avatar Apr 29 '24 21:04 data-sync-user

➤ Valentina Virlics commented:

Lesley Norton yes, reconfirming that this is not reproducing on same Linux machine for regular builds.

Attaching ss and logs after switching to Chinese.

!image-20240430-050750.png|width=322,height=578,alt="image-20240430-050750.png"!

[^mozillavpn-2024-4-30_1.log]

data-sync-user avatar Apr 30 '24 05:04 data-sync-user

➤ Lesley Norton commented:

Thanks Valentina Virlics. One more question: Are the strings in the system tray correctly translated after switching to Chinese?

The following logs are interesting because, before digging in any further, it looks like we’re having trouble pulling the actual strings even though zh_CN is 100% translated.

[30.04.2024 08:04:10.272] (Localizer) Debug: Loading language: zh_CN [30.04.2024 08:04:10.272] (Localizer) Debug: Let's try to load another language as fallback for code zh_CN

[30.04.2024 08:04:10.338] (Addon) Debug: Let's try to load another language for message_dom as fallback for code zh_CN [30.04.2024 08:04:10.339] (Addon) Warning: Loading the fallback locale failed for message_dom - code: en [30.04.2024 08:04:10.339] (Addon) Error: Loading the locale failed for message_dom - code: zh_CN [30.04.2024 08:04:10.340] (Addon) Debug: Let's try to load another language for message_fpn_trial_subscription_expiring as fallback for code zh_CNAlso maybe something to investigate…

30.04.2024 08:03:33.059] Warning: OpenType support missing for "", script 13

data-sync-user avatar May 02 '24 16:05 data-sync-user

➤ Lesley Norton commented:

Naomi Kirby What do you think here? My hunch is that the statically linked app is either not able to find or does not have access to system fonts and that because fonts we ship with (Metropolis and Inter UI) do not support ( https://rsms.me/inter/#languages )all of the languages the client is translated into we are seeing these black boxes instead.

This is old but maybe relevant: https://forum.qt.io/topic/81090/qt-5-9-1-static-font-problem-on-linux?=1714667572886&lang=en-US ( https://forum.qt.io/topic/81090/qt-5-9-1-static-font-problem-on-linux?=1714667572886&lang=en-US|smart-link ) . Option C / Recompile the static version of Qt to use fontconfig and systemfreetype seems interesting. Also: https://doc.qt.io/qt-6/configure-options.html#third-party-libraries ( https://doc.qt.io/qt-6/configure-options.html#third-party-libraries|smart-link ) .

data-sync-user avatar May 02 '24 16:05 data-sync-user

➤ Valentina Virlics commented:

Lesley Norton Yes, seems like the system tray menu looks correct; see ss below;

!image-20240507-085844.png|width=341,height=295,alt="image-20240507-085844.png"!

data-sync-user avatar May 07 '24 08:05 data-sync-user

➤ Lesley Norton commented:

Thanks Valentina Virlics ! So it seems the translations are there but the client does not have access to the system fonts to support locales that aren’t supported by the fonts that we ship with the client.

data-sync-user avatar May 07 '24 15:05 data-sync-user

➤ Lesley Norton commented:

Found this in the Linux logs from https://mozilla-hub.atlassian.net/browse/VPN-6375 ( https://mozilla-hub.atlassian.net/browse/VPN-6375|smart-link ).

10.05.2024 10:49:20.251] Warning: QFontDatabase: Cannot find font directory /builds/worker/qt_dist/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.

data-sync-user avatar May 10 '24 15:05 data-sync-user

➤ Valentina Virlics commented:

Verified as fixed while using 2.23.0 (2.23.0~build20240524-static1);

Special chars are correctly displayed on Linux static builds.

!Screenshot from 2024-05-27 10-36-53.png|width=431,height=736,alt="Screenshot from 2024-05-27 10-36-53.png"!

data-sync-user avatar May 27 '24 07:05 data-sync-user