File: pofuzzy2

package info (click to toggle)
debian-reference 2.132
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 33,980 kB
  • sloc: python: 586; makefile: 575; sh: 528; sed: 80; xml: 36
file content (17 lines) | stat: -rwxr-xr-x 692 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh -e
# vim: set sw=2 expandtab:
# $1: es.po fr.po pt.po zh-cn.po zh-cn.po-best ...
#
MSGATTR="msgattrib"
#
for f in "$@"; do
  TOTAL="$(${MSGATTR} --no-obsolete "po-tmp/$f" | grep ^msgid | sed 1d | wc -l)"
  UNTRANSLATED="$(${MSGATTR} --untranslated "po-tmp/$f" | grep ^msgid | sed 1d | wc -l)"
  FUZZY="$(${MSGATTR} --fuzzy "po-tmp/$f" | grep ^msgid | sed 1d | wc -l)"
  COMPLETED="$(((TOTAL - UNTRANSLATED - FUZZY) * 100 / TOTAL))"
  echo "$f  $TOTAL strings -- TOTAL msgstr to translate"
  echo "$f    $UNTRANSLATED strings -- EMPTY msgstr"
  echo "$f    $FUZZY strings -- FUZZY msgstr"
  echo "$f  $COMPLETED %       -- COMPLETED translation (must be more than 40%)"
  echo
done