summaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-05-27 14:51:04 -0700
committerKevin McCarthy <kevin@8t8.us>2020-05-27 14:51:04 -0700
commit9723c62c88209b6e35e4a488388079f183c427af (patch)
tree696a870a7b5673cdeb263d85bc26767a920f3203 /init.c
parent4aedee8504371f313be0e809358ef1735a9e7b71 (diff)
Allow tagging string config vars as L10N.
Translate them once in mutt_set_default(). Modify makedoc.pl to remove the N_() tag, and to also note the type as "string (localized)". The makedoc.pl already will ignore L10N comment so add a basic comment above each config var in init.h. I'm not tagging $crypt_protected_headers_subject because the spec now says this should be "...". I plan on implementing that change along with other fixes before the next release.
Diffstat (limited to 'init.c')
-rw-r--r--init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/init.c b/init.c
index 576281fe..8cd97ca0 100644
--- a/init.c
+++ b/init.c
@@ -1757,6 +1757,8 @@ static void mutt_set_default (struct option_t *p)
case DT_PATH:
if (!p->init.p && *((char **) p->data.p))
p->init.p = safe_strdup (* ((char **) p->data.p));
+ else if (p->init.p && (p->type & DT_L10N_STR))
+ p->init.p = safe_strdup (_(p->init.p));
break;
case DT_ADDR:
if (!p->init.p && *((ADDRESS **) p->data.p))