From 10288220fc4497080d2c7af29c3730651419b9d7 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 9 Aug 2021 13:57:07 +1200 Subject: [PATCH] add a script to checkout a translations branch and compile the po files into mo files --- checkout-translations-branch | 22 ++++++++++++++++++++++ debian/control | 2 ++ debian/install | 1 + 3 files changed, 25 insertions(+) create mode 100755 checkout-translations-branch diff --git a/checkout-translations-branch b/checkout-translations-branch new file mode 100755 index 00000000..cd235f8b --- /dev/null +++ b/checkout-translations-branch @@ -0,0 +1,22 @@ +#!/bin/sh + +set -eux + +branch=$1 +target="$(readlink -f "${2}")" + +tmpdir="$(mktemp -d)" +cd "${tmpdir}" + +cleanup () { + rm -rf "${tmpdir}" +} + +trap cleanup EXIT + +mkdir -p $target + +bzr branch $branch checkout +for po in checkout/*.po; do + msgfmt "${po}" -o "${target}/$(basename "${po}" .po).mo" +done diff --git a/debian/control b/debian/control index 45dcf710..ecbec401 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ Architecture: any Depends: ${misc:Depends}, apt-utils, attr, + bzr, debootstrap, distro-info, dosfstools, @@ -18,6 +19,7 @@ Depends: ${misc:Depends}, gdisk, genisoimage, germinate (>= 1.25.1), + gettext, git, gnupg, grep-dctrl, diff --git a/debian/install b/debian/install index 818c3d11..500ef28d 100644 --- a/debian/install +++ b/debian/install @@ -4,3 +4,4 @@ get-ppa-fingerprint usr/share/livecd-rootfs minimize-manual usr/share/livecd-rootfs magic-proxy usr/share/livecd-rootfs lp-in-release usr/share/livecd-rootfs +checkout-translations-branch usr/share/livecd-rootfs