A hackish way of generating bin/po4a.pot
by Robert Luberda
Hi,
Yesterday, while updating Polish translations, I noticed that almost all
translations for the po4a-build script had been removed (see the bottom
of the
https://alioth.debian.org/scm/viewvc.php/po4a/po/bin/pl.po?root=po4a&r1=1...
page).
After some investigation it turned out that this had been caused by
passing the `-L perl' option to xgettext.
I've found some workaround for the problem. The workaround replaces
the usual way of generating po4a.pot file with the following steps:
1. create temporary symlinks (like po4a.TMP.pl pointing to po4a) to let
xgettext guess the language from the extension);
2. generate the POT file;
3. fix locations in the POT file to make it refer to real files, not
the temporary ones;
4. remove the symlinks.
The attached patch implements it and seems to work perfectly. What do
you think about it?
Regards,
robert
14 years, 7 months
[PATCH] po4a::text: Unknown option: copyright-holder
by TATEISHI Katsuyuki
Hi,
I got an error "Unknown option: copyright-holder" when doing
'po4a-gettextize -f text' for a simple text.
============================================================
kt@kiri% cat example.txt
Hello world!
kt@kiri% po4a-gettextize -f text -m example.txt -p example_ja.po
po4a::text: Unknown option: copyright-holder
============================================================
And the attached patch for the cvs HEAD will fix it. If
this patch is good to fix this error, would you apply it for
the HEAD?
Regards,
--
TATEISHI Katsuyuki <kt(a)wheel.jp>
diff --git lib/Locale/Po4a/Text.pm lib/Locale/Po4a/Text.pm
index b3b6241..676363d 100644
--- lib/Locale/Po4a/Text.pm
+++ lib/Locale/Po4a/Text.pm
@@ -149,21 +149,21 @@ sub initialize {
my $self = shift;
my %options = @_;
- my %valid = (
- asciidoc => 1,
- breaks => 1,
- debianchangelog => 1,
- debug => 1,
- fortunes => 1,
- markdown => 1,
- nobullets => 1,
- tabs => 1,
- verbose => 1,
- );
+ $self->{options}{'asciidoc'} = 1;
+ $self->{options}{'breaks'} = 1;
+ $self->{options}{'debianchangelog'} = 1;
+ $self->{options}{'debug'} = 1;
+ $self->{options}{'fortunes'} = 1;
+ $self->{options}{'markdown'} = 1;
+ $self->{options}{'nobullets'} = 1;
+ $self->{options}{'tabs'} = 1;
+ $self->{options}{'verbose'} = 1;
+
foreach my $opt (keys %options) {
die wrap_mod("po4a::text",
dgettext("po4a", "Unknown option: %s"), $opt)
- unless exists $valid{$opt};
+ unless exists $self->{options}{$opt};
+ $self->{options}{$opt} = $options{$opt};
}
if (defined $options{'nobullets'}) {
14 years, 7 months