update troubleshoot gpg2 for some distributions (in 2.a)
[enc.git] / Makefile
index 4e353403b3408dae706b8f12fb3ae0122353da1b..901d47f95e91b801a37da1d622d45679886f896c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,15 @@
+# This source code is released in public domain.
+
+# Author Tomas Stary (2016) <tomichec@gmail.com>
+# Thanks for helpful discussion to Thérèse Godefroy
+
 # This is a Makefile to generate the PO files for automated
 # translation. If you get through the trouble of creating PO file for
 # your language, you will save a lot of hassles with editing plain html
 # and repeated text, which also implies potential mistakes.
 
 # Please read the manual on the page:
-# http://dev.man-online.org/man7/po4a/
+# https://po4a.org/man/man1/po4a.1.php
 
 # This Makefile only contains commands from the manual tested for the
 # esd translation.
 # files using: make -f Makefile.gen
 
 # flags for the po4a-getextize
-PO4A_FLAGS=-M utf-8 -f xhtml
+PO4A_FLAGS=-M utf-8 -f xhtml -o porefs=none \
+           -o 'untranslated=<script>' \
+           -o 'attributes=<meta>content' \
+
 # list of source files for the translation
 SRC=confirmation.html\
        index.html\
        infographic.html\
-       mac.html\
        next_steps.html\
-       windows.html\
        workshops.html
 
 ############################################################
-# initialise the po template from English version, this is to be used,
+# Initialise the po template from English version, this is to be used,
 # there is no translation for now, and you are going to build it from
 # scratch. Then copy the file esd-temp.pot to your language file
 # esd-$(lang).po such as esd-cs.po, and edit it in your favourite PO
@@ -60,21 +66,24 @@ FILES=$(SRC)
 # mistake. Go to that file and try to correct the errors and then
 # repeat the procedure.
 
-# Don't give it up translating PO files is nicer.
+# Don't give up. Translating PO files is nicer.
 
 # For more details and troubleshooting see:
-# http://dev.man-online.org/man7/po4a/
+# https://po4a.org/man/man7/po4a.7.php
 # in section: HOWTO convert a pre-existing translation to po4a?
 esd-%.po.extract: $(foreach d,$(DIR) %,$(foreach f,$(FILES),$d/$f))
        po4a-gettextize $(PO4A_FLAGS) $(foreach f,$(FILES),-m $(DIR)/$f) $(foreach f,$(FILES),-l $*/$f) -p $@
        cp $@ `basename -s .extract $@`
 
 ############################################################
-# update the PO translation after the original has changed. This will
+# Update the PO translation after the original has changed. This will
 # make a new PO file automaticaly reusing identical translations, but
 # the strings will be made fuzzy and need to verified manualy. Strings
 # that changed need to be translated again.
 esd-%.po.update: esd-%.po $(foreach f,$(SRC),en/$f)
        cp $< $@
-       po4a-updatepo $(PO4A_FLAGS) $(foreach f,$(SRC),-m en/$f) -p $@
-       cp $@ $<
+       po4a-updatepo $(PO4A_FLAGS) $(foreach f,$(SRC),-m en/$f) -p $@; \
+./gnun-add-fuzzy-diff $@ > $<
+
+# gnun-add-fuzzy-diff (from the GNUN package) is very useful to locate
+# a change within a string.