[wesnoth-commits] [wesnoth/wesnoth] 190b3c: i18n: Add N_n() no-op macro to allow xgettext to e...

Iris Morelle noreply at github.com
Wed Nov 10 01:31:15 UTC 2021


  Branch: refs/heads/1.16
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 190b3cce0881a842ff2db6acd3b6eff93d9e4343
      https://github.com/wesnoth/wesnoth/commit/190b3cce0881a842ff2db6acd3b6eff93d9e4343
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M cmake/FindTranslationTools.cmake
    M po/SConscript
    M src/gettext.hpp

  Log Message:
  -----------
  i18n: Add N_n() no-op macro to allow xgettext to extract plural forms

This is intended to allow xgettext to extract plural forms from the code
without actually altering the input. Basically, this is to _n() as N_()
is to _(), and doesn't actually call any gettext functions.


  Commit: 4df1365ffa0d1fbd92ebd0d1df3ec95bc6e1b775
      https://github.com/wesnoth/wesnoth/commit/4df1365ffa0d1fbd92ebd0d1df3ec95bc6e1b775
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M src/formula/string_utils.cpp

  Log Message:
  -----------
  Make utils::format_timespan() use gettext plurals

This uses N_n() in combination with VNGETTEXT() to get the plural forms
written to po files by xgettext.

NOTE: This is NOT a string-freeze-compliant change. Changing the strings
from being standalone to being part of a plural form set causes them to
be automatically fuzzied by the pot-update target. Merging this in 1.16
will have to wait until after 1.16.0 is released.

CC #6036


  Commit: c159cf91316e9eb5503bdb436e0ca3c955b5f8a0
      https://github.com/wesnoth/wesnoth/commit/c159cf91316e9eb5503bdb436e0ca3c955b5f8a0
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M src/formula/string_utils.cpp
    M src/formula/string_utils.hpp

  Log Message:
  -----------
  Add a `detailed` parameter to utils::format_timespan()

This allows switching between producing full detailed output like "2
days, 3 months, 1 seconds", and only mentioning the largest time unit,
e.g. "2 days". The default is false.

CC #6036


  Commit: bab195f14b777c9c139df3dc8625113773edf93d
      https://github.com/wesnoth/wesnoth/commit/bab195f14b777c9c139df3dc8625113773edf93d
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M src/formula/string_utils.hpp
    M src/tests/test_formula_timespan.cpp

  Log Message:
  -----------
  Update utils::format_timespan() documentation and tests

CC #6036


  Commit: c1ab38403f93febe93d0f764b3da23ba95c8607f
      https://github.com/wesnoth/wesnoth/commit/c1ab38403f93febe93d0f764b3da23ba95c8607f
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M changelog.md

  Log Message:
  -----------
  Update changelog


Compare: https://github.com/wesnoth/wesnoth/compare/0e37282fdb9d...c1ab38403f93



More information about the Commits mailing list