[wesnoth-commits] [wesnoth/wesnoth] f22e18: i18n: Make dsngettext() strip caret annotations fr...

Iris Morelle noreply at github.com
Fri Sep 17 07:56:04 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: f22e18c33acad1f9c3a90da10f6d336cbc36eb05
      https://github.com/wesnoth/wesnoth/commit/f22e18c33acad1f9c3a90da10f6d336cbc36eb05
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M src/gettext.cpp

  Log Message:
  -----------
  i18n: Make dsngettext() strip caret annotations from plural forms too

This affects operation of dsngettext() and its users (e.g. _n() and
VNGETTEXT()) specifically when the plural version of a string is chosen.

Apparently back in 2007 in commit 4852283ab3e1916c66d7d6660d61f9dc2cae38c6,
this function and its late sibling were made to only strip carets from
singular forms under the probable assumption that disambiguation won't
be needed for plurals because of the way GNU gettext pairs them with
their singular msgid under a single unique entry. Like everything else
related to our gettext functionality, this wasn't documented in the C++
code.

However, there's no guarantee that this will remain the case forever if
we some day decide to replace the GNU gettext format with something
without this guarantee. It's also likely to confuse more people later
down the line (especially now that the Lua API exposes this
functionality).

Closes #6093.


  Commit: bd793bd6e84779e4a406f3a0b5caa54c7345a0ab
      https://github.com/wesnoth/wesnoth/commit/bd793bd6e84779e4a406f3a0b5caa54c7345a0ab
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-17 (Fri, 17 Sep 2021)

  Changed paths:
    M src/gettext.cpp

  Log Message:
  -----------
  Merge branch 'bug/6093'

Closes #6094.


Compare: https://github.com/wesnoth/wesnoth/compare/a8c9dc4847f3...bd793bd6e847



More information about the Commits mailing list