Add missing X-Qt-Contexts to header of *_qt.po files
Needs RevisionPublic

Authored by lueck on Dec 4 2018, 6:53 PM.


Group Reviewers

we need the line
"X-Qt-Contexts: true\n"
in the header of *_qt.po files
so far scripty only checks for files without this line in a *_qt file
and reports this issue in the log, e. g.
with 74 translation catalogs without a header entry "X-Qt-Contexts: true\n"
this patch adds the missing entry

Test Plan

in Konsole:
cd l10n
sed -i 's/\"Plural-Forms/\"X-Qt-Contexts: true\\n\"\n\"Plural-Forms/g' $(find cat subdirs -type f -name \*_qt.po -print | xargs grep -L "X-Qt-Contexts: true")
svn diff

executing the command line a second time the
output reads:
sed: no input files

Diff Detail

R883 Subversion
Lint Skipped
Unit Tests Skipped
lueck requested review of this revision.Dec 4 2018, 6:53 PM
lueck created this revision.
Abella requested changes to this revision.EditedDec 4 2018, 8:29 PM
Abella added a subscriber: Abella.

Pology tool manage it more elegantly:

find $(cat subdirs) -type f -name \*_qt.po -print | xargs posieve set-header -sfield:'X-Qt-Contexts: true' -screate -safter:'X-Generator' -sreorder
This revision now requires changes to proceed.Dec 4 2018, 8:29 PM