[debian-edu-commits] debian-edu/ 01/01: Improve swap and add build rule for itil.nb.po.
Petter Reinholdtsen
pere at moszumanska.debian.org
Fri Mar 27 08:10:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository debian-edu-itil-doc-nb.
commit f9904954ffffe0fede9c4735c932ec3db1d20d6a
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Fri Mar 27 09:10:28 2015 +0100
Improve swap and add build rule for itil.nb.po.
---
documentation/itil/Makefile | 3 +++
documentation/itil/po-swap | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/documentation/itil/Makefile b/documentation/itil/Makefile
index bd22279..019fc28 100644
--- a/documentation/itil/Makefile
+++ b/documentation/itil/Makefile
@@ -24,4 +24,7 @@ moin-en: fetch-pages translate
.mediawiki.moin:
./convert.pl $^ > $@
+itil.nb.po: itil.en.po
+ ./po-swap
+
.SUFFIXES: .xml .moin .mediawiki
diff --git a/documentation/itil/po-swap b/documentation/itil/po-swap
index 14c7518..a38e57c 100755
--- a/documentation/itil/po-swap
+++ b/documentation/itil/po-swap
@@ -7,11 +7,14 @@ use warnings;
use Locale::Po4a::Po;
my $enpofile=Locale::Po4a::Po->new();
my $nbpofile=Locale::Po4a::Po->new();
+$nbpofile->set_charset("UTF-8");
$enpofile->read('itil.en.po');
for my $msgid ( keys %{$enpofile->{po}}) {
my $msgstr = $enpofile->gettext($msgid);
- print("push $msgstr -> $msgid\n");
- $nbpofile->push('msgid' => $msgstr, 'msgstr' => $msgid);
+ if (defined $msgstr && $msgid ne $msgstr) {
+ print("push $msgstr -> $msgid\n");
+ $nbpofile->push('msgid' => $msgstr, 'msgstr' => $msgid);
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/debian-edu-itil-doc-nb.git
More information about the debian-edu-commits
mailing list