From b9261e024596bb79e570d20fd9deb686b984a01e Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 3 Apr 2024 17:55:41 +0200 Subject: [PATCH] [i18n] Font UI fallbacks: insert replacement characters with template for Weblate compatibility (#11614) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added in and unproblematic for the past two years, but Weblate has now decided to complain about it to the extent of disabling translations: > Error message String contains control character: 'If some book titles, dictionary entries and such are not displayed well but shown as \ufffe\ufffe or ��, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.\nFonts for many languages can be downloaded at:\n\nhttps://fonts.google.com/noto\n\nOnly fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.' --- frontend/ui/elements/font_ui_fallbacks.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/ui/elements/font_ui_fallbacks.lua b/frontend/ui/elements/font_ui_fallbacks.lua index 1b43ec71b..9b0e09a9f 100644 --- a/frontend/ui/elements/font_ui_fallbacks.lua +++ b/frontend/ui/elements/font_ui_fallbacks.lua @@ -50,13 +50,13 @@ local genFallbackCandidates = function() end end -local more_info_text = _([[ -If some book titles, dictionary entries and such are not displayed well but shown as ￾￾ or ��, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts. +local more_info_text = T(_([[ +If some book titles, dictionary entries and such are not displayed well but shown as %1 or %2, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts. Fonts for many languages can be downloaded at: https://fonts.google.com/noto -Only fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.]]) +Only fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.]]), "￾￾", "��") local getSubMenuItems = function() genFallbackCandidates()