[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 Mar 30 20:26:00 UTC 2017


po4a-Bugs item #311647 was changed at 30/03/2017 22:25 by Martin Quinson
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: Martin Quinson (mquinson)
Date: 30/03/2017 22:25

Message:
Just for the record, this feature is now implemented in the man module (see section "Hiding text from po4a" from Locale::Po4a::Man(3pm))

----------------------------------------------------------------------

Comment By: Michael Terry (mterry-guest)
Date: 29/07/2010 20: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: 29/07/2010 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