mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 00:47:00 +01:00
The app, the tray and the search prompt route every user-visible string through GNU gettext in the `pdfs` text domain, with named placeholders and plural forms. po/ holds the template, update and build scripts, and catalogs for de, en_GB, es, fr, it, nl, pl and pt_BR. Preferences gains a Language row that overrides the system language from the next start (config `language`). Packages compile the catalogs into /usr/share/locale and the desktop files carry translated descriptions and keywords. docs/TRANSLATING.md describes the workflow.
19 lines
625 B
Bash
Executable File
19 lines
625 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Compile every catalog in po/LINGUAS into <localedir>/<lang>/LC_MESSAGES/pdfs.mo.
|
|
# Packages pass their install tree, e.g. "$pkgdir/usr/share/locale"; for a run
|
|
# from the source tree use target/locale with PDFS_LOCALEDIR=target/locale.
|
|
set -euo pipefail
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "usage: $0 <localedir>" >&2
|
|
exit 2
|
|
fi
|
|
localedir="$1"
|
|
po_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
while read -r lang; do
|
|
[ -n "$lang" ] || continue
|
|
mkdir -p "$localedir/$lang/LC_MESSAGES"
|
|
msgfmt --check --output-file="$localedir/$lang/LC_MESSAGES/pdfs.mo" "$po_dir/$lang.po"
|
|
done < "$po_dir/LINGUAS"
|