sez11a/liferay-docs — pull request #405 by jhinkey (2013-02-23 16:03:36+00:00)
Title: Lang support in build/test process

IMPORTANT: Merge don't merge into master. Test in a topic branch.

These changes update build infrastructure and image paths to support viewing localization.

The build process due to changes in build-common.xml do the following:
1. Create build/{lang}/results/ to hold chapter and document markdown and translations
2. Copy the default images to build/{lang}/images/
3. Copy the language specific images to build/{lang}/images/ overwriting any image files of the same name.

The image paths in the devGuide chapter markdown files were changed from ../../images/someImage.png to ../images. This lets us view the correct images found in build/{lang}/images/ (which include localized images) from our HTML files found in build/{lang}/results/some-chapter.html. Previously, we were always viewing the default images found at devGuide/images.

To test these changes do the following:
1. cd devGuide
2. ant clean-all
3. ant markdown-to-html
4. ant markdown-to-html -Dlang=fr
5. View both HTML files from their build/{lang}/results/ directories. The French translation text starts with "Bonjour!" and it's first figure "Figure 1.1" uses a different image from the English translation.

Note, I commented out the check-images task and dependencies as that would need to be adjusted--Have it check that image is found in at least /images or /lang/images.

If we go with this approach to supporting viewing/testing localized images, then we would need to change all of the image paths from ../../images to ../images in our markdown. Note, the asset importer works fine with this change as it disregards the path through the images/ directory and simply looks for the image file in the zip file's images directory.