From 39596279701d620108ba1f9bfb3e025e77146b13 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Nov 2024 08:28:37 +0530 Subject: [PATCH] Micro-optimisation --- src/calibre/utils/formatter_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index bc6bdd5370..7665a38fd5 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -59,7 +59,8 @@ class TranslatedStringWithRaw(str): def _(txt): - return TranslatedStringWithRaw(txt, xlated(txt), txt, xlated(txt)) + translated = xlated(txt) + return TranslatedStringWithRaw(txt, translated, txt, translated) class StoredObjectType(Enum):