From: TAKAHASHI Tamotsu Date: Thu, 1 Jun 2017 20:55:07 +0000 (-0700) Subject: Enable TEXTDOMAINDIR override to make translation testing easier. X-Git-Tag: mutt-1-9-rel~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f93694fadbb9ff38cf81d60f71f089b00d1a8af;p=mutt Enable TEXTDOMAINDIR override to make translation testing easier. If set, TEXTDOMAINDIR will point to a translation directory instead of using the mutt installation directory. --- diff --git a/main.c b/main.c index 0d3ea522..edb36e06 100644 --- a/main.c +++ b/main.c @@ -608,9 +608,15 @@ int main (int argc, char **argv, char **environ) setlocale (LC_ALL, ""); #ifdef ENABLE_NLS - /* FIXME what about init.c:1439 ? */ - bindtextdomain (PACKAGE, MUTTLOCALEDIR); - textdomain (PACKAGE); + /* FIXME what about the LOCALES_HACK in mutt_init() [init.c] ? */ + { + char *domdir = getenv ("TEXTDOMAINDIR"); + if (domdir && domdir[0]) + bindtextdomain (PACKAGE, domdir); + else + bindtextdomain (PACKAGE, MUTTLOCALEDIR); + textdomain (PACKAGE); + } #endif mutt_error = mutt_nocurses_error;