X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=Debian%2FDgit%2FI18n.pm;h=e8068ff366bcb4e3170c85e05073addef87c885e;hp=9c474eefb9c4df9132c1653aaaa9d35ddcd61482;hb=HEAD;hpb=d67cf3f6003716b138f00e813d6df2803a32bd72 diff --git a/Debian/Dgit/I18n.pm b/Debian/Dgit/I18n.pm index 9c474eef..e8068ff3 100644 --- a/Debian/Dgit/I18n.pm +++ b/Debian/Dgit/I18n.pm @@ -5,6 +5,7 @@ package Debian::Dgit::I18n; # This module provides # __ a function which is an alias for gettext # f_ sprintf wrapper that gettexts the format +# i_ identify function, but marks string for translation # # In perl the sub `_' is a `superglobal', which means there # is only one of it in the whole program and every reference @@ -16,11 +17,12 @@ use Locale::gettext; BEGIN { use Exporter; @ISA = qw(Exporter); - @EXPORT = qw(__ f_); + @EXPORT = qw(__ f_ i_); } sub __ ($) { gettext @_; } +sub i_ ($) { $_[0]; } sub f_ ($$;@) { my $f = shift @_; sprintf +(gettext $f), @_; } 1;