Difference between revisions of "Documentation translation"
(Some more details) |
(→Tutorials: Update for move to gitlab of Inkscape proper (inkscape-docs not moved yet)) |
||
Line 5: | Line 5: | ||
Inkscape's tutorial sources are in Docbook XML format, with illustrations in SVG. | Inkscape's tutorial sources are in Docbook XML format, with illustrations in SVG. | ||
The ''translations'' of the tutorials however are in the well- | The ''translations'' of the tutorials however are in the well-known [[Translation information#PO translation files|PO format]]. If you want to help, download them [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/files/head%3A/tutorials/ here]. You will find each tutorial in its own subdirectory, with a .pot template. | ||
Once you are satisfied with what you have done, [[Translation information#Submit finished work|submit it]]. | Once you are satisfied with what you have done, [[Translation information#Submit finished work|submit it]]. | ||
Line 19: | Line 19: | ||
=== Committing a translation to the Inkscape trunk === | === Committing a translation to the Inkscape trunk === | ||
When you have | When you have a gitlab account, so you can fork the repository and make a merge request, and when you are adding a new tutorial SVG to it ([https://gitlab.com/inkscape/inkscape/tree/master/share/tutorials to the tutorial directory]), it's recommended to also perform the following steps: | ||
* Add the filename of the tutorial SVG (and any additional files it needs, like PNG images referenced from the SVG) to ‘share/tutorials/Makefile.am’ in the [ | * Add the filename of the tutorial SVG (and any additional files it needs, like PNG images referenced from the SVG) to ‘share/tutorials/Makefile.am’ in the [https://gitlab.com/inkscape/inkscape/tree/master/ main Inkscape trunk]. | ||
* If the SVG refers to a PNG, then that PNG should exist in the SVG's directory — make sure to also commit that PNG. | * If the SVG refers to a PNG, then that PNG should exist in the SVG's directory — make sure to also commit that PNG. | ||
* Modify the translation of the tutorial filename in the main PO file so as to make Inkscape display the localized tutorial instead of the default (English) one. An example: if the <code>"tutorial-basic.svg"</code> string is translated the following way in ‘po/fr.po’: | * Modify the translation of the tutorial filename in the main PO file so as to make Inkscape display the localized tutorial instead of the default (English) one. An example: if the <code>"tutorial-basic.svg"</code> string is translated the following way in ‘po/fr.po’: | ||
Line 30: | Line 30: | ||
: then whenever the locale is French, Inkscape will display the French (and not the default English) basic tutorial for users. | : then whenever the locale is French, Inkscape will display the French (and not the default English) basic tutorial for users. | ||
You may also check the tutorials with the [ | You may also check the tutorials with the [https://gitlab.com/inkscape/inkscape/blob/master/po/check_for_tutorial_problems.sh check_for_tutorial_problems.sh] script. See the comments inside the script for more information. | ||
=== Verification === | === Verification === | ||
Line 41: | Line 41: | ||
When this is complete create or update the tutorial SVG files: | When this is complete create or update the tutorial SVG files: | ||
# Update your local copy of the [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/files/ inkscape-docs trunk] and the [ | # Update your local copy of the [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/files/ inkscape-docs trunk] and the [https://gitlab.com/inkscape/inkscape/tree/master/ main inkscape trunk] from bzr (see also [[Working with Bazaar]] for some more information on the commands and workflow of Bazaar). | ||
# <code>javac javaclasses/org/inkscape/xslt/files.java</code> (this rebuilds ‘files.class’, which is a Java class file) | # <code>javac javaclasses/org/inkscape/xslt/files.java</code> (this rebuilds ‘files.class’, which is a Java class file) | ||
# <code>cd tutorials/</code> | # <code>cd tutorials/</code> |
Revision as of 19:21, 9 June 2017
Go back to the main Translation information page.
Tutorials
Inkscape's tutorial sources are in Docbook XML format, with illustrations in SVG.
The translations of the tutorials however are in the well-known PO format. If you want to help, download them here. You will find each tutorial in its own subdirectory, with a .pot template.
Once you are satisfied with what you have done, submit it.
The header and footer for the translation can as well be translated. Their translation is to date still a bit different from the tutorial translation as the header and footer SVG files need to be modified directly (so without using a PO file). To translate the tutorial header and footer, download and rename the following files (click on ‘download file’):
You should notice that some strings in the header are paths, not editable texts — this is to ensure that the text will render correctly to the end user. To translate it, you will have to recreate the text object yourself (use a generic sans-serif font with appropriate license, e.g. ‘DejaVu Sans’ or ‘Bistream Vera Sans’, in italic) and convert it to a path when you're done. Also consider the translucent ‘tutorial’ text path in the background.
Committing a translation to the Inkscape trunk
When you have a gitlab account, so you can fork the repository and make a merge request, and when you are adding a new tutorial SVG to it (to the tutorial directory), it's recommended to also perform the following steps:
- Add the filename of the tutorial SVG (and any additional files it needs, like PNG images referenced from the SVG) to ‘share/tutorials/Makefile.am’ in the main Inkscape trunk.
- If the SVG refers to a PNG, then that PNG should exist in the SVG's directory — make sure to also commit that PNG.
- Modify the translation of the tutorial filename in the main PO file so as to make Inkscape display the localized tutorial instead of the default (English) one. An example: if the
"tutorial-basic.svg"
string is translated the following way in ‘po/fr.po’:
msgid "tutorial-basic.svg" msgstr "tutorial-basic.fr.svg"
- then whenever the locale is French, Inkscape will display the French (and not the default English) basic tutorial for users.
You may also check the tutorials with the check_for_tutorial_problems.sh script. See the comments inside the script for more information.
Verification
To create up-to-date tutorials (the ‘tutorial-*.svg’ files), you'll need to build them from the tutorial PO files.
First of all, you need to check whether you have the necessary software. You need a Java SDK, Saxon, and the GNOME documentation utils, before you can actually build the SVGs of the tutorials:
- Install Saxon 6.5.x if it's not already installed. It is a tool that converts XML to SVG using XSLT. You need to have version 6.5.x, because the build process doesn't work with newer versions. Preferably, you install it with your package manager under Linux. For example, under openSUSE, install saxon-6.5.5 or a similarly named package — NOT saxon8 or similar.
You can also download it manually from the project page on SourceForge (saxon.sf.net). Look for the section ‘Older products’ and its subsection ‘Saxon 6.5.5’. Download the zip file and unzip it into a suitable directory that's accessible by the build script (e.g. in /usr/share/java). The build scripts needs to find ‘saxon.jar’ in your Java classpath, so you may want to check your classpath in case of a Java problem. - Install the Java SDK (JRE is not enough) if it's not already installed. You can check your installation with
type java
from the command line — check that java actually points to the SDK's java executable that you installed.
When this is complete create or update the tutorial SVG files:
- Update your local copy of the inkscape-docs trunk and the main inkscape trunk from bzr (see also Working with Bazaar for some more information on the commands and workflow of Bazaar).
javac javaclasses/org/inkscape/xslt/files.java
(this rebuilds ‘files.class’, which is a Java class file)cd tutorials/
make svg
(this creates all tutorial SVGs for all languages — can take long)- Check the newly created tutorial SVGs (which you'll find in their specific tutorial directories: ‘advanced/’, ‘basic/’, etc.) for overlapping text (often caused by font settings) and other problems. It's recommended to perform the check under a different operating system. If the SVGs have overlapping text, check the default fonts on your computer.
- If you want to commit the newly created tutorial SVGs, then copy the new ‘tutorial-*.svg’ files to the ‘share/tutorials/’ directory of your local copy of the main Inkscape trunk and commit them to the main Inkscape trunk.
For more information, see ‘tutorials/README’ (web version here) and ‘tutorials/Makefile.targets’ (web version here).
Keyboard shortcuts and command line references
Just translate the PO file for your language in the ‘keys/’ and ‘man/’ directories of the inkscape-docs repository, then send us your work.
User Manual
Obsolete!
- See also Embedded Help.
- First download the user manual xml document from SVN.
- Edit the trunk/xml/inkscapeUTF.xml file. All languages are inside.
- Just read the file, choose the language reference you want to use (en, fr…) and translate by duplicating the node and changing lang attribute to yours.
- When finishing editing, if necessary edit the Makefile and add your language to the Makefile. In every case test your file with some tools (xmllint...) or just type again "make your_language"; syntax errors will be displayed: please correct them.
- Submit your work as a patch in the patch tracker and warn Cédric Gemy (cedric at le-radar.com) by email.