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

@@ -657,6 +657,9 @@ static void init_locale(void)
setlocale(LC_NUMERIC, "C");
# endif
# ifdef LOCALE_INSTALL_DIR // gnu/linux standard: $prefix/share/locale
bindtextdomain(PROJECT_NAME, LOCALE_INSTALL_DIR);
# else // old vim style: $runtime/lang
{
char_u *p;
@@ -665,11 +668,12 @@ static void init_locale(void)
p = (char_u *)vim_getenv("VIMRUNTIME");
if (p != NULL && *p != NUL) {
vim_snprintf((char *)NameBuff, MAXPATHL, "%s/lang", p);
bindtextdomain(VIMPACKAGE, (char *)NameBuff);
bindtextdomain(PROJECT_NAME, (char *)NameBuff);
}
xfree(p);
textdomain(VIMPACKAGE);
}
# endif
textdomain(PROJECT_NAME);
TIME_MSG("locale set");
}
#endif