Mercurial > vim
diff src/misc1.c @ 3382:4a2744311b3f v7.3.457
updated for version 7.3.457
Problem: When setting $VIMRUNTIME later the directory for fetching
translated messages is not adjusted.
Solution: Put bindtextdomain() in vim_setenv().
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 29 Feb 2012 13:49:09 +0100 |
parents | a27fac494e70 |
children | 214c7ec1c8f9 |
line wrap: on
line diff
--- a/src/misc1.c +++ b/src/misc1.c @@ -4133,17 +4133,6 @@ vim_getenv(name, mustfree) { vim_setenv((char_u *)"VIMRUNTIME", p); didset_vimruntime = TRUE; -#ifdef FEAT_GETTEXT - { - char_u *buf = concat_str(p, (char_u *)"/lang"); - - if (buf != NULL) - { - bindtextdomain(VIMPACKAGE, (char *)buf); - vim_free(buf); - } - } -#endif } else { @@ -4221,6 +4210,22 @@ vim_setenv(name, val) putenv((char *)envbuf); } #endif +#ifdef FEAT_GETTEXT + /* + * When setting $VIMRUNTIME adjust the directory to find message + * translations to $VIMRUNTIME/lang. + */ + if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0) + { + char_u *buf = concat_str(val, (char_u *)"/lang"); + + if (buf != NULL) + { + bindtextdomain(VIMPACKAGE, (char *)buf); + vim_free(buf); + } + } +#endif } #if defined(FEAT_CMDL_COMPL) || defined(PROTO)