mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
vim-patch:8.1.0308: a quick undo shows "1 seconds ago"
Problem: A quick undo shows "1 seconds ago". (Tony Mechelynck)
Solution: Add singular/plural message.
fd6100b2aa
This commit is contained in:
@@ -2587,9 +2587,13 @@ static void u_add_time(char_u *buf, size_t buflen, time_t tt)
|
|||||||
else
|
else
|
||||||
/* longer ago */
|
/* longer ago */
|
||||||
(void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", &curtime);
|
(void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", &curtime);
|
||||||
} else
|
} else {
|
||||||
vim_snprintf((char *)buf, buflen, _("%" PRId64 " seconds ago"),
|
int64_t seconds = time(NULL) - tt;
|
||||||
(int64_t)(time(NULL) - tt));
|
vim_snprintf((char *)buf, buflen,
|
||||||
|
NGETTEXT("%" PRId64 " second ago",
|
||||||
|
"%" PRId64 " seconds ago", (uint32_t)seconds),
|
||||||
|
seconds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user