f0db52d761
Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: I4267481c5b34f0493ca8a7b1b50d398299deeae3
22 lines
652 B
Python
Executable file
22 lines
652 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""Append Welcome dialog strings to COOL UI pot file"""
|
|
|
|
import sys
|
|
import polib
|
|
|
|
welcome = polib.pofile(sys.argv[1],
|
|
autodetect_encoding=False,
|
|
encoding="utf-8",
|
|
wrapwidth=-1)
|
|
coolui = polib.pofile(sys.argv[2],
|
|
autodetect_encoding=False,
|
|
encoding="utf-8",
|
|
wrapwidth=78)
|
|
# Filter out unnecessary strings of meta tags from html2po output
|
|
for entry in welcome:
|
|
if 'html.head.meta' in entry.occurrences[0][0]:
|
|
continue
|
|
if entry.msgid == '':
|
|
continue
|
|
coolui.append(entry)
|
|
coolui.save(sys.argv[2])
|