[Po4a-devel] XML: prevent some attributes from being translated

poy poy at 123gen.com
Sun Dec 14 18:55:45 UTC 2008


hi,

i am using the XHTML module from po4a, and i would like to specify 
attributes that i don't want to be translated.

i do know about the "untranslated" option, which i already use in some 
places, but that option only applies to tags. here i would like to ignore 
modifications done by translators on attributes of an inline tag.

example: the text "abc <a href=\"file.html\" target=\"_blank\" 
title=\"link-name\"> def". as of now, the text appears as is in the .pot 
file, and if a translator mistakenly translates \"file.html\" into 
\"translated_name.html\", then the link will point to a non-existing page.
when a translator translates that text to "abc_translated <a 
href=\"file_translated.html\" target=\"wrong_target\" 
title=\"link-name_translated\"> def_translated", i would like modifications 
to the "href" and "target" attributes to be ignored. or as an alternative 
solution, simply exit po4a with an error stating that the translation file 
is incorrect.

i assume there is no current way of doing it; i could try, but i don't know 
Perl much and even less po4a. i have noticed the recent work on the XHTML 
module (thanks for <br> and <u>, much appreciated!), so i was hoping a po4a 
maintainer could give this a try.
otherwise, i would like pointers on where to start...

thanks,

poy 




More information about the Po4a-devel mailing list