chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: start 9.14
[dgit.git]
/
Debian
/
Dgit
/
I18n.pm
diff --git
a/Debian/Dgit/I18n.pm
b/Debian/Dgit/I18n.pm
index c6f9e1663543b1cf201902c322cff2a00c962c73..e8068ff366bcb4e3170c85e05073addef87c885e 100644
(file)
--- a/
Debian/Dgit/I18n.pm
+++ b/
Debian/Dgit/I18n.pm
@@
-4,7
+4,8
@@
package Debian::Dgit::I18n;
# This module provides
# __ a function which is an alias for gettext
# This module provides
# __ a function which is an alias for gettext
-# ___ sprintf wrapper that gettexts the format
+# 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
#
# 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);
BEGIN {
use Exporter;
@ISA = qw(Exporter);
- @EXPORT = qw(__
__
_);
+ @EXPORT = qw(__
f_ i
_);
}
}
-sub __ { gettext @_; }
-sub ___ { my $f = shift @_; sprintf +(gettext $f), @_; }
+sub __ ($) { gettext @_; }
+sub i_ ($) { $_[0]; }
+sub f_ ($$;@) { my $f = shift @_; sprintf +(gettext $f), @_; }
1;
1;