mirror of
https://github.com/neovim/neovim.git
synced 2025-11-12 13:28:54 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user