]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - fixup-docbook-translated.rb
Added a section -- Notes for the Spanish translation
[text-madewithcc.git] / fixup-docbook-translated.rb
index 57958d48e4cd9f713d1b3f269bc99e3f903a4f93..405a094e238bfaf08e41b827b81fcbe638681d6a 100644 (file)
@@ -21,6 +21,13 @@ def log(level,what)
   end
 end
 
+log 0, 'Including the Spanish version introduction'
+if intro = File.open('extra/es/intro_es.xml', 'r').read rescue nil
+  xml.search('preface').last.after( intro )
+else
+  log 0, ' -!- Introduction text not found or empty'
+end
+
 log 0, 'replace images with translated versions'
 xml.search('imagedata').each do |img|
   # Included images are in the 'Pictures' directory. Translated images