trans-coord-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: philosophy/categories: unlocalised diagram


From: Ineiev
Subject: Re: philosophy/categories: unlocalised diagram
Date: Wed, 01 Dec 2010 15:44:34 +0000
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Ineiev wrote:
On 11/14/10, Ineiev <address@hidden> wrote:
GNUN does not localise the diagram (category.png).

For example, there is a French version available,
but philosophy/categories.fr.html shows the original
English version.
...
If appears that not to localise images is a design decision of Po4a.

Probably this can be worked around with a GNUmakefile modification
like this:

diff --git a/GNUmakefile.orig b/GNUmakefile
index 7a39c6b..724538e 100644
--- a/GNUmakefile.orig
+++ b/GNUmakefile
@@ -159,10 +159,12 @@ endef
 # whether the changes are not trivial (regarding only
 # POT-Creation-Date), in which case the changes are ignored.
 define generate-pot
+sed "s/\(<!-- translate this image -->\) *<img/\1<i translated_img/"
< $< > address@hidden
 $(MAILFAIL) $(NOTIFYSKIP) $(web-addr) \
   "[GNUN Error] POT generation of $(subst $(rootdir)/,,$@) failed" \
   $(PO4A_GETTEXTIZE) $(PO4A-XHTMLFLAGS) $(PO4A-GETTEXTIZEFLAGS) \
-  --master $< --po address@hidden
+  --master address@hidden --po address@hidden
+sed -i "s/<i translated_img/<!-- translate this image --> <img/" address@hidden
 if ([ ! -f $@ ] || [ "`diff -U 0 $@ address@hidden | $(GREP) -v 
"^\(---\|+++\|@@\)" \
      | $(GREP) -v '^[-+]\"POT-Creation-Date:' | wc -c`" -ne 0 ]); then \
   mv address@hidden $@ ; \

Images prefixed by <!-- translate this image --> will go to the .pot file.

Amended (rm the temporary file):
diff --git a/GNUmakefile.orig b/GNUmakefile
index 7a39c6b..cbb3913 100644
--- a/GNUmakefile.orig
+++ b/GNUmakefile
@@ -159,10 +159,13 @@ endef
 # whether the changes are not trivial (regarding only
 # POT-Creation-Date), in which case the changes are ignored.
 define generate-pot
+sed "s/\(<!-- translate this image -->\) *<img/\1<i translated_img/" < $< > 
address@hidden
 $(MAILFAIL) $(NOTIFYSKIP) $(web-addr) \
   "[GNUN Error] POT generation of $(subst $(rootdir)/,,$@) failed" \
   $(PO4A_GETTEXTIZE) $(PO4A-XHTMLFLAGS) $(PO4A-GETTEXTIZEFLAGS) \
-  --master $< --po address@hidden
+  --master address@hidden --po address@hidden
+sed -i "s/<i translated_img/<!-- translate this image --> <img/" address@hidden
+$(RM) address@hidden
 if ([ ! -f $@ ] || [ "`diff -U 0 $@ address@hidden | $(GREP) -v 
"^\(---\|+++\|@@\)" \
      | $(GREP) -v '^[-+]\"POT-Creation-Date:' | wc -c`" -ne 0 ]); then \
   mv address@hidden $@ ; \

Is there anybody active on the list besides Yavor (the automatic one)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]