my $options = {};
-getopts('o:b:', $options) ||
+getopts('o:b:p:', $options) ||
die "unable to parse options\n";
my $dirs = [@ARGV];
die "no such directory '$dir'\n" if ! -d $dir;
}
+my $projectId = $options->{p} || die "missing project ID\n";
+
my $basehref = {};
if (my $base = $options->{b}) {
my $aref = Locale::PO->load_file_asarray($base) ||
my $header = <<__EOD;
Proxmox message catalog.
-Copyright (C) 2011-2017 Proxmox Server Solutions GmbH
-This file is distributed under the same license as the proxmox-mailgateway
-package.
-Proxmox Support Team <support\@proxmox.com>, 2017.
+Copyright (C) 2011-2020 Proxmox Server Solutions GmbH
+This file is free software: you can redistribute it and\/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+Proxmox Support Team <support\@proxmox.com>, 2020.
__EOD
my $ctime = scalar localtime;
-comment=> $header,
-fuzzy=> 1,
-msgstr=>
- "Project-Id-Version: proxmox-mailgateway 5.0\n" .
+ "Project-Id-Version: $projectId\n" .
"Report-Msgid-Bugs-To: <support\@proxmox.com>\n" .
"POT-Creation-Date: $ctime\n" .
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" .
foreach my $s (@$sources) {
open(SRC, $s) || die "unable to open file '$s' - $!\n";
while(defined(my $line = <SRC>)) {
- next if $line =~ m/^function gettext/;
+ next if $line =~ m/^\s*function gettext/;
if ($line =~ m/gettext\s*\(/) {
extract_msg($s, $., $line);
}