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
- # are in Pictures/[langcode]/. Only translated images need to be
- # included.
- orig_img = img.attributes['fileref'].text
- trans_img = orig_img.gsub(/Pictures/, "Pictures/#{lang}")
- next if orig_img == trans_img
-
- if File.exists?(trans_img)
- log 1, 'Replaced %s by %s' % [orig_img, trans_img]
- img.set_attribute('fileref', trans_img)
- end
-end
-
log 0, 'Final editorial requests: Attributions on top, as in other chapters, also for prefaces'
xml.search('preface').each do |pref|
title = pref.search('title').first
#. type: Attribute 'fileref' of: <book><part><chapter><sect1><figure><mediaobject><imageobject><imagedata>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:509
msgid "Pictures/10000201000008000000045C30360249076453E6.png"
-msgstr "Pictures/10000201000008000000045C30360249076453E6.png"
+msgstr "Pictures/es/10000201000008000000045C30360249076453E6.png"
#. type: Content of: <book><part><chapter><sect1><figure>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:507
#. type: Attribute 'fileref' of: <book><part><chapter><sect1><figure><mediaobject><imageobject><imagedata>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:558
msgid "Pictures/10000201000007D0000007D0ACF13F8B71EAF0B9.png"
-msgstr "Pictures/10000201000007D0000007D0ACF13F8B71EAF0B9.png"
+msgstr "Pictures/es/10000201000007D0000007D0ACF13F8B71EAF0B9.png"
#. type: Content of: <book><part><chapter><sect1><sect2><title>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:567
#. type: Attribute 'fileref' of: <book><part><chapter><sect1><sect2><figure><mediaobject><imageobject><imagedata>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:676
msgid "Pictures/10000201000009C40000065D9EC4F530BD4DFBE0.png"
-msgstr "Pictures/10000201000009C40000065D9EC4F530BD4DFBE0.png"
+msgstr "Pictures/es/10000201000009C40000065D9EC4F530BD4DFBE0.png"
#. type: Content of: <book><part><chapter><sect1><sect2><title>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:686
#. type: Attribute 'fileref' of: <book><part><chapter><sect1><figure><mediaobject><imageobject><imagedata>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:805
msgid "Pictures/10000201000009C4000005153EACBD62F00F6BA9.png"
-msgstr "Pictures/10000201000009C4000005153EACBD62F00F6BA9.png"
+msgstr "Pictures/es/10000201000009C4000005153EACBD62F00F6BA9.png"
#. type: Content of: <book><part><chapter><sect1><para><footnote><para>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:817
#. type: Attribute 'fileref' of: <book><part><chapter><sect1><figure><mediaobject><imageobject><imagedata>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:847
msgid "Pictures/10000201000009C4000005150F069409C1CC12F0.png"
-msgstr "Pictures/10000201000009C4000005150F069409C1CC12F0.png"
+msgstr "Pictures/es/10000201000009C4000005150F069409C1CC12F0.png"
#. type: Content of: <book><part><chapter><sect1><para>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:856
#. type: Attribute 'fileref' of: <book><part><chapter><sect1><figure><mediaobject><imageobject><imagedata>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:935
msgid "Pictures/10000201000009C400000515F1CAA15B223F6BAF.png"
-msgstr "Pictures/10000201000009C400000515F1CAA15B223F6BAF.png"
+msgstr "Pictures/es/10000201000009C400000515F1CAA15B223F6BAF.png"
#. type: Content of: <book><part><chapter><sect1><title>
#: MadewithCreativeCommonsmostup-to-dateversion.xml:945