[vim/vim] ngettext() not used for plurals (PR #10606)

5 views
Skip to first unread message

matveyt

unread,
Jun 22, 2022, 8:28:26 AM6/22/22
to vim/vim, Subscribed

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.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/10606

Commit Summary

  • 8e5f34e ngettext() not used for plurals

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/10606@github.com>

codecov[bot]

unread,
Jun 22, 2022, 8:36:42 AM6/22/22
to vim/vim, Subscribed

Codecov Report

Merging #10606 (8e5f34e) into master (155f2d1) will increase coverage by 0.90%.
The diff coverage is 100.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.Message ID: <vim/vim/pull/10606/c1163043554@github.com>

Bram Moolenaar

unread,
Jun 29, 2022, 8:19:13 AM6/29/22
to vim/vim, Subscribed

Closed #10606 via d14bb1a.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/10606/issue_event/6901878765@github.com>

Reply all
Reply to author
Forward
0 new messages