Debian Codegraph @

translations/check-ts.xq

raw
1 for $file in tokenize($files, codepoints-to-string(10))
2 let $fresh := doc($file)/TS/context/message[not (translation/@type = ('obsolete', 'vanished'))]
3 return if (count($fresh) gt 0)
4 then concat($file, ":", count($fresh/translation[not (@type = 'unfinished')]) * 100 idiv count($fresh))
5 else concat($file, ":n/a")