aboutsummaryrefslogtreecommitdiffstats
path: root/chk-po
blob: c7ff2e63bee32647bd2602fe1c6ef34846f6683c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/bash

# Checks that all msgid strings in .po files are identical in the remove-old-kernels script.
# On error, the string in the offending .po file is printed out.
# Number of strings reported should be identical for all languages.

clear
for pofile in po/*pot po/*po; do
	echo "Checking - ${pofile}"
	entries=0
	while read -r line ; do
		
		findid="$(echo "$line" | grep '^msgid'|cut -d'"' -f2)"
		(( ${#findid} == 0 )) && continue
		((entries++))
		if ! grep -F -q "$findid" remove-old-kernels; then
			echo "${pofile} - ${findid}"
		fi
	done < "${pofile}"
	echo strings - $entries
done