This pull request addresses Issue #46 by fixing the multilingual book generation system, ensuring that Spanish books are properly built with images in addition to the English version.
Changes Made
Enhanced build-language.sh:
Improved directory structure handling for non-English languages
Added explicit creation of language subdirectories and image directories
Added more detailed logging for easier debugging
Fixed path handling for Spanish content
Enhanced generate-epub.sh:
Improved language-specific resource path handling
Added better cover image detection based on language
Enhanced error handling and fallback mechanisms
Added more detailed debug output for build failures
Adjusted file size thresholds for diagnostics
Enhanced combine-markdown.sh:
Added better error handling for missing language directories
Improved diagnostic messages when content is missing
Added file size checks to verify output
Added setup.sh improvements:
Added proper setup script to handle multilingual environment initialization
Added explicit handling of language-specific cover images
Created appropriate directory structure from the beginning
Fixed build workflow:
Added additional debugging to track image inclusion
Improved language selection logic
Added redundant copy steps to ensure Spanish files appear in the root directory
Added testing tools:
Created dedicated test scripts to isolate and verify Spanish builds
Testing
These changes have been designed to fix the Spanish book generation without affecting the existing English generation that's working properly. When the --all-languages flag is used, both English and Spanish books should now be generated with images properly included.
The key issues fixed:
Resource paths not properly including chapter-specific images
Language-specific cover images not being detected correctly
Spanish output files not being copied to the root directory
Poor error handling hiding the specific build failures
PR Description
This pull request addresses Issue #46 by fixing the multilingual book generation system, ensuring that Spanish books are properly built with images in addition to the English version.
Changes Made
Enhanced
build-language.sh
:Enhanced
generate-epub.sh
:Enhanced
combine-markdown.sh
:Added
setup.sh
improvements:Fixed build workflow:
Added testing tools:
Testing
These changes have been designed to fix the Spanish book generation without affecting the existing English generation that's working properly. When the
--all-languages
flag is used, both English and Spanish books should now be generated with images properly included.The key issues fixed:
Fixes #46