summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>2017-06-01 13:55:07 -0700
committerTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>2017-06-01 13:55:07 -0700
commit5f93694fadbb9ff38cf81d60f71f089b00d1a8af (patch)
treec1c425203bf2c634966221a7f0cb9b8bd28385e7 /main.c
parentcd3b603d9ebf5c305802b33d789ca610141e869b (diff)
Enable TEXTDOMAINDIR override to make translation testing easier.
If set, TEXTDOMAINDIR will point to a translation directory instead of using the mutt installation directory.
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 9 insertions, 3 deletions
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;