Appendix B. Building and Testing HTML Books

This chapter describes how to install and test an HTML book and includes the following
sections:

Building an HTML Book

The part number directory of a typical HTML book will contain files such as those shown in Example B-1.

Example B-1. Directory of a Sample HTML Book

Hints/       Makefile     images/ index.html

In this example, the Hints directory contains several .html files and the images directory contains all the .gif files for the HTML book. The localized version's book directory should use the same naming conventions for all its files and directories.

Makefile Parameters

After you have finished translating the text and image callouts for an HTML document, update the HTML Makefile with the language-specific parameters, as shown in Table B-1(for European documents) or Table B-2 (for Japanese documents).

Table B-1. Makefile Parameters for WorldView European HTML Books

Parameter

German

French

Spanish

TITLE

short_title
(same as English)

short_title
(same as English)

short_title
(same as English)

FULL TITLE

Localized book title

Localized book title

Localized book title

VERSION

XXX-XXXX-XXXDE

XXX-XXXX-XXXFR

XXX-XXXX-XXXES

BOOKSHELF

 

 

 

 help books

/usr/share/Insight/library/
de_bookshelves/Help

/usr/share/Insight/library/
fr_bookshelves/Help

/usr/share/Insight/library/
es_bookshelves/Help

 end-user books

/usr/share/Insight/library/
de_bookshelves/
SGI_EndUser_Deutsch

/usr/share/Insight/library/
fr_bookshelves/
SGI_EndUser_Français

/usr/share/Insight/library/
es_bookshelves/
SGI_EndUser_Spanish

 admin books

/usr/share/Insight/library/
de_bookshelves/
SGI_Admin_Deutsch

/usr/share/Insight/library/
fr_bookshelves/
SGI_Admin_Français

/usr/share/Insight/library/
es_bookshelves/
SGI_Admin_Spanish

BOOK_ICON

 

 

 

 help books

generic

generic

generic

 end-user books

sgi_end_user

sgi_end_user

sgi_end_user

 admin books

sgi_admin

sgi_admin

sgi_admin

BOOK_LANG

de

fr

es

DTD

HTML

HTML

HTML

DOC_TYPE

MANUAL

MANUAL

MANUAL

SORT_ORDER

Precede with “#”

Precede with “#”

Precede with “#”

HIDDEN

 

 

 

 for help books

TRUE

TRUE

TRUE

 for all others

FALSE

FALSE

FALSE

BOOK_DIRS

Same as English

Same as English

Same as English

HTML_EXTS

Same as English

Same as English

Same as English

For European books, insert the following line between the BOOK_LANG and DTD parameters:

