Commit 223d6d87 authored by Michal Čihař's avatar Michal Čihař

Implement merging of PO file comments

Issue #922
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d790aebc
......@@ -920,6 +920,14 @@ class PoFormat(FileFormat):
self.store.updateheader(**update)
header = self.store.header()
newheader = otherstore.store.header()
if not header or not newheader:
return
header.removenotes()
header.addnote(newheader.getnotes())
@register_fileformat
class PoMonoFormat(PoFormat):
......
......@@ -2,6 +2,7 @@
# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Automatically generated, 2012.
# Testing Weblate, 2015.
#
msgid ""
msgstr ""
......
......@@ -112,6 +112,10 @@ class ImportTest(ImportBaseTest):
self.assertEqual(
header['Language-Team'], 'Test Team <noreply@weblate.org>'
)
self.assertIn(
'Testing Weblate, 2015.',
unit.translation.store.store.header().getnotes()
)
def test_import_author(self):
'''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment