ngettext() should always be preferred for i18n, as many languages have more than just singular/plural dichotomy. It is already used by Vim, except for a couple of new messages.
BTW. Passing unused extra argument to C vararg function is perfectly valid, so something like semsg("E1106: One argument too many", 1) is okay. In fact, https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html even recommends doing so.
P.S. I haven't the test added, as I failed to figure what exact conditions result in E1106 and E1190 instead of E118 and E119.
https://github.com/vim/vim/pull/10606
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Merging #10606 (8e5f34e) into master (155f2d1) will increase coverage by
0.90%.
The diff coverage is100.00%.
@@ Coverage Diff @@ ## master #10606 +/- ## ========================================== + Coverage 81.70% 82.60% +0.90% ========================================== Files 158 148 -10 Lines 185385 172739 -12646 Branches 41931 39051 -2880 ========================================== - Hits 151463 142688 -8775 + Misses 21461 17460 -4001 - Partials 12461 12591 +130
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | 82.60% <100.00%> (+<0.01%) |
⬆️ |
| linux | 82.60% <100.00%> (+<0.01%) |
⬆️ |
| mingw-x64-HUGE | ? |
|
| mingw-x64-HUGE-gui | ? |
|
| windows | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/vim9execute.c | 90.89% <100.00%> (-0.83%) |
⬇️ |
| src/highlight.c | 78.69% <0.00%> (-2.70%) |
⬇️ |
| src/time.c | 87.08% <0.00%> (-2.56%) |
⬇️ |
| src/misc2.c | 86.38% <0.00%> (-2.52%) |
⬇️ |
| src/buffer.c | 84.15% <0.00%> (-2.39%) |
⬇️ |
| src/help.c | 80.07% <0.00%> (-2.38%) |
⬇️ |
| src/session.c | 63.15% <0.00%> (-1.94%) |
⬇️ |
| src/gui.c | 71.24% <0.00%> (-1.92%) |
⬇️ |
| src/menu.c | 81.37% <0.00%> (-1.83%) |
⬇️ |
| src/arglist.c | 83.83% <0.00%> (-1.72%) |
⬇️ |
| ... and 129 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 155f2d1...8e5f34e. Read the comment docs.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()