Difference between revisions of "Documentation translation"

From Inkscape Wiki
Jump to navigation Jump to search
(Remove contents of outdated page. Up-to-date instructions are available in the repository.)
 
(65 intermediate revisions by 12 users not shown)
Line 1: Line 1:
= Tutorial Translation =
+
Go back to the main [[Translation information]] page.
  
Inkscape tutorial sources are in [[DocBook]] format, with illustrations in SVG. If you want to translate one or more tutorials, first download the [[DocBook]] source here:
+
See [https://gitlab.com/inkscape/inkscape-docs/documentation the README file in the Inkscape documentation repository on Gitlab]
  
http://svn.sourceforge.net/viewcvs.cgi/inkscape/doc-docbook/trunk/
+
[[Category: Translation]]
 
 
Each tutorial is in its own subdirectory. You need the *.xml file, for example basic/tutorial-basic.xml. Get it and simply replace all English text in it with the text in your language, preserving all XML markup. See README at that location for some notes on markup.
 
 
 
* If there's already such a file in SVN, you can edit it instead :) If there's no xml file at the above location but there's a translation of this tutorial in SVG format (in share/tutorials in Inkscape distribution), you'll need to convert it to [[DocBook]] (and probably update). Conversion can be done simply by: select the text blocks of an SVG tutorial in Inkscape, Ctrl+C, and Ctrl+V in your text editor, then add the markup.
 
 
 
* Save your file as <original name>.<language suffix>.xml, for example basic/tutorial-basic.es.xml for Spanish.
 
 
 
* Do not use symbolic entities like &amp;aacute; (they're not defined in XML without a DTD). Instead use either numeric entities such as &amp;#225; or simply write your text in UTF-8.
 
 
 
* Most illustrations don't need translations, so you leave the references to them from English XML intact. If however an illustration has some text that you want to translate, open the illustration file in Inkscape (e.g. basic/basic-f12.svg), edit it as needed, and save under a different name (e.g. basic/basic-f12-es.svg). Then change the filename reference in the XML source appropriately.
 
 
 
* When finished, run [http://xmlsoft.org/xmllint.html xmllint] on your file to make sure it's well-formed.
 
 
 
* Send the file to Joshua Andler <scislac at users dot sf dot net>, and he'll convert it to SVG and HTML and upload it to SVN and the web site.
 
 
 
* If after that you want to make any changes, download the file from the above location again, because it may have changed compared to the one you have.
 
 
 
==Tools==
 
* OmegaT - http://www.omegat.org/omegat/omegat_en/omegat.html
 
* Transolution - http://transolution.python-hosting.com/
 
 
 
===Transforming XML into PO files===
 
One can also use xml2po to get PO files out of the XML sources, and also transform the PO files back to XML. After you have a PO file, follow the instructions for editing those files below.
 
 
 
xml2po is available in gnome-doc-utils (http://ftp.gnome.org/pub/gnome/sources/gnome-doc-utils/).
 
 
 
Here are some command lines that were used to translate a German tutorial (the de-locale), please adapt accordingly until we nicely integrate this into our Makefiles.
 
 
 
<pre>
 
## use this at the very beginning, when there is no translation at all:
 
xml2po --output=basic/tutorial-basic.pot basic/tutorial-basic.xml
 
 
 
## use this when there is a *.de.xml, but you want a de.po:
 
xml2po --output=basic/de.po --reuse=basic/tutorial-basic.de.xml basic/tutorial-basic.xml
 
 
 
## xml2po is not happy when this directory doesn't exist:
 
mkdir .tmp.basic
 
 
 
## use this when the tutorial-basic.xml has been updated and you
 
## want the new stuff in your de.po:
 
xml2po --update-translation=basic/de.po basic/tutorial-basic.xml
 
 
 
## use this to create a tutorial-basic.de.xml from your de.po (ScislaC
 
## will use this file to create the final tutorial SVG file)
 
## WARNING: Unfortunately, this doesn't put localized screenshot
 
## file names into the xml file!
 
xml2po --po-file=basic/de.po basic/tutorial-basic.xml > basic/tutorial-basic.de.xml
 
 
 
</pre>
 
 
 
= Keyboard and mouse translation =
 
 
 
 
 
= User Manual =
 

Latest revision as of 17:55, 24 October 2019