This is the general plumbing for looking up translated messages - the
consumer-side. No actual messages are flagged for translation yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
use File::Basename;
use Dpkg::Control::Hash;
use Debian::Dgit::ExitStatus;
use File::Basename;
use Dpkg::Control::Hash;
use Debian::Dgit::ExitStatus;
--- /dev/null
+# -*- perl -*-
+
+package Debian::Dgit::I18n;
+
+# This module provides
+# __ a function which is an alias for gettext
+# ___ 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
+# is to the same one. So it's not really useable in modules.
+# Hence __.
+
+use Locale::gettext;
+
+BEGIN {
+ use Exporter;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(__ ___);
+}
+
+
+sub __ { gettext @_; }
+sub ___ { my $f = shift @_; sprintf +(gettext $f), @_; }
+
+1;
dgit-sponsorship.7
TXTDOCS=README.dsc-import
dgit-sponsorship.7
TXTDOCS=README.dsc-import
-PERLMODULES=Debian/Dgit.pm Debian/Dgit/ExitStatus.pm
+PERLMODULES= \
+ Debian/Dgit.pm \
+ Debian/Dgit/ExitStatus.pm \
+ Debian/Dgit/I18n.pm
ABSURDITIES=git
GDR_PROGRAMS=git-debrebase
GDR_PERLMODULES= \
Debian/Dgit.pm \
Debian/Dgit/GDR.pm \
ABSURDITIES=git
GDR_PROGRAMS=git-debrebase
GDR_PERLMODULES= \
Debian/Dgit.pm \
Debian/Dgit/GDR.pm \
- Debian/Dgit/ExitStatus.pm
+ Debian/Dgit/ExitStatus.pm \
+ Debian/Dgit/I18n.pm
GDR_MAN1PAGES=git-debrebase.1
GDR_MAN5PAGES=git-debrebase.5
GDR_MAN1PAGES=git-debrebase.1
GDR_MAN5PAGES=git-debrebase.5
Package: dgit
Depends: perl, libwww-perl, libdpkg-perl, git-core, devscripts, dpkg-dev,
${misc:Depends}, git-buildpackage, liblist-moreutils-perl,
Package: dgit
Depends: perl, libwww-perl, libdpkg-perl, git-core, devscripts, dpkg-dev,
${misc:Depends}, git-buildpackage, liblist-moreutils-perl,
+ liblocale-gettext-perl,
coreutils (>= 8.23-1~),
libdigest-sha-perl, dput, curl, apt,
libjson-perl, ca-certificates,
coreutils (>= 8.23-1~),
libdigest-sha-perl, dput, curl, apt,
libjson-perl, ca-certificates,
Package: git-debrebase
Depends: perl, git-core, libdpkg-perl, libfile-fnmatch-perl, devscripts,
Package: git-debrebase
Depends: perl, git-core, libdpkg-perl, libfile-fnmatch-perl, devscripts,
+ liblocale-gettext-perl,
${misc:Depends}
Recommends: dgit, git-buildpackage
Architecture: all
${misc:Depends}
Recommends: dgit, git-buildpackage
Architecture: all
Package: dgit-infrastructure
Depends: ${misc:Depends}, perl, git-core, gpgv, chiark-utils-bin,
libjson-perl, libdigest-sha-perl, libdbd-sqlite3-perl, sqlite3,
Package: dgit-infrastructure
Depends: ${misc:Depends}, perl, git-core, gpgv, chiark-utils-bin,
libjson-perl, libdigest-sha-perl, libdbd-sqlite3-perl, sqlite3,
- libwww-perl, libdpkg-perl
+ libwww-perl, libdpkg-perl,
+ liblocale-gettext-perl
Recommends: dgit
Architecture: all
Priority: extra
Recommends: dgit
Architecture: all
Priority: extra
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
use Debian::Dgit::ExitStatus;
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
use Debian::Dgit::ExitStatus;
use Dpkg::Compression;
use Dpkg::Compression::Process;
use POSIX;
use Dpkg::Compression;
use Dpkg::Compression::Process;
use POSIX;
use IPC::Open2;
use Digest::SHA;
use Digest::MD5;
use IPC::Open2;
use Digest::SHA;
use Digest::MD5;
$bpd_glob =~ s#[][\\{}*?~]#\\$&#g;
}
$bpd_glob =~ s#[][\\{}*?~]#\\$&#g;
}
+setlocale(LC_MESSAGES, "");
+textdomain("dgit");
+
if ($ENV{$fakeeditorenv}) {
git_slurp_config();
quilt_fixup_editor();
if ($ENV{$fakeeditorenv}) {
git_slurp_config();
quilt_fixup_editor();
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
use Debian::Dgit::GDR;
use Debian::Dgit::ExitStatus;
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
use Debian::Dgit::GDR;
use Debian::Dgit::ExitStatus;
use Memoize;
use Carp;
use POSIX;
use Memoize;
use Carp;
use POSIX;
use Data::Dumper;
use Getopt::Long qw(:config posix_default gnu_compat bundling);
use Dpkg::Version;
use Data::Dumper;
use Getopt::Long qw(:config posix_default gnu_compat bundling);
use Dpkg::Version;
+setlocale(LC_MESSAGES, "");
+textdomain("git-debrebase");
+
getoptions_main
("bad options\n",
"D+" => \$debuglevel,
getoptions_main
("bad options\n",
"D+" => \$debuglevel,