Subversion Repositories wimsdev

Rev

Rev 5936 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #! /bin/sh
  2.  
  3. cd `dirname $0`
  4. lang=$1
  5. if [ -n "$lang" ] ; then file="commands.$lang" ; else file="commands" ; lang="en"; fi;
  6.  
  7. echo "
  8. !! This file is automatically generated! Do not edit by hand.
  9. "
  10.  
  11. if [ "$lang" = en ] ;  then echo "
  12. <p>Each command takes one line.</p>
  13. <p>In the following table, <span class=\"tt\">[color]</span>
  14. may be either a color name, or 3 integers between 0 and 255, separated by commas,
  15. for the values of red,green,blue.</p>
  16. "
  17. drawing="Drawing commands"
  18. synonym="Synonymes"
  19. fi ;
  20.  
  21. if [ "$lang" = fr ] ; then echo "
  22. <p>Chaque commande prend une ligne.</p>
  23. <p>Dans la table suivante <span class=\"tt\">[color]</span>
  24. peut être un nom de couleur ou 3 entiers 0 entre 255, séparés par des virgules,
  25. correspondant aux valeurs de  rouge, vert, bleu.
  26. </p>
  27. "
  28. drawing="Commandes"
  29. synonym="Synonymes"
  30. fi ;
  31.  
  32. if [ "$lang" = cn ] ;  then echo "
  33. <p>ÿÌõÃüÁîÕ¼Ò»ÐÐ.</p>
  34. <p>ÔÚϱíÖÐ, <span class=\"tt\">[É«²Ê]</span>
  35. ¿ÉÒÔÊÇÉ«²ÊÃû, »ò3¸öÓöººÅ·Ö¸ôµÄ0µ½255µÄÕûÊý, ·Ö±ð´ú±íºìÂÌÀ¶ÈýÖÖÑÕÉ«.
  36. </p>
  37. "
  38. drawing="×÷ͼÃüÁî"
  39. synonym="ͬÒå´Ê"
  40. fi
  41. echo "!reset table_center
  42. \$table_header
  43. <caption>$drawing</caption>
  44. \$table_hdtr<th colspan=\"5\">\$wims_name_name - \$wims_name_Syntax</th></tr>
  45. \$table_hdtr<th colspan=\"2\">$synonym</th>
  46. <th colspan=\"3\">\$wims_name_Meaning</th></tr>
  47. "
  48. awk 'BEGIN {a=10}
  49.         substr($0,1,1)==":" {a=0}
  50.         {a++}
  51.         a==1 {print "$table_tr<td colspan=\"5\" class=\"nowrap tt\">"substr($0,2)"</td></tr>"}
  52.         a==2 {print "$table_tr<td colspan=\"2\"><span class=\"tt\">"$0"&nbsp;</span></td>"}
  53.         a==3 {print "<td colspan=\"3\">"$0"</td></tr>"}
  54.         ' $file
  55.  
  56. echo "\$table_end"
  57.