changeset: 7074:152d548c1bcf
user: TAKAHASHI Tamotsu <[email protected]>
date: Thu Jun 01 13:55:07 2017 -0700
link: http://dev.mutt.org/hg/mutt/rev/152d548c1bcf
Enable TEXTDOMAINDIR override to make translation testing easier.
If set, TEXTDOMAINDIR will point to a translation directory instead of
using the mutt installation directory.
diffs (22 lines):
diff -r 4e29b337e967 -r 152d548c1bcf main.c
--- a/main.c Thu Jun 01 13:33:21 2017 -0700
+++ b/main.c Thu Jun 01 13:55:07 2017 -0700
@@ -608,9 +608,15 @@
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;