[Po4a-devel] [po4a-Bugs][311647] Allow marking some paragraphs/phrases as not-for-translation

po4a-bugs at alioth.debian.org po4a-bugs at alioth.debian.org
Thu Jul 29 13:39:12 UTC 2010


Bugs item #311647, was changed at 2009-05-03 16:04 by Denis Barbier
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=311647&group_id=30267

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: Denis Barbier (barbier-guest)
Date: 2010-07-29 15: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=311647&group_id=30267



More information about the Po4a-devel mailing list