summaryrefslogtreecommitdiffstats
path: root/ipatests/i18n.py
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-11-15 16:43:58 +0100
committerMartin Basti <mbasti@redhat.com>2016-11-22 16:14:50 +0100
commit8a7962585069d7b0ff7e8d87ce094f07c16b3cd4 (patch)
tree418800cfd88cdc8df9e86228290b148772e64b74 /ipatests/i18n.py
parent9ef5a7de781f2508c2925225533973417458d0ea (diff)
downloadfreeipa-8a7962585069d7b0ff7e8d87ce094f07c16b3cd4.tar.gz
freeipa-8a7962585069d7b0ff7e8d87ce094f07c16b3cd4.tar.xz
freeipa-8a7962585069d7b0ff7e8d87ce094f07c16b3cd4.zip
Build: integrate translation system tests again
The Makefile test targets were lost when gettextize infrastructure was introduced. Now it is re-added in its modernized form which counts with generated .pot files. ipatests/i18n.py is now explicitly setting character encoding in files it generates. According to gettext manual chapter "Filling in the Header Entry" the Content-Type header is language-specific so it does not make sense to fill it in in .pot file. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Diffstat (limited to 'ipatests/i18n.py')
-rwxr-xr-xipatests/i18n.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipatests/i18n.py b/ipatests/i18n.py
index 1f48e65bb..8c6e641fd 100755
--- a/ipatests/i18n.py
+++ b/ipatests/i18n.py
@@ -546,7 +546,10 @@ def create_po(pot_file, po_file, mo_file):
for k in po.metadata:
if k.lower() == 'plural-forms':
po.metadata[k] = 'nplurals=2; plural=(n != 1)'
- break
+ # the auto-generated PO file should have charset set to UTF-8
+ # because we are using UTF-8 prefix and suffix below
+ elif k.lower() == 'content-type':
+ po.metadata[k] = 'Content-Type: text/plain; charset=UTF-8'
# Iterate over all msgid's and form a msgstr by prepending