BOOKSUBSYSTEM != echo `echo $(BOOK_LANG) | tr `[a-z]' `[A-Z]'`_$(BOOKSUBSYSTEM) 

Table B-2. Makefile Parameters for WorldView Japanese

Parameter

Japanese

TITLE

short_title
(same as English)

FULL TITLE

English book title followed by “(Japanese)”

VERSION

XXX-XXXX-XXXJP

BOOKSHELF

 

 help books

/usr/share/Insight/library/ja_JP.EUC_bookshelves/Help

 end-user books

/usr/share/Insight/library/ja_JP.EUC_bookshelves/SGI_EndUser_Japanese

 admin books

/usr/share/Insight/library/ja_JP.EUC_bookshelves/SGI_Admin_Japanese

BOOK_ICON

 

 help books

generic

 end-user books

sgi_end_user

 admin books

sgi_admin

BOOK_LANG

ja_JP.EUC

DTD

HTML

DOC_TYPE

MANUAL

SORT_ORDER

Precede with “#”

HIDDEN

 

 for help books

TRUE

 for all others

FALSE

BOOK_DIRS

Same as English

HTML_EXTS

Same as English


Making the booklist.txt File

“Building” an HTML document requires only that you create a booklist.txt file.

  1. From your HTML book's directory, enter

    % make booklist.txt 
    

  2. Use more or vi to view the booklist.txt file.

    % more booklist.txt 
    <BOOK NAME=”Hints_Shortcuts” ALIAS=”Hints and Shortcuts (Japanese)” TYPE=”Adi3xDocument” SGITYPE=”sgi_enduser” SGIHIDE=”FALSE” SGIVERSION=”007-3567-001JP, 6/98” SGIBKADDR=”[email protected]” SGISRCHRES=”FALSE” SGISRCHTAGS=”” SGIGROUP=”HTML”>
    

Installing an HTML Book

Initial Test

Localized HTML documents in French, German, and Spanish can be opened and tested in Netscape by pointing the browser to the file location of the workarea in which their directories reside. Japanese HTML documents can be opened and tested as long as the host machine has the Japanese environment and kanji fonts installed on it.

  1. From Netscape, select Options > Document Encoding, or from Netscape Navigator, select View > Encoding to set the browser's language encoding.

    Choose Western for French, German, or Spanish books.
    Choose Japanese (Auto-Detect) for Japanese books.

  2. Point the browser to your book by entering the path to your book's index.html file in the Netsite dialog box:

    file:/path/to/workarea/index.html 
    

  3. Test all the links to ensure that they “jump” correctly.

  4. Test all the thumbnail images to ensure that a larger image appears where appropriate.

Final Test

HTML books do not have to be “installed” in order to complete a quality assurance test, but it is recommended that their files and booklist.txt file be copied to a test machine before testing to simulate the behavior of an installed HTML book.


Note: HTML help books do not appear as launchable books in IRIS InSight because the IRIS InSight Help bookshelf is “hidden.” HTML help books must be tested from the application's Help pulldown menu.


  1. Log onto your test machine, change to the location where the files would reside if they were installed (the bookshelf), and become superuser:

    % rlogin guest@<test_machine> 
    % cd /hosts/<machine_name>/usr/share/Insight/library/
    <BOOK_LANG>_bookshelves/<BOOKSHELF>/books 
    % su 
    

    For example, the path to use for a Japanese end-user manual would be /hosts/<machine_name>/usr/share/Insight/library/ja_JP.EUC_bookshelves/
    SGI_EndUser_Japanese/books

  2. Create a directory using the book's short_title:

    # mkdir <SHORT_TITLE> 
    

  3. Copy the .html and booklist.txt file and all directory files into the short title directory:

    # cd <SHORT_TITLE> 
    # rcp /hosts/<machine_name>/path/to/book/directory/<part_number>/*.* . 
    # rcp -r 
    /hosts/<machine_name>/path/to/book/directory/<part_number>/<dir> . 
    

  4. Use vi or jot to add this book's booklist.txt information to the bookshelf's booklist.txt file so it will appear on the IRIS InSight bookshelf.

    # vi booklist.txt 
    

    For example, the booklist.txt file for the HTLM book Hints and Shortcuts looks like this:

    <BOOK NAME=”Hints_Shortcuts” ALIAS=”Hints and Shortcuts” TYPE=”Adi3xDocument” SGITYPE=”sgi_enduser” SGIHIDE=”FALSE” SGIVERSION=”007-3567-001, 3/98” SGIBKADDR=”[email protected]” SGISRCHRES=”FALSE” SGISRCHTAGS=”” SGIGROUP=”HTML”>
    

    Highlight the string of text or copy it. Close the file.

    # cd .. 
    # vi booklist.txt 
    

  5. Position the cursor between other book's booklist.txt information so that the new book's title will appear in alphabetical order with respect to other book titles on the bookshelf. Insert the copied text using the middle mouse key or paste function.

  6. Save and close the booklist.txt file.

  7. Exit root:

    # exit 
    % rehash 
    


Note: The installtestbooks script will not work with HTML books.


Testing an HTML Book

Before launching a book for test, set the environment to the language of the book you'll be testing.

Setting Your Environment for Japanese

For Japanese books, your environment must have its LANG set to ja_JP.EUC. To test what LANG variable is set, enter

% env | grep LANG 

To set the LANG variable for Japanese, enter

% setenv LANG ja_JP.EUC

Setting Your Environment for European Languages

For German, French, or Spanish books, your environment must have its LANG set to the appropriate language. To test what LANG variable is set, enter

% env | grep LANG 

To set the LANG variable for German, enter

% setenv LANG de 

To set the LANG variable for French, enter

% setenv LANG fr

To set the LANG variable for Spanish, enter

% setenv LANG es 

Testing Instructions

To test the localized HTML book:

  1. Launch IRIS InSight on the test machine on which the book is installed:

    % iiv -f 
    

  2. Select the bookshelf on which the book is installed.

  3. Double-click the book icon. The book should appear in a Netscape browser.

  4. From a machine on which the English version is installed, launch IRIS InSight:

    % iiv -f 
    

  5. Select the bookshelf on which the English book is installed.

  6. Double-click the English book's icon. The book should appear in a Netscape browser.

  7. Place the two browsers side by side and begin comparative testing.

  8. Click on all the links to ensure that the localized version behaves the same as the English version.

  9. Ensure that all the images in the localized version match those in the English version.

  10. Click on all thumbnail images to ensure that they launch enlarged versions of the images.