[Po4a-devel] <map> and <area> in the XHTML module

poy poy at 123gen.com
Sun Feb 22 21:39:24 UTC 2009


> It's unclear to me what should be the default behavior.

this was hasty i'll explain a bit more...

an example <map> / <area> set of tags looks like this:
<map id="map_toolbar">
 <area shape="rect" coords="0,0,20,20" href="window_public_hubs.html" 
alt="Public Hubs"/>
 <area shape="rect" coords="20,0,40,20" href="#tb_reconnect" 
alt="Reconnect"/>
</map>

neither <map> nor <area> specify any text, so i believe they should simply 
be kept out of translations; considering them breaking tags solves this.
right now, <map> is inlined but <area> is not, so as a result i have the 
following texts in the pot file:

# type: Content of: <html><body><p><map>
#: help\window_main.html:129
msgid "<map id=\"map_toolbar\">"
msgstr ""

# type: Content of: <html><body><p>
#: help\window_main.html:146
msgid "</map>"
msgstr ""

if <map> is to be kept inlined, then so should <area>; my opinion however is 
that neither should be inlined since there is no text to translate inside of 
them.

the only translatable text is the "alt" attribute, but that one is already 
taken care of in the 'attributes' list of options - see related comment 
about <img> and why <img> isn't in that inline list either.

my demand basically boils down to: remove <map> from the "inline" list of 
tags.

> Having <area> as inline permits an easy translation of the coordinates.
> Also, this permits to add areas in the map (image might be translated, and
> requiring different set of areas)

this is a very edge case, and in that case the person will have to add 
<map>, <area> and <img> (to change the image url) to inline tags. but for 
general use i don't think the default should be to display all those <area> 
tags in translations and have translators try to mess with coordinates...
the current policy is to already ignore <img> (see comment in Xhtml.pm:215), 
the same should apply to <map> and <area>.

> (BTW, I think I did not answer to you regarding the tags used for
> placeholder. This was fixed a bit differently from your proposal, but the
> idea of having a valid tag was implemented)

(i noticed the changes, they look good but still aren't exactly what i 
wanted... thanks for your efforts though.)

poy 




More information about the Po4a-devel mailing list