https://gramps-project.org/wiki/api.php?action=feedcontributions&user=MathieuMD&feedformat=atomGramps - User contributions [en]2024-03-28T17:46:39ZUser contributionsMediaWiki 1.31.3https://gramps-project.org/wiki/index.php?title=Bases_de_g%C3%A9n%C3%A9alogie&diff=73163Bases de généalogie2019-10-02T09:30:39Z<p>MathieuMD: Reformatage + Typos</p>
<hr />
<div>[[Category:Fr:Genealogy]]<br />
{{languages|Genealogy basics}}<br />
<br />
Quelques recommandations concernant la pratique de la généalogie :<br />
<br />
;Obtenez une source<br />
:Qu'importe l'information que vous obtenez certains jours, elle sera toujours bonne si elle provient d'une [[Sources/fr|sources]]. Prenez du temps pour découvrir et écrire tous les détails.<br />
<br />
;Allez de ce que vous savez vers ce que vous cherchez<br />
:Enregistrez tout ce qui est connu avant de faire des hypothèses. Les faits peuvent vous suggérer la direction à prendre pour continuer les recherches. Ne regardez pas des miliers d'enregistrements dans l'espoir de trouver quelque chose lorsque vous n'avez pas exploré toutes les autres options.<br />
<br />
;Soyez descriptif<br />
:Ne vous limitez pas aux enregistrements des noms, les dates et lieux. La généalogie n'est pas seulement l'étude et l'analyse de ce qui s'est passé, mais pourquoi c'est arrivé et comment les descendants ont été modelés par ces événements. De plus, c'est un séduisant récit qui va intéresser votre famille.<br />
<br />
;Soyez fidèle dans la mesure du possible<br />
:Ne faites pas d'hypothèses quand vous enregistrez les informations principales. Écrivez exactement ce que vous voyez, utilisez des [crochets] pour vos commentaires. Utilisez le latin "[http://fr.wikipedia.org/wiki/Sic (sic)]" pour illustrer une transcription avec une erreur possible. Vous pourrez par la suite retrouver ce que vous pensiez comme étant une abréviation ou une faute de frappe liée à une variation de l'écriture manuscrite, courante sur une période, ou une distinction entre deux faits avec la même orthographe.<br />
<br />
;N'oubliez personne<br />
:Enregistrez tous les individus trouvés dans un événement. Les familles vivaient, travaillaient souvent ensemble, ainsi les relations d'un individu peuvent être mises à jours lors d'événements des frères et sœurs, voisins, paroissiens.<br />
<br />
;Planifiez vos efforts<br />
:Savoir ce que vous regardez pour organiser votre temps. Des voyages spéciaux pour voir les documents originaux, les lieux d'inhumation, les bibliothèques, ou interroger des individus, ne sont pas simple à répéter. Soyez certain(e) de tout avoir car vous n'aurez peut être pas d'autre chance d'y avoir accès. Il est malheureux de devoir revenir d'un endroit et se rendre compte que l'on a oublié une pièce importante alors que cette dernière était sous nos yeux.<br />
<br />
;Interprétez calmement<br />
:Parfois la ré-interprétation de pièces non-liées en apparence va soudainement nous révéler une période colorée que l'on aurait jamais imaginé. Des changements brutaux dans une famille, tel qu'un déménagement, une immigration, un mariage, un décès, ou une naissance peut vous indiquer la direction des recherches.<br />
<br />
;Des enregistrements de qualité<br />
:Inclure vos théories et questions sur l'information pour pouvoir les lire. Il n'y a rien d'étrange pour la compréhension des autres de sorte que l'on peut confortablement vérifier l'exactitude des faits et hypothèses. Ceci peut aider les autres à comprendre votre vision et fournir une information complémentaire permettant de se poser d'autres questions lors d'une recherche dans le même. Soyez certain(e) d'utiliser des crochets ou parenthèses ou tout autre notation technique pour clairement distinguer vos commentaires de la source elle-même.<br />
<br />
;Respectez la vie privée des vivants<br />
:La généalogie n'est pas destinée à envahir la vie privée des gens en révélant leur état de santé actuel, leur numéro de sécurité sociale, ou d'autres informations de la sphère privée. Soyez sensible à cela lorsque vous écrivez des informations sur des sujets qui pourraient mettre mal à l'aise les membres de votre famille, ces derniers ne seront alors pas prêt à discuter avec vous.<br />
<br />
;Sauvegardez vos informations électroniques régulièrement<br />
:Vous avez passé du temps à entrer des informations dans votre programme de généalogie, prenez 5 minutes pour sauvegarder ces données sur un support de stockage (CD, clé USB). Nommez le disque avec une description et une date avec un feutre et stockez le dans un endroit sombre, frais et sec.<br />
<br />
;Prenez beaucoup d'images<br />
:Utilisez des photographies pour vous souvenir des détails que vous n'avez pas pu écrire. Les images des tombes d'un cimetière peuvent être utiles, mais vous pouvez également souhaiter avoir une photo de l'église, une vue de la route proche du site, différents angles de prise de vue, les tombes adjacentes, une vue général du lieu, ceux qui vous ont accompagné lors de la visite. Plus tard, ceci vous aidera à trouver d'autres pistes ou tout simplement à revoir les bons souvenirs de cette journée.</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Getting_started_with_Gramps_development&diff=49448Getting started with Gramps development2014-05-04T16:30:26Z<p>MathieuMD: /* Eclipse + pydev */</p>
<hr />
<div>{{man warn|Warning:|This tutorial is work in progress. Feel free to help and modify it.}}<br />
<br />
This tutorial aims to help you in your first [http://en.wikipedia.org/wiki/Hacker_%28programmer_subculture%29 hacking] of Gramps. It will help you setting up a development environment and explain where to find the files you need.<br />
<br />
This tutorial assumes that you are using GNU/Linux (but it might help under another OS) and that you know the basics of Python programming language.<br />
<br />
= Set up your environment =<br />
== Optional : set up a development environment ==<br />
<br />
{{man warn|Warning:|I highly recommend that you do not use your usual environment for developing Gramps. Definitely do '''not''' work on your main Gramps family tree. Doing so may result in data loss in your Gramps Family Tree !}}<br />
<br />
If you run your development version of Gramps as the usual user, it will show all your usual Gramps family trees, so loading one by mistake is possible and a bug may result in losing productive data. To prevent this, you could use a [[GRAMPSHOME]] environment variable to create a separate folder for productive data, see [[Run Gramps from a portable drive]] for more information.<br />
<br />
Here are some options you may choose to prevent this. If you have enough resources, I recommend using VirtualBox. <br />
<br />
=== VirtualBox ===<br />
[http://www.virtualbox.org/ VirtualBox] is an open source virtualisation solution. Install it, run it and you have a virtual PC in your PC. Network connection works out of the box without extra configuration needed. Install your favorite Linux distribution and start hacking Gramps in a fully separated environment.<br />
<br />
=== Chroot ===<br />
You may also use a chroot to result in a similar separation as virtualbox. <br />
<br />
If you use Ubuntu, you can set up the chroot environment following these instructions:<br />
[https://help.ubuntu.com/community/BasicChroot Creating a basic Ubuntu chroot]<br />
If you use Gramps in a chroot jail with another Linux distribution, please add information here.<br />
<br />
You should then have a working chroot environment in /var/chroot (or whichever location you chose).<br />
Enter it with <br />
sudo chroot /var/chroot <br />
This means that within this directory, applications cannot access files without the chroot jail, <br />
i.e. your Gramps install within the directory cannot destroy another install of Gramps in your usual home directory.<br />
<br />
From a shell within your chroot directory, just clone the Git repository into the chroot folder as usual.<br />
Please note that before running the autogen-Script for generating makefiles, you may need to get some packages: <br />
apt-get install python intltool libglib2.0-dev gedit<br />
<br />
=== Another user ===<br />
You may also simply do your development as another user, so you won't access your usual ~/.gramps database when testing.<br />
<br />
You can also create an alias account with the same user and group IDs, but with a different login name and different home directory, typically, a subdir of the real user's home directory. <br />
This gives the benefit of less disk usage, and no permission boundary between the two account aliases. On the other hand, if you are afraid of malicious code within gramps purposefully breaking out and wreaking havoc on your real home account's .gramps, this method is too weak for you. For regular development scenario, though, this setup certainly does suffice.<br />
<br />
This is what the cloning looks like in my /etc/passwd:<br />
vassilii:x:1000:1000:Vassilii Khachaturov,,,:/home/vassilii:/bin/bash<br />
v:x:1000:1000:Vassilii Khachaturov,,,:/home/vassilii/pub:/bin/bash<br />
<br />
Create symlink to the dotfiles you want to reuse. Obviously, don't do this for ''.gramps''! Something like (inside ~vassilii/pub):<br />
ln -s ../.bashrc ../.mozilla ../.ratpoisonrc ../.gitconfig .<br />
<br />
You can use the alias account in a standalone matter (X session under it), or just inside a terminal window (su - <name of the alias account>). All the build, install, and test run of gramps should be done under this account. This will preserve your normal account's .gramps. <br />
<br />
Having obtained the gramps source tree, as the first build step, do<br />
./autogen.sh -- --prefix=/home/vassilii/pub/local<br />
('''replace /home/vassilii/pub/ with the actual aliased home directory!!!''')<br />
<br />
After you build and install (no root needed! you install under the local prefix), check that the right (locally built) gramps is on your PATH. Tweak your shell profiles as needed.<br />
<br />
=== None of above ===<br />
You have been warned! At a minimum name your test family trees 'a_test_name'. By starting with 'a_test' they show at the top of the family tree manager, and the test makes it clear what they are for.<br />
<br />
== Mac OS X ==<br />
In order to develop (or even use) Gramps on an Apple Macintosh, you must first install all of the prerequisite libraries and their headers. There are three choices for this [http://live.gnome.org/Gtk%2BOSX Gtk-OSX], [http://www.macports.org MacPorts], or [http://www.finkproject.org Fink]. Full instructions for building Gramps for each is provided here: [[Mac OS X:Build from source:Application package]], [[Mac OS X:Build from source:MacPorts]], or [[Mac OS X:Build from source:fink]].<br />
The last only works with X11, which is no longer included in OS X but can be installed separately. MacPorts can be built with/for either X11 or OS X's native Quartz graphics backend, and Gtk-OSX is exclusively for Quartz. <br />
<br />
== Install a text editor ==<br />
;Whichever editor you use, make sure that it is set up so that the indent level is 4 spaces. Do not use the Tab character to indent.<br />
<br />
The following is in alphabetic order. Choose the one you like.<br />
<br />
=== Eclipse + PyDev ===<br />
[http://www.eclipse.org/downloads/ Eclipse] with [http://pydev.org/manual_101_install.html PyDev] brings an integrated IDE for Python. To run it, you have to do a few steps configuration:<br />
<br />
* First, you have to set the path to your python interpreter:<br />
** Go in the menu '''Window > Preferences...''';<br />
** Then choose '''PyDev > Interpreters > Python Interpreter'''.<br />
** Click '''New...''' to create a link to your Python executable (for example ''/usr/bin/python2.6'').<br />
<br />
* Next, you have to set up a PyDev project:<br />
** Go in the menu '''File > New > Project...''';<br />
** Choose '''PyDev Project'''<br />
** Project name could be ''Gramps''<br />
** Uncheck '''Use defaults''' and choose '''~/gramps-trunk''' as the project directory.<br />
** Project type is '''Python 2.6'''<br />
** Interpreter is the one you created at the first step above<br />
** And then you can press '''Finish'''.<br />
<br />
You are now ready to start coding!<br />
<br />
=== pycharm ===<br />
[http://www.jetbrains.com/pycharm/ PyCharm] is more powerful and out-of-the-box than Eclipse with pydev, although it is not Free Software like Eclipse is. Seems to be recognizing more Python syntax and feels faster on my box. I unpacked the distribution, launched bin/pycharm.sh script, and it just worked. 'File » Open Directory' and selected the "Gramps/src" directory in my local checked out Git WD, and things work from there. <br />
<br />
'Version Control » Update Project' automatically syncs up with the Git repository.<br />
<br />
=== Emacs or Vim ===<br />
Experienced Unix-like users and developers will often use one of these editors. They're available with virtually all distributions of modern Unix-like systems.<br />
<br />
=== Eric4 ===<br />
[http://eric-ide.python-projects.org/index.html Eric4] is a python editor. It has everything you need (code completion, python shell, ...)<br />
<br />
=== Geany ===<br />
[http://www.geany.org/ Geany] is a nice development Editor. One feature I like is that it will automaticly recognise python code and list Symbols in a side bar, allowing to jump quickly in your code.<br />
Install it and you can start coding !<br />
<br />
Note, you can also get [http://wiki.geany.org/howtos/pydocw instant documentation for python modules].<br />
<br />
=== SPE ===<br />
[http://pythonide.stani.be/ SPE] or Stani's python editor, is a python editor. It is somewhat more powerfull than Erik4 (quick access to code fragments, extensive search, ...) but can be unstable on some setups. Try it to know.<br />
<br />
=== Scribes ===<br />
[http://scribes.sourceforge.net Scribes] is a text editor written in python and Gtk, that uniquely blends simplicity with well researched powerful functions.<br />
<br />
=== Other ===<br />
<br />
[http://kate-editor.org/ Kate] works well as a general editor for Python. It also recognizes key words of Python and marks them in colours. Kate is a Linux KDE desktop program. Of course, it also works on gnome installations.<br />
<br />
'''Idle''' is a handy simple editor that takes advantage of the interpreter features of Python. Often Idle comes with Python packages. Idle works well in Linux and other OS's, including the "dominant OS". If you install Windows version of Python, you will probably install from the same package Idle. One feature of Idle tends to confuse newcomers: Idle main window is NOT used for program writing, but for displaying the results. Notice that there is a Python tutorial, automagically installed with Idle on a Windows box. It is worth noting that the Tutorial gives quite extensive introduction into Python and is authored by the originator of Python: Guido van Rossum.<br />
<br />
(If you have a favourite Editor and want to share it : describe how to set it up here.)<br />
<br />
== Get the source tree ==<br />
To get the source tree, you will need Git. Please have a look at the dedicated tutorial [[Brief introduction to Git]] for details.<br />
<br />
You can also use a graphical Git tool like "gitk" or "git-gui".<br />
<br />
'''This tutorial now assumes you have cloned the Gramps repository into a directory called "~/Gramps". If not, you have to change this path when it is used below.'''<br />
<br />
{{man warn|Warning:|Let it be clear that the settings directory "~/.gramps/" is a '''different''' hidden directory in your home-dir. Do not store anything there.''}}<br />
<br />
== Run Gramps from the source ==<br />
To test that you did all well, you may want to run Gramps from your downloaded Git tree. This is explained in the [[Running a development version of Gramps]]; here are the quick steps:<br />
<br />
For the internationalization code to work, you need to have the translation tools.<br />
<br />
On Debian, just run (as root) - ('''Only if Debian installs Gramps 4.0+ as Gramps version!):<br />
apt-get build-dep gramps<br />
<br />
On Fedora 8 - 10 (Fedora is up to version 17 now so does this still apply?), you will need:<br />
yum install intltool gettext git-core rcs<br />
<br />
Build Gramps with:<br />
cd ~/Gramps<br />
python setup.py build<br />
<br />
To run Gramps, type:<br />
python Gramps.py<br />
<br />
== Correct Translation in development ==<br />
<br />
'''To check if following is still current!'''<br />
Warning: you will not be able to load translations on /usr/local/share/locale, because you will load /usr/share/locale, which could be translations for stable release (set on grampsapp.py).<br />
You may generate a custom launcher by adding this line:<br />
export GRAMPSI18N=/usr/local/share/locale<br />
if you want to use an other path, you may add this line:<br />
export GRAMPSI18N=@prefix@/share/locale<br />
on current gramps.sh.in (source file) before installation.<br />
<br />
= Browse the source code =<br />
<br />
* For further information see: [[Gramps 4.x File Organization|Gramps 4.x File Layout Organization]]<br />
<br />
= Develop =<br />
Before you start developing, read<br />
* [[Programming guidelines]]<br />
* [[UI style]]<br />
* [[Brief introduction to Git]]<br />
* [[Using database API]]<br />
* [http://www.gramps-project.org/docs/ API Code Documentation] - Gramps master<br />
* [[Devhelp]]<br />
* [[Committing policies]]<br />
<br />
<br />
[[Category:Developers/Tutorials]]<br />
[[Category:Developers/General|G]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Ajouter_un(e)_parrain/marraine&diff=49388Ajouter un(e) parrain/marraine2014-04-21T15:56:07Z<p>MathieuMD: /* Ajouter tous les participants à un baptême */</p>
<hr />
<div>{{languages|Add a godfather-godmother}}<br />
Dans plusieurs cultures les enfants sont liés à un parraine et une marraine. Ici, nous allons expliquer comment ajouter ce type de relation à un individu.<br />
<br />
== Ajouter un parrain ou une marraine ==<br />
Nous suggérons fortement d'ajouter le parrain et la marraine des individus de votre base de données. Pour celà, allez dans la vue Individus, et ajoutez-les. Dans la plupart des cas, les seules informations sur les parrains/marraines sont leurs noms, et parfois leur âge.<br />
<br />
[[Image:EditPerson-AssociationsTab-40.png|thumb|450px|Associations]]<br />
<br />
== Ajouter une relation ==<br />
<br />
La relation parraine/marraine peut être ajoutée à un individu depuis l'onglet {{man label|Associations}} de l'éditeur d'individu. Ouvrez l'individu "filleul(e)", allez sur l'onglet, et ajouter l'association parrain/marraine en sélectionnant l'individu parrain/marraine depuis la liste des individus.<br />
<br />
== Ajouter tous les participants à un baptême == <br />
Normalement vous découvrez les parrain et marraine lors d'un enregistrement de baptême. Ainsi, créez un individu baptisé avec un événement baptême. Cet individu a le rôle '''Principal''' pour cet événement. Ensuite, allez dans l'onglet événements desdits parrain/marraine, et cliquez sur le bouton index pour sélectionner un événement existant. Sélectionnez l'événement baptême que vous venez de créer, et définissez le rôle '''Parrain/Marraine'''.<br />
<br />
Cet événement est maintenant un événement partagé.<br />
<br />
== Autre : ne pas créer d'individu ==<br />
<br />
Des personnes ont une aversion pour l'ajout d'individus à leur arbre familial, lorsque ces derniers n'ont que le nom. Tout d'abord, permettez nous d'expliquer pourquoi vous devriez quand même générer un individu :<br />
* Gramps le supporte.<br />
* Vous pourrez rencontrer cette même personne plusieurs fois dans votre recherche. Un individu présent dans la vue Individus va accroître la probabilité que cette personne apparaisse comme parrain/marraine.<br />
* L'outil ''Trouver les non-liés'' aura plus d'informations.<br />
<br />
Si malgré tout vous ne souhaitez pas enregistrer les parrain/marraine, sans les créer, utilisez l'onglet attribut de l'individu. Vous pouvez ajouter l'attribut parrain/marraine à l'individu, avec la valeur du nom. Vous pouvez faire la même chose avec l'événement baptême.<br />
<br />
==Voir également==<br />
<br />
*[[Add a child/fr|Ajouter un enfant]]<br />
*[[Add a spouse/fr|Ajouter un conjoint]]<br />
*[[Add a witness/fr|Ajouter un témoin]]<br />
<br />
[[Category:Fr:Comment je...]][[Category:Fr:Tutorials]][[Category:Fr:Documentation]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Ajouter_un(e)_parrain/marraine&diff=49387Ajouter un(e) parrain/marraine2014-04-21T15:55:00Z<p>MathieuMD: /* Ajouter tous les participants à un baptême */</p>
<hr />
<div>{{languages|Add a godfather-godmother}}<br />
Dans plusieurs cultures les enfants sont liés à un parraine et une marraine. Ici, nous allons expliquer comment ajouter ce type de relation à un individu.<br />
<br />
== Ajouter un parrain ou une marraine ==<br />
Nous suggérons fortement d'ajouter le parrain et la marraine des individus de votre base de données. Pour celà, allez dans la vue Individus, et ajoutez-les. Dans la plupart des cas, les seules informations sur les parrains/marraines sont leurs noms, et parfois leur âge.<br />
<br />
[[Image:EditPerson-AssociationsTab-40.png|thumb|450px|Associations]]<br />
<br />
== Ajouter une relation ==<br />
<br />
La relation parraine/marraine peut être ajoutée à un individu depuis l'onglet {{man label|Associations}} de l'éditeur d'individu. Ouvrez l'individu "filleul(e)", allez sur l'onglet, et ajouter l'association parrain/marraine en sélectionnant l'individu parrain/marraine depuis la liste des individus.<br />
<br />
== Ajouter tous les participants à un baptême == <br />
Normalement vous découvrez les parrain et marraine lors d'un enregistrement de baptême. Ainsi, créez un individu baptisé avec un événement baptême. Cet individu a le rôle 'Principal' pour cet événement. Ensuite, allez dans l'onglet événements desdits parrain/marraine, et cliquez sur le bouton index pour sélectionner un événement existant. Sélectionnez l'événement baptême que vous venez de créer, et définissez le rôle 'parrain/marraine'.<br />
<br />
Cet événement est maintenant un événement partagé.<br />
<br />
== Autre : ne pas créer d'individu ==<br />
<br />
Des personnes ont une aversion pour l'ajout d'individus à leur arbre familial, lorsque ces derniers n'ont que le nom. Tout d'abord, permettez nous d'expliquer pourquoi vous devriez quand même générer un individu :<br />
* Gramps le supporte.<br />
* Vous pourrez rencontrer cette même personne plusieurs fois dans votre recherche. Un individu présent dans la vue Individus va accroître la probabilité que cette personne apparaisse comme parrain/marraine.<br />
* L'outil ''Trouver les non-liés'' aura plus d'informations.<br />
<br />
Si malgré tout vous ne souhaitez pas enregistrer les parrain/marraine, sans les créer, utilisez l'onglet attribut de l'individu. Vous pouvez ajouter l'attribut parrain/marraine à l'individu, avec la valeur du nom. Vous pouvez faire la même chose avec l'événement baptême.<br />
<br />
==Voir également==<br />
<br />
*[[Add a child/fr|Ajouter un enfant]]<br />
*[[Add a spouse/fr|Ajouter un conjoint]]<br />
*[[Add a witness/fr|Ajouter un témoin]]<br />
<br />
[[Category:Fr:Comment je...]][[Category:Fr:Tutorials]][[Category:Fr:Documentation]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Ajouter_un(e)_parrain/marraine&diff=49386Ajouter un(e) parrain/marraine2014-04-21T15:23:52Z<p>MathieuMD: /* Ajouter un parrain ou une marraine */</p>
<hr />
<div>{{languages|Add a godfather-godmother}}<br />
Dans plusieurs cultures les enfants sont liés à un parraine et une marraine. Ici, nous allons expliquer comment ajouter ce type de relation à un individu.<br />
<br />
== Ajouter un parrain ou une marraine ==<br />
Nous suggérons fortement d'ajouter le parrain et la marraine des individus de votre base de données. Pour celà, allez dans la vue Individus, et ajoutez-les. Dans la plupart des cas, les seules informations sur les parrains/marraines sont leurs noms, et parfois leur âge.<br />
<br />
[[Image:EditPerson-AssociationsTab-40.png|thumb|450px|Associations]]<br />
<br />
== Ajouter une relation ==<br />
<br />
La relation parraine/marraine peut être ajoutée à un individu depuis l'onglet {{man label|Associations}} de l'éditeur d'individu. Ouvrez l'individu "filleul(e)", allez sur l'onglet, et ajouter l'association parrain/marraine en sélectionnant l'individu parrain/marraine depuis la liste des individus.<br />
<br />
== Ajouter tous les participants à un baptême == <br />
Normalement vous devrez les parrain et marraine lors d'un enregistrement de baptême. Ainsi, créez un individu baptisé avec un événement baptême. Cet individu à le rôle 'Principal' pour cet événement. Dès lors, allez dans l'onglet événements des parrain/marraine, et cliquez sur le bouton index pour sélectionner un événement existant. Sélectionnez l'événement baptême que vous avez créé, et définissez le rôle pour les parrain/marraine. <br />
<br />
Cet événement est maintenant un événement partagé.<br />
<br />
== Autre : ne pas créer d'individu ==<br />
<br />
Des personnes ont une aversion pour l'ajout d'individus à leur arbre familial, lorsque ces derniers n'ont que le nom. Tout d'abord, permettez nous d'expliquer pourquoi vous devriez quand même générer un individu :<br />
* Gramps le supporte.<br />
* Vous pourrez rencontrer cette même personne plusieurs fois dans votre recherche. Un individu présent dans la vue Individus va accroître la probabilité que cette personne apparaisse comme parrain/marraine.<br />
* L'outil ''Trouver les non-liés'' aura plus d'informations.<br />
<br />
Si malgré tout vous ne souhaitez pas enregistrer les parrain/marraine, sans les créer, utilisez l'onglet attribut de l'individu. Vous pouvez ajouter l'attribut parrain/marraine à l'individu, avec la valeur du nom. Vous pouvez faire la même chose avec l'événement baptême.<br />
<br />
==Voir également==<br />
<br />
*[[Add a child/fr|Ajouter un enfant]]<br />
*[[Add a spouse/fr|Ajouter un conjoint]]<br />
*[[Add a witness/fr|Ajouter un témoin]]<br />
<br />
[[Category:Fr:Comment je...]][[Category:Fr:Tutorials]][[Category:Fr:Documentation]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Brief_introduction_to_SVN&diff=40135Brief introduction to SVN2012-10-28T10:00:28Z<p>MathieuMD: /* Option 2: use the build code */</p>
<hr />
<div>The development source code of GRAMPS is stored in the SVN repository at sourceforge [http://gramps.svn.sourceforge.net/viewsvn/gramps]. This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably<br />
want to do one of two things<br />
with SVN: either download the latest source or the development version,<br />
or else upload your changes (if you have write access to the repository)<br />
or make a patchfile (if you don't have write access).<br />
<br />
== Types of branches ==<br />
There are four kinds of branches in the Subversion Repository: <br />
<br />
* ''trunk'' - There is only one trunk. All new feature development happens in the trunk. New releases never come from the trunk. The trunk for GRAMPS can be found here: http://svn.code.sf.net/p/gramps/code/trunk<br />
<br />
* ''maintenance'' - There are many maintenance branches. A maintenance branch is created from the trunk when all the features for a release are complete. New features are not committed to maintenance branch. Releases only come from maintenance branches. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in trunk. Maintenance branches can be found here: http://svn.code.sf.net/p/gramps/code/branches/maintenance<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''trunk''. Occassionally a GEP will require extensive reworking or long periods when the code base is ususable. In these cases a branch in ''geps'' can be used as a temporary development area. Once the hard work is done the change should be merged into the trunk and the ''geps'' branch should be removed. ''greps'' branches should follow the naming convention ''gep-<###>-<descriptive text>'' e.g. ''gep-013-server''. Please read the [[#Working with development branches]] section for help with managing these branches.<br />
<br />
* ''sandbox'' - These are meant for experimentation purposes. If you want to explore some ideas or try out some changes that would break the ''trunk'' or prototype something that has not made it to a GEP you can create a ''sandbox'' branch. These should be short lived. As soon as you have finished please remove the branch. We reserve the right to remove any ''sandbox'' branch that has not been touched for 12 months. ''sandbox'' branches should use the following naming convention ''<username>-<descriptive text>'' e.g. ''hippy-prototype-rss-idea''. Please read the [[#Working with development branches]] section for help with managing these branches.<br />
<br />
Release tags are created in the ''tags'' directory. The first two digits of the GRAMPS version number are reserved to indicate the maintenance branch the code came from. The last digit indicates the revision from that maintenance branch. For example, 3.0.4 would indicate the 5th release from the 3.0 branch (3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4).<br />
<br />
Here is a hypothetical example:<br />
Imagine that the current version of GRAMPS is 8.3.2. A new series of features has been added in trunk and are ready for release. A new maintenance branch is created from trunk named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in trunk that will not be included in the 8.4 series of releases, but will be included in the 8.5 series. Bug fixes continue to occur in the 8.4 branch until the code is deemed worthy of release. At that time, a release is tagged from the 8.4 maintenance branch and named 8.4.0. Some time after the release of 8.4.0, some bugs are found and fixed in the 8.4 maintenance branch. Those bug fixes are released as 8.4.1.<br />
<br />
== Stable version ==<br />
* To download the source to a ~/gramps{{stable_branch}} directory, you can use two methods to access the SVN repository:<br />
# An http frontend to gramps SVN<br />
# SVN access <br />
* To upload your changes, you have to have developer access. <br />
<br />
The second method requires that svn be installed on your system (Debian/Ubuntu: <code>apt-get install subversion</code>; Fedora: <code>yum install subversion</code>).<br />
With the SVN method, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
svn co <nowiki>http://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps</nowiki>{{stable_branch}} gramps{{stable_branch}}</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a sourceforge account, use https instead:<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps</nowiki>{{stable_branch}} gramps{{stable_branch}}</code><br />
You will in this case be requested for your root keyring password which will store your sourceforge credentials, and next your password. If the user on your PC is not the same one as on sourceforge, leave password empty and press enter, you will then receive the option to enter a username first, and then the sourceforge password for that username.<br />
<br />
If you would like to update your source tree after some time, execute the following command in the top directory of the gramps{{stable_branch}} source tree:<br />
<br />
<code><br />
svn update<br />
</code><br />
<br />
To commit your changes, you need to have checked out the gramps code with https, and have commit access to the Gramps repository (the Gramps admin can give you this, [[Contact|Brian Matherly or Benny Malengier]]). Commit happens if execute:<br />
<br />
<code><br />
svn commit -m "message describing the nature of the change"<br />
</code><br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the SVN repository. In this case, create a patch, and commit this on the [http://bugs.gramps-project.org ticket tracker]. You can do this in the top gramps directory as follows:<br />
<br />
<code><br />
svn diff > mychanges.patch<br />
</code><br />
<br />
A developer can apply this patch then with the command:<br />
<br />
<br />
<code><br />
patch -p0 < mychanges.patch<br />
</code><br />
<br />
== Unstable development: "trunk" ==<br />
<br />
:Also see: [[Getting started with GRAMPS Trunk]].<br />
<br />
=== Obtain it===<br />
There are several versions of the gramps code in SVN. <br />
The development branch for small changes and bug fixes is ''gramps{{stable_branch}}'' and ''trunk'' has been created for the ongoing unstable version. <br />
If this talk of ''branch'' and ''trunk'' sounds confusing you might like to read the list message [http://article.gmane.org/gmane.comp.genealogy.gramps.devel/8678 explaining branch and trunk].<br />
<br />
'''Replace in the commands here ''https'' by ''http'' if you do not have a sourceforge account.<br />
<br />
To checkout a copy of the possibly unstable trunk to ./trunk:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/trunk trunk</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.4 ./gramps34:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps34 gramps34</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.3 ./gramps33:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps33 gramps33</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.2 ./gramps32:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps32 gramps32</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.1 ./gramps31:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps31 gramps31</nowiki><br />
</code><br />
<br />
To checkout a copy of the older stable GRAMPS 3.0 ./gramps30:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps30 gramps30</nowiki><br />
</code><br />
<br />
To checkout a copy of the older stable GRAMPS 2.2 ./gramps22:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps22 gramps22</nowiki><br />
</code><br />
<br />
=== Prepare trunk ===<br />
Now go into the <code>trunk</code> directory and type<br />
python setup.py build<br />
<br />
{{man warn|1=Warning|2=Do not install the development version if you don't know how to version python modules. That is, do '''not''' type {{man label|sudo python setup.py install}}. }}<br />
<br />
=== Prepare gramps34 and before===<br />
The old versions of Gramps use autotools, so you need to run<br />
./autogen.sh<br />
make<br />
<br />
==== Building with Fedora 8 - 10 ====<br />
<br />
These are the packages you need:<br />
<br />
<code><br />
yum install intltool gnome-doc-utils gettext subversion rcs<br />
</code><br />
<br />
<br />
==== Windows ====<br />
This step appears unnecessary on windows? See [[Installation#Building_from_source]]<br />
<br />
=== Run the development version ===<br />
As you should not install the development version, how can you try it out? The current Python version required to run Gramps trunk is officially python2.7 as of July 2012. <br />
<br />
{{man note|1=Known Problems|2=Some problems are due to the migration from GTK2 to GTK3: [[GEPS_029:_GTK3-GObject_introspection_Conversion#Problems|list of known problems]]}}<br />
<br />
==== Option 1: run from source repo ====<br />
Here, we use the code in <code>trunk</code> directory to run Gramps. This means that compiled python files will be stored there. This is not ideal, but the easiest way to develop Gramps, as changes are immediately picked up by the code.<br />
<br />
Copy the const.py file created in build to your source directory if you want to use your source directory to work with Gramps:<br />
cp build/lib.linux-$(uname -m)-2.7/gramps/gen/const.py gramps/gen/const.py<br />
python Gramps.py<br />
<br />
''Note'': the <code>lib.linux-$(uname -m)-2.7</code> folder name vary depending on your system (i686 or x86_64).<br />
<br />
That is it. If you installed some dependencies of Gramps in non-default positions, you need to indicate with PYTHONPATH where they can be found, and with LD_LIBRARY_PATH where link libraries can be found. Eg, if you install GTK and spell checking from source too, you will need something like:<br />
PYTHONPATH=/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python Gramps.py<br />
<br />
==== Option 2: use the build code ====<br />
Here, we use the code build in <code>trunk/build</code> directory to run Gramps. For compiled programs this is the only way, but for Gramps nothing is compiled. It is not bad however to keep your code separated from your execution, as deleting the build directory is easy. After a code change in your source, you then need to run however <code>python setup.py</code> again to update the build direcotry. To run Gramps from build, do<br />
cd trunk/build/lib.linux-$(uname -m)-2.7/<br />
python -c 'from gramps.grampsapp import main; main()'<br />
<br />
Again, it might be needed to set with PYTHONPATH where dependencies can be found, and with LD_LIBRARY_PATH link libraries, see option 1.<br />
<br />
If you point your PYTHONPATH to the build directory, you can actually run Gramps from a random directory. Like this:<br />
<br />
cd<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-$(uname -m)-2.7/ python -c 'from gramps.grampsapp import main; main()'<br />
<br />
So, more general:<br />
cd<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-$(uname -m)-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python -c 'from gramps.grampsapp import main; main()'<br />
<br />
If the build directory is in your PYTHONPATH, you can also just execute the grampsapp.py module. So this will work too:<br />
cd ~/gramps-trunk/build/lib.linux-$(uname -m)-2.7/gramps<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-$(uname -m)-2.7/ python grampsapp.py<br />
<br />
or again more generally <br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-$(uname -m)-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python grampsapp.py<br />
<br />
'''Note''': At the time of writing, only the last, so using grampsapp.py works, as not all imports in Gramps have been converted to relative or absolute imports. This conversion will be finished by end of 2012 however.<br />
<br />
<br />
{{man warn|1=warning|2=Do not open your existing databases with trunk, it might destroy your data, and will make it impossible to use the data in the stable version {{stable_branch}}. To try it out, export your database to a gramps xml file, eg <code>test_trunk.gramps</code>, create a new family tree in trunk, and import this xml file.}}<br />
<br />
=== Where for bugs? ===<br />
The [http://bugs.gramps-project.org bug tracker] has in the right top angle different projects. Choose project ''trunk'' and submit an issue.<br />
<br />
=== Making a patchfile ===<br />
If you do not have write access to the repository, you can make a patchfile with your changes. This is a text file which can then be sent by email to somebody, or posted/uploaded to the bug tracker (against a bug you are fixing or a feature request which you are solving for instance), etc.<br />
<br />
These instructions assume SVN is installed on your system (Debian/Ubuntu: <code>apt-get install subversion</code>; Fedora: <code>yum install subversion</code>).<br />
<br />
These instructions tell how to make a patchfile against trunk, so that your changes are added to the next major release of Gramps. (To make a patchfile against a branch the process is similar, with some slight changes.)<br />
<br />
So first checkout a copy of the trunk to ./trunk:<br />
<br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/trunk trunk</nowiki><br />
<br />
Then use your favorite editor to change whatever file(s) you want.<br />
<br />
To then use SVN to make a patchfile, first go to the top of your changed tree<br />
<br />
cd /path-to-your-gramps/trunk<br />
<br />
and then tell SVN to record/document/itemize the changes to your edited file(s)<br />
<br />
svn diff > ~/some-descriptive-name.patch<br />
<br />
with the resulting file being the patchfile you just made.<br />
<br />
If you want to add a new text file, such as a new python module,<br />
you can include that in your patchfile by first doing, e.g.,<br />
<br />
svn add dir1/dir2/newfile.py<br />
<br />
before you do the "svn diff" as described above. (This method<br />
does not work for non-text files such as image files; be warned.)<br />
<br />
Note also that if you add a file in this manner, depending<br />
on what was added and where it was added, you may also have<br />
to modify the corresponding Makefile.am file.<br />
<br />
I do not know how to make a patchfile which documents<br />
a deleted file which "patch" will then correctly delete.<br />
(If you know how, please add it here.) When SVN version 1.7<br />
is released (scheduled for 1Q2011 as I write this), then there<br />
will be a "svn patch" command which should do that.<br />
<br />
== Working with development branches ==<br />
<br />
<br />
If you are using a ''geps'' or ''sandbox'' branch you need to take care when merging changes from the ''trunk'' and back to the ''trunk''. Please take a few minutes to read the [http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html| Basic Merging] section of the Subversion book. <br />
<br />
'''IMPORTANT:''' please use an svn client that is version 1.5 or newer. The merge tracking functionality only became available in 1.5. If you use an earlier client you will have to deal with all the revision tracking of merges by hand - not fun.<br />
<br />
'''IMPORTANT:''' if you see a message that talks about ''from foreign repository'' it is probably because your working copy was checked out from an http:// url but you are merging from a https:// url or visa versa. Just be consistent about why you use. Don't merge ''from foreign repository'' because svn will not be able to manage the revisions correctly.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''trunk'':<br />
<br />
svn copy <nowiki>https://svn.code.sf.net/p/gramps/code/trunk https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
=== Merging ''trunk'' changes into the branch ===<br />
<br />
You should do this regularly so that you don't have a nasty job of resolving loads of conflicts when you come to merge your changes back into the ''trunk'':<br />
<br />
cd gep-014-fab-feature<br />
svn merge <nowiki>https://svn.code.sf.net/p/gramps/code/trunk</nowiki><br />
<br />
'''NOTE''' you will see some modification to files that you are not expecting. If you look at these you will find that they are modifications to svn properties. These are used by the merging tool to keep track of what changes have already been applied.<br />
<br />
=== Merging changes from the ''branch'' back into the ''trunk'' ===<br />
<br />
When you are ready to merge your changes back into the ''trunk'':<br />
<br />
First make sure you have all the ''trunk'' changes in your branch:<br />
<br />
cd gep-014-fab-feature<br />
svn merge <nowiki>https://svn.code.sf.net/p/gramps/code/trunk</nowiki><br />
svn commit -m "meaningful message"<br />
<br />
Then move over to a working copy of the ''trunk'' and merge in your branch:<br />
<br />
cd trunk<br />
svn merge --reintegrate <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
Now build it, test it, convince yourself that it all works and then commit the changes:<br />
<br />
svn commit -m "All the changes for GEP-014"<br />
<br />
Now you '''must''' delete your branch. You can recreate it later if you need to but svn can not cope with doing another merge --reintegrate from the same branch:<br />
<br />
svn remove <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged<br />
into the trunk or have been abandoned. To remove a branch:<br />
<br />
svn remove <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
The developers reserve the right to remove branches that have been<br />
dormant for more than 1 year.<br />
<br />
<br />
== Useful things to know ==<br />
=== Subversion commands ===<br />
svn help add<br />
<br />
svn help commit<br />
<br />
svn help log<br />
<br />
Adding files to repositories requires you to set some properties to the files and to have a [http://apps.sourceforge.net/trac/sitedocs/wiki/Subversion sourceforge account]. See <code>svn help propset</code>. You can use the <code>propget</code> on existing files to see how you should add it. A convenient way is to common files to your <code>~/.subversion/config</code> file, eg in my config I have:<br />
<br />
[miscellany]<br />
enable-auto-props = yes<br />
<br />
[auto-props]<br />
*.py = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision<br />
*.po = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision<br />
*.sh = svn:eol-style=native;svn:executable<br />
Makefile = svn:eol-style=native<br />
*.png = svn:mime-type=application/octet-stream<br />
*.svg = svn:eol-style=native;svn:mime-type=text/plain<br />
<br />
=== Ignore files ===<br />
You should on creation of new directories set the svn:ignore property:<br />
<br />
svn propedit svn:ignore src/new_dir/<br />
<br />
and there set at least:<br />
*.pyc<br />
*.pyo<br />
Makefile<br />
Makefile.in<br />
<br />
=== svn2cl ===<br />
The GRAMPS project does not keep a ChangeLog file under source control. All change history is captured by Subversion automatically when it is committed. A ChangeLog file is generated from the SVN commit logs before each release using [[How to use svn2cl|svn2cl]]. Developers should take care to make useful commit log messages when committing changes to Subversion. Here are some guidelines:<br />
<br />
*Try to make a descriptive message about the change.<br />
*Use complete sentences when possible.<br />
*When committing a change that fixes a bug on the tracker, use the bug's number and summary as the message.<br />
*When committing a patch from a contributor, put the contributor's name and e-mail address in the commit message.<br />
*It is not necessary to put the names of the files you have modified in the commit message because Subversion stores that automatically.<br />
<br />
=== Other usage tips ===<br />
<br />
* Additional tips and recommendations related to committing changes: [[SVN Commit Tips]]<br />
* GRAMPS [[Committing policies]]<br />
<br />
=== Browse svn ===<br />
<br />
An alternative to the command line tools to view the svn repository is<br />
the [http://gramps.svn.sourceforge.net/viewvc/gramps/ online interface].<br />
<br />
=== Download Tarball ===<br />
<br />
You can also download a tarball for past and present sources.<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps32/src/?view=tar 3.2.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps33/src/?view=tar 3.3.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps34/src/?view=tar 3.4.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/?view=tar Trunk]<br />
<br />
[[Category:Developers/General|B]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Brief_introduction_to_SVN&diff=40134Brief introduction to SVN2012-10-28T09:58:54Z<p>MathieuMD: /* Option 1: run from source repo */ Replaced x86_64 by $(uname -m)</p>
<hr />
<div>The development source code of GRAMPS is stored in the SVN repository at sourceforge [http://gramps.svn.sourceforge.net/viewsvn/gramps]. This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably<br />
want to do one of two things<br />
with SVN: either download the latest source or the development version,<br />
or else upload your changes (if you have write access to the repository)<br />
or make a patchfile (if you don't have write access).<br />
<br />
== Types of branches ==<br />
There are four kinds of branches in the Subversion Repository: <br />
<br />
* ''trunk'' - There is only one trunk. All new feature development happens in the trunk. New releases never come from the trunk. The trunk for GRAMPS can be found here: http://svn.code.sf.net/p/gramps/code/trunk<br />
<br />
* ''maintenance'' - There are many maintenance branches. A maintenance branch is created from the trunk when all the features for a release are complete. New features are not committed to maintenance branch. Releases only come from maintenance branches. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in trunk. Maintenance branches can be found here: http://svn.code.sf.net/p/gramps/code/branches/maintenance<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''trunk''. Occassionally a GEP will require extensive reworking or long periods when the code base is ususable. In these cases a branch in ''geps'' can be used as a temporary development area. Once the hard work is done the change should be merged into the trunk and the ''geps'' branch should be removed. ''greps'' branches should follow the naming convention ''gep-<###>-<descriptive text>'' e.g. ''gep-013-server''. Please read the [[#Working with development branches]] section for help with managing these branches.<br />
<br />
* ''sandbox'' - These are meant for experimentation purposes. If you want to explore some ideas or try out some changes that would break the ''trunk'' or prototype something that has not made it to a GEP you can create a ''sandbox'' branch. These should be short lived. As soon as you have finished please remove the branch. We reserve the right to remove any ''sandbox'' branch that has not been touched for 12 months. ''sandbox'' branches should use the following naming convention ''<username>-<descriptive text>'' e.g. ''hippy-prototype-rss-idea''. Please read the [[#Working with development branches]] section for help with managing these branches.<br />
<br />
Release tags are created in the ''tags'' directory. The first two digits of the GRAMPS version number are reserved to indicate the maintenance branch the code came from. The last digit indicates the revision from that maintenance branch. For example, 3.0.4 would indicate the 5th release from the 3.0 branch (3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4).<br />
<br />
Here is a hypothetical example:<br />
Imagine that the current version of GRAMPS is 8.3.2. A new series of features has been added in trunk and are ready for release. A new maintenance branch is created from trunk named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in trunk that will not be included in the 8.4 series of releases, but will be included in the 8.5 series. Bug fixes continue to occur in the 8.4 branch until the code is deemed worthy of release. At that time, a release is tagged from the 8.4 maintenance branch and named 8.4.0. Some time after the release of 8.4.0, some bugs are found and fixed in the 8.4 maintenance branch. Those bug fixes are released as 8.4.1.<br />
<br />
== Stable version ==<br />
* To download the source to a ~/gramps{{stable_branch}} directory, you can use two methods to access the SVN repository:<br />
# An http frontend to gramps SVN<br />
# SVN access <br />
* To upload your changes, you have to have developer access. <br />
<br />
The second method requires that svn be installed on your system (Debian/Ubuntu: <code>apt-get install subversion</code>; Fedora: <code>yum install subversion</code>).<br />
With the SVN method, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
svn co <nowiki>http://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps</nowiki>{{stable_branch}} gramps{{stable_branch}}</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a sourceforge account, use https instead:<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps</nowiki>{{stable_branch}} gramps{{stable_branch}}</code><br />
You will in this case be requested for your root keyring password which will store your sourceforge credentials, and next your password. If the user on your PC is not the same one as on sourceforge, leave password empty and press enter, you will then receive the option to enter a username first, and then the sourceforge password for that username.<br />
<br />
If you would like to update your source tree after some time, execute the following command in the top directory of the gramps{{stable_branch}} source tree:<br />
<br />
<code><br />
svn update<br />
</code><br />
<br />
To commit your changes, you need to have checked out the gramps code with https, and have commit access to the Gramps repository (the Gramps admin can give you this, [[Contact|Brian Matherly or Benny Malengier]]). Commit happens if execute:<br />
<br />
<code><br />
svn commit -m "message describing the nature of the change"<br />
</code><br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the SVN repository. In this case, create a patch, and commit this on the [http://bugs.gramps-project.org ticket tracker]. You can do this in the top gramps directory as follows:<br />
<br />
<code><br />
svn diff > mychanges.patch<br />
</code><br />
<br />
A developer can apply this patch then with the command:<br />
<br />
<br />
<code><br />
patch -p0 < mychanges.patch<br />
</code><br />
<br />
== Unstable development: "trunk" ==<br />
<br />
:Also see: [[Getting started with GRAMPS Trunk]].<br />
<br />
=== Obtain it===<br />
There are several versions of the gramps code in SVN. <br />
The development branch for small changes and bug fixes is ''gramps{{stable_branch}}'' and ''trunk'' has been created for the ongoing unstable version. <br />
If this talk of ''branch'' and ''trunk'' sounds confusing you might like to read the list message [http://article.gmane.org/gmane.comp.genealogy.gramps.devel/8678 explaining branch and trunk].<br />
<br />
'''Replace in the commands here ''https'' by ''http'' if you do not have a sourceforge account.<br />
<br />
To checkout a copy of the possibly unstable trunk to ./trunk:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/trunk trunk</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.4 ./gramps34:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps34 gramps34</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.3 ./gramps33:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps33 gramps33</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.2 ./gramps32:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps32 gramps32</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.1 ./gramps31:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps31 gramps31</nowiki><br />
</code><br />
<br />
To checkout a copy of the older stable GRAMPS 3.0 ./gramps30:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps30 gramps30</nowiki><br />
</code><br />
<br />
To checkout a copy of the older stable GRAMPS 2.2 ./gramps22:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps22 gramps22</nowiki><br />
</code><br />
<br />
=== Prepare trunk ===<br />
Now go into the <code>trunk</code> directory and type<br />
python setup.py build<br />
<br />
{{man warn|1=Warning|2=Do not install the development version if you don't know how to version python modules. That is, do '''not''' type {{man label|sudo python setup.py install}}. }}<br />
<br />
=== Prepare gramps34 and before===<br />
The old versions of Gramps use autotools, so you need to run<br />
./autogen.sh<br />
make<br />
<br />
==== Building with Fedora 8 - 10 ====<br />
<br />
These are the packages you need:<br />
<br />
<code><br />
yum install intltool gnome-doc-utils gettext subversion rcs<br />
</code><br />
<br />
<br />
==== Windows ====<br />
This step appears unnecessary on windows? See [[Installation#Building_from_source]]<br />
<br />
=== Run the development version ===<br />
As you should not install the development version, how can you try it out? The current Python version required to run Gramps trunk is officially python2.7 as of July 2012. <br />
<br />
{{man note|1=Known Problems|2=Some problems are due to the migration from GTK2 to GTK3: [[GEPS_029:_GTK3-GObject_introspection_Conversion#Problems|list of known problems]]}}<br />
<br />
==== Option 1: run from source repo ====<br />
Here, we use the code in <code>trunk</code> directory to run Gramps. This means that compiled python files will be stored there. This is not ideal, but the easiest way to develop Gramps, as changes are immediately picked up by the code.<br />
<br />
Copy the const.py file created in build to your source directory if you want to use your source directory to work with Gramps:<br />
cp build/lib.linux-$(uname -m)-2.7/gramps/gen/const.py gramps/gen/const.py<br />
python Gramps.py<br />
<br />
''Note'': the <code>lib.linux-$(uname -m)-2.7</code> folder name vary depending on your system (i686 or x86_64).<br />
<br />
That is it. If you installed some dependencies of Gramps in non-default positions, you need to indicate with PYTHONPATH where they can be found, and with LD_LIBRARY_PATH where link libraries can be found. Eg, if you install GTK and spell checking from source too, you will need something like:<br />
PYTHONPATH=/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python Gramps.py<br />
<br />
==== Option 2: use the build code ====<br />
Here, we use the code build in <code>trunk/build</code> directory to run Gramps. For compiled programs this is the only way, but for Gramps nothing is compiled. It is not bad however to keep your code separated from your execution, as deleting the build directory is easy. After a code change in your source, you then need to run however <code>python setup.py</code> again to update the build direcotry. To run Gramps from build, do<br />
cd trunk/build/lib.linux-x86_64-2.7/<br />
python -c 'from gramps.grampsapp import main; main()'<br />
<br />
Again, it might be needed to set with PYTHONPATH where dependencies can be found, and with LD_LIBRARY_PATH link libraries, see option 1.<br />
<br />
If you point your PYTHONPATH to the build directory, you can actually run Gramps from a random directory. Like this:<br />
<br />
cd<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/ python -c 'from gramps.grampsapp import main; main()'<br />
<br />
So, more general:<br />
cd<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python -c 'from gramps.grampsapp import main; main()'<br />
<br />
If the build directory is in your PYTHONPATH, you can also just execute the grampsapp.py module. So this will work too:<br />
cd ~/gramps-trunk/build/lib.linux-x86_64-2.7/gramps<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/ python grampsapp.py<br />
<br />
or again more generally <br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python grampsapp.py<br />
<br />
'''Note''': at the time of writing, only the last, so using grampsapp.py works, as not all imports in Gramps have been converted to relative or absolute imports. This conversion will be finished by end of 2012 however.<br />
<br />
<br />
{{man warn|1=warning|2=Do not open your existing databases with trunk, it might destroy your data, and will make it impossible to use the data in the stable version {{stable_branch}}. To try it out, export your database to a gramps xml file, eg <code>test_trunk.gramps</code>, create a new family tree in trunk, and import this xml file.}}<br />
<br />
=== Where for bugs? ===<br />
The [http://bugs.gramps-project.org bug tracker] has in the right top angle different projects. Choose project ''trunk'' and submit an issue.<br />
<br />
=== Making a patchfile ===<br />
If you do not have write access to the repository, you can make a patchfile with your changes. This is a text file which can then be sent by email to somebody, or posted/uploaded to the bug tracker (against a bug you are fixing or a feature request which you are solving for instance), etc.<br />
<br />
These instructions assume SVN is installed on your system (Debian/Ubuntu: <code>apt-get install subversion</code>; Fedora: <code>yum install subversion</code>).<br />
<br />
These instructions tell how to make a patchfile against trunk, so that your changes are added to the next major release of Gramps. (To make a patchfile against a branch the process is similar, with some slight changes.)<br />
<br />
So first checkout a copy of the trunk to ./trunk:<br />
<br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/trunk trunk</nowiki><br />
<br />
Then use your favorite editor to change whatever file(s) you want.<br />
<br />
To then use SVN to make a patchfile, first go to the top of your changed tree<br />
<br />
cd /path-to-your-gramps/trunk<br />
<br />
and then tell SVN to record/document/itemize the changes to your edited file(s)<br />
<br />
svn diff > ~/some-descriptive-name.patch<br />
<br />
with the resulting file being the patchfile you just made.<br />
<br />
If you want to add a new text file, such as a new python module,<br />
you can include that in your patchfile by first doing, e.g.,<br />
<br />
svn add dir1/dir2/newfile.py<br />
<br />
before you do the "svn diff" as described above. (This method<br />
does not work for non-text files such as image files; be warned.)<br />
<br />
Note also that if you add a file in this manner, depending<br />
on what was added and where it was added, you may also have<br />
to modify the corresponding Makefile.am file.<br />
<br />
I do not know how to make a patchfile which documents<br />
a deleted file which "patch" will then correctly delete.<br />
(If you know how, please add it here.) When SVN version 1.7<br />
is released (scheduled for 1Q2011 as I write this), then there<br />
will be a "svn patch" command which should do that.<br />
<br />
== Working with development branches ==<br />
<br />
<br />
If you are using a ''geps'' or ''sandbox'' branch you need to take care when merging changes from the ''trunk'' and back to the ''trunk''. Please take a few minutes to read the [http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html| Basic Merging] section of the Subversion book. <br />
<br />
'''IMPORTANT:''' please use an svn client that is version 1.5 or newer. The merge tracking functionality only became available in 1.5. If you use an earlier client you will have to deal with all the revision tracking of merges by hand - not fun.<br />
<br />
'''IMPORTANT:''' if you see a message that talks about ''from foreign repository'' it is probably because your working copy was checked out from an http:// url but you are merging from a https:// url or visa versa. Just be consistent about why you use. Don't merge ''from foreign repository'' because svn will not be able to manage the revisions correctly.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''trunk'':<br />
<br />
svn copy <nowiki>https://svn.code.sf.net/p/gramps/code/trunk https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
=== Merging ''trunk'' changes into the branch ===<br />
<br />
You should do this regularly so that you don't have a nasty job of resolving loads of conflicts when you come to merge your changes back into the ''trunk'':<br />
<br />
cd gep-014-fab-feature<br />
svn merge <nowiki>https://svn.code.sf.net/p/gramps/code/trunk</nowiki><br />
<br />
'''NOTE''' you will see some modification to files that you are not expecting. If you look at these you will find that they are modifications to svn properties. These are used by the merging tool to keep track of what changes have already been applied.<br />
<br />
=== Merging changes from the ''branch'' back into the ''trunk'' ===<br />
<br />
When you are ready to merge your changes back into the ''trunk'':<br />
<br />
First make sure you have all the ''trunk'' changes in your branch:<br />
<br />
cd gep-014-fab-feature<br />
svn merge <nowiki>https://svn.code.sf.net/p/gramps/code/trunk</nowiki><br />
svn commit -m "meaningful message"<br />
<br />
Then move over to a working copy of the ''trunk'' and merge in your branch:<br />
<br />
cd trunk<br />
svn merge --reintegrate <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
Now build it, test it, convince yourself that it all works and then commit the changes:<br />
<br />
svn commit -m "All the changes for GEP-014"<br />
<br />
Now you '''must''' delete your branch. You can recreate it later if you need to but svn can not cope with doing another merge --reintegrate from the same branch:<br />
<br />
svn remove <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged<br />
into the trunk or have been abandoned. To remove a branch:<br />
<br />
svn remove <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
The developers reserve the right to remove branches that have been<br />
dormant for more than 1 year.<br />
<br />
<br />
== Useful things to know ==<br />
=== Subversion commands ===<br />
svn help add<br />
<br />
svn help commit<br />
<br />
svn help log<br />
<br />
Adding files to repositories requires you to set some properties to the files and to have a [http://apps.sourceforge.net/trac/sitedocs/wiki/Subversion sourceforge account]. See <code>svn help propset</code>. You can use the <code>propget</code> on existing files to see how you should add it. A convenient way is to common files to your <code>~/.subversion/config</code> file, eg in my config I have:<br />
<br />
[miscellany]<br />
enable-auto-props = yes<br />
<br />
[auto-props]<br />
*.py = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision<br />
*.po = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision<br />
*.sh = svn:eol-style=native;svn:executable<br />
Makefile = svn:eol-style=native<br />
*.png = svn:mime-type=application/octet-stream<br />
*.svg = svn:eol-style=native;svn:mime-type=text/plain<br />
<br />
=== Ignore files ===<br />
You should on creation of new directories set the svn:ignore property:<br />
<br />
svn propedit svn:ignore src/new_dir/<br />
<br />
and there set at least:<br />
*.pyc<br />
*.pyo<br />
Makefile<br />
Makefile.in<br />
<br />
=== svn2cl ===<br />
The GRAMPS project does not keep a ChangeLog file under source control. All change history is captured by Subversion automatically when it is committed. A ChangeLog file is generated from the SVN commit logs before each release using [[How to use svn2cl|svn2cl]]. Developers should take care to make useful commit log messages when committing changes to Subversion. Here are some guidelines:<br />
<br />
*Try to make a descriptive message about the change.<br />
*Use complete sentences when possible.<br />
*When committing a change that fixes a bug on the tracker, use the bug's number and summary as the message.<br />
*When committing a patch from a contributor, put the contributor's name and e-mail address in the commit message.<br />
*It is not necessary to put the names of the files you have modified in the commit message because Subversion stores that automatically.<br />
<br />
=== Other usage tips ===<br />
<br />
* Additional tips and recommendations related to committing changes: [[SVN Commit Tips]]<br />
* GRAMPS [[Committing policies]]<br />
<br />
=== Browse svn ===<br />
<br />
An alternative to the command line tools to view the svn repository is<br />
the [http://gramps.svn.sourceforge.net/viewvc/gramps/ online interface].<br />
<br />
=== Download Tarball ===<br />
<br />
You can also download a tarball for past and present sources.<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps32/src/?view=tar 3.2.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps33/src/?view=tar 3.3.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps34/src/?view=tar 3.4.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/?view=tar Trunk]<br />
<br />
[[Category:Developers/General|B]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion&diff=40133GEPS 029: GTK3-GObject introspection Conversion2012-10-28T08:58:55Z<p>MathieuMD: /* Open */ Added error message</p>
<hr />
<div>Gramps was written with GTK 2 toolkit. This has been replaced upstream with GTK 3, so Gramps should convert to GTK 3.<br />
<br />
== Guideline ==<br />
We try to convert 1 to 1. If there are problems due to deprecated features, or otherwise, add in the code:<br />
<br />
# TODO GTK3: write what problem is due to gtk 3 conversion<br />
<br />
Before release, all TODO GTK3 in the code must be cleaned up<br />
<br />
== Documentation ==<br />
Python GTK3 docs: [http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html]<br />
<br />
Alternative is to look at the base C documentation, and understand from experience how the introspection works. Gnome docs: [http://developer.gnome.org/gtk3/index.html].<br />
<br />
As python works with classes, it looks somewhat like the C++ interface: [http://developer.gnome.org/gtkmm/stable/]. To investigate the specific override (how to init Gtk classes):<br />
* python overrides: [http://git.gnome.org/browse/pygobject/tree/gi/overrides]<br />
<br />
Furthermore, for the other gi libs:<br />
* [http://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html PangoCairo]<br />
* [http://developer.gnome.org/pango/stable/pango.html Pango]<br />
* [http://developer.gnome.org/ http://developer.gnome.org/]<br />
<br />
== Installation ==<br />
=== Ubuntu 12.04 ===<br />
For people on Ubuntu 12.04, you need:<br />
<br />
1. add the gnome_shell repo to have the latest version of glib and friends, see how to add the ppa on:<br />
[http://www.ubuntuupdates.org/ppa/gnome_shell?dist=precise gnome_shell pppa]<br />
Then upgrade your system via the system manager. <br />
<br />
Note 1 : If you use Gnome3, also add the gnome3 ppa!<br />
<br />
Note 2: this can make gnome shell unstable if the ppa is too bleeding edge!!<br />
<br />
2. install version 3.3.2 of pygobject. No ppa for this, I use the git repo on gnome.org, so my git config:<br />
[remote "origin"]<br />
fetch = +refs/heads/*:refs/remotes/origin/*<br />
url = http://git.gnome.org/browse/pygobject<br />
<br />
So to install it to folder pygobject, do <br />
<br />
git clone git://git.gnome.org/pygobject pygobject<br />
<br />
Then checkout tag 3.3.2, so<br />
<br />
cd pygobject<br />
git checkout 3.3.2<br />
<br />
Make sure you have the dependencies installed, you will need:<br />
:# libglib2.0-dev package (otherwise you will obtain an error like ''undefined mqcro: AM_PATH_GLIB_2_0''. <br />
:# autoconf, automake, libtool, intltool package<br />
:# python-dev package<br />
:# libcairo2-dev, python-cairo-dev<br />
:# python-gobject-dev<br />
:# libgirepository1.0-dev<br />
So, use the line:<br />
<br />
sudo apt-get install autoconf automake libtool python-dev libglib2.0-dev libcairo2-dev python-cairo-dev python-gobject-dev libgirepository1.0-dev<br />
<br />
Then compile pygobject:<br />
<br />
./autogen.sh<br />
make<br />
sudo make install<br />
<br />
Now this installs to /usr/local, so to run the test with that, on ubuntu in your terminal:<br />
<br />
PYTHONPATH=/usr/local/lib/python2.7/site-packages/ python gramps.py<br />
<br />
If you then get:<br />
<br />
<pre><br />
$ PYTHONPATH=/usr/local/lib/python2.7/site-packages/ python src/gramps.py<br />
Gtk typelib not installed. Install Gnome Introspection, and pygobject version 3.3.2 or later.<br />
<br />
Gramps will terminate now.<br />
</pre><br />
<br />
You may need to:<br />
<br />
export LD_LIBRARY_PATH=/usr/local/lib<br />
<br />
Also, I had to get rid of the older gobject:<br />
<br />
sudo rm -rf /usr/lib/python2.7/dist-packages/gobject<br />
<br />
=== Debian Testing ===<br />
As of 25 July 2012, the Debian repositories does not contain sufficiently up-to-date python GObject introspection packages and so need to be installed from the experimental repository, which currently contains version 3.3.4. Perhaps the simplest way to install is just to download the latest packages from the Debian packages web site. The files required can be found for different architectures at:<br />
<br />
* [http://packages.debian.org/experimental/python-gi python-gi]<br />
* [http://packages.debian.org/experimental/python-gi-cairo python-gi-cairo]<br />
<br />
Install the package files with dpkg. eg<br />
<br />
dpkg -i python-gi_3.3.4-1_i386.deb<br />
<br />
A GTK3 theme engine is required to make Gramps look visually more appealing. Try gtk3-engines-oxygen.<br />
<br />
=== GTK 3 theme ===<br />
If Gramps looks ugly in GTK 3, you probably are not using a GTK 3 theme. In that case, GTK falls back to the Raleigh theme. <br />
<br />
[[Image:gramps-gtk3-raleigh.png|center|550px|Gramps in GTK3 Adwaita theme]]<br />
<br />
The solution is to install a theme that comes with a GTK 3 theme. For example the Adwaita theme:<br />
<br />
[[Image:gramps-gtk3.png|center|550px|Gramps in GTK3 Adwaita theme]]<br />
<br />
For a good dark theme, consider elementary-dark-theme, installable from [http://www.noobslab.com/2012/06/install-elementary-dark-gtk3-theme-on.html]<br />
<br />
[[Image:gramps-gtk3-elementarydark.png|center|550px|Gramps in GTK3 elementary dark theme]]<br />
<br />
==== KDE ====<br />
To set the theme, open gramps, and open '''System settings -> Application Appearance -> GTK+ Appearance''', and select different theme, click on apply. If you see Gramps update completely, you have selected a theme with GTK 3 support. If the theme falls back to something consisting of Raleigh theme components, the theme does not have good GTK 3 support. Even if Gramps updates, not all elements visible will update. Restart Gramps to be sure the theme works as intended. You can install gtk-theme-switch to test themes.<br />
<br />
=== Spell Check Install ===<br />
For working spell check, we need a patched gtkspell version that supports gobject introspection. A working version is the '''changes''' branch at [https://github.com/manisandro/gtkspell3/tree/changes https://github.com/manisandro/gtkspell3/tree/changes]. So one needs to install this version of gtkspell. The python-gtkspell code is then no longer needed, and can be removed. Source of this code is a sourceforge bug entry [https://sourceforge.net/tracker/index.php?func=detail&aid=3298132&group_id=7896&atid=107896] and a redhat bug entry: [https://bugzilla.redhat.com/show_bug.cgi?id=675504]<br />
<br />
Gramps supports this version since revision 20130: [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/gui/spell.py?r1=20057&r2=20130]<br />
<br />
==== Installation of spell check in Ubuntu 12.04 ====<br />
First we install the git package to obtain the code: <br />
sudo apt-get install git<br />
Obtain the source code, and change to the version with gtk3 and gobject introspection support:<br />
git clone git://github.com/manisandro/gtkspell3.git<br />
cd gtkspell3/<br />
git checkout -b changes origin/changes<br />
Now obtain the packages needed to compile this code. In my case I had most code (see above installation introspection for other packages that might be needed). I still needed to install the following:<br />
sudo apt-get install gtk-doc-tools libenchant-dev<br />
You may also need gtk3 devel packages:<br />
sudo apt-get install gtk+-3.0-dev<br />
Now compile and install the code<br />
./autogen.sh<br />
make<br />
sudo make install<br />
Gramps now needs to find the gtkspell typelib and introspection lib. The first I achieve by copying the typelib to the correct location:<br />
sudo cp /usr/local/lib/girepository-1.0/GtkSpell-3.0.typelib /usr/lib/girepository-1.0/<br />
The lib can be found by path by setting the LD_LIBRARY_PATH environment variable. Hence, start Gramps as follows:<br />
LD_LIBRARY_PATH=/usr/local/lib python src/gramps.py<br />
If you followed the guide above and compiled your own pygobject module, you need to start Gramps with the command<br />
PYTHONPATH=/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python src/gramps.py<br />
<br />
=== WebKit for Htmlrenderer ===<br />
The htmlview requires WebKit. Introspection bindings for this is available, in Ubuntu package gir1.2-webkit-3.0<br />
<br />
Developerwize, we need to replace size-request signal, see [http://developer.gnome.org/gtk3/3.0/ch25s02.html]<br />
<br />
=== OsmGpsMap for Geography ===<br />
The Geography requires osmgpsmap. Introspection bindings for this is not currently available, so you need to compile it.<br />
As it doesn't work correctly for the moment and some patches are not in git, I forked osmgpsmap.<br />
<br />
git clone git://github.com/SNoiraud/osm-gps-map.git<br />
cd osm-gps-map<br />
# switch to branch gtk3<br />
git checkout -b gtk3 origin/gtk3<br />
git branch -a<br />
<br />
As I'm currently modifying osm-gps-map, If you already have osm-gps-map and you want to get the last version, do :<br />
<br />
git pull<br />
<br />
You might have all your dependencies as you already compiled pygobject. For Ubuntu you still need packages libsoup2.4-dev and libsoup2.4<br />
<br />
You may also need gtk3 devel packages:<br />
sudo apt-get install gtk+-3.0-dev<br />
<br />
Now compile osmgpsmap:<br />
<br />
./autogen.sh<br />
make<br />
sudo make install<br />
sudo cp /usr/local/lib/girepository-1.0/OsmGpsMap-0.8.typelib /usr/lib/girepository-1.0/<br />
<br />
To use this now, you have to, or remove the installed version of osmgpsmap on your computer, or set the LD_LIBRARY_PATH to point at the installed version. Eg, I start Gramps in trunk with:<br />
<br />
LD_LIBRARY_PATH=/usr/local/lib PYTHONPATH=/usr/local/lib/python2.7/site-packages/ python src/gramps.py<br />
<br />
First sets library to ''/usr/local/lib'' so as to find osmgpsmap and gtkspell, second ''/usr/local/lib/python2.7/site-packages/'' to find the local install of pygobject<br />
<br />
== Problems ==<br />
<br />
If anyone files a bug against PyGobject, Gtk or any of the Gtk dependencies (except Cairo, which isn't part of Gnome), please add John (the address bugzilla has is jralls@ceridwen.fremont.ca.us) to the CC list at the bottom of the bug report page or post the bug URI to the gramps-devel list.<br />
<br />
=== Open ===<br />
* We cannot set strings in struct, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=678401] It seems we can do without this, so not an issue at the moment<br />
* osmgpsmap is GTK2. There is a GTK3 branch in git, we should try it, and contribute to the conversion. '''In Progress''': Geography really minimalist : no menu, no markers, ...<br />
* pyexiv2 module causes a segmentation fault when exiting Gramps - see bug [http://www.gramps-project.org/bugs/view.php?id=6042 #6042]<br />
* python-gnome2 package causes a segmentation fault when Gramps starts - see bug [http://www.gramps-project.org/bugs/view.php?id=5972 #5972]<br />
<pre> TypeError: Error when calling the metaclass bases<br />
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases</pre><br />
* Geography : missing tiles : osm-gps-map problem.<br />
* Geography : for all other problems, use last version with git pull. Be careful, osm-gps-map is now 0.8. You must remove all 1.0 versions (OsmGpsMap*.gir and OsmGpsMap*.typelib)<br />
* No rows_reordered function on treemodels in python, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=684558]. Current fix: disconnect and reconnect the model so sort need not emit rows-reordered signal. However, this means the history of expand collapse of nodes in a treeview is lost after rows have been reordered (this happens in gramps on click on the column that is already sorted.<br />
* Geography : We cannot mix osmgpsmap between trunk and gramps34 and others.<br />
<br />
===Solved or workaround===<br />
* there are some drag and drop issues: [https://bugzilla.gnome.org/show_bug.cgi?id=680638], [https://bugzilla.gnome.org/show_bug.cgi?id=680640]. '''Solved:''' Use set_target_list functions for drag and drop with a created TargetList.<br />
* error in list_families on textview in styledtexteditor: [https://bugzilla.gnome.org/show_bug.cgi?id=679654]. '''Workaround''': we use a global function that calls this once as workaround. There is a fix upstream.<br />
* str and unicode no longer seem to work, the encoding must be passed too; '''Future: deprecate unicode() in the code, as we want to support python 3''' - '''SOLVED FOR NOW'': added reload(sys) in gramps.py and set encoding to utf-8. Is there a better way that is userfriendly?<br />
* there is no longer automatic conversion to str utf-8 when using GTK functions, we must convert before passing to GTK.<br />
* glade can no longer work with our catalog. We need to upgrade comboboxentry to combobox with has_entry manually, and hope editors keep working... - '''Solved:''' Although our catalog cannot be opened, we can use glade with undefined elements without issues.<br />
* menu.popup does not seem to work in some instances. '''Solved:''' Make sure the reference to menu survives, so eg, do self.menu= function, then self.menu.popup. Alternatively, passing position function seems to also work as workaround, see grampsbar.py for example<br />
* Many Gtk elements no longer grab certain events. '''Solved:''' Add a Gtk.EventBox under them to grab the event.<br />
* Geography : bad placement of markers : osm-gps-map problem. '''Solved''' : git pull the latest version. Need to be acknowledge by osm-gps-map team.<br />
* Geography : We cannot mix osmgpsmap between trunk and gramps34 and others. '''Solved''' : git pull the latest version. You must remove all libosmgps* from /usr/local/lib before make install<br />
<br />
== Related Gramps Bugs ==<br />
* #{{bug|5009}}: Use gobject introspection for GTK 3 dependency<br />
<br />
== How to investigate a hard crash?==<br />
With GTK 3, hard crashes are a lot more likely than before. Very troubling for a python developer, as you do not know where the crash happens. So, to investigate these, do the following.<br />
<br />
First install python with debug symbols, in Ubuntu:<br />
<br />
sudo apt-get install python-dbg<br />
<br />
Now, you can start python with gdb<br />
<br />
$ > gdb python<br />
(gdb) set env GRAMPSCODE /path/to/code/gramps/src<br />
(gdb) set env PYTHONPATH $PYTHONPATH:$GRAMPSHOME:/usr/local/lib/python2.7/site-packages/<br />
(gdb) r $GRAMPSCODE/gramps.py<br />
...after the crash...<br />
(gdb) bt<br />
<br />
This works best if you have the debug symbols installed for everything relevant, or are running from a self-built tree. <br />
<br />
[[Category:GEPS|G]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Brief_introduction_to_SVN&diff=40132Brief introduction to SVN2012-10-28T08:55:46Z<p>MathieuMD: /* Run the development version */ Added a link to known problems</p>
<hr />
<div>The development source code of GRAMPS is stored in the SVN repository at sourceforge [http://gramps.svn.sourceforge.net/viewsvn/gramps]. This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably<br />
want to do one of two things<br />
with SVN: either download the latest source or the development version,<br />
or else upload your changes (if you have write access to the repository)<br />
or make a patchfile (if you don't have write access).<br />
<br />
== Types of branches ==<br />
There are four kinds of branches in the Subversion Repository: <br />
<br />
* ''trunk'' - There is only one trunk. All new feature development happens in the trunk. New releases never come from the trunk. The trunk for GRAMPS can be found here: http://svn.code.sf.net/p/gramps/code/trunk<br />
<br />
* ''maintenance'' - There are many maintenance branches. A maintenance branch is created from the trunk when all the features for a release are complete. New features are not committed to maintenance branch. Releases only come from maintenance branches. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in trunk. Maintenance branches can be found here: http://svn.code.sf.net/p/gramps/code/branches/maintenance<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''trunk''. Occassionally a GEP will require extensive reworking or long periods when the code base is ususable. In these cases a branch in ''geps'' can be used as a temporary development area. Once the hard work is done the change should be merged into the trunk and the ''geps'' branch should be removed. ''greps'' branches should follow the naming convention ''gep-<###>-<descriptive text>'' e.g. ''gep-013-server''. Please read the [[#Working with development branches]] section for help with managing these branches.<br />
<br />
* ''sandbox'' - These are meant for experimentation purposes. If you want to explore some ideas or try out some changes that would break the ''trunk'' or prototype something that has not made it to a GEP you can create a ''sandbox'' branch. These should be short lived. As soon as you have finished please remove the branch. We reserve the right to remove any ''sandbox'' branch that has not been touched for 12 months. ''sandbox'' branches should use the following naming convention ''<username>-<descriptive text>'' e.g. ''hippy-prototype-rss-idea''. Please read the [[#Working with development branches]] section for help with managing these branches.<br />
<br />
Release tags are created in the ''tags'' directory. The first two digits of the GRAMPS version number are reserved to indicate the maintenance branch the code came from. The last digit indicates the revision from that maintenance branch. For example, 3.0.4 would indicate the 5th release from the 3.0 branch (3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4).<br />
<br />
Here is a hypothetical example:<br />
Imagine that the current version of GRAMPS is 8.3.2. A new series of features has been added in trunk and are ready for release. A new maintenance branch is created from trunk named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in trunk that will not be included in the 8.4 series of releases, but will be included in the 8.5 series. Bug fixes continue to occur in the 8.4 branch until the code is deemed worthy of release. At that time, a release is tagged from the 8.4 maintenance branch and named 8.4.0. Some time after the release of 8.4.0, some bugs are found and fixed in the 8.4 maintenance branch. Those bug fixes are released as 8.4.1.<br />
<br />
== Stable version ==<br />
* To download the source to a ~/gramps{{stable_branch}} directory, you can use two methods to access the SVN repository:<br />
# An http frontend to gramps SVN<br />
# SVN access <br />
* To upload your changes, you have to have developer access. <br />
<br />
The second method requires that svn be installed on your system (Debian/Ubuntu: <code>apt-get install subversion</code>; Fedora: <code>yum install subversion</code>).<br />
With the SVN method, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
svn co <nowiki>http://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps</nowiki>{{stable_branch}} gramps{{stable_branch}}</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a sourceforge account, use https instead:<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps</nowiki>{{stable_branch}} gramps{{stable_branch}}</code><br />
You will in this case be requested for your root keyring password which will store your sourceforge credentials, and next your password. If the user on your PC is not the same one as on sourceforge, leave password empty and press enter, you will then receive the option to enter a username first, and then the sourceforge password for that username.<br />
<br />
If you would like to update your source tree after some time, execute the following command in the top directory of the gramps{{stable_branch}} source tree:<br />
<br />
<code><br />
svn update<br />
</code><br />
<br />
To commit your changes, you need to have checked out the gramps code with https, and have commit access to the Gramps repository (the Gramps admin can give you this, [[Contact|Brian Matherly or Benny Malengier]]). Commit happens if execute:<br />
<br />
<code><br />
svn commit -m "message describing the nature of the change"<br />
</code><br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the SVN repository. In this case, create a patch, and commit this on the [http://bugs.gramps-project.org ticket tracker]. You can do this in the top gramps directory as follows:<br />
<br />
<code><br />
svn diff > mychanges.patch<br />
</code><br />
<br />
A developer can apply this patch then with the command:<br />
<br />
<br />
<code><br />
patch -p0 < mychanges.patch<br />
</code><br />
<br />
== Unstable development: "trunk" ==<br />
<br />
:Also see: [[Getting started with GRAMPS Trunk]].<br />
<br />
=== Obtain it===<br />
There are several versions of the gramps code in SVN. <br />
The development branch for small changes and bug fixes is ''gramps{{stable_branch}}'' and ''trunk'' has been created for the ongoing unstable version. <br />
If this talk of ''branch'' and ''trunk'' sounds confusing you might like to read the list message [http://article.gmane.org/gmane.comp.genealogy.gramps.devel/8678 explaining branch and trunk].<br />
<br />
'''Replace in the commands here ''https'' by ''http'' if you do not have a sourceforge account.<br />
<br />
To checkout a copy of the possibly unstable trunk to ./trunk:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/trunk trunk</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.4 ./gramps34:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps34 gramps34</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.3 ./gramps33:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps33 gramps33</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.2 ./gramps32:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps32 gramps32</nowiki><br />
</code><br />
<br />
To checkout a copy of the last branch GRAMPS 3.1 ./gramps31:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps31 gramps31</nowiki><br />
</code><br />
<br />
To checkout a copy of the older stable GRAMPS 3.0 ./gramps30:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps30 gramps30</nowiki><br />
</code><br />
<br />
To checkout a copy of the older stable GRAMPS 2.2 ./gramps22:<br />
<code><br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps22 gramps22</nowiki><br />
</code><br />
<br />
=== Prepare trunk ===<br />
Now go into the <code>trunk</code> directory and type<br />
python setup.py build<br />
<br />
{{man warn|1=Warning|2=Do not install the development version if you don't know how to version python modules. That is, do '''not''' type {{man label|sudo python setup.py install}}. }}<br />
<br />
=== Prepare gramps34 and before===<br />
The old versions of Gramps use autotools, so you need to run<br />
./autogen.sh<br />
make<br />
<br />
==== Building with Fedora 8 - 10 ====<br />
<br />
These are the packages you need:<br />
<br />
<code><br />
yum install intltool gnome-doc-utils gettext subversion rcs<br />
</code><br />
<br />
<br />
==== Windows ====<br />
This step appears unnecessary on windows? See [[Installation#Building_from_source]]<br />
<br />
=== Run the development version ===<br />
As you should not install the development version, how can you try it out? The current Python version required to run Gramps trunk is officially python2.7 as of July 2012. <br />
<br />
{{man note|1=Known Problems|2=Some problems are due to the migration from GTK2 to GTK3: [[GEPS_029:_GTK3-GObject_introspection_Conversion#Problems|list of known problems]]}}<br />
<br />
==== Option 1: run from source repo ====<br />
Here, we use the code in <code>trunk</code> directory to run Gramps. This means that compiled python files will be stored there. This is not ideal, but the easiest way to develop Gramps, as changes are immediately picked up by the code.<br />
<br />
Copy the const.py file created in build to your source directory if you want to use your source directory to work with Gramps:<br />
cp build/lib.linux-x86_64-2.7/gramps/gen/const.py gramps/gen/const.py<br />
# note the lib.linux path may vary depending on your system e.g. it could be lib.linux-i686-2.7<br />
python Gramps.py<br />
<br />
That is it. If you installed some dependencies of Gramps in non-default positions, you need to indicate with PYTHONPATH where then can be found, and with LD_LIBRARY_PATH where link libraries can be found. Eg, if you install GTK and spell checking from source too, you will need something like:<br />
PYTHONPATH=/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python Gramps.py<br />
<br />
==== Option 2: use the build code ====<br />
Here, we use the code build in <code>trunk/build</code> directory to run Gramps. For compiled programs this is the only way, but for Gramps nothing is compiled. It is not bad however to keep your code separated from your execution, as deleting the build directory is easy. After a code change in your source, you then need to run however <code>python setup.py</code> again to update the build direcotry. To run Gramps from build, do<br />
cd trunk/build/lib.linux-x86_64-2.7/<br />
python -c 'from gramps.grampsapp import main; main()'<br />
<br />
Again, it might be needed to set with PYTHONPATH where dependencies can be found, and with LD_LIBRARY_PATH link libraries, see option 1.<br />
<br />
If you point your PYTHONPATH to the build directory, you can actually run Gramps from a random directory. Like this:<br />
<br />
cd<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/ python -c 'from gramps.grampsapp import main; main()'<br />
<br />
So, more general:<br />
cd<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python -c 'from gramps.grampsapp import main; main()'<br />
<br />
If the build directory is in your PYTHONPATH, you can also just execute the grampsapp.py module. So this will work too:<br />
cd ~/gramps-trunk/build/lib.linux-x86_64-2.7/gramps<br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/ python grampsapp.py<br />
<br />
or again more generally <br />
PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python grampsapp.py<br />
<br />
'''Note''': at the time of writing, only the last, so using grampsapp.py works, as not all imports in Gramps have been converted to relative or absolute imports. This conversion will be finished by end of 2012 however.<br />
<br />
<br />
{{man warn|1=warning|2=Do not open your existing databases with trunk, it might destroy your data, and will make it impossible to use the data in the stable version {{stable_branch}}. To try it out, export your database to a gramps xml file, eg <code>test_trunk.gramps</code>, create a new family tree in trunk, and import this xml file.}}<br />
<br />
=== Where for bugs? ===<br />
The [http://bugs.gramps-project.org bug tracker] has in the right top angle different projects. Choose project ''trunk'' and submit an issue.<br />
<br />
=== Making a patchfile ===<br />
If you do not have write access to the repository, you can make a patchfile with your changes. This is a text file which can then be sent by email to somebody, or posted/uploaded to the bug tracker (against a bug you are fixing or a feature request which you are solving for instance), etc.<br />
<br />
These instructions assume SVN is installed on your system (Debian/Ubuntu: <code>apt-get install subversion</code>; Fedora: <code>yum install subversion</code>).<br />
<br />
These instructions tell how to make a patchfile against trunk, so that your changes are added to the next major release of Gramps. (To make a patchfile against a branch the process is similar, with some slight changes.)<br />
<br />
So first checkout a copy of the trunk to ./trunk:<br />
<br />
svn co <nowiki>https://svn.code.sf.net/p/gramps/code/trunk trunk</nowiki><br />
<br />
Then use your favorite editor to change whatever file(s) you want.<br />
<br />
To then use SVN to make a patchfile, first go to the top of your changed tree<br />
<br />
cd /path-to-your-gramps/trunk<br />
<br />
and then tell SVN to record/document/itemize the changes to your edited file(s)<br />
<br />
svn diff > ~/some-descriptive-name.patch<br />
<br />
with the resulting file being the patchfile you just made.<br />
<br />
If you want to add a new text file, such as a new python module,<br />
you can include that in your patchfile by first doing, e.g.,<br />
<br />
svn add dir1/dir2/newfile.py<br />
<br />
before you do the "svn diff" as described above. (This method<br />
does not work for non-text files such as image files; be warned.)<br />
<br />
Note also that if you add a file in this manner, depending<br />
on what was added and where it was added, you may also have<br />
to modify the corresponding Makefile.am file.<br />
<br />
I do not know how to make a patchfile which documents<br />
a deleted file which "patch" will then correctly delete.<br />
(If you know how, please add it here.) When SVN version 1.7<br />
is released (scheduled for 1Q2011 as I write this), then there<br />
will be a "svn patch" command which should do that.<br />
<br />
== Working with development branches ==<br />
<br />
<br />
If you are using a ''geps'' or ''sandbox'' branch you need to take care when merging changes from the ''trunk'' and back to the ''trunk''. Please take a few minutes to read the [http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html| Basic Merging] section of the Subversion book. <br />
<br />
'''IMPORTANT:''' please use an svn client that is version 1.5 or newer. The merge tracking functionality only became available in 1.5. If you use an earlier client you will have to deal with all the revision tracking of merges by hand - not fun.<br />
<br />
'''IMPORTANT:''' if you see a message that talks about ''from foreign repository'' it is probably because your working copy was checked out from an http:// url but you are merging from a https:// url or visa versa. Just be consistent about why you use. Don't merge ''from foreign repository'' because svn will not be able to manage the revisions correctly.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''trunk'':<br />
<br />
svn copy <nowiki>https://svn.code.sf.net/p/gramps/code/trunk https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
=== Merging ''trunk'' changes into the branch ===<br />
<br />
You should do this regularly so that you don't have a nasty job of resolving loads of conflicts when you come to merge your changes back into the ''trunk'':<br />
<br />
cd gep-014-fab-feature<br />
svn merge <nowiki>https://svn.code.sf.net/p/gramps/code/trunk</nowiki><br />
<br />
'''NOTE''' you will see some modification to files that you are not expecting. If you look at these you will find that they are modifications to svn properties. These are used by the merging tool to keep track of what changes have already been applied.<br />
<br />
=== Merging changes from the ''branch'' back into the ''trunk'' ===<br />
<br />
When you are ready to merge your changes back into the ''trunk'':<br />
<br />
First make sure you have all the ''trunk'' changes in your branch:<br />
<br />
cd gep-014-fab-feature<br />
svn merge <nowiki>https://svn.code.sf.net/p/gramps/code/trunk</nowiki><br />
svn commit -m "meaningful message"<br />
<br />
Then move over to a working copy of the ''trunk'' and merge in your branch:<br />
<br />
cd trunk<br />
svn merge --reintegrate <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
Now build it, test it, convince yourself that it all works and then commit the changes:<br />
<br />
svn commit -m "All the changes for GEP-014"<br />
<br />
Now you '''must''' delete your branch. You can recreate it later if you need to but svn can not cope with doing another merge --reintegrate from the same branch:<br />
<br />
svn remove <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged<br />
into the trunk or have been abandoned. To remove a branch:<br />
<br />
svn remove <nowiki>https://svn.code.sf.net/p/gramps/code/branches/geps/gep-014-fab-feature</nowiki><br />
<br />
The developers reserve the right to remove branches that have been<br />
dormant for more than 1 year.<br />
<br />
<br />
== Useful things to know ==<br />
=== Subversion commands ===<br />
svn help add<br />
<br />
svn help commit<br />
<br />
svn help log<br />
<br />
Adding files to repositories requires you to set some properties to the files and to have a [http://apps.sourceforge.net/trac/sitedocs/wiki/Subversion sourceforge account]. See <code>svn help propset</code>. You can use the <code>propget</code> on existing files to see how you should add it. A convenient way is to common files to your <code>~/.subversion/config</code> file, eg in my config I have:<br />
<br />
[miscellany]<br />
enable-auto-props = yes<br />
<br />
[auto-props]<br />
*.py = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision<br />
*.po = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision<br />
*.sh = svn:eol-style=native;svn:executable<br />
Makefile = svn:eol-style=native<br />
*.png = svn:mime-type=application/octet-stream<br />
*.svg = svn:eol-style=native;svn:mime-type=text/plain<br />
<br />
=== Ignore files ===<br />
You should on creation of new directories set the svn:ignore property:<br />
<br />
svn propedit svn:ignore src/new_dir/<br />
<br />
and there set at least:<br />
*.pyc<br />
*.pyo<br />
Makefile<br />
Makefile.in<br />
<br />
=== svn2cl ===<br />
The GRAMPS project does not keep a ChangeLog file under source control. All change history is captured by Subversion automatically when it is committed. A ChangeLog file is generated from the SVN commit logs before each release using [[How to use svn2cl|svn2cl]]. Developers should take care to make useful commit log messages when committing changes to Subversion. Here are some guidelines:<br />
<br />
*Try to make a descriptive message about the change.<br />
*Use complete sentences when possible.<br />
*When committing a change that fixes a bug on the tracker, use the bug's number and summary as the message.<br />
*When committing a patch from a contributor, put the contributor's name and e-mail address in the commit message.<br />
*It is not necessary to put the names of the files you have modified in the commit message because Subversion stores that automatically.<br />
<br />
=== Other usage tips ===<br />
<br />
* Additional tips and recommendations related to committing changes: [[SVN Commit Tips]]<br />
* GRAMPS [[Committing policies]]<br />
<br />
=== Browse svn ===<br />
<br />
An alternative to the command line tools to view the svn repository is<br />
the [http://gramps.svn.sourceforge.net/viewvc/gramps/ online interface].<br />
<br />
=== Download Tarball ===<br />
<br />
You can also download a tarball for past and present sources.<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps32/src/?view=tar 3.2.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps33/src/?view=tar 3.3.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/branches/maintenance/gramps34/src/?view=tar 3.4.x]<br />
<br />
* [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/?view=tar Trunk]<br />
<br />
[[Category:Developers/General|B]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=40000Comment produire un graphique relationnel2012-10-19T20:57:56Z<p>MathieuMD: /* Méthode simple */</p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
=== Méthode simple ===<br />
[[Image:familylines_graph-A1.ps.jpg|right|thumb|150px|Graphique au format A1]]<br />
[[Image:familylines_graph-A1_2x4xA4.pdf.jpg|right|thumb|100px|Découpé en 8 pages A4]]<br />
Lancer le « Graphique de lignées familiales » (dans « Rapports > Diagrammes ») et le configurer. Par exemple :<br />
# Options du papier :<br />
#* Taille : A1<br />
#* Orientation : 1. Paysage<br />
#* Marges : toutes à 1 cm<br />
# Individus recherchés :<br />
#* Sélectionner tous les individus devant être utilisés comme base pour tracer l'arbre (permet d'inclure les lignés des parents et grand-parents par exemple)<br />
# Couleur de la famille :<br />
#* Donner une couleur aux noms principaux<br />
# Mise en page GraphViz :<br />
#* Taille de la police : 32<br />
#* Orientation du graphique : Horizontal (←)<br />
#* Nombre de pages horizontales et verticales : 1<br />
# Options GraphViz :<br />
#* Ratio d'aspect : Remplir la zone donnée<br />
#* Résolution : 300<br />
#* Espacement de nœud et rang : 0,50<br />
#* Utiliser les sous-graphiques : Oui<br />
# Format de sortie : PostScript<br />
Enregistrer le fichier familylines_graph.ps et utiliser le logiciel ''poster'' (Ubuntu/Debian : <tt>apt-get install poster</tt>) pour le découper en plusieurs pages :<br />
poster -v -mA4 -pA1 familylines_graph.ps > familylines_graph-A1_A4.ps<br />
Ensuite, avec ''ps2pdf'', convertir ce fichier PostScript en PDF pour une utilisation plus simple :<br />
ps2pdf familylines_graph-A1_A4.ps<br />
Il ne reste plus qu'à imprimer les pages et les assembler. L'auteur de ''Poster'' suggère de découper les marges de gauche et du bas (sauf sur les pages du bord gauche et celles du bas) et de les coller ensemble en commençant par celle en bas à gauche et ensuite de gauche à droite puis de bas en haut. Enfin, pour renforcer le poster, le retourner et mettre du ruban adhésif sur les jointures)<br />
<br />
=== Autre méthode ===<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Sous GNU/Linux, l'outil en ligne de commande ''pdfposter'' peut diviser un grand fichier PDF en plusieurs au format A4/A3/Lettre/etc. Installez-le via le gestionnaire de paquets de votre distribution (Ubuntu/Debian : <tt>sudo apt-get install pdfposter</tt>). Par exemple, pour diviser un poster A0 en pages A4 (lisez la page de manuel : <tt>man pdfposter</tt>) :<br />
pdfposter -mA4 -pA0 posterA0.pdf posterA0_A4.pdf<br />
<br />
=== Autres logiciels ===<br />
* Sous Linux, Windows et Mac, vous pouvez utiliser le programme ''[http://posterazor.sourceforge.net/ PosterRazor]'', qui possède une interface simple à utiliser. Note : ''PosterRazor'' ne peut découper que des images, il faudra donc choisir d'enregistrer le graphique au format PNG dans Gramps.<br />
* Sous Windows, il y a également ''[http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler]'' (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=39999Comment produire un graphique relationnel2012-10-19T20:57:32Z<p>MathieuMD: /* Autre méthode */</p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
=== Méthode simple ===<br />
[[Image:familylines_graph-A1.ps.jpg|right|thumb|150px|Graphique au format A1]]<br />
[[Image:familylines_graph-A1_2x4xA4.pdf.jpg|right|thumb|100px|Découpé en 8 pages A4]]<br />
Lancer le « Graphique de lignées familiales » (dans « Rapports > Diagrammes ») et le configurer. Par exemple :<br />
# Options du papier :<br />
#* Taille : A1<br />
#* Orientation : 1. Paysage<br />
#* Marges : toutes à 1 cm<br />
# Individus recherchés :<br />
#* Sélectionner tous les individus devant être utilisés comme base pour tracer l'arbre (permet d'inclure les lignés des parents et grand-parents par exemple)<br />
# Couleur de la famille :<br />
#* Donner une couleur aux noms principaux<br />
# Mise en page GraphViz :<br />
#* Taille de la police : 32<br />
#* Orientation du graphique : Horizontal (←)<br />
#* Nombre de pages horizontales et verticales : 1<br />
# Options GraphViz :<br />
#* Ratio d'aspect : Remplir la zone donnée<br />
#* Résolution : 300<br />
#* Espacement de nœud et rang : 0,50<br />
#* Utiliser les sous-graphiques : Oui<br />
# Format de sortie : PostScript<br />
Enregistrer le fichier familylines_graph.ps et utiliser le logiciel ''poster'' (Ubuntu/Debian : <tt>apt-get install poster</tt>) pour le découper en plusieurs pages :<br />
poster -v -mA4 -pA1 familylines_graph.ps > familylines_graph-A1_A4.ps<br />
Ensuite, avec ''ps2pdf'', convertir ensuite ce fichier PostScript en PDF pour une utilisation plus simple :<br />
ps2pdf familylines_graph-A1_A4.ps<br />
Il ne reste plus qu'à imprimer les pages et les assembler. L'auteur de ''Poster'' suggère de découper les marges de gauche et du bas (sauf sur les pages du bord gauche et celles du bas) et de les coller ensemble en commençant par celle en bas à gauche et ensuite de gauche à droite puis de bas en haut. Enfin, pour renforcer le poster, le retourner et mettre du ruban adhésif sur les jointures)<br />
<br />
=== Autre méthode ===<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Sous GNU/Linux, l'outil en ligne de commande ''pdfposter'' peut diviser un grand fichier PDF en plusieurs au format A4/A3/Lettre/etc. Installez-le via le gestionnaire de paquets de votre distribution (Ubuntu/Debian : <tt>sudo apt-get install pdfposter</tt>). Par exemple, pour diviser un poster A0 en pages A4 (lisez la page de manuel : <tt>man pdfposter</tt>) :<br />
pdfposter -mA4 -pA0 posterA0.pdf posterA0_A4.pdf<br />
<br />
=== Autres logiciels ===<br />
* Sous Linux, Windows et Mac, vous pouvez utiliser le programme ''[http://posterazor.sourceforge.net/ PosterRazor]'', qui possède une interface simple à utiliser. Note : ''PosterRazor'' ne peut découper que des images, il faudra donc choisir d'enregistrer le graphique au format PNG dans Gramps.<br />
* Sous Windows, il y a également ''[http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler]'' (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=39998Comment produire un graphique relationnel2012-10-19T20:55:49Z<p>MathieuMD: /* Méthode précise */</p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
=== Méthode simple ===<br />
[[Image:familylines_graph-A1.ps.jpg|right|thumb|150px|Graphique au format A1]]<br />
[[Image:familylines_graph-A1_2x4xA4.pdf.jpg|right|thumb|100px|Découpé en 8 pages A4]]<br />
Lancer le « Graphique de lignées familiales » (dans « Rapports > Diagrammes ») et le configurer. Par exemple :<br />
# Options du papier :<br />
#* Taille : A1<br />
#* Orientation : 1. Paysage<br />
#* Marges : toutes à 1 cm<br />
# Individus recherchés :<br />
#* Sélectionner tous les individus devant être utilisés comme base pour tracer l'arbre (permet d'inclure les lignés des parents et grand-parents par exemple)<br />
# Couleur de la famille :<br />
#* Donner une couleur aux noms principaux<br />
# Mise en page GraphViz :<br />
#* Taille de la police : 32<br />
#* Orientation du graphique : Horizontal (←)<br />
#* Nombre de pages horizontales et verticales : 1<br />
# Options GraphViz :<br />
#* Ratio d'aspect : Remplir la zone donnée<br />
#* Résolution : 300<br />
#* Espacement de nœud et rang : 0,50<br />
#* Utiliser les sous-graphiques : Oui<br />
# Format de sortie : PostScript<br />
Enregistrer le fichier familylines_graph.ps et utiliser le logiciel ''poster'' (Ubuntu/Debian : <tt>apt-get install poster</tt>) pour le découper en plusieurs pages :<br />
poster -v -mA4 -pA1 familylines_graph.ps > familylines_graph-A1_A4.ps<br />
Ensuite, avec ''ps2pdf'', convertir ensuite ce fichier PostScript en PDF pour une utilisation plus simple :<br />
ps2pdf familylines_graph-A1_A4.ps<br />
Il ne reste plus qu'à imprimer les pages et les assembler. L'auteur de ''Poster'' suggère de découper les marges de gauche et du bas (sauf sur les pages du bord gauche et celles du bas) et de les coller ensemble en commençant par celle en bas à gauche et ensuite de gauche à droite puis de bas en haut. Enfin, pour renforcer le poster, le retourner et mettre du ruban adhésif sur les jointures)<br />
<br />
=== Autre méthode ===<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Sous GNU/Linux, l'outil en ligne de commande ''pdfposter'' peut diviser un grand fichier PDF en plusieurs au format A4/A3/Lettre/etc. Installez-le via le gestionnaire de paquets de votre distribution (Ubuntu/Debian : <tt>sudo apt-get install pdfposter</tt>). Par exemple, pour diviser un poster A0 au format PDF, en 16 feuilles A4 (lisez la page de manuel : <tt>man pdfposter</tt>) :<br />
pdfposter -mA4 -pA0 posterA0.pdf > posterA0_A4.ps<br />
<br />
=== Autres logiciels ===<br />
* Sous Linux, Windows et Mac, vous pouvez utiliser le programme ''[http://posterazor.sourceforge.net/ PosterRazor]'', qui possède une interface simple à utiliser. Note : ''PosterRazor'' ne peut découper que des images, il faudra donc choisir d'enregistrer le graphique au format PNG dans Gramps.<br />
* Sous Windows, il y a également ''[http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler]'' (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=39997Comment produire un graphique relationnel2012-10-19T20:42:33Z<p>MathieuMD: /* Méthode simple */</p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
=== Méthode simple ===<br />
[[Image:familylines_graph-A1.ps.jpg|right|thumb|150px|Graphique au format A1]]<br />
[[Image:familylines_graph-A1_2x4xA4.pdf.jpg|right|thumb|100px|Découpé en 8 pages A4]]<br />
Lancer le « Graphique de lignées familiales » (dans « Rapports > Diagrammes ») et le configurer. Par exemple :<br />
# Options du papier :<br />
#* Taille : A1<br />
#* Orientation : 1. Paysage<br />
#* Marges : toutes à 1 cm<br />
# Individus recherchés :<br />
#* Sélectionner tous les individus devant être utilisés comme base pour tracer l'arbre (permet d'inclure les lignés des parents et grand-parents par exemple)<br />
# Couleur de la famille :<br />
#* Donner une couleur aux noms principaux<br />
# Mise en page GraphViz :<br />
#* Taille de la police : 32<br />
#* Orientation du graphique : Horizontal (←)<br />
#* Nombre de pages horizontales et verticales : 1<br />
# Options GraphViz :<br />
#* Ratio d'aspect : Remplir la zone donnée<br />
#* Résolution : 300<br />
#* Espacement de nœud et rang : 0,50<br />
#* Utiliser les sous-graphiques : Oui<br />
# Format de sortie : PostScript<br />
Enregistrer le fichier familylines_graph.ps et utiliser le logiciel ''poster'' (Ubuntu/Debian : <tt>apt-get install poster</tt>) pour le découper en plusieurs pages :<br />
poster -v -mA4 -pA1 familylines_graph.ps > familylines_graph-A1_A4.ps<br />
Ensuite, avec ''ps2pdf'', convertir ensuite ce fichier PostScript en PDF pour une utilisation plus simple :<br />
ps2pdf familylines_graph-A1_A4.ps<br />
Il ne reste plus qu'à imprimer les pages et les assembler. L'auteur de ''Poster'' suggère de découper les marges de gauche et du bas (sauf sur les pages du bord gauche et celles du bas) et de les coller ensemble en commençant par celle en bas à gauche et ensuite de gauche à droite puis de bas en haut. Enfin, pour renforcer le poster, le retourner et mettre du ruban adhésif sur les jointures)<br />
<br />
=== Méthode précise ===<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Chez vous, vous pouvez imprimer ceci sur de nombreuses feuilles A4/A3 avec d'autres programmes :<br />
* Sous Linux, l'outil en ligne de commande ''poster'' peut diviser en A4/A3/Lettre. <br />
*# Installez-le via votre gestionnaire de paquets (ou par exemple en ligne de commande pour Ubuntu: ''sudo apt-get install poster''<br />
*# Lisez la page man, par exemple pour diviser un poster A0 au format postscript, en 16 feuilles A4, faites:<br />
''poster -iA0 -mA4 -pA0 posterA0.ps > posterA4.ps'' <br />
* Sous Linux, Windows et Mac, vous pouvez également utiliser le programme [http://posterazor.sourceforge.net/ PosterRazor], qui possède une interface plus simple à utiliser.<br />
* Sous Windows, il y a également [http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler] (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=39996Comment produire un graphique relationnel2012-10-19T20:30:15Z<p>MathieuMD: /* Méthode simple */</p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
=== Méthode simple ===<br />
[[Image:familylines_graph-A1.ps.jpg|right|thumb|150px|Graphique au format A1]]<br />
[[Image:familylines_graph-A1_2x4xA4.pdf.jpg|right|thumb|100px|Découpé en 8 pages A4]]<br />
Lancer le « Graphique de lignées familiales » (dans « Rapports > Diagrammes ») et le configurer. Par exemple :<br />
# Options du papier :<br />
#* Taille : A1<br />
#* Orientation : 1. Paysage<br />
#* Marges : toutes à 1 cm<br />
# Individus recherchés :<br />
#* Sélectionner tous les individus devant être utilisés comme base pour tracer l'arbre (permet d'inclure les lignés des parents et grand-parents par exemple)<br />
# Couleur de la famille :<br />
#* Donner une couleur aux noms principaux<br />
# Mise en page GraphViz :<br />
#* Taille de la police : 32<br />
#* Orientation du graphique : Horizontal (←)<br />
#* Nombre de pages horizontales et verticales : 1<br />
# Options GraphViz :<br />
#* Ratio d'aspect : Remplir la zone donnée<br />
#* Résolution : 300<br />
#* Espacement de nœud et rang : 0,50<br />
#* Utiliser les sous-graphiques : Oui<br />
# Format de sortie : PostScript<br />
Enregistrer le fichier familylines_graph.ps et utiliser le logiciel poster (Ubuntu/Debian : <tt>apt-get install poster</tt>) pour le découper en plusieurs pages :<br />
poster -v -mA4 -pA1 familylines_graph.ps > familylines_graph-A1_A4.ps<br />
Ensuite, avec <tt>ps2pdf</tt>, convertir ensuite ce fichier PostScript en PDF pour une utilisation plus simple :<br />
ps2pdf familylines_graph-A1_A4.ps<br />
<br />
=== Méthode précise ===<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Chez vous, vous pouvez imprimer ceci sur de nombreuses feuilles A4/A3 avec d'autres programmes :<br />
* Sous Linux, l'outil en ligne de commande ''poster'' peut diviser en A4/A3/Lettre. <br />
*# Installez-le via votre gestionnaire de paquets (ou par exemple en ligne de commande pour Ubuntu: ''sudo apt-get install poster''<br />
*# Lisez la page man, par exemple pour diviser un poster A0 au format postscript, en 16 feuilles A4, faites:<br />
''poster -iA0 -mA4 -pA0 posterA0.ps > posterA4.ps'' <br />
* Sous Linux, Windows et Mac, vous pouvez également utiliser le programme [http://posterazor.sourceforge.net/ PosterRazor], qui possède une interface plus simple à utiliser.<br />
* Sous Windows, il y a également [http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler] (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=File:Familylines_graph-A1_2x4xA4.pdf.jpg&diff=39995File:Familylines graph-A1 2x4xA4.pdf.jpg2012-10-19T20:28:23Z<p>MathieuMD: </p>
<hr />
<div></div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=File:Familylines_graph-A1.ps.jpg&diff=39994File:Familylines graph-A1.ps.jpg2012-10-19T20:27:54Z<p>MathieuMD: </p>
<hr />
<div></div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=39993Comment produire un graphique relationnel2012-10-19T20:27:22Z<p>MathieuMD: /* Imprimer de grands graphiques */</p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
=== Méthode simple ===<br />
[[Image:familylines_graph-A1.ps.jpg|right|thumb|150px|Graphique au format A1]]<br />
[[Image:familylines_graph-A1_2x4xA4.pdf.jpg|right|thumb|150px|Découpé en 8 pages A4]]<br />
Lancer le « Graphique de lignées familiales » (dans « Rapports > Diagrammes ») et le configurer. Par exemple :<br />
# Options du papier :<br />
#* Taille : A1<br />
#* Orientation : 1. Paysage<br />
#* Marges : toutes à 1 cm<br />
# Individus recherchés :<br />
#* Sélectionner tous les individus devant être utilisés comme base pour tracer l'arbre (permet d'inclure les lignés des parents et grand-parents par exemple)<br />
# Couleur de la famille :<br />
#* Donner une couleur aux noms principaux<br />
# Mise en page GraphViz :<br />
#* Taille de la police : 32<br />
#* Orientation du graphique : Horizontal (←)<br />
#* Nombre de pages horizontales et verticales : 1<br />
# Options GraphViz :<br />
#* Ratio d'aspect : Remplir la zone donnée<br />
#* Résolution : 300<br />
#* Espacement de nœud et rang : 0,50<br />
#* Utiliser les sous-graphiques : Oui<br />
# Format de sortie : PostScript<br />
Enregistrer le fichier familylines_graph.ps et utiliser le logiciel poster (Ubuntu/Debian : <tt>apt-get install poster</tt>) pour le découper en plusieurs pages :<br />
poster -v -mA4 -pA1 familylines_graph.ps > familylines_graph-A1_A4.ps<br />
Ensuite, avec <tt>ps2pdf</tt>, convertir ensuite ce fichier PostScript en PDF pour une utilisation plus simple :<br />
ps2pdf familylines_graph-A1_A4.ps<br />
<br />
<br />
=== Méthode précise ===<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Chez vous, vous pouvez imprimer ceci sur de nombreuses feuilles A4/A3 avec d'autres programmes :<br />
* Sous Linux, l'outil en ligne de commande ''poster'' peut diviser en A4/A3/Lettre. <br />
*# Installez-le via votre gestionnaire de paquets (ou par exemple en ligne de commande pour Ubuntu: ''sudo apt-get install poster''<br />
*# Lisez la page man, par exemple pour diviser un poster A0 au format postscript, en 16 feuilles A4, faites:<br />
''poster -iA0 -mA4 -pA0 posterA0.ps > posterA4.ps'' <br />
* Sous Linux, Windows et Mac, vous pouvez également utiliser le programme [http://posterazor.sourceforge.net/ PosterRazor], qui possède une interface plus simple à utiliser.<br />
* Sous Windows, il y a également [http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler] (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Comment_produire_un_graphique_relationnel&diff=39987Comment produire un graphique relationnel2012-10-19T20:00:31Z<p>MathieuMD: </p>
<hr />
<div>{{languages|Howto: Make a relationship chart}}<br />
<br />
<br />
<br />
Ceci est un tutoriel pour réaliser un graphique relationnel (pouvant être les ascendants, descendants, des individus filtrés, toute la base !) depuis Gramps-2.2.x avec un greffon (''plugin'') basé sur GraphViz.[[Image:RelationshipChartDescendants.png|right|thumb|300px|Un exemple de graphique]]<br />
<br />
Ce rapport est généré avec graphviz, ainsi vous avez besoin d'installer [http://graphviz.org graphviz] (sous linux, utilisez votre gestionnaire de paquets). <br />
<br />
== Avant de démarrer ==<br />
<br />
Gramps peut produire des graphiques, mais pour les voir, vous avez besoin d'autres programmes. Nous vous recommandons :<br />
* [http://graphviz.org Graphviz] : '''nécessaire''' pour les graphiques relationnels.<br />
* [http://www.inkscape.org/ Inkscape] : pour voir ou éditer les graphiques 'svg'.<br />
* [http://www.documentfoundation.org/download/ LibreOffice] ou [http://www.openoffice.org/ OpenOffice] ou [http://www.calligra-suite.org/ Calligra] : pour voir et éditer les documents 'odt'.<br />
<br />
== Filtres : les personnes devant être imprimées ? ==<br />
<br />
=== Qu'est ce que les filtres ?===<br />
<br />
Dans Gramps vous pouvez définir des filtres pour une sélection d'individus, voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|les filtres]]. Dans la plupart des rapports, chaque filtre personnel que vous avez créé sera disponible, ainsi que les 'filtres standards' sur les descendants et ascendants. Ces derniers sont dépendants de la personne active lorsque que vous appelez le rapport.<br />
<br />
=== Combien d'individus ?===<br />
<br />
Votre filtre peut contenir un nombre très important d'individus. De ce fait imprimer ou voir un très grand graphique peut être très problématique selon la capacité et la configuration de votre ordinateur.<br />
<br />
== Exemple 1-A: un graphique des descendants ==<br />
<br />
[[Image:RelationshipChartDescendants.png|right|thumb|200px|Un graphique des descendants, cliquez pour les détails]]<br />
<br />
Téléchargez [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/data.gramps example.gramps] (clic droit 'Enregistrer sous ...'), créez une nouvelle base de données dans Gramps, et importez le fichier example.gramps.<br />
<br />
Si ce n'est pas le cas, définissez la personne active : ''Garner, Lewis Anderson''. <br />
<br />
Pour générer un graphique des descendants avec le rapport relationnel, choisissez depuis le menu <br />
{{man menu|Rapports -> Graphiques -> Graphique relationnel...}}.<br />
<br />
Dans le dialogue, définissez le format .png et choisissez dans les onglets disponibles :<br />
#'''Options Papier'''-> Taille : selon les nombre d'individus, choisissez la taille personnalisée (définir la hauteur et la largeur avec des grands nombres)<br />
#'''Options du rapport'''-> Filtre : Descendants de Garner, Lewis Andersson <br />
#'''Optons de mise en page'''-> Aspect : taille minimale<br />
<br />
(Si vous avez des difficultés pour saisir une taille dans le dialogue. Une alternative étant d'utiliser le code graphviz de l'exemple 3, ci dessous.)<br />
<br />
Le résultat (avec Gramps 2.2.7) est visible à la droite de l'écran. Vous pouvez utiliser la fonction imprimer liée à votre visualiseur d'image et votre imprimante (vérifiez la valeur DPI de votre fichier png !), ou vous pouvez utiliser cette image sur un site internet pour la partager. Dans ce dernier cas, vous pouvez également jetter un oeil sur [[Make flash plugin from a png|faire un graphique relationnel en flash]], pour rendre le graphique plus 'navigable'.<br />
<br />
Dans l'image, vous voyez les hommes en bleu, et les femmes en rose. Les cercles jaunes indiquent un noeud familial permettant l'impression des données de mariage (si connues). Vous pouvez ignorer les noeuds familiaux en désélectionnant l'option ''Afficher les noeuds familiaux'' dans les '''Options de Graphviz'''.<br />
<br />
== Exemple 1-B: un graphique des ascendants ==<br />
<br />
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. Le graphique des ascendants. Pour l'image détaillée, [[Media:RelationshipChartAncestors.png| cliquez ici (853kb!)]]]]<br />
<br />
Téléchargez et ouvrez le fichier example.gramps (voir l'exemple précédent)<br />
<br />
Définissez ''Warner, Carl Thomas'' comme personne active.<br />
<br />
Répétez les étapes des l'exemple précédent, mais choisissez juste le filtre ''Ascendants de Warner, Carl Thomas''. <br />
<br />
Ci-joint le résultat. <br />
<br />
C'est un graphique très grand.<br />
Il peut être vu dans un bon visualiseur d'image. <br />
<br />
Pour l'impression vous aurez sans doute besoin d'utiliser plusieurs pages (par exemple au format PDF via Ghostscript), ou une bonne table d'impression. L'impression sur une imprimante grand public est également possible avec des graphiques d'une taille raisonnable.<br />
<br />
<br clear="all"/><br />
<br />
== Exemple 2: un graphique avec ascendants, descendants et leurs familles ==<br />
<br />
[[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. Un grand graphique. Pour l'image détaillée, [[Media:RelationshipChartAncestorsAndDescendants.png| cliquez ici (363kb!)]]]]<br />
<br />
Notez que cet exemple utilise les filtres. <br />
Voir [[Gramps_3.4_Wiki_Manual_-_Filters/fr|cette page]] pour plus d'informations sur les filtres.<br />
<br />
Ouvrez le fichier example.gramps et sélectionnez ''Cristiansen, Frances'' comme personne active.<br />
<br />
Tout d'abord, nous créons un filtre :<br />
Ouvrez l'éditeur de filtre et créez un nouveau filtre, appelé '''Frances1'''. Ce filtre contiendra les règles :<br />
<br />
* ''Ascendants de <individu>'' choisissez ''Christiansen, Frances'' et cochez <tt>inclusif</tt>.<br />
* ''Descendants de <individu>'' choisissez ''Christiansen, Frances'' <br />
<br />
Puis, nous créons le filtre qui sera utilisé pour le rapport. Il sera basé sur le précédent filtre : créez ce filtre, appelé '''Frances2'''. Ce filtre contiendra les règles :<br />
<br />
* ''Individus correspondants au filtre'', choisissez ''Frances1''.<br />
* ''Parents du filtre '' Frances1<br />
* ''Frères et soeurs du filtre '' Frances1<br />
* ''Conjoints du filtre '' Frances1<br />
<br />
Enfin, fermez l'éditeur de filtre, et suivez les instructions données dans les exemples 1a et 1b, mais choisissez le filtre '''Frances2''' dans l'onglet '''Options du rapport''' (Graphique relationnel).<br />
<br />
Le résultat est visible à droite (363kb, grand fichier !)<br />
<br />
== Exemple 3, générer un graphique en utilisant Graphviz et l'outil en ligne de commande ==<br />
<br />
=== Préparation dans Gramps ===<br />
<br />
Dans le menu, sélectionnez {{man menu|Rapports -> GraphViz -> Graphique relationnel...}}.<br />
<br />
Choisissez le filtre que vous souhaitez utiliser, définissez également autant d'options que possible aux valeurs voulues (comme expliqué dans l'exemple 1-A), mais le format sera "Graphviz (.gv)". Cliquez sur {{man button|Valider}}. Vous devez obtenir un fichier ".gv".<br />
<br />
Ce fichier est du type texte, ainsi il peut être ouvert avec un éditeur de texte.<br />
<br />
=== Changements manuels ===<br />
<br />
Le fichier ''dot'' (.gv) a une structure bien définie, pour plus d'informations, voir : [http://www.graphviz.org/Documentation.php www.graphviz.org]<br />
<br />
digraph GRAMPS_graph<br />
{<br />
bgcolor=white;<br />
center="true"; <br />
concentrate="false";<br />
dpi="75";<br />
graph [fontsize=12];<br />
<br />
...<br />
<br />
les données Gramps sont affichées :<br />
<br />
I3493 [ shape="box" fillcolor="pink" style="solid,filled" label="Blancke, Charlotte\n(1801)" ];<br />
...<br />
<br />
Vous pouvez optimiser la mise en page en appliquant des changements au fichier. <br />
<br />
*La taille de la page : regardez la section "page" et "taille", et changez les informations par des '''valeurs plus grandes'''. Ceci est important, dans le cas contraire, les miniatures ne seront pas de bonne qualité ou le texte ne sera pas lisible. <br />
*Vous pouvez également changer la famille de police.<br />
Regardez les lignes :<br />
node [style=filled fontsize="12"];<br />
et changez par :<br />
node [style=filled fontsize="12" fontname="Sans"];<br />
pour utiliser la police ''Sans''. <br />
En ligne de commande regardez quelle police ttf, Graphviz trouve sur votre PC.<br />
<br />
===Génération de l'image===<br />
<br />
Sauvez votre fichier modifié sous le nom de ''rapport.dot'', et lancez la commande :<br />
dot -Tpng -orapport.png rapport.dot<br />
Ceci va utiliser l'outil graphviz "dot" pour générer le fichier .png contenant le rapport.<br />
<br />
Pour voir les messages d'information (comme la police) utilisez l'argument -v. Vous pouvez également générer d'autres formats d'image, par exemple, le format jpeg avec les informations de sortie :<br />
dot -Tjpg -orapport.jpg rapport.dot -v<br />
<br />
...<br />
Activated plugin library: libgvplugin_pango.so.5<br />
Using textlayout: textlayout:cairo<br />
Activated plugin library: libgvplugin_dot_layout.so.5<br />
Using layout: dot:dot_layout<br />
Using render: cairo:cairo<br />
Activated plugin library: libgvplugin_gd.so.5<br />
Using device: jpg:cairo:gd<br />
The plugin configuration file: /usr/lib/graphviz/config4 was successfully loaded.<br />
render : cairo dot fig gd map ps svg vml vrml xdot<br />
layout : circo dot fdp neato nop nop1 nop2 twopi<br />
textlayout : textlayout<br />
device : canon cmap cmapx cmapx_np dia dot fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib<br />
loadimage : (lib) gd gd2 gif jpe jpeg jpg png ps<br />
dot: fontname "Times-Roman" resolved to: "Times New Roman, Normal" /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf<br />
network simplex: 11 nodes 10 edges 0 iter 0.00 sec<br />
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0<br />
mincross GRAMPS_graph: 0 crossings, 0.00 secs.<br />
network simplex: 23 nodes 37 edges 7 iter 0.00 sec<br />
routesplines: 10 edges, 30 boxes 0.00 sec<br />
Using render: cairo:cairo<br />
Using device: jpg:cairo:gd<br />
...<br />
<br />
== Imprimer de grands graphiques ==<br />
Si vous souhaitez imprimer de grands graphiques (surtout avec des photos et autres détails) dans une qualité de lecture raisonnable, voici quelques étapes qui pourraient vous aider :<br />
# Dans les options du document, choisissez le format de sortie SVG.<br />
# Définissez le format de papier pour tenir dans une feuille (SVG ne peut pas gérer plus d'une feuille), donc choisissez A0 ou taille personnalisée.<br />
# Utilisez [http://www.inkscape.org/ Inkscape] pour ouvrir votre graphique SVG.<br />
# Menu Fichier/Propriétés du document, utilisez la fonction "Adapter la page à la sélection" (corrigez la taille d'après la taille du graphique).<br />
# Menu Fichier/Enregistrer sous, choisissez le format PDF.<br />
<br />
Vous avez maintenant un grand poster que vous pouvez imprimer. Inkscape ne donne pas de titre au fichier PDF pour imprimer de grands graphiques sur plusieurs feuilles A4/A3, vous devez donc utiliser un autre programme pour le faire. Chez vous, vous pouvez imprimer ceci sur de nombreuses feuilles A4/A3 avec d'autres programmes :<br />
* Sous Linux, l'outil en ligne de commande ''poster'' peut diviser en A4/A3/Lettre. <br />
*# Installez-le via votre gestionnaire de paquets (ou par exemple en ligne de commande pour Ubuntu: ''sudo apt-get install poster''<br />
*# Lisez la page man, par exemple pour diviser un poster A0 au format postscript, en 16 feuilles A4, faites:<br />
''poster -iA0 -mA4 -pA0 posterA0.ps > posterA4.ps'' <br />
* Sous Linux, Windows et Mac, vous pouvez également utiliser le programme [http://posterazor.sourceforge.net/ PosterRazor], qui possède une interface plus simple à utiliser.<br />
* Sous Windows, il y a également [http://www.noliturbare.com/pdf-tools/pdf-tiler Govert's PDF Tiler] (nécessite .NET 1.1)<br />
<br />
== Dépannage ==<br />
<br />
*Si vous rencontrez un problème avec les polices de caractère (caractères manquants) ou une taille de police inadaptée, voir l'exemple 3 sur comment définir manuellement la police.<br />
*Si vous avez une mauvaise résolution pour le fichier png, un texte illisible, c'est probablement la taille du papier qui est trop petite. Voir l'exemple 1-A: définir la taille du papier, et modifiez également les '''Options de la mise en page''', dans le ratio d'aspect : utilisez <tt>automatiquement le nombre optimal de pages</tt>, ou <tt>taille minimale</tt>.<br />
<br />
{{man warn|Rapports et identifiants personnalisés|Après l'importation d'un GEDCOM, votre base de données peut contenir des identifiants non-normalisés (par ex. 123I ou 456U non définis dans {{man menu|Édition --> Préférences --> Identifiants ID}}). Si le rapport généré n'affiche pas correctement vos données, alors essayez [[Gramps_3.1_Wiki_Manual_-_Tools/fr#R.C3.A9organiser_les_identifiants_GRAMPS|l'outil Réorganiser les identifiants Gramps...]] ({{man menu|Outils --> Modification de la base de données -->Réorganiser les identifiants Gramps...}}).}}<br />
<br />
== D'autres possibilités ==<br />
<br />
* Vous pouvez générer des graphiques pour les descendants et les ajouter à la galerie d'image pour la personne. Le graphique est disponible pour sur un site internet. <br />
* [[Make flash plugin from a png |un graphique relationnel en flash]], permet de zoomer, se déplacer, ... au-dessus de vos données, ou mieux encore, utilisez le format SVG pour Firefox et Opera, voir [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page DenominoViso].<br />
<br />
== Comment aider au développement ? ==<br />
<br />
Si vous regardez les spécifications du format dot, vous noterez qu'il y a beaucoup de possibilités avec GraphViz. Si vous avez des connaissances en programmation vous pouvez ajouter des fonctionnalités :<br />
* plus/au moins de texte dans les boîtes : quel texte et comment les organiser ?<br />
* Les couleurs. Voir le rapport [[Familylines plugin|Lignées familiales]] : une couleur par famille, pour les relations spécifiques, pour la souche, ...<br />
<br />
== Lien vers le manuel ==<br />
<br />
Par ailleurs, jettez un oeil sur [http://www.gramps-project.org/wiki/index.php?title=Gramps_3.1_Wiki_Manual_-_Reports/fr#Graphique_relationnel le graphique relationnel].<br />
<br />
[[Category:Fr:Comment je...]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Traduire_Gramps_en_fran%C3%A7ais&diff=35878Traduire Gramps en français2012-03-23T21:53:13Z<p>MathieuMD: </p>
<hr />
<div>Traduire Gramps en français.<br />
<br />
[[Category:Translators/Categories]] [[Category:Developers/General]]<br />
<br />
== Glossaire ==<br />
Quelques variables pour la cohérence, tirées du fr.po :<br />
<br />
* '''ancestor''' : ascendant<br />
* '''descendant''' : descendant<br />
* '''person''', '''individual''', '''people''' : individu(s)<br />
* '''remove''' (context) : enlever une référence ou supprimer de la base<br />
* '''home''' : souche<br />
* '''active person''' : individu actif<br />
* '''media''' : media (pas de 's' ou accent) : un medium (les médias : journaux, tv)<br />
* '''call name''' : prénom usuel<br />
* '''unknown''' (context) : inconnu ou non-connu (individu)<br />
<br />
== Justifications ==<br />
=== media ===<br />
TODO : pourquoi medium|media (latin) plus que média|médias (français) ?<br />
<br />
== Voir aussi ==<br />
=== Sur la traduction ===<br />
* [[Translating GRAMPS]]<br />
* La discussion [http://www.geneanet.org/forum/index.php?topic=440903 Traduction de Gramps en français] sur le forum GeneaNet<br />
* Le bug [http://www.gramps-project.org/bugs/view.php?id=5648 Submiting French translation completed and updated]<br />
<br />
=== Sur Gramps ===<br />
* Les articles des catégories [[:Category:GRAMPS_terminology|GRAMPS terminology]] et [[:Category:Translators/Categories|Translators/Categories]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Traduire_Gramps_en_fran%C3%A7ais&diff=35877Traduire Gramps en français2012-03-23T21:51:59Z<p>MathieuMD: </p>
<hr />
<div>= Traduire Gramps en français =<br />
[[Category:Translators/Categories]] [[Category:Developers/General]]<br />
<br />
== Glossaire ==<br />
Quelques variables pour la cohérence, tirées du fr.po :<br />
<br />
* '''ancestor''' : ascendant<br />
* '''descendant''' : descendant<br />
* '''person''', '''individual''', '''people''' : individu(s)<br />
* '''remove''' (context) : enlever une référence ou supprimer de la base<br />
* '''home''' : souche<br />
* '''active person''' : individu actif<br />
* '''media''' : media (pas de 's' ou accent) : un medium (les médias : journaux, tv)<br />
* '''call name''' : prénom usuel<br />
* '''unknown''' (context) : inconnu ou non-connu (individu)<br />
<br />
== Justifications ==<br />
=== media ===<br />
TODO : pourquoi medium|media (latin) plus que média|médias (français) ?<br />
<br />
== Voir aussi ==<br />
=== Sur la traduction ===<br />
* [[Translating GRAMPS]]<br />
* La discussion [http://www.geneanet.org/forum/index.php?topic=440903 Traduction de Gramps en français] sur le forum GeneaNet<br />
* Le bug [http://www.gramps-project.org/bugs/view.php?id=5648 Submiting French translation completed and updated]<br />
<br />
=== Sur Gramps ===<br />
* Les articles des catégories [[:Category:GRAMPS_terminology|GRAMPS terminology]] et [[:Category:Translators/Categories|Translators/Categories]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Traduire_Gramps_en_fran%C3%A7ais&diff=35876Traduire Gramps en français2012-03-23T21:49:52Z<p>MathieuMD: Created page with "= Traduire Gramps en français = Category:Translators/Categories Category:Developers/General == Glossaire == Quelques variables pour la cohérence, tirées du fr.po :..."</p>
<hr />
<div>= Traduire Gramps en français =<br />
[[Category:Translators/Categories]] [[Category:Developers/General]]<br />
<br />
== Glossaire ==<br />
Quelques variables pour la cohérence, tirées du fr.po :<br />
<br />
* '''ancestor''' : ascendant<br />
* '''descendant''' : descendant<br />
* '''person''', '''individual''', '''people''' : individu(s)<br />
* '''remove''' (context) : enlever une référence ou supprimer de la base<br />
* '''home''' : souche<br />
* '''active person''' : individu actif<br />
* '''media''' : media (pas de 's' ou accent) : un medium (les médias : journaux, tv)<br />
* '''call name''' : prénom usuel<br />
* '''unknown''' (context) : inconnu ou non-connu (individu)<br />
<br />
== Justifications ==<br />
=== media ===<br />
TODO : pourquoi medium|media (latin) plus que média|médias (français) ?<br />
<br />
== Voir aussi ==<br />
=== Sur la traduction ===<br />
* [[Translating GRAMPS]]<br />
* La discussion [http://www.geneanet.org/forum/index.php?topic=440903 Traduction de Gramps en français] sur le forum GeneaNet<br />
* Le bug [http://www.gramps-project.org/bugs/view.php?id=5648 Submiting French translation completed and updated]<br />
<br />
=== Sur Gramps ===<br />
* [[Category:GRAMPS_terminology|GRAMPS terminology]] et [[Category:Translators/Categories|Translators/Categories]]</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Translating_Gramps&diff=35875Translating Gramps2012-03-23T21:29:53Z<p>MathieuMD: Added link to Coding_for_translation</p>
<hr />
<div>{{languages|Translating GRAMPS}}<br />
<br />
Tips for translators of the GRAMPS program.<br />
<br />
The page [[Coding_for_translation|coding for translation]] may also be of interest to translators.<br />
<br />
[[Category:Translators/Categories]][[Category:Developers/General]]<br />
<br />
==Gettext file format==<br />
<br />
===Header===<br />
<br />
''msginit'' is a GNU utility, called on /po directory, which generates a header for gettext file template : '''gramps.pot'''.<br />
<br />
"Project-Id-Version: PACKAGE VERSION\n"<br />
"Report-Msgid-Bugs-To: \n"<br />
"POT-Creation-Date: 2004-12-30 10:52-0500\n"<br />
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"<br />
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"<br />
"Language-Team: LANGUAGE <LL@li.org>\n"<br />
"MIME-Version: 1.0\n"<br />
"Content-Type: text/plain; charset=CHARSET\n"<br />
"Content-Transfer-Encoding: 8bit\n"<br />
"Plural-Forms: nplurals=2; plural=(n != 1);\n"<br />
<br />
* ''Project-Id-Version'' : this is the name and version of the package. Fill it in if it has not already been filled in by xgettext. <br />
* ''Report-Msgid-Bugs-To'' : this has already been filled in by xgettext. It contains an email address or URL where you can report bugs in the untranslated strings:<br />
** Strings which are not entire sentences, see the maintainer guidelines in Preparing Strings.<br />
** Strings which use unclear terms or require additional context to be understood.<br />
** Strings which make invalid assumptions about notation of date, time or money.<br />
** Pluralisation problems.<br />
** Incorrect English spelling.<br />
** Incorrect formatting. <br />
* ''POT-Creation-Date'' : this has already been filled in by xgettext.<br />
* ''PO-Revision-Date'' : You don't need to fill this in. It will be filled by the PO file editor when you save the file.<br />
* ''Last-Translator'' : fill in your name and email address (without double quotes).<br />
* ''Language-Team'' : fill in the English name of the language, and the email address or homepage URL of the language team you are part of. Before starting a translation, it is a good idea to get in touch with your translation team, not only to make sure you don't do duplicated work, but also to coordinate difficult linguistic issues. In the Free Translation Project, each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's [http://translationproject.org/ homepage], in the "Teams" area.<br />
<br />
=== msgid / msgstr / comment / fuzzy ===<br />
<br />
#: gramps.py:10<br />
#, fuzzy<br />
msgid "File not found"<br />
msgstr ""<br />
<br />
* text after ''#'' provides a comment.<br />
** The file reference and the line number after ''#:'' <br />
** A comment on code or the main string (''msgid'') after ''#.''<br />
** A comment on your translation (''msgstr'') after ''#''<br />
This will help translator but is optional for having a translation.<br />
* ''#, fuzzy'' could be added because string is not up-to-date. It means that there was a change somewhere (a string has been added, removed or modified) and ''xgettext'' did a guess on what the translation should be. This guess is most likely not entirely correct, but it is often very close.<br />
''fuzzy'' strings are ignored, english string (''msgid'') will be used ! Need to correct/validate entry on your translation editor.<br />
* msgid is the string, present on gramps' code<br />
* msgstr is your translation string<br />
<br />
==Tips for translators==<br />
===Getting started===<br />
<br />
# Always save your translations in UTF-8 encoding<br />
# Don't overwrite the English strings, your translation should be below the original string<br />
# Take heed on special characters. You must have the same number of and types as the original string.<br />
# Verify spelling and grammar on your translation.<br />
# Don't translate "too freely". Your translation should be as close match to the original as possible<br />
# Be consistent with your translations. If you decide on a specific word/phrase for something, stick to that throughout the translation.<br />
# If possible, try the translation before sending<br />
<br />
Translating GRAMPS into a new language means translating English strings used in the GRAMPS interface. To put it shortly, this amounts to<br />
# obtaining the gramps.pot file with the strings to be translated,<br />
# translating the strings in the template, and<br />
# getting the translated file uploaded into gramps SVN repository.<br />
Another avenue of translation is translating the documentation. This is a different and lengthy process and it is decribed in our [[Translating the manual]] page. Here we will concentrate on the interface translation only.<br />
<br />
===Obtaining gramps.pot===<br />
* Download <code>gramps.pot</code> from GRAMPS SVN repository, see [[Brief_introduction_to_SVN| the introduction to SVN]].<br />
* Look for <code>gramps.pot</code> in the directory <code>gramps33/po</code> or if you looking for the trunk version look for <code>gramps.pot</code> in the directory <code>trunk/po</code>.<br />
<br />
===Translating messages===<br />
* Copy <code>gramps.pot</code> to the file named <code>lang.po</code>, according to the language you are translating into (<code>fr.po</code> for French, <code>ru.po</code> for Russian, etc.)<br />
* Use [http://gtranslator.sourceforge.net GTtranslator] (GNOME, windows), [http://i18n.kde.org/tools/ KBabel] (KDE), [http://userbase.kde.org/Lokalize Lokalize] (KDE, windows), Emacs po-mode, [http://translate.sourceforge.net/wiki/pootling/index pootling] (GNU/Linux, windows), [http://www.poedit.net/ poedit] (GNU/Linux, OSX, windows), or any similar tool designed for translating <code>.po</code> files. If you do not like any of these tools, you can use any text editor to translate messages. If using vim, properly setting the "langmap" option will significantly speed up your work.<br />
* Even though GRAMPS uses UNICODE (UTF-8) for its character set, you may use your native character set for your translation. Just make sure you specify the character set you are using in the <code>Content-Type</code> line in the <code>.po</code> file. GRAMPS will handle the conversion to UNICODE.<br />
* If there are non ASCII characters in the original English string, try to preserve them by copying them, if applicable.<br />
<br />
===Context===<br />
As an extension to standard gettext, strings in GRAMPS can have a context prefix. This prefix should '''not''' be translated, and just be deleted in the translation. More info and an example [[#Translation context|further down]].<br />
<br />
As a special context, you will see the manual context, eg :<br />
'manual|Editing_Dates'<br />
these strings should only be translated if a wiki manual is available in your language, eg in Dutch :<br />
'Datums_aanpassen' <br />
<br />
The string refers to a section, eg [[Gramps_3.3_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed_-_part_1#Editing_dates |Editing_Dates]] in Dutch becomes [[Gramps_3.3_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed_-_part_1/de#Daten_bearbeiten|Datums_aanpassen]].<br />
<br />
===Testing your <code>.po</code> file===<br />
In the directory <code>gramps33/po</code> or the <code>trunk/po</code> run the command: <pre>make</pre> If there are errors in your po file, this will fail and give you an error message. You should correct these errors. If you have trouble understanding the error, try to run the next test, which might give a more verbose output.<br />
<br />
====check_po====<br />
In the directory <code>gramps33/po</code> or the <code>trunk/po</code> run the command: <pre>./check_po lang.po</pre> or <pre>python check_po lang.po > lang</pre> where lang is your language code. This will give you errors in your translation, information on badly translated phrases, ... the output could resemble something like this..<br />
<br />
File: nl.po<br />
Template total: 3816<br />
PO total: 3671<br />
Fuzzy: 125<br />
Untranslated: 12<br />
%s mismatches: 0<br />
%d mismatches: 2<br />
%() name mismatches:9<br />
%() missing s/d: 0<br />
Runaway context: 0<br />
XML special chars: 0<br />
Last character: 15<br />
Shortcut in msgstr: 16<br />
PO Coverage: 99.67%<br />
Template Coverage: 95.89%<br />
Localized at: 97% (previous gramps.pot)<br />
<br />
If you get ''previous gramps.pot'', then you are not using the last ''gramps.pot'', see [[#Updating_your_translation|update your translation]]. ''fuzzy'' and untranslated strings will be ignored, Gramps will use main strings in english.<br />
<br />
-------- %d mismatches --------------<br />
You can see that there are 3816 strings to be translated and the coverage is around 96 %. There are still 12 untranslated strings and some 120 fuzzies. The last one can be ok, but should be checked. Additional information shows e.g. that in 15 strings there is a mismatch with the 'last character':<br />
-------- last character not identical ---------<br />
msg nr: 98, lineno: 602<br />
msgid "Could not make database directory: "<br />
msgstr "Kon geen gegevensbestandsmap aanmaken"<br />
<br />
This is very valuable information, because you can easily see what the problem is, even if you do not understand the language! Clearly the last characters must be ": "<br />
<br />
====statistics====<br />
<br />
In the directory <code>gramps33/po</code> or the <code>trunk/po</code> run the command: <pre>msgfmt --statistics lang.po</pre> or <pre>msgfmt.exe --statistics lang.po</pre> where lang is your language code. This should not throw an error.<br />
Basically this gives the same info in a condensed format: 3533 translated messages, 125 fuzzy translations, 12 untranslated messages.<br />
<br />
====GNU `gettext' utilities====<br />
<br />
[http://www.gnu.org/software/gettext/ GNU `gettext' utilities] provides a few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings:<br />
<br />
msgattrib - attribute matching and manipulation on message catalog<br />
msgcat - combines several message catalogs<br />
msgcmp - compare message catalog and template<br />
msgcomm - match two message catalogs<br />
msgconv - character set conversion for message catalog<br />
msgen - create English message catalog<br />
msgexec - process translations of message catalog<br />
msgfilter - edit translations of message catalog<br />
msgfmt - compile message catalog to binary format (.po->.mo)<br />
msggrep - pattern matching on message catalog<br />
msginit - initialize a message catalog<br />
msgmerge - merge message catalog and template<br />
msgunfmt - uncompile message catalog from binary format<br />
msguniq - unify duplicate translations in message catalog<br />
<br />
For checking syntax (header, format, domain) :<br />
msgfmt -c nl.po<br />
<br />
msgfmt.exe -c nl.po<br />
<br />
For checking keyboard accelerators (underscore) :<br />
msgfmt --check-accelerators=_ nl.po<br />
<br />
msgfmt.exe --check-accelerators=_ nl.po<br />
<br />
====Gettext lint====<br />
<br />
[http://gettext-lint.sourceforge.net/ Gettext lint] is a collection of tools for checking the validity, consistency and spelling of PO. Some python scripts do not work anymore with last expat version.<br />
<br />
====Translate Toolkit====<br />
<br />
[http://translate.sourceforge.net/wiki/toolkit/index Translate Toolkit] is a collection of useful tools for localisation. It can help to improve the quality of your localisation, including tools to help check, validate, merge and extract messages from your localizations.<br />
<br />
====Save as .mo file====<br />
<br />
If possible and when you are finished translating, go to '''File -> Save as...''' to generate a ''.mo'' file for testing syntax.<br />
<br />
* Under poedit, you can set to always compile a ''.mo'' file when saving changes by clicking '''File -> Preferences''' and on the '''Editor tab''' check the '''Automatically compile ''.mo'' file on save box'''. A dialog will warn you if there is a syntax error on your ''.po'' file.<br />
<br />
* Kbabel and Lokalize also provide a syntax check when saving. If an error occured we can navigate to messages which contain errors. <br />
<br />
Please, enable this feature to avoid errors on compilation process.<br />
<br />
===Formatting (compiling) <code>.po</code> file===<br />
* Currently, [[Coding_for_translation#How_it_works|formatting (msgfmt) is performed during build time]], so you should not have to worry about it. The translated <code>.po</code> file is the product of your work. Check it into SVN if you obtained the permission to do so, or email it to [[Contact|Brian or Benny]] otherwise.<br />
<br />
===Updating your translation===<br />
If you have submitted a translation, it may well be that after some weeks/months, new strings are added to GRAMPS, implying you need to update your translation file. <br />
<br />
Assuming you have obtained originally the GRAMPS source tree as explained in [[Brief introduction to SVN]]. Now:<br />
* Update your gramps tree from SVN. This can be done by executing the command <pre>svn up</pre> from the root GRAMPS svn directory. This will download an updated <code>gramps.pot</code> file.<br />
* Use your outdated translation to translate the strings that did not change:<pre>msgmerge lang.po gramps.pot -o newlang.po</pre> or <pre>msgmerge --no-wrap lang.po gramps.pot -o newlang.po</pre> where <code>lang</code> is your language code. The <code>--no-wrap</code> option will prevent changes due to automatic word wrapping, use it if your previous po file was constructed like that. The <code>--no-wrap</code> options allows for more readable SVN diffs.<br />
* Check fuzzy messages and translate all untranslated messages in <code>newlang.po</code>. When you are sure everything is right, rename <code>newlang.po</code> as <code>lang.po</code> and check it into SVN as you did with the original file.<br />
* If command <code>msgmerge</code> is not available on your system, you have to install the <code>}gettext</code> package. For [http://wiki.wxpython.org/index.cgi/Internationalization#How_to_get_gettext_tools_for_Win32 windows users].<br />
<br />
There is also the make target that does the following:<br />
* Create new <code>gramps.pot</code> template from the source code files<br />
cd po<br />
make gramps.pot<br />
or<br />
cd po<br />
intltool-update -p<br />
* Updates each <code>po</code> file in the source tree<br />
It may be an overkill for you, but if you feel like using it, you can run:<br />
cd po<br />
make update-po <br />
in the <code>po</code> directory. This assumes that you have already succesfully configured the source. Note, this command ignores <code>--no-wrap</code> option, so not practical for SVN diffs.<br />
<br />
===Testing your update===<br />
<br />
You can test your update easily with the above mentioned '''check_po''' file. If you downloaded this file, just do:<br />
<pre>python check_po newlang.po</pre>. If everything is ok, the output will be something like this:<br />
File: newlang.po<br />
Template total: 3075<br />
PO total: 3075<br />
Fuzzy: 0<br />
Untranslated: 0<br />
%s mismatches: 0<br />
%d mismatches: 0<br />
%() name mismatches:0<br />
%() missing s/d: 0<br />
Runaway context: 0<br />
XML special chars: 0<br />
Last character: 0<br />
Shortcut in msgstr: 0<br />
PO Coverage: 100.00%<br />
Template Coverage: 100.00%<br />
<br />
===Installing your translation===<br />
<br />
You want to use the new translation immediately, and systemwide?<br />
You can by installing just the contents of the po directory, but you will need to build the source first, so:<br />
./autogen.sh<br />
make<br />
cd po<br />
make --prefix=/usr install #as root !<br />
<br />
This should install your translations to <code>/usr/share/locale/xx/LC_MESSAGES/gramps.mo</code>, with xx being your language. You could of course copy your files manually to that dir with the gramps.mo name.<br />
<br />
Make sure you only install from within the po directory, or you will install the development version of GRAMPS, which is not supported and for testing only!<br />
<br />
==== Running trunk with your translation ====<br />
<br />
The current GRAMPS trunk as of February 2009 by default looks for the i18n data under <code>/usr/local/share/locale</code>. So you can use:<br />
<br />
./autogen.sh<br />
make<br />
cd po<br />
make install #as root !<br />
<br />
This will install the .mo files under /usr/local/share/locale/xx/LC_MESSAGES, since the default prefix is /usr/local<br />
<br />
or <br />
<br />
./autogen.sh --prefix=/home/.../<br />
make<br />
make install #as simple user !<br />
<br />
This will install Gramps and translations under your ''/home/...'' directory.<br />
<br />
===== $GRAMPSI18N (for your locale) =====<br />
<br />
Actually you don't even need to install the files in order to test them. This is useful because you can develop GRAMPS without needing superuser privileges. Bear in mind the GRAMPS i18n process goes something like this when you use trunk as of February 2009:<br />
<br />
* when you type <code>make</code> in the source tree root (/home/user/trunk e.g.) all the trunk/po/*.po files are compiled into trunk/po/*.gmo files.<br />
* when you type <code>make install</code> inside the /home/user/trunk/po directory, these .gmo files are copied to /usr/local/share/locale/xx/LC_MESSAGES as gramps.mo files.<br />
<br />
But you can change the place where GRAMPS looks for these files by altering the environment variable $GRAMPSI18N. So you could also for instance do something like this and avoid the <code>make install</code> step: (if you are using csh or tcsh the syntax would be a little different)<br />
<br />
[user@localhost /home/user/trunk]$ mkdir -p po/en_GB/LC_MESSAGES<br />
[user@localhost /home/user/trunk]$ cp po/en_GB.gmo po/en_GB/LC_MESSAGES/gramps.mo<br />
[user@localhost /home/user/trunk]$ cd src<br />
[user@localhost /home/user/trunk/src]$ GRAMPSI18N=$PWD/../po LANG=en_GB.UTF-8 python gramps.py<br />
<br />
===== gramps.sh =====<br />
<br />
On a gramps launcher (copy from ''{prefix}/bin/gramps'') you can set :<br />
export GRAMPSDIR=/...<br />
export GRAMPSI18N=/...<br />
<br />
Where the environment variable ''$GRAMPSDIR'' is the path to your ''gramps'' directory.<br />
<br />
Where the environment variable ''$GRAMPSI18N'' is the path to your ''gramps locale'' directory.<br />
<br />
===== Just testing your translation =====<br />
<br />
If you don't want to compile all translations, you may save your ''.po'' file as ''.mo'' file, or use ''msgfmt'' utility on /po directory:<br />
<br />
msgfmt -o gramps.mo your_lang.po<br />
<br />
msgfmt.exe -o gramps.mo your_lang.po<br />
<br />
this will create a ''gramps.mo'' file, a compiled version of your ''.po'' file.<br />
Put it on your translation path (''see above'').<br />
<br />
==Hard to translate phrases==<br />
Some things are just hard to translate. Below are a few of the more difficult items, along with some suggestions on how to handle them.<br />
===LDS terminology===<br />
The Church of Jesus Christ of Latter Day Saints (a.k.a. Mormons) maintains a lot of genealogy data. In the United States, they are probably the non-government organization with the most detailed records available. Genealogical research is important to the Mormon church. They are responsible for defining the [[GEDCOM]] format.<br />
<br />
The LDS Church has some specific terminology that can present difficulty in translating. There are two approaches to handling the information.<br />
# If the LDS Church has a presence in your country, contact the LDS Temple in your area and ask them what the correct terminology is in your native language<br />
# If the LDS Church does not have a presence in your country, it would probably be safe to simply not translate the phrases.<br />
These terms include:<br />
# LDS Ordinance names:<br />
#* Sealed to Parents<br />
#* Sealed to Spouse<br />
#* LDS Baptism<br />
#* Endowment<br />
# LDS Status names for Ordinances:<br />
#* Child<br />
#* Cleared<br />
#* Completed<br />
#* Infant<br />
#* Pre-1970<br />
#* Qualified<br />
#* Stillborn<br />
#* Submitted<br />
#* Uncleared<br />
#* BIC (Born In the Covenant)<br />
#* DNS (Do Not Submit)<br />
#* Canceled<br />
#* DNS/CAN (Do Not Submit/Previous sealing cancelled)<br />
<br />
==Advanced issues==<br />
===Format line parameters===<br />
Format line parameters such as <nowiki>%s</nowiki> and <nowiki>%d</nowiki> '''should not''' be translated. The order of these parameters '''should not''' be changed. Examples:<br />
<br />
English:<br />
Long widowhood: %s was a widow %d years.<br />
<br />
Translation (using Backward English as an example :-):<br />
Gnol doohwodiw: %s saw a wodiw %d sraey.<br />
<br />
Named format line parameters such as <nowiki>%(something)s and %(something)d</nowiki> also '''should not''' be translated. Feel free to change the order of named parameters to correctly phrase the message in your language. Also, use hints provided by the names. Examples:<br />
<br />
English:<br />
Baptized before birth: %(male_name)s<br />
born %(byear)d, baptized %(bapyear)d.<br />
<br />
Translation into Backward English:<br />
Dezitpab erofeb htrib: %(byear)d<br />
nrob %(male_name)s, dezitpab %(bapyear)d.<br />
<br />
In the above example, the verb "born" should be in masculine form (if verbs in your language have gender, that is), since the person born is apparently a male.<br />
<br />
Sometimes those <nowiki>%(something)s</nowiki> are positioned in a text without spaces, like in the example below:<br />
<br />
English:<br />
This person was baptised%(endnotes)s.<br />
<br />
Translation into Backward English:<br />
Siht nosrep saw desitpab%(endnotes)s.<br />
<br />
===Translation context===<br />
In some cases, two different concepts can be expressed by the same word in English and yet require different translations. For example, the '''title of the book''' and the nobility '''title of the person''' are expressed by the same '''Title''' word. However, in other languages different words are needed to describe the book title and the person's title.<br />
<br />
To mitigate such problems, a context can be added to the translation string. A context-enabled string has a vertical line separating the context from the string:<br />
book|Title<br />
person|Title<br />
The correct translation '''should not''' include either the context or the separator. The context is to give the translator idea of what the string means. However, '''both the context and the separator must not be in the translated string''', so in backward english the above is translated into<br />
Eltitkoob<br />
Eltitnosrep<br />
<br />
===Plural forms===<br />
<br />
There was requests for [http://www.gnu.org/software/gettext/manual/html_node/gettext_150.html#Plural-forms plural forms] support.<br />
<br />
First, translators need to check if information is available on .po header :''"Plural-Forms:\n"''. (See [http://translate.sourceforge.net/wiki/l10n/pluralforms samples])<br />
<br />
# msgid contains the singular string in english<br />
# msgid_plural contains the plural string in english<br />
# msgstr[0] contains the singular translated version (for 1 and sometimes 0, set on header)<br />
# msgstr[1] contains the plural version (for 1 + 1 = 2 )<br />
# msgstr[2] contains the plural form (for 2 + 1 = 3)<br />
<br />
*For language with one form (singular=plural, ''Plural-Forms: nplurals=1; plural=0''), like Chinese, Hungarian or Turkish:<br />
<br />
msgid "%d second"<br />
msgid_plural "%d seconds"<br />
msgstr [0] "%d 秒"<br />
<br />
*For language with one plural form (''Plural-Forms: nplurals=2; plural=n != 1;''), like english:<br />
<br />
msgid "%d hour"<br />
msgid_plural "%d hours"<br />
msgstr [0] "%d hour"<br />
msgstr [1] "%d hours"<br />
<br />
*For language with more plural forms (like Czech):<br />
<br />
msgid "%d second"<br />
msgid_plural "%d seconds"<br />
msgstr [0] "%d sekunda"<br />
msgstr [1] "%d sekundy"<br />
msgstr [2] "%d sekund"<br />
<br />
As a final check, please do ensure that the following command does not throw any errors:<br />
<br />
msgfmt -c filename.po<br />
<br />
===Translating mnemonics keys(Keyboard Shortcut keys)===<br />
Mnemonics are accelerator keys (also known as Keyboard Shortcut keys) you find in labels, accessible by pressing the {{man key press|ALT}} key together with the mnemonic. You see then in the translated text with a low line, eg '_Help' is shown as 'Help' with a line under the H, and can be put to focus/selected by pressing {{man key press|ALT|h}}.<br />
<br />
It is nice if mnemonics on a screen are unique, but it is not required. If you use twice the same mnemonic, the user must press repeatedly the accelerator to switch between the different entries. However, note the following rule:<br />
*"If duplication of access keys in a window is unavoidable, you should still refrain from duplicating the access keys for any of these buttons that appear in the same window: {{man button|OK}}, {{man button|Cancel}}, {{man button|Close}}, {{man button|Apply}} or {{man button|Help}}."<br />
<br />
So you should check in your language what the mnemonic key is for those buttons, and avoid using the same in translated text<br />
<br />
'''Warning''': some fonts family will not properly display mnemonics on "g", "j", "p", "q" or "y" as these print the letter over the line under it making it very hard to distinguish the small line. Please avoid to use mnemonics key bindings on these letters. Also try to avoid i and l, as people have difficulty distinguishing between those.<br />
<br />
Capital letters are no problem though, underlining eg G will work just fine as the letter does not write over the line.<br />
<br />
===Translating relationships===<br />
Translating relationships is not done within the <code>.po</code> files, except for occasional <code>father</code> and <code>mother</code> strings here and there in the interfaces and reports. Complete translation of all relationships for the language/culture is done inside a relationship calculator plugin.<br />
<br />
In short, the need for a plugin comes from the impossibility to translate "first cousin twice removed" in languages such as, e.g., German or Russian. See the [[Relationship Calculator]] page for details on why and how to create such a plugin.<br />
<br />
===Translating dates===<br />
Handling date translation is not entirely done within the <code>.po</code> files. Complete handling of date translation for each language/culture is done inside a dedicated date handler module.<br />
<br />
The need for a separate module comes from the requirements to handle culture-specific parsing and displaying of dates. For example, the month and day order is different between most European countries and the US. Also, each language has its own set of acceptable modifier and qualifiers for the date: things like "from X to Y" or "between X and Y" may have different word order. Same with "around", "calculated", "estimated". Add to this calendar names, and you have a compelling need for a dedicated module. See the [[Date Handler]] page for details on why and how to create such a module.<br />
<br />
==Translating man pages==<br />
You can also translated the man pages into your own language.<br />
<br />
For the development (trunk) version you can find the required starting files under the directory (/trunk)/data/man. You will find the files<br />
*Makefile.am<br />
*gramps.1.in<br />
<br />
First off all you must make a directory for your language under data/man.<br />
<code><br />
cd data/man<br />
</code><br />
<br />
and do <code><br />
mkdir xx<br />
</code><br />
<br />
where xx is your languagecode (fr for French, sv for Swedish, etc.) You should use SVN. See [[Brief_introduction_to_SVN| the introduction to SVN]]. Then do <code><br />
svn add xx<br />
svn commit -m "xx dir for man pages" xx<br />
</code><br />
This will add the xx dir under svn revision control and upload the new dir.<br />
Next step is to copy the Makefile.am and gramps.1.in from data/man to your new directory. Translate all relevant strings in the data/man/xx/gramps.1.in file. Change the file data/man/xx/Makefile.am:<br />
*add the line mandir = @mandir@/xx<br />
*change the line && CONFIG_FILES=data/man/xx/$@ $(SHELL)<br />
<br />
Next step: change the file data/man/Makefile: <br />
*add xx to the line SUBDIRS = fr nl sv<br />
<br />
The final step is to alter the file ''Configure.in '':<br />
*add data/man/xx/Makefile to the line AC_CONFIG_FILES([<br />
<br />
Because you added new files, SVN requires that you set the correct propset for those files. Two things are to be done.<br />
<code><br />
svn propset svn:mime-type text/plain xx/gramps.1.in xx/Makefile.am<br />
svn propset svn:eol-type native xx/gramps.1.in xx/Makefile.am<br />
</code><br />
<br />
You could also in the config file of subversion ( HOMEDIR/.subversion/config) enable the auto-prop feature (enable-auto-props = yes) and uncomment the relevant lines in the [auto-props] section.<br />
All changes must be committed and do not forget to change the ChangeLog file.<br />
<br />
You should see no errors when you run the <code><br />
./configure<br />
make<br />
</code> scripts.<br />
<br />
{{man warn|Install|This last step must be done only in the data/man/xx directory. If not, your normal gramps installation will be overwritten. And this step must be done as superuser(su)}}<br />
<code><br />
sudo make install<br />
</code><br />
This will put the gramps.1.gz file into /usr/local/share/man/xx/man1 directory. You could also use a prefix. Then you do:<code><br />
sudo make --prefix=/usr/share install<br />
</code><br />
<br />
To see the result of your work, do:<code><br />
man -L xx gramps<br />
</code><br />
<br />
==Translating wiki manual==<br />
To have the link working in GRAMPS, you need to have or edit the GrampsDisplay.py file to contain your language.<br />
On line 30 of that file, you see:<br />
<br />
MANUALS = {<br />
'nl' : '/nl',<br />
}<br />
<br />
This maps a language code to the extension used on the wiki, so to add french, change this too:<br />
<br />
MANUALS = {<br />
'nl' : '/nl',<br />
'fr': '/fr',<br />
}<br />
<br />
*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.<br />
Note that reports/tools link to a section in the page with the same name as the report name in GRAMPS.<br />
<br />
*You should be able to edit directly on wiki or using tools like [http://translate.sourceforge.net/wiki/toolkit/txt2po 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.<br />
<br />
==Language specific pages==<br />
Check out the pages which cover some aspects of translation into a specific language, such as the glossary.<br />
<br />
*[[Translation into Finnish|Finnish]]<br />
*[[Translation into French|French (Français)]]<br />
*[[Translation into Russian|Russian]]<br />
<br />
==Translating addon plugins==<br />
<br />
* See [[Addons_development#Get_translators_to_translate_your_addon_into_multiple_languages|3rd-party addon for GRAMPS]].</div>MathieuMDhttps://gramps-project.org/wiki/index.php?title=Translating_Gramps&diff=35874Translating Gramps2012-03-23T21:26:58Z<p>MathieuMD: /* Language specific pages */</p>
<hr />
<div>{{languages|Translating GRAMPS}}<br />
<br />
Tips for translators of the GRAMPS program.<br />
[[Category:Translators/Categories]][[Category:Developers/General]]<br />
<br />
==Gettext file format==<br />
<br />
===Header===<br />
<br />
''msginit'' is a GNU utility, called on /po directory, which generates a header for gettext file template : '''gramps.pot'''.<br />
<br />
"Project-Id-Version: PACKAGE VERSION\n"<br />
"Report-Msgid-Bugs-To: \n"<br />
"POT-Creation-Date: 2004-12-30 10:52-0500\n"<br />
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"<br />
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"<br />
"Language-Team: LANGUAGE <LL@li.org>\n"<br />
"MIME-Version: 1.0\n"<br />
"Content-Type: text/plain; charset=CHARSET\n"<br />
"Content-Transfer-Encoding: 8bit\n"<br />
"Plural-Forms: nplurals=2; plural=(n != 1);\n"<br />
<br />
* ''Project-Id-Version'' : this is the name and version of the package. Fill it in if it has not already been filled in by xgettext. <br />
* ''Report-Msgid-Bugs-To'' : this has already been filled in by xgettext. It contains an email address or URL where you can report bugs in the untranslated strings:<br />
** Strings which are not entire sentences, see the maintainer guidelines in Preparing Strings.<br />
** Strings which use unclear terms or require additional context to be understood.<br />
** Strings which make invalid assumptions about notation of date, time or money.<br />
** Pluralisation problems.<br />
** Incorrect English spelling.<br />
** Incorrect formatting. <br />
* ''POT-Creation-Date'' : this has already been filled in by xgettext.<br />
* ''PO-Revision-Date'' : You don't need to fill this in. It will be filled by the PO file editor when you save the file.<br />
* ''Last-Translator'' : fill in your name and email address (without double quotes).<br />
* ''Language-Team'' : fill in the English name of the language, and the email address or homepage URL of the language team you are part of. Before starting a translation, it is a good idea to get in touch with your translation team, not only to make sure you don't do duplicated work, but also to coordinate difficult linguistic issues. In the Free Translation Project, each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's [http://translationproject.org/ homepage], in the "Teams" area.<br />
<br />
=== msgid / msgstr / comment / fuzzy ===<br />
<br />
#: gramps.py:10<br />
#, fuzzy<br />
msgid "File not found"<br />
msgstr ""<br />
<br />
* text after ''#'' provides a comment.<br />
** The file reference and the line number after ''#:'' <br />
** A comment on code or the main string (''msgid'') after ''#.''<br />
** A comment on your translation (''msgstr'') after ''#''<br />
This will help translator but is optional for having a translation.<br />
* ''#, fuzzy'' could be added because string is not up-to-date. It means that there was a change somewhere (a string has been added, removed or modified) and ''xgettext'' did a guess on what the translation should be. This guess is most likely not entirely correct, but it is often very close.<br />
''fuzzy'' strings are ignored, english string (''msgid'') will be used ! Need to correct/validate entry on your translation editor.<br />
* msgid is the string, present on gramps' code<br />
* msgstr is your translation string<br />
<br />
==Tips for translators==<br />
===Getting started===<br />
<br />
# Always save your translations in UTF-8 encoding<br />
# Don't overwrite the English strings, your translation should be below the original string<br />
# Take heed on special characters. You must have the same number of and types as the original string.<br />
# Verify spelling and grammar on your translation.<br />
# Don't translate "too freely". Your translation should be as close match to the original as possible<br />
# Be consistent with your translations. If you decide on a specific word/phrase for something, stick to that throughout the translation.<br />
# If possible, try the translation before sending<br />
<br />
Translating GRAMPS into a new language means translating English strings used in the GRAMPS interface. To put it shortly, this amounts to<br />
# obtaining the gramps.pot file with the strings to be translated,<br />
# translating the strings in the template, and<br />
# getting the translated file uploaded into gramps SVN repository.<br />
Another avenue of translation is translating the documentation. This is a different and lengthy process and it is decribed in our [[Translating the manual]] page. Here we will concentrate on the interface translation only.<br />
<br />
===Obtaining gramps.pot===<br />
* Download <code>gramps.pot</code> from GRAMPS SVN repository, see [[Brief_introduction_to_SVN| the introduction to SVN]].<br />
* Look for <code>gramps.pot</code> in the directory <code>gramps33/po</code> or if you looking for the trunk version look for <code>gramps.pot</code> in the directory <code>trunk/po</code>.<br />
<br />
===Translating messages===<br />
* Copy <code>gramps.pot</code> to the file named <code>lang.po</code>, according to the language you are translating into (<code>fr.po</code> for French, <code>ru.po</code> for Russian, etc.)<br />
* Use [http://gtranslator.sourceforge.net GTtranslator] (GNOME, windows), [http://i18n.kde.org/tools/ KBabel] (KDE), [http://userbase.kde.org/Lokalize Lokalize] (KDE, windows), Emacs po-mode, [http://translate.sourceforge.net/wiki/pootling/index pootling] (GNU/Linux, windows), [http://www.poedit.net/ poedit] (GNU/Linux, OSX, windows), or any similar tool designed for translating <code>.po</code> files. If you do not like any of these tools, you can use any text editor to translate messages. If using vim, properly setting the "langmap" option will significantly speed up your work.<br />
* Even though GRAMPS uses UNICODE (UTF-8) for its character set, you may use your native character set for your translation. Just make sure you specify the character set you are using in the <code>Content-Type</code> line in the <code>.po</code> file. GRAMPS will handle the conversion to UNICODE.<br />
* If there are non ASCII characters in the original English string, try to preserve them by copying them, if applicable.<br />
<br />
===Context===<br />
As an extension to standard gettext, strings in GRAMPS can have a context prefix. This prefix should '''not''' be translated, and just be deleted in the translation. More info and an example [[#Translation context|further down]].<br />
<br />
As a special context, you will see the manual context, eg :<br />
'manual|Editing_Dates'<br />
these strings should only be translated if a wiki manual is available in your language, eg in Dutch :<br />
'Datums_aanpassen' <br />
<br />
The string refers to a section, eg [[Gramps_3.3_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed_-_part_1#Editing_dates |Editing_Dates]] in Dutch becomes [[Gramps_3.3_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed_-_part_1/de#Daten_bearbeiten|Datums_aanpassen]].<br />
<br />
===Testing your <code>.po</code> file===<br />
In the directory <code>gramps33/po</code> or the <code>trunk/po</code> run the command: <pre>make</pre> If there are errors in your po file, this will fail and give you an error message. You should correct these errors. If you have trouble understanding the error, try to run the next test, which might give a more verbose output.<br />
<br />
====check_po====<br />
In the directory <code>gramps33/po</code> or the <code>trunk/po</code> run the command: <pre>./check_po lang.po</pre> or <pre>python check_po lang.po > lang</pre> where lang is your language code. This will give you errors in your translation, information on badly translated phrases, ... the output could resemble something like this..<br />
<br />
File: nl.po<br />
Template total: 3816<br />
PO total: 3671<br />
Fuzzy: 125<br />
Untranslated: 12<br />
%s mismatches: 0<br />
%d mismatches: 2<br />
%() name mismatches:9<br />
%() missing s/d: 0<br />
Runaway context: 0<br />
XML special chars: 0<br />
Last character: 15<br />
Shortcut in msgstr: 16<br />
PO Coverage: 99.67%<br />
Template Coverage: 95.89%<br />
Localized at: 97% (previous gramps.pot)<br />
<br />
If you get ''previous gramps.pot'', then you are not using the last ''gramps.pot'', see [[#Updating_your_translation|update your translation]]. ''fuzzy'' and untranslated strings will be ignored, Gramps will use main strings in english.<br />
<br />
-------- %d mismatches --------------<br />
You can see that there are 3816 strings to be translated and the coverage is around 96 %. There are still 12 untranslated strings and some 120 fuzzies. The last one can be ok, but should be checked. Additional information shows e.g. that in 15 strings there is a mismatch with the 'last character':<br />
-------- last character not identical ---------<br />
msg nr: 98, lineno: 602<br />
msgid "Could not make database directory: "<br />
msgstr "Kon geen gegevensbestandsmap aanmaken"<br />
<br />
This is very valuable information, because you can easily see what the problem is, even if you do not understand the language! Clearly the last characters must be ": "<br />
<br />
====statistics====<br />
<br />
In the directory <code>gramps33/po</code> or the <code>trunk/po</code> run the command: <pre>msgfmt --statistics lang.po</pre> or <pre>msgfmt.exe --statistics lang.po</pre> where lang is your language code. This should not throw an error.<br />
Basically this gives the same info in a condensed format: 3533 translated messages, 125 fuzzy translations, 12 untranslated messages.<br />
<br />
====GNU `gettext' utilities====<br />
<br />
[http://www.gnu.org/software/gettext/ GNU `gettext' utilities] provides a few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings:<br />
<br />
msgattrib - attribute matching and manipulation on message catalog<br />
msgcat - combines several message catalogs<br />
msgcmp - compare message catalog and template<br />
msgcomm - match two message catalogs<br />
msgconv - character set conversion for message catalog<br />
msgen - create English message catalog<br />
msgexec - process translations of message catalog<br />
msgfilter - edit translations of message catalog<br />
msgfmt - compile message catalog to binary format (.po->.mo)<br />
msggrep - pattern matching on message catalog<br />
msginit - initialize a message catalog<br />
msgmerge - merge message catalog and template<br />
msgunfmt - uncompile message catalog from binary format<br />
msguniq - unify duplicate translations in message catalog<br />
<br />
For checking syntax (header, format, domain) :<br />
msgfmt -c nl.po<br />
<br />
msgfmt.exe -c nl.po<br />
<br />
For checking keyboard accelerators (underscore) :<br />
msgfmt --check-accelerators=_ nl.po<br />
<br />
msgfmt.exe --check-accelerators=_ nl.po<br />
<br />
====Gettext lint====<br />
<br />
[http://gettext-lint.sourceforge.net/ Gettext lint] is a collection of tools for checking the validity, consistency and spelling of PO. Some python scripts do not work anymore with last expat version.<br />
<br />
====Translate Toolkit====<br />
<br />
[http://translate.sourceforge.net/wiki/toolkit/index Translate Toolkit] is a collection of useful tools for localisation. It can help to improve the quality of your localisation, including tools to help check, validate, merge and extract messages from your localizations.<br />
<br />
====Save as .mo file====<br />
<br />
If possible and when you are finished translating, go to '''File -> Save as...''' to generate a ''.mo'' file for testing syntax.<br />
<br />
* Under poedit, you can set to always compile a ''.mo'' file when saving changes by clicking '''File -> Preferences''' and on the '''Editor tab''' check the '''Automatically compile ''.mo'' file on save box'''. A dialog will warn you if there is a syntax error on your ''.po'' file.<br />
<br />
* Kbabel and Lokalize also provide a syntax check when saving. If an error occured we can navigate to messages which contain errors. <br />
<br />
Please, enable this feature to avoid errors on compilation process.<br />
<br />
===Formatting (compiling) <code>.po</code> file===<br />
* Currently, [[Coding_for_translation#How_it_works|formatting (msgfmt) is performed during build time]], so you should not have to worry about it. The translated <code>.po</code> file is the product of your work. Check it into SVN if you obtained the permission to do so, or email it to [[Contact|Brian or Benny]] otherwise.<br />
<br />
===Updating your translation===<br />
If you have submitted a translation, it may well be that after some weeks/months, new strings are added to GRAMPS, implying you need to update your translation file. <br />
<br />
Assuming you have obtained originally the GRAMPS source tree as explained in [[Brief introduction to SVN]]. Now:<br />
* Update your gramps tree from SVN. This can be done by executing the command <pre>svn up</pre> from the root GRAMPS svn directory. This will download an updated <code>gramps.pot</code> file.<br />
* Use your outdated translation to translate the strings that did not change:<pre>msgmerge lang.po gramps.pot -o newlang.po</pre> or <pre>msgmerge --no-wrap lang.po gramps.pot -o newlang.po</pre> where <code>lang</code> is your language code. The <code>--no-wrap</code> option will prevent changes due to automatic word wrapping, use it if your previous po file was constructed like that. The <code>--no-wrap</code> options allows for more readable SVN diffs.<br />
* Check fuzzy messages and translate all untranslated messages in <code>newlang.po</code>. When you are sure everything is right, rename <code>newlang.po</code> as <code>lang.po</code> and check it into SVN as you did with the original file.<br />
* If command <code>msgmerge</code> is not available on your system, you have to install the <code>}gettext</code> package. For [http://wiki.wxpython.org/index.cgi/Internationalization#How_to_get_gettext_tools_for_Win32 windows users].<br />
<br />
There is also the make target that does the following:<br />
* Create new <code>gramps.pot</code> template from the source code files<br />
cd po<br />
make gramps.pot<br />
or<br />
cd po<br />
intltool-update -p<br />
* Updates each <code>po</code> file in the source tree<br />
It may be an overkill for you, but if you feel like using it, you can run:<br />
cd po<br />
make update-po <br />
in the <code>po</code> directory. This assumes that you have already succesfully configured the source. Note, this command ignores <code>--no-wrap</code> option, so not practical for SVN diffs.<br />
<br />
===Testing your update===<br />
<br />
You can test your update easily with the above mentioned '''check_po''' file. If you downloaded this file, just do:<br />
<pre>python check_po newlang.po</pre>. If everything is ok, the output will be something like this:<br />
File: newlang.po<br />
Template total: 3075<br />
PO total: 3075<br />
Fuzzy: 0<br />
Untranslated: 0<br />
%s mismatches: 0<br />
%d mismatches: 0<br />
%() name mismatches:0<br />
%() missing s/d: 0<br />
Runaway context: 0<br />
XML special chars: 0<br />
Last character: 0<br />
Shortcut in msgstr: 0<br />
PO Coverage: 100.00%<br />
Template Coverage: 100.00%<br />
<br />
===Installing your translation===<br />
<br />
You want to use the new translation immediately, and systemwide?<br />
You can by installing just the contents of the po directory, but you will need to build the source first, so:<br />
./autogen.sh<br />
make<br />
cd po<br />
make --prefix=/usr install #as root !<br />
<br />
This should install your translations to <code>/usr/share/locale/xx/LC_MESSAGES/gramps.mo</code>, with xx being your language. You could of course copy your files manually to that dir with the gramps.mo name.<br />
<br />
Make sure you only install from within the po directory, or you will install the development version of GRAMPS, which is not supported and for testing only!<br />
<br />
==== Running trunk with your translation ====<br />
<br />
The current GRAMPS trunk as of February 2009 by default looks for the i18n data under <code>/usr/local/share/locale</code>. So you can use:<br />
<br />
./autogen.sh<br />
make<br />
cd po<br />
make install #as root !<br />
<br />
This will install the .mo files under /usr/local/share/locale/xx/LC_MESSAGES, since the default prefix is /usr/local<br />
<br />
or <br />
<br />
./autogen.sh --prefix=/home/.../<br />
make<br />
make install #as simple user !<br />
<br />
This will install Gramps and translations under your ''/home/...'' directory.<br />
<br />
===== $GRAMPSI18N (for your locale) =====<br />
<br />
Actually you don't even need to install the files in order to test them. This is useful because you can develop GRAMPS without needing superuser privileges. Bear in mind the GRAMPS i18n process goes something like this when you use trunk as of February 2009:<br />
<br />
* when you type <code>make</code> in the source tree root (/home/user/trunk e.g.) all the trunk/po/*.po files are compiled into trunk/po/*.gmo files.<br />
* when you type <code>make install</code> inside the /home/user/trunk/po directory, these .gmo files are copied to /usr/local/share/locale/xx/LC_MESSAGES as gramps.mo files.<br />
<br />
But you can change the place where GRAMPS looks for these files by altering the environment variable $GRAMPSI18N. So you could also for instance do something like this and avoid the <code>make install</code> step: (if you are using csh or tcsh the syntax would be a little different)<br />
<br />
[user@localhost /home/user/trunk]$ mkdir -p po/en_GB/LC_MESSAGES<br />
[user@localhost /home/user/trunk]$ cp po/en_GB.gmo po/en_GB/LC_MESSAGES/gramps.mo<br />
[user@localhost /home/user/trunk]$ cd src<br />
[user@localhost /home/user/trunk/src]$ GRAMPSI18N=$PWD/../po LANG=en_GB.UTF-8 python gramps.py<br />
<br />
===== gramps.sh =====<br />
<br />
On a gramps launcher (copy from ''{prefix}/bin/gramps'') you can set :<br />
export GRAMPSDIR=/...<br />
export GRAMPSI18N=/...<br />
<br />
Where the environment variable ''$GRAMPSDIR'' is the path to your ''gramps'' directory.<br />
<br />
Where the environment variable ''$GRAMPSI18N'' is the path to your ''gramps locale'' directory.<br />
<br />
===== Just testing your translation =====<br />
<br />
If you don't want to compile all translations, you may save your ''.po'' file as ''.mo'' file, or use ''msgfmt'' utility on /po directory:<br />
<br />
msgfmt -o gramps.mo your_lang.po<br />
<br />
msgfmt.exe -o gramps.mo your_lang.po<br />
<br />
this will create a ''gramps.mo'' file, a compiled version of your ''.po'' file.<br />
Put it on your translation path (''see above'').<br />
<br />
==Hard to translate phrases==<br />
Some things are just hard to translate. Below are a few of the more difficult items, along with some suggestions on how to handle them.<br />
===LDS terminology===<br />
The Church of Jesus Christ of Latter Day Saints (a.k.a. Mormons) maintains a lot of genealogy data. In the United States, they are probably the non-government organization with the most detailed records available. Genealogical research is important to the Mormon church. They are responsible for defining the [[GEDCOM]] format.<br />
<br />
The LDS Church has some specific terminology that can present difficulty in translating. There are two approaches to handling the information.<br />
# If the LDS Church has a presence in your country, contact the LDS Temple in your area and ask them what the correct terminology is in your native language<br />
# If the LDS Church does not have a presence in your country, it would probably be safe to simply not translate the phrases.<br />
These terms include:<br />
# LDS Ordinance names:<br />
#* Sealed to Parents<br />
#* Sealed to Spouse<br />
#* LDS Baptism<br />
#* Endowment<br />
# LDS Status names for Ordinances:<br />
#* Child<br />
#* Cleared<br />
#* Completed<br />
#* Infant<br />
#* Pre-1970<br />
#* Qualified<br />
#* Stillborn<br />
#* Submitted<br />
#* Uncleared<br />
#* BIC (Born In the Covenant)<br />
#* DNS (Do Not Submit)<br />
#* Canceled<br />
#* DNS/CAN (Do Not Submit/Previous sealing cancelled)<br />
<br />
==Advanced issues==<br />
===Format line parameters===<br />
Format line parameters such as <nowiki>%s</nowiki> and <nowiki>%d</nowiki> '''should not''' be translated. The order of these parameters '''should not''' be changed. Examples:<br />
<br />
English:<br />
Long widowhood: %s was a widow %d years.<br />
<br />
Translation (using Backward English as an example :-):<br />
Gnol doohwodiw: %s saw a wodiw %d sraey.<br />
<br />
Named format line parameters such as <nowiki>%(something)s and %(something)d</nowiki> also '''should not''' be translated. Feel free to change the order of named parameters to correctly phrase the message in your language. Also, use hints provided by the names. Examples:<br />
<br />
English:<br />
Baptized before birth: %(male_name)s<br />
born %(byear)d, baptized %(bapyear)d.<br />
<br />
Translation into Backward English:<br />
Dezitpab erofeb htrib: %(byear)d<br />
nrob %(male_name)s, dezitpab %(bapyear)d.<br />
<br />
In the above example, the verb "born" should be in masculine form (if verbs in your language have gender, that is), since the person born is apparently a male.<br />
<br />
Sometimes those <nowiki>%(something)s</nowiki> are positioned in a text without spaces, like in the example below:<br />
<br />
English:<br />
This person was baptised%(endnotes)s.<br />
<br />
Translation into Backward English:<br />
Siht nosrep saw desitpab%(endnotes)s.<br />
<br />
===Translation context===<br />
In some cases, two different concepts can be expressed by the same word in English and yet require different translations. For example, the '''title of the book''' and the nobility '''title of the person''' are expressed by the same '''Title''' word. However, in other languages different words are needed to describe the book title and the person's title.<br />
<br />
To mitigate such problems, a context can be added to the translation string. A context-enabled string has a vertical line separating the context from the string:<br />
book|Title<br />
person|Title<br />
The correct translation '''should not''' include either the context or the separator. The context is to give the translator idea of what the string means. However, '''both the context and the separator must not be in the translated string''', so in backward english the above is translated into<br />
Eltitkoob<br />
Eltitnosrep<br />
<br />
===Plural forms===<br />
<br />
There was requests for [http://www.gnu.org/software/gettext/manual/html_node/gettext_150.html#Plural-forms plural forms] support.<br />
<br />
First, translators need to check if information is available on .po header :''"Plural-Forms:\n"''. (See [http://translate.sourceforge.net/wiki/l10n/pluralforms samples])<br />
<br />
# msgid contains the singular string in english<br />
# msgid_plural contains the plural string in english<br />
# msgstr[0] contains the singular translated version (for 1 and sometimes 0, set on header)<br />
# msgstr[1] contains the plural version (for 1 + 1 = 2 )<br />
# msgstr[2] contains the plural form (for 2 + 1 = 3)<br />
<br />
*For language with one form (singular=plural, ''Plural-Forms: nplurals=1; plural=0''), like Chinese, Hungarian or Turkish:<br />
<br />
msgid "%d second"<br />
msgid_plural "%d seconds"<br />
msgstr [0] "%d 秒"<br />
<br />
*For language with one plural form (''Plural-Forms: nplurals=2; plural=n != 1;''), like english:<br />
<br />
msgid "%d hour"<br />
msgid_plural "%d hours"<br />
msgstr [0] "%d hour"<br />
msgstr [1] "%d hours"<br />
<br />
*For language with more plural forms (like Czech):<br />
<br />
msgid "%d second"<br />
msgid_plural "%d seconds"<br />
msgstr [0] "%d sekunda"<br />
msgstr [1] "%d sekundy"<br />
msgstr [2] "%d sekund"<br />
<br />
As a final check, please do ensure that the following command does not throw any errors:<br />
<br />
msgfmt -c filename.po<br />
<br />
===Translating mnemonics keys(Keyboard Shortcut keys)===<br />
Mnemonics are accelerator keys (also known as Keyboard Shortcut keys) you find in labels, accessible by pressing the {{man key press|ALT}} key together with the mnemonic. You see then in the translated text with a low line, eg '_Help' is shown as 'Help' with a line under the H, and can be put to focus/selected by pressing {{man key press|ALT|h}}.<br />
<br />
It is nice if mnemonics on a screen are unique, but it is not required. If you use twice the same mnemonic, the user must press repeatedly the accelerator to switch between the different entries. However, note the following rule:<br />
*"If duplication of access keys in a window is unavoidable, you should still refrain from duplicating the access keys for any of these buttons that appear in the same window: {{man button|OK}}, {{man button|Cancel}}, {{man button|Close}}, {{man button|Apply}} or {{man button|Help}}."<br />
<br />
So you should check in your language what the mnemonic key is for those buttons, and avoid using the same in translated text<br />
<br />
'''Warning''': some fonts family will not properly display mnemonics on "g", "j", "p", "q" or "y" as these print the letter over the line under it making it very hard to distinguish the small line. Please avoid to use mnemonics key bindings on these letters. Also try to avoid i and l, as people have difficulty distinguishing between those.<br />
<br />
Capital letters are no problem though, underlining eg G will work just fine as the letter does not write over the line.<br />
<br />
===Translating relationships===<br />
Translating relationships is not done within the <code>.po</code> files, except for occasional <code>father</code> and <code>mother</code> strings here and there in the interfaces and reports. Complete translation of all relationships for the language/culture is done inside a relationship calculator plugin.<br />
<br />
In short, the need for a plugin comes from the impossibility to translate "first cousin twice removed" in languages such as, e.g., German or Russian. See the [[Relationship Calculator]] page for details on why and how to create such a plugin.<br />
<br />
===Translating dates===<br />
Handling date translation is not entirely done within the <code>.po</code> files. Complete handling of date translation for each language/culture is done inside a dedicated date handler module.<br />
<br />
The need for a separate module comes from the requirements to handle culture-specific parsing and displaying of dates. For example, the month and day order is different between most European countries and the US. Also, each language has its own set of acceptable modifier and qualifiers for the date: things like "from X to Y" or "between X and Y" may have different word order. Same with "around", "calculated", "estimated". Add to this calendar names, and you have a compelling need for a dedicated module. See the [[Date Handler]] page for details on why and how to create such a module.<br />
<br />
==Translating man pages==<br />
You can also translated the man pages into your own language.<br />
<br />
For the development (trunk) version you can find the required starting files under the directory (/trunk)/data/man. You will find the files<br />
*Makefile.am<br />
*gramps.1.in<br />
<br />
First off all you must make a directory for your language under data/man.<br />
<code><br />
cd data/man<br />
</code><br />
<br />
and do <code><br />
mkdir xx<br />
</code><br />
<br />
where xx is your languagecode (fr for French, sv for Swedish, etc.) You should use SVN. See [[Brief_introduction_to_SVN| the introduction to SVN]]. Then do <code><br />
svn add xx<br />
svn commit -m "xx dir for man pages" xx<br />
</code><br />
This will add the xx dir under svn revision control and upload the new dir.<br />
Next step is to copy the Makefile.am and gramps.1.in from data/man to your new directory. Translate all relevant strings in the data/man/xx/gramps.1.in file. Change the file data/man/xx/Makefile.am:<br />
*add the line mandir = @mandir@/xx<br />
*change the line && CONFIG_FILES=data/man/xx/$@ $(SHELL)<br />
<br />
Next step: change the file data/man/Makefile: <br />
*add xx to the line SUBDIRS = fr nl sv<br />
<br />
The final step is to alter the file ''Configure.in '':<br />
*add data/man/xx/Makefile to the line AC_CONFIG_FILES([<br />
<br />
Because you added new files, SVN requires that you set the correct propset for those files. Two things are to be done.<br />
<code><br />
svn propset svn:mime-type text/plain xx/gramps.1.in xx/Makefile.am<br />
svn propset svn:eol-type native xx/gramps.1.in xx/Makefile.am<br />
</code><br />
<br />
You could also in the config file of subversion ( HOMEDIR/.subversion/config) enable the auto-prop feature (enable-auto-props = yes) and uncomment the relevant lines in the [auto-props] section.<br />
All changes must be committed and do not forget to change the ChangeLog file.<br />
<br />
You should see no errors when you run the <code><br />
./configure<br />
make<br />
</code> scripts.<br />
<br />
{{man warn|Install|This last step must be done only in the data/man/xx directory. If not, your normal gramps installation will be overwritten. And this step must be done as superuser(su)}}<br />
<code><br />
sudo make install<br />
</code><br />
This will put the gramps.1.gz file into /usr/local/share/man/xx/man1 directory. You could also use a prefix. Then you do:<code><br />
sudo make --prefix=/usr/share install<br />
</code><br />
<br />
To see the result of your work, do:<code><br />
man -L xx gramps<br />
</code><br />
<br />
==Translating wiki manual==<br />
To have the link working in GRAMPS, you need to have or edit the GrampsDisplay.py file to contain your language.<br />
On line 30 of that file, you see:<br />
<br />
MANUALS = {<br />
'nl' : '/nl',<br />
}<br />
<br />
This maps a language code to the extension used on the wiki, so to add french, change this too:<br />
<br />
MANUALS = {<br />
'nl' : '/nl',<br />
'fr': '/fr',<br />
}<br />
<br />
*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.<br />
Note that reports/tools link to a section in the page with the same name as the report name in GRAMPS.<br />
<br />
*You should be able to edit directly on wiki or using tools like [http://translate.sourceforge.net/wiki/toolkit/txt2po 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.<br />
<br />
==Language specific pages==<br />
Check out the pages which cover some aspects of translation into a specific language, such as the glossary.<br />
<br />
*[[Translation into Finnish|Finnish]]<br />
*[[Translation into French|French (Français)]]<br />
*[[Translation into Russian|Russian]]<br />
<br />
==Translating addon plugins==<br />
<br />
* See [[Addons_development#Get_translators_to_translate_your_addon_into_multiple_languages|3rd-party addon for GRAMPS]].</div>MathieuMD