[SCM] live-manual branch, debian-next, updated. debian/3.0_a13-1-12-g2479a8a
chals
chals at altorricon.com
Sun Jul 8 15:45:23 UTC 2012
The following commit has been merged in the debian-next branch:
commit 2479a8adc700228037a283ec6472d5bda6594dff
Author: chals <chals at altorricon.com>
Date: Sun Jul 8 17:43:52 2012 +0200
Adding unfuzzy target to automatically fix 'predictable' fuzzy strings after building the manuals from the .po files.
diff --git a/manual/Makefile b/manual/Makefile
index 7992825..d949d11 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -50,4 +50,6 @@ distclean: clean
rm -f po4a.cfg
rm -rf $(LANGUAGES)
-rebuild: distclean update build
+rebuild: distclean update build unfuzzy
+unfuzzy:
+ @./bin/unfuzzy-dates.sh
diff --git a/manual/bin/unfuzzy-dates.sh b/manual/bin/unfuzzy-dates.sh
new file mode 100755
index 0000000..6f9da3d
--- /dev/null
+++ b/manual/bin/unfuzzy-dates.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+# Script to automatically fix "predictable" fuzzy strings in live-manual.
+# 'XY' is the start line number of the fuzzy strings in the dates.
+
+XY="50"
+
+# Getting the unfuzzying done.
+
+echo "Fixing 'fuzzy' in date strings..."
+
+for LANGUAGE in $(ls po)
+do
+ if [ "$(grep --line-number --word-regexp 'fuzzy' po/${LANGUAGE}/live-manual.ssm.po | sed 's/[^0-9]*//g')" -eq "${XY}" ] > /dev/null 2>&1
+ then
+ sed -i -e "${XY} s|#, fuzzy, no-wrap|#, no-wrap|" \
+ -e "$((${XY} + 1)),$((${XY} + 3))d" \
+ po/${LANGUAGE}/live-manual.ssm.po
+ fi
+done
--
live-manual
More information about the debian-live-changes
mailing list