This commit sets default languages to English for the application unless the user specifies a different language, ensuring a consistent first-run experience across different system locales. Additionally, a wrapper for Qt tools is introduced in the CMake configuration for non-Windows platforms to filter out non-actionable output during builds.
26 lines
674 B
Bash
Executable File
26 lines
674 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
tool="${1:-}"
|
|
shift || true
|
|
|
|
if [[ -z "$tool" ]]; then
|
|
echo "qt_tool_wrapper.sh: missing tool argument" >&2
|
|
exit 2
|
|
fi
|
|
|
|
base="$(basename "$tool")"
|
|
|
|
# Qt LinguistTools (lrelease) prints some noisy informational lines to stderr that
|
|
# are not actionable during normal builds (e.g. "Removed plural forms...").
|
|
# We filter only those specific messages.
|
|
if [[ "$base" == "lrelease" ]]; then
|
|
"$tool" "$@" 2>&1 | sed \
|
|
-e '/^Removed plural forms as the target language has less forms\.$/d' \
|
|
-e '/^If this sounds wrong, possibly the target language is not set or recognized\.$/d'
|
|
exit "${PIPESTATUS[0]}"
|
|
fi
|
|
|
|
exec "$tool" "$@"
|
|
|