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): ...@@ -920,6 +920,14 @@ class PoFormat(FileFormat):
self.store.updateheader(**update) 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 @register_fileformat
class PoMonoFormat(PoFormat): class PoMonoFormat(PoFormat):
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# Automatically generated, 2012. # Automatically generated, 2012.
# Testing Weblate, 2015.
# #
msgid "" msgid ""
msgstr "" msgstr ""
......
...@@ -112,6 +112,10 @@ class ImportTest(ImportBaseTest): ...@@ -112,6 +112,10 @@ class ImportTest(ImportBaseTest):
self.assertEqual( self.assertEqual(
header['Language-Team'], 'Test Team <noreply@weblate.org>' header['Language-Team'], 'Test Team <noreply@weblate.org>'
) )
self.assertIn(
'Testing Weblate, 2015.',
unit.translation.store.store.header().getnotes()
)
def test_import_author(self): 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