Frontend: Remove "#, fuzzy" from translations in src/locales/fr.po

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2025-10-23 09:49:27 +02:00
parent 7b97a5d43f
commit dd2ada0651
2 changed files with 23 additions and 6 deletions

View file

@ -1,9 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail
shopt -s globstar nullglob
remove_fuzzy_flag() {
local file="$1"
# Skip files that do not contain the fuzzy marker.
if ! grep -q '^#,\ fuzzy$' "$file"; then
return
fi
local tmp
tmp="$(mktemp)"
# Copy every line except the fuzzy marker.
awk '$0 != "#, fuzzy"' "$file" >"$tmp"
mv "$tmp" "$file"
}
echo "Removing fuzzy attribute from backend translations..."
for file in ./assets/locales/**/*.po; do msgattrib --clear-fuzzy -o "${file}" "${file}"; done
for file in ./assets/locales/**/*.po; do
remove_fuzzy_flag "$file"
done
echo "Removing fuzzy attribute from frontend translations..."
for file in ./frontend/src/locales/*.po; do msgattrib --clear-fuzzy -o "${file}" "${file}"; done
for file in ./frontend/src/locales/*.po; do
remove_fuzzy_flag "$file"
done
echo "Done."