mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 19:07:39 +00:00
9f4be32753
This allows to drop the custom check-po Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/753>
25 lines
612 B
Bash
Executable file
25 lines
612 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright (C) 2024 The Phosh developers
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# Author: Guido Günther <agx@sigxcpu.org>
|
|
|
|
cd po/ || exit 1
|
|
# barf on untranslated C files. Seems intltool
|
|
# can't be told to exit with non-zero exit status
|
|
# in this case
|
|
|
|
if intltool-update -m 2>&1 | grep -E -qs '/.*\.(c|ui|in)'; then
|
|
intltool-update -m
|
|
exit 1
|
|
fi
|
|
|
|
# Check for broken po files
|
|
for file in *.po; do
|
|
echo -n "Checking ${file}: "
|
|
msgfmt -v -c "${file}"
|
|
# Check for errors, msgfmt returns 0 on errors too
|
|
if msgfmt -c "${file}" 2>&1 | grep -qs 'fatal error'; then
|
|
exit 1
|
|
fi
|
|
done
|