SCM

[#311647] Allow marking some paragraphs/phrases as not-for-translation

View Trackers | Bugs | Export CSV | Monitor

Date:
2009-05-03 14:04
Priority:
3
State:
Open
Submitted by:
Michael Terry (mterry-guest)
Assigned to:
Nobody (None)
Category:
None
Group:
None
Resolution:
None
Summary:
Allow marking some paragraphs/phrases as not-for-translation

Detailed description
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.

Followups: Sort comments antichronologically

Message
Date: 2010-07-29 13:39
Sender: Denis Barbier

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.
Date: 2010-07-29 18:14
Sender: Michael Terry

That would be fine. I'd also be interested in similar syntax for man pages too.

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge
Show source