stop lconvert from complaining about plurals
Weird issue. lconvert of Qt 4.7.4 complains when:
a) … there are msgstr[x] with x > nplurals=y, i. e. translations for
more plural forms than the language actually has.
Understandable, so we remove redundant plurals with black voodoo:
for pofile in *.po; do
IFS='=' read var plurals \
< <(egrep -o 'nplurals=[[:digit:]]+' $pofile);
maxplural=$(egrep -o 'msgstr\[[[:digit:]]+\]' $pofile |
egrep -o '[[:digit:]]+' | sort -rn | head -n 1);
for ((i=$plurals; i<=$maxplural; i++)); do
sed -i -re "/^msgstr\[$i\]/d;" $pofile;
done;
done
b) … the .po path contains a '/'.
Huh? Yeah.
`lconvert -i xy.po …` is fine.
`lconvert -i ./xy.po …` produces an error.
So we're running lconvert from ${CMAKE_SOURCE_DIR}/po now.
14 files changed: