]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - fixup-docbook-translated.rb
Make fixup-docbook-translated.rb a bit more verbose about what it is ignoring.
[text-madewithcc.git] / fixup-docbook-translated.rb
index 775fc364959125c80e92664fac2b37ace9bda96b..d933346b03df41a1dbcb1bfc08da6d953a0f9219 100644 (file)
@@ -38,11 +38,11 @@ if 'es' == lang
 
     # Some formatting issues we need to modify
     attrib_text.gsub!(/Paul y Sarah/, 'Paul <?latex \textup{>y<?latex } > Sarah')
-    attrib_text.gsub!(/Merkley (CEO.*)/, 'Merkley <citetitle>\1</citetitle>')
+    attrib_text.gsub!(/Merkley,? (CEO.*)/, 'Merkley <citetitle>\1</citetitle>')
     attrib_text.gsub!(/Wolf (Ins.*)/, 'Wolf <citetitle>\1</citetitle>')
 
     attrib.remove
-    title.after('<blockquote><attribution>%s</attribution></blockquote>' % attrib_text)
+    title.after('<blockquote><attribution>%s</attribution><para/></blockquote>' % attrib_text)
     log 1, 'Moved: %s' % attrib_text
   end
 end
@@ -50,6 +50,8 @@ end
 if legal = File.open('extra/%s/legal_info.xml' % lang, 'r').read rescue nil
   log 0, 'Replace legal info by the information assembled by our publisher'
   xml.search('colophon').first.inner_html = legal
+else
+  log 0, ' -!- Not including the %s legal_info text' % lang
 end
 
 # Doing this the dirty, non-DocBooky way: I'm adding a large <?latex
@@ -62,6 +64,8 @@ end
 if colophon = File.open('extra/%s/colophon.tex' % lang, 'r').read rescue nil
   log 0, 'Add a colophon at the end'
   xml.search('appendix').last.search('para').last.after('<?latex %s ?>' % colophon)
+else
+  log 0, ' -!- Not including the %s colophon text' % lang
 end