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

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

Details

Reviewers
Abella
Group Reviewers
Localization
Summary

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.
https://logs.l10n.kde.org/181204.trunk_l10n-kf5
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

Repository
R883 Subversion
Lint
Lint Skipped
Unit
Unit Tests Skipped
lueck requested review of this revision.Tue, Dec 4, 6:53 PM
lueck created this revision.
Abella requested changes to this revision.EditedTue, Dec 4, 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.Tue, Dec 4, 8:29 PM