diff options
author | Guillem Jover <guillem@debian.org> | 2018-07-28 04:11:17 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2018-07-30 06:30:04 +0200 |
commit | 1d0be95366c19fbc88c891dbedf7613aedbbdea5 (patch) | |
tree | 36cdc400c04a5b9f8de85c8cf96f7be17d6344c3 /scripts/Dpkg | |
parent | e3c32720167a6c23fc19471d3e3273965c3dc9e5 (diff) | |
download | dpkg-1d0be95366c19fbc88c891dbedf7613aedbbdea5.tar.gz |
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
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Gettext.pm | 13 |
1 files changed, 13 insertions, 0 deletions
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 |