Skip to content

Commit

Permalink
[i18n] Font UI fallbacks: insert replacement characters with template…
Browse files Browse the repository at this point in the history
… for Weblate compatibility (#11614)

Added in <#8722> 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.'
  • Loading branch information
Frenzie committed Apr 3, 2024
1 parent dce9202 commit b9261e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/ui/elements/font_ui_fallbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b9261e0

Please sign in to comment.