10 STEP LANGUAGE RECOVERY PROGRAM This is a 10 step program to recover the text for a Telegard language file where the compiled .tgl is up-to-date but the original uncompiled .txt file has been deleted or damaged. This program does not require any tools that you don't already have at your disposal. THE 10 STEPS (+1) TO RECOVERY 0. Make backups of your language files (.txt and .tgl)... (jic) 1. Rename your lost .tgl file to 'recover.tgl' 2. Open a text editor, start a new file 'emptylng.txt', add one line '; this is a blank language file' and save 3. Execute 'makelang emptylng.txt' (if makelang is not in your path, run '\tgpath\makelang emptylng.txt' instead) 4. Unzip the release english.txt file; a) Change to a Telegard temp directory (\temp, \temp1, etc.) b) GAMMA/RELEASE VERSIONS: Extract the language.tws file into this directory ('pkunzip tg_309g1.zip install.tg', 'pkunzip install.tg -sREADYTOGO language.tws'). Unpack the .tws file into this directory ('unpack language.tws .'). BETA VERSIONS: Unzip the english.txt file into this directory from the latest __update.zip file ('pkunzip __update.zip english.txt'). c) Rename english.txt to release.txt, and copy to your languages directory. 5. Execute 'makelang release.txt' 6. Execute 'cmprlang emptylng recover' 7. Open a text editor, open 'cmprlang.txt', and then delete the lines at the top of the file 'CMPRLANG results file:' to the 0001 line (not including 0001 line), and at the end of the file 'Checking for different strings' and the associated blank lines. 8. Rename cmprlang.txt to recover.txt The language file recover.txt has all the lines from your original .tgl, recovered back to their text (uncompiled) form. While this is sufficient recovery, it sure would be nice to get the comments of what variables are, etc. updated eh? Sure, no problem.... 9. Execute 'makelang recover -M release'. Your language is now as good as new... 10. Rename 'recover.NEW' to whatever your (lost) .tgl file was called. Recompile and check things out... * * * IMPORTANT NOTE * * * Depending on the last time you updated the text of the recovered language, you should also make the modifications to the language that occurred from the time you last updated the text to the date of the release language. Grab all the appropriate LANGUAGE.* files, and make the appropriate changes (note, you should not have to add or remove any lines, since the -M merge automatically took care of that portion for you). WHY DOES THIS WORK? The Telegard language tools are extremely powerful. When 'cmprlang' runs, it is checking an empty language against a complete, compiled language. Each line that exists in the compiled language does not exist in the empty language, and is considered new. Thus, the resulting cmprlang.txt file is all of the language lines from your original compiled language listed as 'new'. When 'makelang -M' runs, it is checking for new/removed lines, and also restoring all of the comments. So your uncommented language file recover.txt becomes a commented language file recover.new. This file also has been updated with new (or missed entries; if they were blank entries) from the release language, and all deleted language id lines have also been removed. So when your language file comes out of the makelang process, it's as good as new . . . WHAT IS DIFFERENT FROM MY OLD LANGUAGE FILE AND THIS NEW ONE? If you added your own comments, those were lost. Unfortunately the comments are not stored in the .tgl file, and thus could not be recovered. Lines that were removed since you last updated the language were removed. Lines that were added now exist (check out the lines that the makelang -M returns--some of those lines might be blank lines that the compiled .tgl did not have, but it's quite possible that there are a couple of new lines too...). The comments in the language are up-to-date (so if you didn't add variable comments/descriptions/etc. from language change to language change, you'll be happy to know they've magically appeared). Otherwise, the file is as good as your old one. Honest. And all for less than a nickel. CONTACTING THE AUTHOR The author of this document can be contacted as follows: Echomail Tim Strike, TG_SUPPORT (fidonet) Netmail Tim Strike @ 1:259/423 (fidonet) Internet Email tim@telegard.net