aboutsummaryrefslogtreecommitdiffstats
path: root/chk-po
blob: 6a023276e492a141d65cff9fe8e6cb3dc1ce961c (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
#!/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.

clear
for pofile in po/*; do
	echo "Checking - ${pofile}"
	entries=0
	while read line ; do
		
		findid="$(echo "$line" | grep 'msgid'|cut -d'"' -f2)"
		[[ ${#findid} = 0 ]] && continue
		# Skip these two strings as they include a variable in the script.
		if echo "$findid"|grep -q "that would be used"; then
			continue
		fi
		((entries++))
		if ! fgrep -q "$findid" remove-old-kernels; then
			echo "${pofile} - ${findid}"
		fi
	done < "${pofile}"
	echo strings - $entries
done