aboutsummaryrefslogtreecommitdiffstats
path: root/chk-po
diff options
context:
space:
mode:
authorBarry Jackson <barjac@mageia.org>2023-01-11 18:14:22 +0000
committerBarry Jackson <barjac@mageia.org>2023-01-11 18:14:22 +0000
commitc64f1a217dbeb27837a8b8093ce606d551c1a2f8 (patch)
tree705afd4c8439bd0cbf083326de20325984ae708c /chk-po
parent98bcc60e0e28242d7d4cca9e371fd614b73d3c71 (diff)
downloadremove-old-kernels-c64f1a217dbeb27837a8b8093ce606d551c1a2f8.tar
remove-old-kernels-c64f1a217dbeb27837a8b8093ce606d551c1a2f8.tar.gz
remove-old-kernels-c64f1a217dbeb27837a8b8093ce606d551c1a2f8.tar.bz2
remove-old-kernels-c64f1a217dbeb27837a8b8093ce606d551c1a2f8.tar.xz
remove-old-kernels-c64f1a217dbeb27837a8b8093ce606d551c1a2f8.zip
fix some .po msgid errors, add chk-po script
Diffstat (limited to 'chk-po')
-rwxr-xr-xchk-po22
1 files changed, 22 insertions, 0 deletions
diff --git a/chk-po b/chk-po
new file mode 100755
index 0000000..63341fe
--- /dev/null
+++ b/chk-po
@@ -0,0 +1,22 @@
+#!/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}"
+ while read line ; do
+ #echo $line
+ findstr="$(echo "$line" | grep 'msgid'|cut -d'"' -f2)"
+ # Skip these two strings as they include a variable in the script.
+ if echo "$findstr"|grep -q "that would be used"; then
+ continue
+ fi
+ if ! fgrep -q "$findstr" remove-old-kernels; then
+ echo "${pofile} - ${findstr}"
+ fi
+ done < "${pofile}"
+# echo ""
+done
+