build: rework checks in i18n-scan.pl