[Top][All Lists]
[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: |
Mon, 15 Nov 2010 09:41:50 +0400 |
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.
>
> Unfortunately, I can't tell how to fix this.
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.