[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.201,1.202"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Jan 13 19:37:25 UTC 2008


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv27612/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
* lib/Locale/Po4a/Man.pm: Describe how an author can write specify
  that some parts are not to be translated.
* lib/Locale/Po4a/Man.pm: Updated Copyright dates.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- Man.pm	13 Jan 2008 15:47:15 -0000	1.201
+++ Man.pm	13 Jan 2008 19:37:23 -0000	1.202
@@ -279,6 +279,40 @@
  .splitfont       .Sx             .T              .TF             .The
  .TT              .UC             .ul             .Vb             .zZ
 
+=head2 Hiding text to po4a
+
+Sometimes, the author knows that some parts are not translatable, and
+should not be extracted by po4a. For example, an option may accept an
+I<other> argument, and I<other> may also appear as the last item of a
+list. In the first case, I<other> should be not be translatable. And in
+the second case, I<other> should be translated.
+
+In such case, the author can avoid po4a to extract some strings, using
+some special groff constructs:
+
+ .if !'po4a'hide' .B other
+
+(this will require the B<-o groff_code=verbatim> option)
+
+A new macro can also be defined to automate this:
+ .de IR_untranslated
+ .    IR \\$@
+ ..
+
+ .IR_untranslated \-q ", " \-\-quiet
+
+(this will require the options B<-o groff_code=verbatim> and
+B<-o untranslated=IR_untranslated>; with this construct, the B<.if
+!'po4a'hide'> conditional is not strictly needed since po4a will not parse
+the internal of the macro definition)
+
+or using an alias:
+ .als IR_untranslated IR
+
+ .IR_untranslated \-q ", " \-\-quiet
+
+(this will require the B<-o untranslated=als,IR_untranslated> option)
+
 =head2 Conclusion
 
 To summarise this section, keep simple, and don't try to be clever while
@@ -350,7 +384,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2002, 2003, 2004, 2005, 2006 by SPI, inc.
+Copyright 2002-2008 by SPI, inc.
 
 This program is free software; you may redistribute it and/or modify it
 under the terms of GPL (see the COPYING file).




More information about the Po4a-commits mailing list