aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-10-23 15:10:28 -0400
committerJames McCoy <jamessan@jamessan.com>2021-11-01 06:40:00 -0400
commit684640f5518a483cf2bc48efc8f68449379cef69 (patch)
treea57866f1d9ca7d05e1a3436015d8aaa3c59438e8 /src/nvim/buffer.c
parent7f4b7320f63eee37841b9b7608495a3f6f9d2fb7 (diff)
downloadrneovim-684640f5518a483cf2bc48efc8f68449379cef69.tar.gz
rneovim-684640f5518a483cf2bc48efc8f68449379cef69.tar.bz2
rneovim-684640f5518a483cf2bc48efc8f68449379cef69.zip
vim-patch:8.1.0306: plural messages are not translated properly
Problem: Plural messages are not translated properly. Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin) https://github.com/vim/vim/commit/da6e8919e75fa8f961d1b805e877c8a92e76dafb
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index a4c7b1816c..62d41051e0 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1016,23 +1016,14 @@ char_u *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int e
errormsg = IObuff;
} else if (deleted >= p_report) {
if (command == DOBUF_UNLOAD) {
- if (deleted == 1) {
- MSG(_("1 buffer unloaded"));
- } else {
- smsg(_("%d buffers unloaded"), deleted);
- }
+ smsg(NGETTEXT("%d buffer unloaded", "%d buffers unloaded", (unsigned long)deleted),
+ deleted);
} else if (command == DOBUF_DEL) {
- if (deleted == 1) {
- MSG(_("1 buffer deleted"));
- } else {
- smsg(_("%d buffers deleted"), deleted);
- }
+ smsg(NGETTEXT("%d buffer deleted", "%d buffers deleted", (unsigned long)deleted),
+ deleted);
} else {
- if (deleted == 1) {
- MSG(_("1 buffer wiped out"));
- } else {
- smsg(_("%d buffers wiped out"), deleted);
- }
+ smsg(NGETTEXT("%d buffer wiped out", "%d buffers wiped out", (unsigned long)deleted),
+ deleted);
}
}
}
@@ -3103,12 +3094,11 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg));
} else if (p_ru) {
// Current line and column are already on the screen -- webb
- if (curbuf->b_ml.ml_line_count == 1) {
- vim_snprintf_add((char *)buffer, IOSIZE, _("1 line --%d%%--"), n);
- } else {
- vim_snprintf_add((char *)buffer, IOSIZE, _("%" PRId64 " lines --%d%%--"),
- (int64_t)curbuf->b_ml.ml_line_count, n);
- }
+ vim_snprintf_add((char *)buffer, IOSIZE,
+ NGETTEXT("%" PRId64 " line --%d%%--",
+ "%" PRId64 " lines --%d%%--",
+ (unsigned long)curbuf->b_ml.ml_line_count),
+ (int64_t)curbuf->b_ml.ml_line_count, n);
} else {
vim_snprintf_add((char *)buffer, IOSIZE,
_("line %" PRId64 " of %" PRId64 " --%d%%-- col "),