File: pofuzzy1

package info (click to toggle)
debian-reference 2.131
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 33,684 kB
  • sloc: python: 586; makefile: 574; sh: 528; sed: 80
file content (17 lines) | stat: -rwxr-xr-x 680 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/$f" | grep ^msgid | sed 1d | wc -l)"
  UNTRANSLATED="$(${MSGATTR} --untranslated "po/$f" | grep ^msgid | sed 1d | wc -l)"
  FUZZY="$(${MSGATTR} --fuzzy "po/$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