build: install *.mo into the "standard" directory

Change POROJECT_NAME to 'nvim', and use it as the gettext
domain name. The *.mo files, previously installed as
$runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as
$prefix/locale/xx/LC_MESSAGES/nvim.mo.
This commit is contained in:
Jun T
2016-02-17 23:16:25 +09:00
parent 498eb02049
commit 1a15cf84c2
7 changed files with 19 additions and 18 deletions

View File

@@ -742,15 +742,15 @@ char_u * home_replace_save(buf_T *buf, char_u *src) FUNC_ATTR_NONNULL_RET
void vim_setenv(const char *name, const char *val)
{
os_setenv(name, val, 1);
/*
* When setting $VIMRUNTIME adjust the directory to find message
* translations to $VIMRUNTIME/lang.
*/
#ifndef LOCALE_INSTALL_DIR
// When setting $VIMRUNTIME adjust the directory to find message
// translations to $VIMRUNTIME/lang.
if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0) {
char *buf = (char *)concat_str((char_u *)val, (char_u *)"/lang");
bindtextdomain(VIMPACKAGE, buf);
bindtextdomain(PROJECT_NAME, buf);
xfree(buf);
}
#endif
}