diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-05-27 14:51:04 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-05-27 14:51:04 -0700 |
commit | 9723c62c88209b6e35e4a488388079f183c427af (patch) | |
tree | 696a870a7b5673cdeb263d85bc26767a920f3203 /init.c | |
parent | 4aedee8504371f313be0e809358ef1735a9e7b71 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)) |