Changes

Jump to: navigation, search

Translating the Gramps User manual

166 bytes added, 00:12, 26 January 2013
m
Gramps
We explain {{languages}}An explanation of how you can translate the GRAMPS manual, as offered [[User_manualUser manual|hereGramps User manual]] in html and pdf format. This manual is also available from withing GRAMPS with within Gramps using the {{man key press|F1 }} key(which opens this manual in a browser window), or from the help menu.[[Category:Developers/Localization]][[Category:Developers/General]]
==Getting started==
Translating GRAMPS' documentation into a new language is a long, tedious, and boring process, just like with any complex text :-) However, the good news is that since version 2.2 the translations for our user manual are maintained using po files, just like with translating the [[Translating GRAMPS|UI strings]]. Technically, this amounts to three simple steps:
# obtaining the text to be translated,
# translating the text, and
# getting the translated file uploaded into gramps SVN repository.
==Obtaining the Translating Gramps' documentation into a new language is a long, tedious, and boring process, just like with any complex text==:-) * Obtain Since Gramps version 3.0 the documentation was moved completely to this wiki. So for translation you don't need to use or even install any fancy applications to help us. You can use your browser and start immediately. Just go to the source tree, either from GRAMPS SVN repository (see [[Brief introduction to SVNUser manual]]page, or from select the current manual and then click on your language. You should could keep the english manual open to check if there is a help page missing. The general [[InstallationHelp:Contents|released source tarballwiki help page]] on sourceforgewill help you editing wiki pages. This wiki uses the [http://www.mediawiki. * Under <code>help<org/code> directoryMediaWiki] software, there which is the same that is a file named <code>gramps.pot<used by [http://code>en. Copy it to <code>help/zz/zzwikipedia.po<org/code> (where <code>zz<wiki/code> is your language code)Wikipedia Wikipedia], so it could feel familiar.
==Translating==
With the po file ready, you can start translating.* Use any editor or a po-file tool like [http://www.gtranslator.org GTtranslator] or [http://kbabel.kde.org/ KBabel] to translate strings in the po-file===Screenshots===
* Figures: localized screenshots are nice in the localized manual
** If you can provide figures on your own this is great. Place Upload them in to this wiki with the directory following naming convention: <code>help/zz/figuresfigure_name_zz.png</code> (<code>zz</code> is your language code). Bear in mind that screenshots have to be '''indexed PNGs, not more than 510 pixels wide''', in order to satisfy If the GNOME Documentation Style Guidefigure is language independent just call it <code>figure_name.** For screenshot: also make sure the print size fits on an A4png</USletter printout in pdfcode>. You can check this with GIMP in View Menu --> Info window** A command to take screenshots that works for me, is by using imagemagick (should be installed with every linux distribution, if not, get it): <pre>import -quality 100 -trim -delay 200 -resize 500 -density 100x100 -frame -channel RGB -depth 8 screenshot.png </pre>This creates a fully compressed (<code>-quality 100</code>), trimed timed screenshot after 2 seconds (<code>-delay 200</code>) of size 500 pixels wide (<code>-resize 500</code>), with resolution 100 (<code>-density 100x100</code>), with the window frame attached (<code>-frame</code>) in RGB mode (<code>-channel RGB</code>) and bbp 24 (<code>-depth 8, for some reason on my machine depth 8 corresponds with bbp 24 and not 8</code>). This creates images of 5 inches wide, which fit nicely on a book page, as well as on a html HTML page.
** If it's too much trouble for you, just let us know and perhaps somebody else will do it for you. Fortunately, one does not have to speak the language to make screenshots :-)
** For maintenance, it could be more easy to follow a naming scheme :
*** filename-''{gramps version number}-{locale}''.png <pre>Mainwin-33-fr.png</pre>
*** filename_''{gramps version number}_{locale}''.png <pre>Mainwin_33_fr.png</pre>
 
*[[Screenshots]]
 
==Links to wiki manual==
 
To have your recently translated manual available from within Gramps. You need to activate the manual by editing the following file: '''[http://svn.code.sf.net/p/gramps/code/trunk/gramps/gui/display.py display.py]''' to contain your language code, you may also contact the developers of Gramps by opening a ''Feature request'' for the new language on the [[Using_the_bug_tracker |Bug tracker]].
 
On line 32 of that file, you see:
 
<pre>
MANUALS = {
'nl' : '/nl',
}
</pre>
 
This maps a language code to the extension used on the wiki, so to add french, change this to:
 
<pre>
MANUALS = {
'nl' : '/nl',
'fr' : '/fr',
}
</pre>
 
*Every 'manual|...' entry in the gramp.pot file refers to a section in the manual, so make sure to use good section headings so this does not change too much over time.
 
Note that reports/tools link to a section in the page with the same name as the report name in Gramps.
 
*You should be able to edit directly on wiki or using tools like [http://translate.sourceforge.net/wiki/toolkit/txt2po#mediawiki txt2po].
 
Also previous gettext file for the manual and [http://en.wikipedia.org/wiki/Translation_memory Translation Memory] may help you to upgrade deprecated/old gettext files.
==Uploading you work into gramps SVNPossible improvement==All the files you have translated will need to be checked into GRAMPS SVN repository, under the <code>help/zz</code> directory. Also, certain makefiles will need to be modified to enable proper building and installation of your manual translation. Check your work into SVN if you have the permissions (add new files as necessary and modify Makefiles, if you know what to do) or oterwise, email it to [[Contact|Alex Roitman]].* To quickly test your translation once the makefiles are updated to include your language, build the translated manual from the po file by running in the top-level source directory <code> make</code> and call up your manual with the gnome help browser: <pre>yelp help/xx/gramps.xml</pre>
==Making A project like [http://www.gnucash.org/ GnuCash] provides a html or pdf manual==See complete web site environment by using gettext files, see [[Manual Generationhttp://svn.gnucash.org/repo/htdocs/trunk/README README file]]. You need not do this, somebody of the developer team will generate the official manual and upload to the gramps-project website on current [[User_manual]http://svn.gnucash.org/repo/htdocs/trunk/ environment]. If you feel however that the version on the website is too old, mail the devel list, asking to upload a new version.
If you see strange things on the official version, generate the manual yourself locally as indicated in [[Manual GenerationCategory:Translators/Categories]][[Category:Developers/General]], and see if you can improve on the methodology.

Navigation menu