mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
ci: Include .ui files in POTFILES check
As the previous commit shows, just checking source files isn't enough. Extending the existing check to .ui files should make sure that we catch that kind of breakage in the future before it hits translators. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2173>
This commit is contained in:
parent
db3640ac30
commit
5a18f00fa6
1 changed files with 4 additions and 0 deletions
|
|
@ -1,10 +1,14 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
srcdirs="src subprojects/extensions-tool"
|
srcdirs="src subprojects/extensions-tool"
|
||||||
|
uidirs="js subprojects/extensions-app"
|
||||||
|
|
||||||
# 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)
|
||||||
|
|
||||||
|
# find ui files that contain translatable string
|
||||||
|
files="$files "$(grep -lRi --include='*.ui' 'translatable="[ty1]' $uidirs)
|
||||||
|
|
||||||
# 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…
Add table
Add a link
Reference in a new issue