mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
ci: Split POTFILES check between C and JS
Regex are a crude tool for analyzing whether some code *calls* a particular function. Spidermonkey has Reflect.parse() that returns the AST of the passed in code, which allows for a much more precise check for javascript. The old script is still used for C code, where i18n-affecting changes are much rarer. Based heavily on Philip Chimento's mozjs migration script at https://gitlab.gnome.org/ptomato/moz60tool. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>
This commit is contained in:
parent
53e623e49c
commit
b9f38f95e3
3 changed files with 213 additions and 4 deletions
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
srcdirs="js src subprojects/extensions-tool"
|
||||
globs=('*.js' '*.c')
|
||||
srcdirs="src subprojects/extensions-tool"
|
||||
|
||||
# find source files that contain gettext keywords
|
||||
files=$(grep -lR ${globs[@]/#/--include=} '\(gettext\|[^I_)]_\)(' $srcdirs)
|
||||
files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
|
||||
|
||||
# filter out excluded files
|
||||
if [ -f po/POTFILES.skip ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue