diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-09-29 11:00:22 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-09-29 12:47:39 +0100 |
commit | 33f697e1ebf2ca4a68479c7769ecc93dd0ee28e3 (patch) | |
tree | d1dab4075362daa94bb53249b7dc9c25d94f037f /Debian | |
parent | 4e31e13244be1694c3725a8e463ad0494635ef30 (diff) |
i18n: Rename ___ to f_
I have decided that's a better name. Not _f because, unlike
printf (where f is done first, and then print), here the _ is done
first and then f.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Dgit.pm | 2 | ||||
-rw-r--r-- | Debian/Dgit/I18n.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index b1aa620..4b340d9 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -672,7 +672,7 @@ sub getfield ($$) { my ($dctrl,$field) = @_; my $v = $dctrl->{$field}; return $v if defined $v; - fail ___ "missing field %s in %s", $field, $dctrl->get_option('name'); + fail f_ "missing field %s in %s", $field, $dctrl->get_option('name'); } sub parsechangelog_loop ($$$) { diff --git a/Debian/Dgit/I18n.pm b/Debian/Dgit/I18n.pm index c6f9e16..b86fec8 100644 --- a/Debian/Dgit/I18n.pm +++ b/Debian/Dgit/I18n.pm @@ -4,7 +4,7 @@ package Debian::Dgit::I18n; # This module provides # __ a function which is an alias for gettext -# ___ sprintf wrapper that gettexts the format +# f_ sprintf wrapper that gettexts the format # # In perl the sub `_' is a `superglobal', which means there # is only one of it in the whole program and every reference @@ -16,11 +16,11 @@ use Locale::gettext; BEGIN { use Exporter; @ISA = qw(Exporter); - @EXPORT = qw(__ ___); + @EXPORT = qw(__ f_); } sub __ { gettext @_; } -sub ___ { my $f = shift @_; sprintf +(gettext $f), @_; } +sub f_ { my $f = shift @_; sprintf +(gettext $f), @_; } 1; |