Bibletime – a bible study tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
668 B

  1. # !/usr/bin/perl
  2. # little script to extract the text from the tips file
  3. # and output it, so xgettext can add the tips to the po file
  4. #
  5. # 2000 by Matthias Kiefer <matthias.kiefer@gmx.de>
  6. # Command line option added by Joachim Ansorg
  7. open(FILE,"<$ARGV[0]") || die "unable to open tips file";
  8. $inTip=0;
  9. while(<FILE>)
  10. {
  11. chomp;
  12. # tip starts with <html>
  13. if(/^\s*<html>/i)
  14. {
  15. $inTip=1;
  16. print "\ni18n(\n";
  17. next;
  18. }
  19. if($inTip!=0)
  20. {
  21. # tip ends with </html>
  22. if(/^\s*<\/html>/i)
  23. {
  24. print ");\n";
  25. $inTip=0;
  26. }
  27. else
  28. {
  29. # replace \ with \\
  30. s/\\/\\\\/g;
  31. # replace " with \"
  32. s/"/\\"/g;
  33. print "\"$_\\n\"\n";
  34. }
  35. }
  36. }
  37. close(FILE);