Difference between revisions of "Documentation translation"

From Inkscape Wiki
Jump to navigation Jump to search
m (Frigory moved page DocumentationTranslation to Documentation translation: A real title, please)
(Changing category; a few corrections)
Line 1: Line 1:
Go Back to the main [http://wiki.inkscape.org/wiki/index.php/Translation_information Translation information] page.
Go back to the main [[Translation information]] page.


== Tutorial translation ==
== Tutorial translation ==
Line 39: Line 39:
For more information, see '''tutorials/README''' (Web version [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/annotate/head%3A/tutorials/README here]) and '''tutorials/Makefile.targets''' (Web version [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/annotate/head%3A/tutorials/Makefile.targets here]).
For more information, see '''tutorials/README''' (Web version [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/annotate/head%3A/tutorials/README here]) and '''tutorials/Makefile.targets''' (Web version [http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/annotate/head%3A/tutorials/Makefile.targets here]).


== Adding a new tutorial to the inkscape trunk==
== Adding a new tutorial to the inkscape trunk ==
 
When you have commit access to the Inkscape bazaar repository and when adding a new tutorial SVG to the it ([http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head%3A/share/tutorials/ to the tutorial directory]), it's recommended to also perform the following steps:
When you have commit access to the Inkscape bazaar repository and when adding a new tutorial SVG to the it ([http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head%3A/share/tutorials/ to the tutorial directory]), it's recommended to also perform the following steps:


Line 45: Line 46:
* 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'''
:<code>msgid "tutorial-basic.svg"</code>
<pre>
:<code>msgstr "tutorial-basic.fr.svg"</code>
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.
</pre>
: then whenever the locale is French, Inkscape will display the French (and not the default English) basic tutorial for users.
* Update the [[TranslationStatus | translation status]] in the wiki.
* Update the [[TranslationStatus | translation status]] in the wiki.


Line 58: Line 60:


== User Manual ==
== User Manual ==
* See also [[Embedded Help]]
* See also [[Embedded Help]]
* First download the user manual xml document from [http://inkscape.svn.sourceforge.net/viewcvs.cgi/inkscape/user_manual/trunk/xml/ SVN]
* First download the user manual xml document from [http://inkscape.svn.sourceforge.net/viewcvs.cgi/inkscape/user_manual/trunk/xml/ SVN]
Line 65: Line 68:
* submit your work as a patch in the patch tracker and warn Cédric Gemy (cedric at le-radar.com) by email.
* submit your work as a patch in the patch tracker and warn Cédric Gemy (cedric at le-radar.com) by email.


== Manual pages (man)==
== Manual pages (man) ==
 
* first download inkscape.pod from [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/inkscape.pod bazaar]
* rename it to inkscape.xx.pod, where xx is the code for your language
* open inkscape.xx.pod in your favourite text editor (pay attention to encoding which must be UTF8), and directly translate in the file.
* you can take a look at a first example of translation with [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/inkscape.fr.pod inkscape.fr.pod]
* finally, submit your work in the [https://bugs.launchpad.net/inkscape patch tracker] and drop a mail to the inkscape devel mailing list.


== Translation information ==
* First download inkscape.pod from [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/inkscape.pod bazaar].
Go Back to the main [http://wiki.inkscape.org/wiki/index.php/Translation_information Translation information] page.
* Rename it to inkscape.xx.pod, where xx is the code for your language.
* Open inkscape.xx.pod in your favourite text editor (pay attention to encoding which must be UTF8), and directly translate in the file.
* You can take a look at a first example of translation with [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/inkscape.fr.pod inkscape.fr.pod].
* Finally, submit your work in the [https://bugs.launchpad.net/inkscape patch tracker] and drop a mail to the inkscape devel mailing list.


[[Category: Developer Discussion]]
[[Category: Translation]]

Revision as of 22:16, 11 July 2016

Go back to the main Translation information page.

Tutorial translation

Inkscape's tutorial sources are in Docbook XML format, with illustrations in SVG.

The translations of the tutorials however are in the well-know PO format. If you want to help, download them here:

http://bazaar.launchpad.net/~inkscape.dev/inkscape-docs/trunk/files/head%3A/tutorials/

  • Each tutorial is in its own subdirectory. You need the <LANG>.po file, for example basic/fr.po. Please coordinate with the previous translator listed in that file!
  • If there is none of these files, get the <tutorial>.pot file, rename it to <LANG>.po and start translating.

Once you are satisfied with what you have done, submit it to the Launchpad bug tracker. Open a new bug with name translation to <your language>, upload the po-file there as attachment. You need to create an account on ubuntu launchpad if you have no account there, yet. When you are also working on the translation of the inkscape program itself, pay attention to the fact that for each new translated tutorial, there is also a need to slightly modify the programs po-file of your language. See the sections below. Probably this is performed by the developer during the addition of the tutorial to the trunk, so please also update your local Inkscape po-file.

Thanks!

Tutorial header and footer translation

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-file needs to be modified directly (so without using a po-file). To translate the tutorial header and footer, download and rename the following files (click download file on):

Verification of tutorial translation

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:

  1. 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.
  2. Install Java SDK (JRE is not enough) if it's not already installed. Under openSUSE, the package name should be java-1_6_0-sun-devel or something similar. 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:

  1. 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).
  2. cd javaclasses/org/inkscape/xslt; javac files.java
    (this rebuilds files.class, which is a Java class file)
  3. cd tutorials/
  4. make svg
    (this creates all tutorial SVGs for all languages -- can take long)
  5. Check the newly created tutorial SVGs (which you'll find in their specific tutorial directories: advanced/, basic/, ...) 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.
  6. 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).

Adding a new tutorial to the inkscape trunk

When you have commit access to the Inkscape bazaar repository and when adding a new tutorial SVG to the 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.

Keyboard and mouse translation

  • TBD

User Manual

  • 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.

Manual pages (man)

  • First download inkscape.pod from bazaar.
  • Rename it to inkscape.xx.pod, where xx is the code for your language.
  • Open inkscape.xx.pod in your favourite text editor (pay attention to encoding which must be UTF8), and directly translate in the file.
  • You can take a look at a first example of translation with inkscape.fr.pod.
  • Finally, submit your work in the patch tracker and drop a mail to the inkscape devel mailing list.