Branch: refs/heads/2.3.0
Home:
https://github.com/Checkmk/checkmk
Commit: 2a73ee499464be06a49f6cf317552be7b1dd2ea1
https://github.com/Checkmk/checkmk/commit/2a73ee499464be06a49f6cf317552be7b…
Author: Joerg Herbel <joerg.herbel(a)checkmk.com>
Date: 2024-04-30 (Tue, 30 Apr 2024)
Changed paths:
M cmk/gui/i18n.py
M tests/unit/cmk/gui/test_i18n.py
Log Message:
-----------
Avoid translating the emptry string
The empty string is reserved for header data in PO files:
https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
"An empty untranslated-string is reserved to contain the header entry
with the meta information".
Hence, the localization of the empty string is the header data, which we
certainly do not want to display.
Prior to 2.3, this was not an issue, because we only used `_` or `_l`
for localization. Hence, instead of eg. `_("")`, one could directly use
`""`. However, as of 2.3, the new APIs use dedicated classes such as
`Title` to mark localizable strings. Using `""` instead of
`Title("")`
is a type error. Therefore, we now explicitly avoid translating the
empty string.
CMK-17236
Change-Id: I8f96ad19baeb500e0aa85e7750ff9b123104b1ae
(cherry picked from commit 1421786d019f39b4e721084398dc80ffafb1933a)
To unsubscribe from these emails, change your notification settings at
https://github.com/Checkmk/checkmk/settings/notifications