Difference between revisions of "Translation information"

From Inkscape Wiki
Jump to navigation Jump to search
 
Line 7: Line 7:
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.  
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.  
* Save your file as <original name>-<language suffix>.xml, for example basic/tutorial-basic-es.xml for Spanish. If there's alreasy such a file in CVS, 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 (e.g. in share/tutorials in Inkscape distribution), you'll need to convert it to DocBook (and probably update).
* Save your file as <original name>-<language suffix>.xml, for example basic/tutorial-basic-es.xml for Spanish. If there's alreasy such a file in CVS, 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 (e.g. in share/tutorials in Inkscape distribution), you'll need to convert it to DocBook (and probably update).
* Do not use symbolic entities like &aacute;. Instead use either numeric entities such as á or simply write your text in UTF-8.
* Do not use symbolic entities like &amp;aacute;. 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 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.
* Most illustrations don't need translations, so you leave the references to them from 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 xmllint on your file to make sure it's well-formed.
* When finished, run xmllint on your file to make sure it's well-formed.

Revision as of 17:01, 27 April 2005

Tutorial translations

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:

http://cvs.sourceforge.net/viewcvs.py/inkscape/doc-docbook/

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.

  • Save your file as <original name>-<language suffix>.xml, for example basic/tutorial-basic-es.xml for Spanish. If there's alreasy such a file in CVS, 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 (e.g. in share/tutorials in Inkscape distribution), you'll need to convert it to DocBook (and probably update).
  • Do not use symbolic entities like &aacute;. Instead use either numeric entities such as &#225; or simply write your text in UTF-8.
  • Most illustrations don't need translations, so you leave the references to them from 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 xmllint on your file to make sure it's well-formed.
  • Send the file to buliabyak at gmail dot com, and I'll convert it to SVG and HTML and upload it to CVS and the web site.

Interface translations

If you're interested in helping with providing interface translation for Inkscape, here are a few links to help you getting started:

   http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch20s03.html
   http://developer.gnome.org/projects/gtp/l10n-guide/
   http://developer.gnome.org/projects/gtp/style-guides/
   http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html

Download the .po file for your language from here:

   http://cvs.sourceforge.net/viewcvs.py/inkscape/inkscape/po/

If a .po file for your language does not yet exist, then create one by copying the inkscape.pot file that gets generated when you run make in the codebase.

Edit the file to add or correct translations of the English strings, and then upload your work via the SourceForge patch tracker:

   http://sourceforge.net/tracker/?func=add&group_id=93438&atid=604308

(Check the Upload checkbox and add your file or patch.)


Here's how to make an absolutely up-to-date translation (in case the PO file in CVS is not up-to-date enough):

1. update your local copy of Inkscape in the usual way: "cvs update"
2. "./autogen.sh"
3. "./configure"
4. enter the "po" directory: "cd po"
5. generate the current PO template: "../intltool-update --pot"
6. merge your existing translations into the new POT file (inkscape.pot):
   "msgmerge your_latest_PO_file inkscape.pot > new_PO_file"

Then you just need to complete the translations in the PO file that was created in step 6.

Tools for Translations

A few important things to remember

  • After translating a fuzzy string (one that is marked with a ", fuzzy" comment), please remove its "fuzzy" tag -- otherwise this translation will be discarded by the build process, meaning that this string will show up untranslated. KBabel can do this automatically (see KBabel settings).
  • Before publishing your work (after you have finished updating the PO file), please update the "PO-Revision-Date" and "Last-Translator" fields in the PO file header. KBabel can do this automatically.

Review

This is the start of a list of places to get translation reviews done. So far:

 http://www.linux.it/tp/

Locale Testing

Before reporting that a locale doesn't work in Inkscape, you need to make sure that your system has that locale correctly set up. To do this, you need to generally find a way to run "locale-gen". (Under Debian this is via "dpkg-reconfigure locale".) If you set the LANG variable and check a regular tool, you should see the correct language for both the libc error (first line) and the tool error (second line):

LANG=es_MX ls -z
ls: opción inválida -- z
Pruebe `ls --help' para más información.

If it reports the regular C messages, your locale has not been correctly configured, and you'll need to find the right way to run "locale-gen" for your distribution:

LANG=es_ES ls -z
ls: invalid option -- z
Try `ls --help' for more information.

Programmers

Please make sure you use dgettext for any pluralized strings.