forked from aniani/vim
patch 9.0.1575: "file N of M" message is not translated
Problem: "file N of M" message is not translated. Solution: Make argument count message translatable. (close #12429)
This commit is contained in:
23
src/buffer.c
23
src/buffer.c
@@ -5278,24 +5278,21 @@ append_arg_number(
|
|||||||
int buflen,
|
int buflen,
|
||||||
int add_file) // Add "file" before the arg number
|
int add_file) // Add "file" before the arg number
|
||||||
{
|
{
|
||||||
char_u *p;
|
|
||||||
|
|
||||||
if (ARGCOUNT <= 1) // nothing to do
|
if (ARGCOUNT <= 1) // nothing to do
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
p = buf + STRLEN(buf); // go to the end of the buffer
|
char *msg;
|
||||||
if (p - buf + 35 >= buflen) // getting too long
|
switch ((wp->w_arg_idx_invalid ? 1 : 0) + (add_file ? 2 : 0))
|
||||||
return FALSE;
|
|
||||||
*p++ = ' ';
|
|
||||||
*p++ = '(';
|
|
||||||
if (add_file)
|
|
||||||
{
|
{
|
||||||
STRCPY(p, "file ");
|
case 0: msg = _(" (%d of %d)"); break;
|
||||||
p += 5;
|
case 1: msg = _(" ((%d) of %d)"); break;
|
||||||
|
case 2: msg = _(" (file %d of %d)"); break;
|
||||||
|
case 3: msg = _(" (file (%d) of %d)"); break;
|
||||||
}
|
}
|
||||||
vim_snprintf((char *)p, (size_t)(buflen - (p - buf)),
|
|
||||||
wp->w_arg_idx_invalid ? "(%d) of %d)"
|
char_u *p = buf + STRLEN(buf); // go to the end of the buffer
|
||||||
: "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
|
vim_snprintf((char *)p, (size_t)(buflen - (p - buf)), msg,
|
||||||
|
wp->w_arg_idx + 1, ARGCOUNT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1575,
|
||||||
/**/
|
/**/
|
||||||
1574,
|
1574,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user