Bugs item #311647, was changed at 2009-05-03 10:04 by Michael Terry
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=31...
Status: Open
Priority: 3
Submitted By: Michael Terry (mterry-guest)
Assigned to: Nobody (None)
Summary: Allow marking some paragraphs/phrases as not-for-translation
Category: None
Group: None
Resolution: None
Initial Comment:
It would be nice if I could mark some paragraphs as untranslatable.
For example, say I have a docbook flie that lists a number of file paths as part of the
documentation. These paths (like ~/.cache) show up to be translated, but I don't want
them to be.
Maybe some format-specific comment that po4a understands? In the docbook example, the
paragraph being preceded by <!-- po4a: ignore --> or something.
----------------------------------------------------------------------
Comment By: Michael Terry (mterry-guest)
Date: 2010-07-29 14:14
Message:
That would be fine. I'd also be interested in similar syntax for man pages too.
----------------------------------------------------------------------
Comment By: Denis Barbier (barbier-guest)
Date: 2010-07-29 09:39
Message:
You are right, that would be nice. The parser can cope with comments only if they are
embedded within a paragraph, which means that in XML one has to write <para><!--
Hey translator -->Foo bar</para> to have this comment printed into PO files.
One could indeed define special comments, e.g. <para><!-- po4a: ignore -->Foo
bar</para> to have a paragraph copied verbatim into translated documents. Note that
these comments will not be removed from translated documents, I believe that this is
fine.
You can test by editing Locale/Po4a/Xml.pm like this: replace
if ($translate ne "")
by
if ($translate ne "" && !(defined($comments) && $comments =~
m/^\s*po4a:\s*ignore/s))
I will commit this change unless you report problems with it.
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=31...