37388186bca30e2b574370e4de75439152b652df
[geeqie.git] / scripts / untranslated-text.sh
1 #!/bin/sh
2
3 ## @file
4 ## @brief Locate strings not marked for translation
5 ##
6 ## Checks all .c files under ./src
7 ##
8 ## The check is not comprehensive - some errors are not detected
9 ## and there are some false hits.
10 ##
11
12 for file in src/*.c src/view_file/*.c
13 do
14         for search_text in "label" "menu_item_add" "tooltip" "_button" "_text"
15         do
16                 cat -n "$file" | grep --extended-regexp --ignore-case "$search_text.*\(\"" | grep --invert-match "_(" | grep --invert-match "(\"\")" && printf '%s\n\n' "$file"
17         done
18 done