From 0013fdf36b7348479f57d989a014bdd9e8a656f1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 20:12:25 +0200 Subject: Adding upstream version 21. Signed-off-by: Daniel Baumann --- expand-translations | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 expand-translations (limited to 'expand-translations') diff --git a/expand-translations b/expand-translations new file mode 100755 index 0000000..0683507 --- /dev/null +++ b/expand-translations @@ -0,0 +1,29 @@ +#!/bin/sh + +set -eu + +outdir="$1" + +mkdir -p "$outdir" + +isas=$(cat isa-list | grep ^Name | cut -d " " -f2) + +for po in debian/po/*.po ; do + po2="$outdir/$(basename "$po")" + truncate -s0 "$po2" + + echo "Extending $po: s/&NAME&/\$isa > $po2" + csplit --quiet --suppress-matched -f "$po2." -b '%02d.sect' "$po" '/^$/' '{*}' + for sect in $(ls -1 $po2*.sect | sort -n) ; do + if grep -q '@NAME@' $sect ; then + for isa in $isas ; do + cat $sect | sed -e "s/@NAME@/$isa/g" >> "$po2" + echo >> "$po2" + done + else + cat $sect >> "$po2" + echo >> "$po2" + fi + rm $sect + done +done -- cgit v1.2.3