This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=1d0be95366c19fbc88c891dbedf7613aedbbdea5 commit 1d0be95366c19fbc88c891dbedf7613aedbbdea5 Author: Guillem Jover <[email protected]> AuthorDate: Sat Jul 28 04:11:17 2018 +0200 Dpkg::Gettext: Document textdomain() and ngettext() replacement functions We should mention when these functions are present and what they do, so that users know when they can rely on these. Warned-by: Test::Pod::Coverage --- debian/changelog | 2 ++ scripts/Dpkg/Gettext.pm | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index d818667d2..37e11b1ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -149,6 +149,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium and -d option descriptions. - Mark profiles as a replaceable item in dpkg-buildpackage --help output. - Update test suite requirements in README. + - Document textdomain() and ngettext() replacement functions in + Dpkg::Gettext POD. * Code internals: - Do not use stringy eval to define different sub implementations, just assign an anonymous sub to the typeglob. diff --git a/scripts/Dpkg/Gettext.pm b/scripts/Dpkg/Gettext.pm index 89a4d154f..03b723c9d 100644 --- a/scripts/Dpkg/Gettext.pm +++ b/scripts/Dpkg/Gettext.pm @@ -89,6 +89,19 @@ our $DEFAULT_TEXT_DOMAIN = 'dpkg-dev'; =over 4 +=item $domain = textdomain($new_domain) + +Compatibility textdomain() fallback when Locale::gettext is not available. + +If $new_domain is not undef, it will set the current domain to $new_domain. +Returns the current domain, after possibly changing it. + +=item $trans = ngettext($msgid, $msgid_plural, $n) + +Compatibility ngettext() fallback when Locale::gettext is not available. + +Returns $msgid if $n is 1 or $msgid_plural otherwise. + =item $trans = g_($msgid) Calls dgettext() on the $msgid and returns its translation for the current -- Dpkg.Org's dpkg

