[debian-edu-commits] debian-edu/ 01/01: Try harder to swap the po entries.
Petter Reinholdtsen
pere at moszumanska.debian.org
Wed Apr 15 07:01:03 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 dd4b1f236713ad0754f92b6d0059bb26a01a986e
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Wed Apr 15 08:58:01 2015 +0200
Try harder to swap the po entries.
---
documentation/itil/po-swap | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/documentation/itil/po-swap b/documentation/itil/po-swap
index 0075da6..85146d0 100755
--- a/documentation/itil/po-swap
+++ b/documentation/itil/po-swap
@@ -11,6 +11,8 @@ $nbpofile->set_charset("UTF-8");
$enpofile->read('itil.en.po');
for my $msgid ( keys %{$enpofile->{po}}) {
my $msgstr = $enpofile->gettext($msgid);
+ $msgid = remap($msgid);
+ $msgstr = remap($msgstr);
if (defined $msgstr ) { # && $msgid ne $msgstr) {
print("push $msgstr -> $msgid\n");
$nbpofile->push('msgid' => $msgstr, 'msgstr' => $msgid);
@@ -19,3 +21,11 @@ for my $msgid ( keys %{$enpofile->{po}}) {
$nbpofile->write('itil.nb.po');
+
+sub remap {
+ my $str = shift;
+ $str =~ s/\\\"/\"/g;
+ $str =~ s/\\n/\n/g;
+ $str =~ s/\\\\/\\/g;
+ return $str;
+}
--
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