Difference between revisions of "Internationalisation/Offline/Export to Web"

From Jmol
Jump to navigation Jump to search
Line 1: Line 1:
= Translating the ''Export to web'' module =
+
= Translating the ''Export to Web'' module =
  
 
[[Image:WebPageMakerPopInTab.png|thumb|sample Web Page Maker window]]
 
[[Image:WebPageMakerPopInTab.png|thumb|sample Web Page Maker window]]
The ''Export to web'' module [[Image:ToWebButton.png|Export To Web button]],  
+
The ''Export to Web'' modulW [[Image:ToWebButton.png|Export To Web button]],  
part of the Jmol application, consists of an interface  
+
part of the Jmol application, consists of
 +
* an interface  
 
(a window entitled ''Jmol Web Page Maker'' that opens separate from the  
 
(a window entitled ''Jmol Web Page Maker'' that opens separate from the  
 
main app window and can be operated in parallel),
 
main app window and can be operated in parallel),
a help window,
+
* a help window,
and a set of internal templates that will be used to generate the
+
* a set of internal templates that will be used to generate the
 
user's web pages.
 
user's web pages.
 
All of them need translation, with a different procedure.
 
All of them need translation, with a different procedure.
Line 14: Line 15:
  
 
The ''Jmol Web Page Maker'' window contains several texts that are translated in the  
 
The ''Jmol Web Page Maker'' window contains several texts that are translated in the  
same way as the rest of the application (either online through Launchpad web site,  
+
same way as the rest of the application (that is, either online through Launchpad web site,  
 
or offline by editing the {{File|''LANG''.po}} files on your computer; see  
 
or offline by editing the {{File|''LANG''.po}} files on your computer; see  
 
[[Internationalisation#Translating_the_application.2Fapplet|Translating the application/applet]]).
 
[[Internationalisation#Translating_the_application.2Fapplet|Translating the application/applet]]).
Line 60: Line 61:
 
Some text strings are shown in the final web pages but are not included in the
 
Some text strings are shown in the final web pages but are not included in the
 
html template files themselves.  
 
html template files themselves.  
Instead, they are included in the PO files (the same as text for the interface is).
+
Instead, they are included in the {{File|''LANG''.po}} files (the same as text for the interface is).
However, given that they will be shown in html files and not within the application,  
+
However, given that they will be shown as part of html files and not within the application,  
special precautions are needed to assure the proper visualization in any user's browser.
+
special precautions are needed to ensure the proper visualization in any user's browser.
  
 
You must provide translated text strings (using either the online or offline methods)
 
You must provide translated text strings (using either the online or offline methods)
 
that do not use accented characters per se, but converted into the equivalent  
 
that do not use accented characters per se, but converted into the equivalent  
 
HTML entities. Examples:
 
HTML entities. Examples:
  á  or  á  for accute-accented a (á)
+
  á  or  á  for acute-accented a (á)
  é  or  é  for accute-accented e (é)
+
  é  or  é  for acute-accented e (é)
  í  or  í  for accute-accented i (í)
+
  í  or  í  for acute-accented i (í)
  ó  or  ó  for accute-accented o (ó)
+
  ó  or  ó  for acute-accented o (ó)
  ú  or  ú  for accute-accented u (ú)
+
  ú  or  ú  for acute-accented u (ú)
 
  ñ  or  ñ  for tilde-n (ñ)
 
  ñ  or  ñ  for tilde-n (ñ)
 
  ¿  or  ¿  for opening question mark (¿)
 
  ¿  or  ¿  for opening question mark (¿)
 
  ¡  or  ¡  for opening exclamation mark (¡)
 
  ¡  or  ¡  for opening exclamation mark (¡)
 
(see http://htmlhelp.com/reference/html40/entities/ for a full list of entity codes)
 
(see http://htmlhelp.com/reference/html40/entities/ for a full list of entity codes)

Revision as of 15:58, 30 August 2008

Translating the Export to Web module

sample Web Page Maker window

The Export to Web modulW Export To Web button, part of the Jmol application, consists of

  • an interface

(a window entitled Jmol Web Page Maker that opens separate from the main app window and can be operated in parallel),

  • a help window,
  • a set of internal templates that will be used to generate the

user's web pages. All of them need translation, with a different procedure.

Translating the interface

The Jmol Web Page Maker window contains several texts that are translated in the same way as the rest of the application (that is, either online through Launchpad web site, or offline by editing the File icon.gifLANG.po files on your computer; see Translating the application/applet).

Translating the instructions

Introduction panel of Web Page Maker
Help window of Web Page Maker

The introduction panel (a tab inside the Jmol Web Page Maker interface) and the help/instructions panels (opened in a separate window) are built from html files.

These files are in org/openscience/jmol/app/webexport/html/
Currently:
File icon.gifInstalling_Applet.html
File icon.gifPath_to_Applet.html
File icon.gifpop_in_instructions.html
File icon.gifscript_button_instructions.html
File icon.gifTesting_Pages_Locally.html
File icon.gifWebExportIntro.html

You must duplicate those original English files and rename them according to your language, then translate their content using a text or html editor. See Translating html files.

Translating the web page templates

Translating the html files

The templates are composed of several html files.

These files are in org/openscience/jmol/app/webexport/html/
Currently:
File icon.gifpop_in_template.html
File icon.gifpop_in_template2.html
File icon.gifscript_button_template.html
File icon.gifscript_button_template2.html

You must duplicate those original English files and rename them according to your language, then translate their content using a text or html editor. See Translating html files.

Translating some terms showing in the final web pages

Some text strings are shown in the final web pages but are not included in the html template files themselves. Instead, they are included in the File icon.gifLANG.po files (the same as text for the interface is). However, given that they will be shown as part of html files and not within the application, special precautions are needed to ensure the proper visualization in any user's browser.

You must provide translated text strings (using either the online or offline methods) that do not use accented characters per se, but converted into the equivalent HTML entities. Examples:

á  or  á  for acute-accented a (á)
é  or  é  for acute-accented e (é)
í  or  í  for acute-accented i (í)
ó  or  ó  for acute-accented o (ó)
ú  or  ú  for acute-accented u (ú)
ñ  or  ñ  for tilde-n (ñ)
¿  or  ¿  for opening question mark (¿)
¡   or  ¡  for opening exclamation mark (¡)

(see http://htmlhelp.com/reference/html40/entities/ for a full list of entity codes)

Contributors

AngelHerraez, Cudo29