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'}) {