Merge branch 'master' of vcs.fsf.org:enc
[enc.git] / Makefile
index 7d8167479257e466b3b55631bb0695d460441915..3908bdd537ad60344bc779678d1b5a65f34d9f6c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # This source code is released in public domain.
 
 # Author Tomas Stary (2016) <tomichec@gmail.com> 
-# Thanks for helpfull discussion to Thérèse Godefroy
+# 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
@@ -69,10 +69,10 @@ 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 $@
@@ -85,17 +85,8 @@ esd-%.po.extract: $(foreach d,$(DIR) %,$(foreach f,$(FILES),$d/$f))
 # 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 $@ $<
-
-# TODO: The system could be further refined with 2 external scripts:
-
-# - gnun-add-fuzzy-diff (from the GNUN package [4]). Very useful to locate
-# a change within a string. It runs after po4a-updatepo.
+       po4a-updatepo $(PO4A_FLAGS) $(foreach f,$(SRC),-m en/$f) -p $@; \
+./gnun-add-fuzzy-diff $@ > $<
 
-# - some sort of reformatting script to get rid of the extra spaces, tabs,
-# linefeeds, etc., to make sure that a spurious difference between
-# index.html, mac.html and windows.html isn't going to add useless strings
-# to an existing POT file, or make the POs fuzzy for no reason. There is
-# such a script in the kitchen (reformat-html), but I am currently using a
-# simpler one (reformat-original, attached).
+# gnun-add-fuzzy-diff (from the GNUN package) is very useful to locate
+# a change within a string.