aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/pod/live-manual/media/text/bin/show-complete-languages.sh
blob: 4682d0a66b44485fb97f84a362735cf846264665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

# Find 100% translated languages in live-manual

Find_untranslated ()
{
for POFILE in manual/po/"${LANGUAGE}"/*
	do
		
		if [ "$(sed '$!d' ${POFILE})" = 'msgstr ""' ]
			then
				sed '$G' ${POFILE} | grep --extended-regexp --before-context=1 '^$' | grep --count '^msgstr ""$' || continue
		else
			grep --extended-regexp --before-context=1 '^$' ${POFILE} | grep --count '^msgstr ""$' || continue
		fi	
        
	done
}

        for LANGUAGE in $(ls manual/po)
            do
               if [ "$(Find_untranslated | awk '{ sum += $1 } END { print sum }')" -eq "0" ]
                then
                    echo -n "${LANGUAGE}, "
               fi
            done