Patch 9.0.1575
Problem:    "file N of M" message is not translated.
Solution:   Make argument count message translatable. (close #12429)
Files:      src/buffer.c


*** ../vim-9.0.1574/src/buffer.c        2023-05-20 14:06:56.669542805 +0100
--- src/buffer.c        2023-05-23 17:56:41.331542365 +0100
***************
*** 5278,5301 ****
      int               buflen,
      int               add_file)       // Add "file" before the arg number
  {
-     char_u    *p;
- 
      if (ARGCOUNT <= 1)                // nothing to do
        return FALSE;
  
!     p = buf + STRLEN(buf);    // go to the end of the buffer
!     if (p - buf + 35 >= buflen)       // getting too long
!       return FALSE;
!     *p++ = ' ';
!     *p++ = '(';
!     if (add_file)
      {
!       STRCPY(p, "file ");
!       p += 5;
      }
!     vim_snprintf((char *)p, (size_t)(buflen - (p - buf)),
!               wp->w_arg_idx_invalid ? "(%d) of %d)"
!                                 : "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
      return TRUE;
  }
  
--- 5278,5298 ----
      int               buflen,
      int               add_file)       // Add "file" before the arg number
  {
      if (ARGCOUNT <= 1)                // nothing to do
        return FALSE;
  
!     char *msg;
!     switch ((wp->w_arg_idx_invalid ? 1 : 0) + (add_file ? 2 : 0))
      {
!       case 0: msg = _(" (%d of %d)"); break;
!       case 1: msg = _(" ((%d) of %d)"); break;
!       case 2: msg = _(" (file %d of %d)"); break;
!       case 3: msg = _(" (file (%d) of %d)"); break;
      }
! 
!     char_u *p = buf + STRLEN(buf);    // go to the end of the buffer
!     vim_snprintf((char *)p, (size_t)(buflen - (p - buf)), msg,
!                                                 wp->w_arg_idx + 1, ARGCOUNT);
      return TRUE;
  }
  
*** ../vim-9.0.1574/src/version.c       2023-05-23 15:27:47.011308166 +0100
--- src/version.c       2023-05-23 18:00:02.139363549 +0100
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1575,
  /**/

-- 
I'm trying to be an optimist, but I don't think it'll work.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230523170120.8AE8C1C0F38%40moolenaar.net.

Raspunde prin e-mail lui