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

Iris Morelle noreply at github.com
Sat Sep 18 08:49:08 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 018a0ebd78bd9c4a63355ce463b2856681d0644f
      https://github.com/wesnoth/wesnoth/commit/018a0ebd78bd9c4a63355ce463b2856681d0644f
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-17 (Fri, 17 Sep 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: 743ed666dae48ddddfa3df959eda91ec37b9e6de
      https://github.com/wesnoth/wesnoth/commit/743ed666dae48ddddfa3df959eda91ec37b9e6de
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-17 (Fri, 17 Sep 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: c8cae486510b8deed5288e9658e77e5eb27993ea
      https://github.com/wesnoth/wesnoth/commit/c8cae486510b8deed5288e9658e77e5eb27993ea
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-17 (Fri, 17 Sep 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: 32c6a706e2b541fa29ce3b3636d7b570c54906f3
      https://github.com/wesnoth/wesnoth/commit/32c6a706e2b541fa29ce3b3636d7b570c54906f3
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-17 (Fri, 17 Sep 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: 7d242f1ac41324cfdd0d6c1824ea6ebe346b9bda
      https://github.com/wesnoth/wesnoth/commit/7d242f1ac41324cfdd0d6c1824ea6ebe346b9bda
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2021-09-18 (Sat, 18 Sep 2021)

  Changed paths:
    M cmake/FindTranslationTools.cmake
    M po/SConscript
    M src/formula/string_utils.cpp
    M src/formula/string_utils.hpp
    M src/gettext.hpp
    M src/tests/test_formula_timespan.cpp

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


Compare: https://github.com/wesnoth/wesnoth/compare/5f3382e8d892...7d242f1ac413



More information about the Commits mailing list