diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-03 22:08:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-03 22:08:45 +0200 |
commit | ee695f787ade7fd88fc5f5497553d95c0c3645b5 (patch) | |
tree | 222deac7781773672758c4466687c7367f014ef3 /src/vim.h | |
parent | cf25fdb8f10a92b3bf9e295c466c1b69812b7886 (diff) | |
download | vim-ee695f787ade7fd88fc5f5497553d95c0c3645b5.zip |
patch 7.4.2152
Problem: No proper translation of messages with a count.
Solution: Use ngettext(). (Sergey Alyoshin)
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -561,6 +561,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */ # endif /* These are in os_win32.c */ extern char *(*dyn_libintl_gettext)(const char *msgid); +extern char *(*dyn_libintl_ngettext)(const char *msgid, const char *msgid_plural, unsigned long n); extern char *(*dyn_libintl_bindtextdomain)(const char *domainname, const char *dirname); extern char *(*dyn_libintl_bind_textdomain_codeset)(const char *domainname, const char *codeset); extern char *(*dyn_libintl_textdomain)(const char *domainname); @@ -574,6 +575,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname); #ifdef FEAT_GETTEXT # ifdef DYNAMIC_GETTEXT # define _(x) (*dyn_libintl_gettext)((char *)(x)) +# define ngettext(x, xs, n) (*dyn_libintl_ngettext)((char *)(x), (char *)(xs), (n)) # define N_(x) x # define bindtextdomain(domain, dir) (*dyn_libintl_bindtextdomain)((domain), (dir)) # define bind_textdomain_codeset(domain, codeset) (*dyn_libintl_bind_textdomain_codeset)((domain), (codeset)) @@ -592,6 +594,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname); # endif #else # define _(x) ((char *)(x)) +# define ngettext(x, xs, n) (((n) == 1) ? (char *)(x) : (char *)(xs)) # define N_(x) x # ifdef bindtextdomain # undef bindtextdomain @@ -1501,6 +1504,8 @@ typedef UINT32_TYPEDEF UINT32_T; # define MSG_BUF_CLEN MSG_BUF_LEN /* cell length */ #endif +#define FOLD_TEXT_LEN 51 /* buffer size for get_foldtext() */ + /* Size of the buffer used for tgetent(). Unfortunately this is largely * undocumented, some systems use 1024. Using a buffer that is too small * causes a buffer overrun and a crash. Use the maximum known value to stay |