ci: Include .desktop files in POTFILES check
.desktop files always include translatable strings, so make sure they are added to either POTFILES.in or POTFILES.skip. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2904>
This commit is contained in:
parent
3f0d3381ee
commit
168b306ffe
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
srcdirs="src subprojects/extensions-tool"
|
srcdirs="src subprojects/extensions-tool"
|
||||||
uidirs="js subprojects/extensions-app"
|
uidirs="js subprojects/extensions-app"
|
||||||
|
desktopdirs="data subprojects/extensions-app/ subprojects/extensions-tool"
|
||||||
|
|
||||||
# find source files that contain gettext keywords
|
# find source files that contain gettext keywords
|
||||||
files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
|
files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
|
||||||
@ -9,6 +10,9 @@ files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
|
|||||||
# find ui files that contain translatable string
|
# find ui files that contain translatable string
|
||||||
files="$files "$(grep -lRi --include='*.ui' 'translatable="[ty1]' $uidirs)
|
files="$files "$(grep -lRi --include='*.ui' 'translatable="[ty1]' $uidirs)
|
||||||
|
|
||||||
|
# find .desktop files
|
||||||
|
files="$files "$(find $desktopdirs -name '*.desktop*')
|
||||||
|
|
||||||
# filter out excluded files
|
# filter out excluded files
|
||||||
if [ -f po/POTFILES.skip ]; then
|
if [ -f po/POTFILES.skip ]; then
|
||||||
files=$(for f in $files; do ! grep -q ^$f po/POTFILES.skip && echo $f; done)
|
files=$(for f in $files; do ! grep -q ^$f po/POTFILES.skip && echo $f; done)
|
||||||
|
Loading…
Reference in New Issue
Block a user