[gnome-shell] ci: Handle POTFILES.skip in potfiles check
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ci: Handle POTFILES.skip in potfiles check
- Date: Tue, 7 Apr 2020 20:33:11 +0000 (UTC)
commit 6c0bd207e91537ac74c99a3299a31d1f1dafe7c0
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Mar 10 01:39:09 2020 +0100
ci: Handle POTFILES.skip in potfiles check
Allow marking files as ignored when searching for translatable
strings, similar to "good" ol' intltool.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
.gitlab-ci/check-potfiles.sh | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/.gitlab-ci/check-potfiles.sh b/.gitlab-ci/check-potfiles.sh
index 51cbdd89a2..8785eb8077 100755
--- a/.gitlab-ci/check-potfiles.sh
+++ b/.gitlab-ci/check-potfiles.sh
@@ -6,6 +6,11 @@ globs=('*.js' '*.c')
# find source files that contain gettext keywords
files=$(grep -lR ${globs[@]/#/--include=} '\(gettext\|[^I_)]_\)(' $srcdirs)
+# filter out excluded files
+if [ -f po/POTFILES.skip ]; then
+ files=$(for f in $files; do ! grep -q ^$f po/POTFILES.skip && echo $f; done)
+fi
+
# find those that aren't listed in POTFILES.in
missing=$(for f in $files; do ! grep -q ^$f po/POTFILES.in && echo $f; done)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]