]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1483: not possible to translation position in buffer v9.1.1483
authorEmir SARI <emir_sari@icloud.com>
Thu, 26 Jun 2025 18:38:16 +0000 (20:38 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 26 Jun 2025 18:38:16 +0000 (20:38 +0200)
Problem:  not possible to translation position in buffer
Solution: use _() macro to mark the output as translatable
          (Emir SARI)

Row/Column indicator separator is currently not customizable. Some
languages have a space after the comma as the usual practice, plus this
would help translators use a custom separator like colons if necessary.

Additionally, after a save, the line and the byte indicator is also
hardcoded, this enables i18n for that as well.

closes: #17608

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/drawscreen.c
src/fileio.c
src/version.c

index 37c8f422553c8992a96653d372f87335e88b856d..5c28b0ac4eb77cf16aa3d134993905c0a6ce9df6 100644 (file)
@@ -734,7 +734,10 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum)
            wp->w_p_list = TRUE;
        }
 
-       bufferlen = vim_snprintf((char *)buffer, RULER_BUF_LEN, "%ld,",
+       // row number, column number is appended
+       // l10n: leave as-is unless a space after the comma is preferred
+       // l10n: do not add any row/column label, due to the limited space
+       bufferlen = vim_snprintf((char *)buffer, RULER_BUF_LEN, _("%ld,"),
                (wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
                    ? 0L
                    : (long)(wp->w_cursor.lnum));
index c87ae4d4695dd0d1a853bdba0de2fe7a9ba882b0..5771a45e45eaaf0f3d7d181db06422428f999594 100644 (file)
@@ -3189,7 +3189,8 @@ msg_add_lines(
 
     if (shortmess(SHM_LINES))
        vim_snprintf((char *)IObuff + len, IOSIZE - (size_t)len,
-               "%s%ldL, %lldB", insert_space ? " " : "", lnum, (varnumber_T)nchars);
+               // l10n: L as in line, B as in byte
+               _("%s%ldL, %lldB"), insert_space ? " " : "", lnum, (varnumber_T)nchars);
     else
     {
        len += vim_snprintf((char *)IObuff + len, IOSIZE - (size_t)len,
index 67346ec22eb549bc95c480a3adb8a37d620dda6d..35685911cc5cd2d6b1311986dbf7f8302546d1f5 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1483,
 /**/
     1482,
 /**/