From 7de3fcb7f46f581f59fca0a5c81dffe6b3537797 Mon Sep 17 00:00:00 2001 From: Dino Date: Thu, 1 Oct 2026 22:48:50 -0400 Subject: [PATCH] don't put _() marking around empty strings ("") RM #2247 --- utility/registry_ini.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/utility/registry_ini.c b/utility/registry_ini.c index 6587a26fbc..0b29ccc8be 100644 --- a/utility/registry_ini.c +++ b/utility/registry_ini.c @@ -3894,9 +3894,14 @@ bool entry_str_set_gt_marking(struct entry *pentry, bool gt_marking) SECFILE_RETURN_VAL_IF_FAIL(pentry->psection->secfile, pentry->psection, ENTRY_STR == pentry->type, FALSE); - pentry->string.gt_marking = gt_marking; - - return TRUE; + /* don't put gettext marking on empty strings */ + if (pentry->string.value[0] != '\0') { + pentry->string.gt_marking = gt_marking; + return TRUE; + } else { + pentry->string.gt_marking = FALSE; + return !gt_marking; + } } /************************************************************************//** -- 2.31.0