Translation Plans for FirstGlance in Jmol (FGiJ)

Local Operation for Testing
FGiJ can be operated from a local copy (instead of from an http server). Local operation provides an easy way to test modifications, such as translation. Ask for help if anything below is not clear!

1. Check with
   to coordinate efforts, and to find out where to get the current version. Ideally, you would not be translating while the English versions of the same texts are being updated!
2. Download the current version of FGiJ.
3. It would be wise to keep an unmodified copy of the version of FGiJ that you will work on. This could come in very handy later.
4. Decompress the FGiJ filetree. Open the file fgij/index.htm in the Firefox* browser. This would be a good time to make a bookmark or shortcut/alias for future convenience.
5. Go to pdb.org and enter a PDB code, such as 1d66. At the page on 1d66, click on Display Files, then PDB file. In January, 2010, these links were at the upper right of the window. You should see the text of the PDB file in Firefox. Copy the URL to the PDB file. In January, 2010, it was

       http://www.pdb.org/pdb/files/1D66.pdb

6. At fgij/index.htm, click on Enter a molecule's URL, then paste the URL into the slot, and Submit.
7. Click OK to use the signed Jmol applet, then give it permission to run. FGiJ should start and display the molecule. (The signed applet is required because you are asking the applet to get a PDB file from an external source.)
8. If you want to display a different molecule, simply change the PDB code at the end of the above URL.

* Firefox is strongly recommended because it reports javascript errors (which can result from text formatting errors) in a simple, clear, straightforward way. Step by step instructions are provided in a document linked below. Other browsers make diagnosis more complicated.

Translation Strategy
Not all English documents in FGiJ need to be translated. Highly technical documents need not be translated. FGiJ will be updated, and its structure may change, from time to time. The following strategy seems simplest to me, but I am open to suggestions:

1. Duplicate the fgij directory with all its subdirectories and files.
2. Move the duplicate fgij into fgij/languages.
3. Rename the duplicate fgij directory with a 2-letter code representing the language such as `
   - fgij/languages/ar for Arabic
   - fgij/languages/zh for Chinese
   - fgij/languages/fr for French
   - fgij/languages/de for German
   - fgij/languages/he for Hebrew
   - fgij/languages/ja for Japanese
   - fgij/languages/pt for Portuguese
   - fgij/languages/ru for Russian
   - fgij/languages/es for Spanish
   `
4. Create a link to the new FGiJ language in fgij/about.htm in the list of Languages.
5. Operate English FGiJ and your in-translation FGiJ offline (see instructions below).
6. Translate the highest priority files first (see list below).
7. It will be useful to comment out the English text (instead of deleting it) so you can keep it side by side with the translation.
8. After translating each bit, save the file you are translating, then reload it in the browser to proofread, and to make sure that you did not "break" the javascript. Please see Editing Javascript Files: Finding and Fixing Problems for important guidance. CHECK THIS LINK

Updating a Previous Translation Suppose that a translated version exists, but meanwhile, a newer version of FGiJ has been released. Here is a suggestion on how to identify the portions of text that need updated translation.

1. Download the newer version of FGiJ. We'll call it the New English Version.
2. Make a duplicate copy of the New English Version. It may be very handy to have an unmodified copy later.
3. Obtain the previous version of FGiJ, that was translated, in English. We'll call it the Old English Version.
4. Compare the New English Version with the Old English Version, file by file. The only program we know about that is fully satisfactory for this purpose is a Windows program called Beyond Compare from scootersoftware.com. It will show you exactly which files differ, and exactly which lines in each file differ. On Mac OS X, the free program TextWrangler CHECK THIS LINK is excellent for comparing and updating pairs of files, but it does not handle entire trees of files.
5. Knowing which lines differ in which files, you can decide what is the simplest way to update each translated file.

Highest Priority Files Needing Translation

- All English text in the following files needs to be translated.
- The name of the program, FirstGlance in Jmol should NOT be translated. The name should be the English name in all languages.
- It is important to note that javascript variable names must NOT be translated! For example:
  - English in file txt02.js:
    AllModels_txt = "All&nbsp;Models";
    // &nbsp; is HTML for a space that cannot be used to break the line (non-breaking space).
  - Correct translation:
    AllModels_txt = "Todos&nbsp;Los&nbsp;Modelos";
  - Incorrect translation
    TodosModelos_txt = "Todos&nbsp;Los&nbsp;Modelos";
    // Both the javascript variable name and the text were translated.
    // This will generate a javascript error. It will not work.
- Sometimes translators will need to shorten the phrase so that it will fit in the layout. In the above example, translation to simply
  AllModels_txt = "Modelos";
  would be clear enough.
- For javascript files (their filenames end .js), please see Editing Javascript Files. It is particularly important to change only one thing at a time, then reload the page you are working on to check for errors. If you get stuck, email a zipped copy of the offending file to

FILES NEEDING TRANSLATION

- Here's a really simple case to start with, the file fgij/contact.js. There is only one phrase that needs translation. It changes the last line at the bottom of the main page (fgij/index.htm).
- A slightly more complicated case is fgij/enterurl.js. It displays the upload and URL text on the main page (fgij/index.htm).
- OK, now we'll get serious: fgij/txt01.js -- View index.htm for use and context. Except for the previous two files, all the remaining text on the main page has been extracted into this file, including the tool tips that pop-up when you touch (not click) images and links with the mouse.
- fgij/txt02.js contains the text for most of the links in the upper left control panel (from file controls.js).
- fgij/txt03.js contains the text for some of the links in the upper left control panel, and various miscellaneous messages (from file jcontrol.js).