Files
spotifast/.github/scripts/update-translations.sh
T
Carmine Paolino aca81b8e47 Compile and look up translations with fastframe-i18n
The build script compiles assets/i18n with fastframe-i18n's PO compiler,
the gettext lookups and the system language detection come from the
crate, and Spotifast keeps its Locale enum, its tags, native names and
phrase helpers, and its mapping from a language tag to a catalogue. The
compiler's own fixture test moves to the crate; the test that every
catalogue covers the template and keeps its placeholders stays here.
update-translations.sh becomes a wrapper around the crate's script with
the same options and output, and tr, sys-locale, polib and include-po
leave the build.

No behaviour changes.
2026-09-25 15:50:44 +02:00

12 lines
643 B
Bash
Executable File

#!/usr/bin/env bash
# Updates assets/i18n with fastframe-i18n's script, from the checkout Cargo
# already has. Requires GNU gettext tools with Rust support; normal Cargo
# builds do not. Pass --check to fail on a stale template instead.
set -euo pipefail
cd "$(dirname "$0")/../.."
crate=$(cargo metadata --format-version 1 --locked |
grep -o '"manifest_path":"[^"]*fastframe-i18n/Cargo.toml"' | head -n1 |
sed 's/^"manifest_path":"//; s/Cargo.toml"$//')
exec bash "$crate/scripts/update-translations.sh" --package Spotifast --domain spotifast \
--bugs 'https://github.com/crmne/spotifast/issues/new?template=translation.yml' "$@"