https://www.gramps-project.org/wiki/api.php?action=feedcontributions&user=BACbKA&feedformat=atomGramps - User contributions [en]2024-03-28T16:29:39ZUser contributionsMediaWiki 1.31.3https://www.gramps-project.org/wiki/index.php?title=Getting_started_with_Gramps_development&diff=49444Getting started with Gramps development2014-04-30T06:46:26Z<p>BACbKA: /* pycharm */ removed the license blurb, the community edition is fully functional python environment and has no timebomb any more</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 />
Eclipse with 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. Go in the menu "Window"->"Preferences...", then choose "Pydev"->"Interpreter - Python". With "new", you can create a link to "/usr/bin/python2.5". there you are.<br />
<br />
Next, you have to set up a pydev project. Go in the menu "File" -> "New" -> "Project", and choose a Pydev projet. Project name could be "Gramps trunk", uncheck "Use defaults" and choose "~/gramps-trunk" as the project directory. Project type is "Python 2.6", and then you can press "Finish". 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>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Translating_Gramps&diff=48090Translating Gramps2014-01-29T12:05:24Z<p>BACbKA: /* Translation context in GUI labels */</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 the Gramps Git repository.<br />
Another avenue of translation is translating the documentation. This is a different and lengthy process and it is described in our [[Translating the Gramps User manual]] page. Here we will concentrate on the interface translation only.<br />
<br />
===Obtaining gramps.pot===<br />
* Download <code>gramps.pot</code> from Gramps Git repository, see [[Brief_introduction_to_Git| the introduction to Git]].<br />
* Look for <code>gramps.pot</code> in the '''po''' directory.<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 <code>po</code> directory 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 <code>po</code> directory run the command: <br />
<br />
./check_po --skip-fuzzy lang.po <br />
or <br />
python check_po --skip-fuzzy lang.po > lang<br />
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 <code>po</code> directory 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 />
====Pology (KDE)====<br />
<br />
[http://pology.nedohodnik.net/ Pology] is a Python library and collection of command-line tools for in-depth processing of PO files, the translation file format of the GNU Gettext software translation system. Pology functionality ranges from precision operations on individual PO messages, to cross-file operations on large collections of PO files. Pology is used by the [http://websvn.kde.org/trunk/l10n-support/pology/ KDE] translation teams for checking syntax.<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 />
* Lokalize, GTranslator 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 Git 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 Git]]. Now:<br />
* Update your Gramps tree from Git. This can be done by executing the command <pre>git pull</pre> from the root Gramps 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 Git 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 Git 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 />
* To back-port translations, e.g., to merge master branch translations onto an earlier branch, do this on the eariler branch (assuming gramps.pot is updated):<br />
<pre>msgmerge -C lang.po master-lang.po gramps.pot -o newlang.po</pre>. Then resolve the fuzzies as usual.<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 Git diffs.<br />
<br />
{{man warn|Environment change|For Gramps 4.0 and master, see [[Translation_environment4|new environment]].}}<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 />
python check_po --skip-fuzzy newlang.po<br />
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 />
{{man warn|Environment change|For Gramps 4.0 and master, see [[Translation_environment4|new environment]].}}<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 ''/usr/share/locale/{lang}/LC_MESSAGES/gramps.mo'', with {lang} 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 the master branch with your translation ====<br />
<br />
The i18n data are often under ''../share/locale'' according to the default prefix.<br />
<br />
So you can use:<br />
<br />
python setup.py build<br />
python setup.py install #as root !<br />
<br />
This will install the .mo files under ''../share/locale/xx/LC_MESSAGES'', according to the default prefix set.<br />
<br />
or <br />
<br />
python setup.py build<br />
python setup.py install --root=/home/joe/gramps<br />
--prefix="/home/joe/gramps4" <br />
--enable-packager-mode #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 the master branch:<br />
<br />
* when you type <code>python build</code> in the source tree root (/home/user/Gramps e.g.) all the po/*.po files are compiled into build/mo/{lang}/*.mo files.<br />
* when you type <code>python install</code> inside the po directory, these .mo files are copied to {prefix}/share/locale/{lang}/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>python setup install</code> step: (if you are using csh or tcsh the syntax would be a little different)<br />
<br />
[user@localhost /home/user/Gramps]$ mkdir -p po/en_GB/LC_MESSAGES<br />
[user@localhost /home/user/Gramps]$ cp po/en_GB.gmo po/en_GB/LC_MESSAGES/gramps.mo<br />
[user@localhost /home/user/Gramps]$ cd gramps<br />
[user@localhost /home/user/Gramps/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 />
If you are a Gramps translator and need a developer to help you add a context to the Gramps source files, please ask for it on the gramps-devel list.<br />
<br />
====Translation context in GUI labels====<br />
If there is a string in the Glade GUI (i.e., in a .glade source file) that requires the translation context, it's impossible to have it translated statically. In this case, one needs to add runtime code to the corresponding dialog initialization to override the label string with the text obtained with an sgettext call. I.e.,<br />
<br />
* Verify the relevant widget has a meaningful id in the .glade file (as opposed to a silly autogenerated one). Modify the id if needed and make sure no existing code used the old widget id! E.g., change<br />
<object class="GtkLabel" id="label3"><br />
:into<br />
<object class="GtkLabel" id="place_name_label"><br />
* Add a context to the translatable string in the .glade file. This way, when you look at the POT file or a PO file derived from it, you see a reference to this place, along with the actual place in the .py file(s) which also has the same context string. E.g., change<br />
<property name="label" translatable="yes">Name:</property><br />
:into<br />
<property name="label" translatable="yes">place|Name:</property><br />
* In the corresponding dialog initialization, add code to set the string to the correct translation during runtime, e.g.:<br />
:globally in the file:<br />
PLACE_NAME = _('place|Name:')<br />
:in the MergePlace.__init__ method:<br />
for widget_name in ('name_btn1', 'name_btn2'):<br />
self.get_widget(widget_name).set_label(PLACE_NAME)<br />
:The exact method to call on the Gtk control will be different based on the actual GUI element affected. E.g., a GtkButton has a set_label method, whereas a GtkLabel has a set_text.<br />
* Regenerate the POT, translate the new PO strings, and test your work.<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 />
<br />
{{man warn|Environment change|For gramps 4.0 and master, see [[Translation_environment4#Translating_man_pages|new environment]].}}<br />
<br />
You can also translated the man pages into your own language.<br />
<br />
For the development version (master branch) you can find the required starting files under the directory 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 Git. See [[Brief_introduction_to_Git| the introduction to Git]].<br />
<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 />
All changes must be committed and pushed to the server:<br />
git commit -am "Add man page for xx"<br />
git push<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] or [http://po4a.alioth.debian.org/ po4a]. 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. eg, store existing entries from ''/usr/share/locale''.<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>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Translating_Gramps&diff=48089Translating Gramps2014-01-29T12:03:50Z<p>BACbKA: /* Translation context in GUI labels */</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 the Gramps Git repository.<br />
Another avenue of translation is translating the documentation. This is a different and lengthy process and it is described in our [[Translating the Gramps User manual]] page. Here we will concentrate on the interface translation only.<br />
<br />
===Obtaining gramps.pot===<br />
* Download <code>gramps.pot</code> from Gramps Git repository, see [[Brief_introduction_to_Git| the introduction to Git]].<br />
* Look for <code>gramps.pot</code> in the '''po''' directory.<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 <code>po</code> directory 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 <code>po</code> directory run the command: <br />
<br />
./check_po --skip-fuzzy lang.po <br />
or <br />
python check_po --skip-fuzzy lang.po > lang<br />
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 <code>po</code> directory 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 />
====Pology (KDE)====<br />
<br />
[http://pology.nedohodnik.net/ Pology] is a Python library and collection of command-line tools for in-depth processing of PO files, the translation file format of the GNU Gettext software translation system. Pology functionality ranges from precision operations on individual PO messages, to cross-file operations on large collections of PO files. Pology is used by the [http://websvn.kde.org/trunk/l10n-support/pology/ KDE] translation teams for checking syntax.<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 />
* Lokalize, GTranslator 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 Git 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 Git]]. Now:<br />
* Update your Gramps tree from Git. This can be done by executing the command <pre>git pull</pre> from the root Gramps 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 Git 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 Git 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 />
* To back-port translations, e.g., to merge master branch translations onto an earlier branch, do this on the eariler branch (assuming gramps.pot is updated):<br />
<pre>msgmerge -C lang.po master-lang.po gramps.pot -o newlang.po</pre>. Then resolve the fuzzies as usual.<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 Git diffs.<br />
<br />
{{man warn|Environment change|For Gramps 4.0 and master, see [[Translation_environment4|new environment]].}}<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 />
python check_po --skip-fuzzy newlang.po<br />
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 />
{{man warn|Environment change|For Gramps 4.0 and master, see [[Translation_environment4|new environment]].}}<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 ''/usr/share/locale/{lang}/LC_MESSAGES/gramps.mo'', with {lang} 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 the master branch with your translation ====<br />
<br />
The i18n data are often under ''../share/locale'' according to the default prefix.<br />
<br />
So you can use:<br />
<br />
python setup.py build<br />
python setup.py install #as root !<br />
<br />
This will install the .mo files under ''../share/locale/xx/LC_MESSAGES'', according to the default prefix set.<br />
<br />
or <br />
<br />
python setup.py build<br />
python setup.py install --root=/home/joe/gramps<br />
--prefix="/home/joe/gramps4" <br />
--enable-packager-mode #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 the master branch:<br />
<br />
* when you type <code>python build</code> in the source tree root (/home/user/Gramps e.g.) all the po/*.po files are compiled into build/mo/{lang}/*.mo files.<br />
* when you type <code>python install</code> inside the po directory, these .mo files are copied to {prefix}/share/locale/{lang}/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>python setup install</code> step: (if you are using csh or tcsh the syntax would be a little different)<br />
<br />
[user@localhost /home/user/Gramps]$ mkdir -p po/en_GB/LC_MESSAGES<br />
[user@localhost /home/user/Gramps]$ cp po/en_GB.gmo po/en_GB/LC_MESSAGES/gramps.mo<br />
[user@localhost /home/user/Gramps]$ cd gramps<br />
[user@localhost /home/user/Gramps/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 />
If you are a Gramps translator and need a developer to help you add a context to the Gramps source files, please ask for it on the gramps-devel list.<br />
<br />
====Translation context in GUI labels====<br />
If there is a string in the Glade GUI (i.e., in a .glade source file) that requires the translation context, it's impossible to have it translated statically. In this case, one needs to add runtime code to the corresponding dialog initialization to override the label string with the text obtained with an sgettext call. I.e.,<br />
<br />
* Verify the relevant widget has a meaningful id in the .glade file (as opposed to a silly autogenerated one). Modify the id if needed and make sure no existing code used the old widget id! E.g., change<br />
<object class="GtkLabel" id="label3"><br />
:into<br />
<object class="GtkLabel" id="place_name_label"><br />
* Add a context to the translatable string in the .glade file. This way, when you look at the POT file or a PO file derived from it, you see a reference to this place, along with the actual place in the .py file(s) which also has the same context string. E.g., change<br />
<property name="label" translatable="yes">Name:</property><br />
:into<br />
<property name="label" translatable="yes">place|Name:</property><br />
* In the corresponding dialog initialization, add code to set the string to the correct translation during runtime, e.g.:<br />
:globally in the file:<br />
PLACE_NAME = _('place|Name:')<br />
:in the MergePlace.__init__ method:<br />
for widget_name in ('name_btn1', 'name_btn2'):<br />
self.get_widget(widget_name).set_label(PLACE_NAME)<br />
:The exact method to call on the Gtk control will be different based on the actual GUI element affected. E.g., a GtkButton has a set_label method, whereas a GtkLabel has a set_text.<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 />
<br />
{{man warn|Environment change|For gramps 4.0 and master, see [[Translation_environment4#Translating_man_pages|new environment]].}}<br />
<br />
You can also translated the man pages into your own language.<br />
<br />
For the development version (master branch) you can find the required starting files under the directory 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 Git. See [[Brief_introduction_to_Git| the introduction to Git]].<br />
<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 />
All changes must be committed and pushed to the server:<br />
git commit -am "Add man page for xx"<br />
git push<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] or [http://po4a.alioth.debian.org/ po4a]. 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. eg, store existing entries from ''/usr/share/locale''.<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>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Translating_Gramps&diff=48088Translating Gramps2014-01-29T11:56:48Z<p>BACbKA: /* Translation context */</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 the Gramps Git repository.<br />
Another avenue of translation is translating the documentation. This is a different and lengthy process and it is described in our [[Translating the Gramps User manual]] page. Here we will concentrate on the interface translation only.<br />
<br />
===Obtaining gramps.pot===<br />
* Download <code>gramps.pot</code> from Gramps Git repository, see [[Brief_introduction_to_Git| the introduction to Git]].<br />
* Look for <code>gramps.pot</code> in the '''po''' directory.<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 <code>po</code> directory 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 <code>po</code> directory run the command: <br />
<br />
./check_po --skip-fuzzy lang.po <br />
or <br />
python check_po --skip-fuzzy lang.po > lang<br />
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 <code>po</code> directory 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 />
====Pology (KDE)====<br />
<br />
[http://pology.nedohodnik.net/ Pology] is a Python library and collection of command-line tools for in-depth processing of PO files, the translation file format of the GNU Gettext software translation system. Pology functionality ranges from precision operations on individual PO messages, to cross-file operations on large collections of PO files. Pology is used by the [http://websvn.kde.org/trunk/l10n-support/pology/ KDE] translation teams for checking syntax.<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 />
* Lokalize, GTranslator 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 Git 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 Git]]. Now:<br />
* Update your Gramps tree from Git. This can be done by executing the command <pre>git pull</pre> from the root Gramps 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 Git 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 Git 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 />
* To back-port translations, e.g., to merge master branch translations onto an earlier branch, do this on the eariler branch (assuming gramps.pot is updated):<br />
<pre>msgmerge -C lang.po master-lang.po gramps.pot -o newlang.po</pre>. Then resolve the fuzzies as usual.<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 Git diffs.<br />
<br />
{{man warn|Environment change|For Gramps 4.0 and master, see [[Translation_environment4|new environment]].}}<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 />
python check_po --skip-fuzzy newlang.po<br />
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 />
{{man warn|Environment change|For Gramps 4.0 and master, see [[Translation_environment4|new environment]].}}<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 ''/usr/share/locale/{lang}/LC_MESSAGES/gramps.mo'', with {lang} 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 the master branch with your translation ====<br />
<br />
The i18n data are often under ''../share/locale'' according to the default prefix.<br />
<br />
So you can use:<br />
<br />
python setup.py build<br />
python setup.py install #as root !<br />
<br />
This will install the .mo files under ''../share/locale/xx/LC_MESSAGES'', according to the default prefix set.<br />
<br />
or <br />
<br />
python setup.py build<br />
python setup.py install --root=/home/joe/gramps<br />
--prefix="/home/joe/gramps4" <br />
--enable-packager-mode #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 the master branch:<br />
<br />
* when you type <code>python build</code> in the source tree root (/home/user/Gramps e.g.) all the po/*.po files are compiled into build/mo/{lang}/*.mo files.<br />
* when you type <code>python install</code> inside the po directory, these .mo files are copied to {prefix}/share/locale/{lang}/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>python setup install</code> step: (if you are using csh or tcsh the syntax would be a little different)<br />
<br />
[user@localhost /home/user/Gramps]$ mkdir -p po/en_GB/LC_MESSAGES<br />
[user@localhost /home/user/Gramps]$ cp po/en_GB.gmo po/en_GB/LC_MESSAGES/gramps.mo<br />
[user@localhost /home/user/Gramps]$ cd gramps<br />
[user@localhost /home/user/Gramps/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 />
If you are a Gramps translator and need a developer to help you add a context to the Gramps source files, please ask for it on the gramps-devel list.<br />
<br />
====Translation context in GUI labels====<br />
If there is a string in the Glade GUI (i.e., in a .glade source file) that requires the translation context, it's impossible to have it translated statically. In this case, one needs to add runtime code to the corresponding dialog initialization to override the label string with the text obtained with an sgettext call. I.e.,<br />
<br />
* Verify the relevant widget has a meaningful id in the .glade file (as opposed to a silly autogenerated one). Modify the id if needed and make sure no existing code used the old widget id! E.g., change<br />
<object class="GtkLabel" id="label3"><br />
:into<br />
<object class="GtkLabel" id="place_name_label"><br />
* Add a context to the translatable string in the .glade file. This way, when you look at the POT file or a PO file derived from it, you see a reference to this place, along with the actual place in the .py file(s) which also has the same context string. E.g., change<br />
<property name="label" translatable="yes">Name:</property><br />
:into<br />
<property name="label" translatable="yes">place|Name:</property><br />
* In the corresponding dialogs' initialization, add code to set the string to the correct translation during runtime, e.g.:<br />
:globally in the file:<br />
PLACE_NAME = _('place|Name:')<br />
:in the MergePlace.__init__ method:<br />
for widget_name in ('name_btn1', 'name_btn2'):<br />
self.get_widget(widget_name).set_label(PLACE_NAME)<br />
:The exact method to call on the Gtk control will be different based on the actual GUI element affected. E.g., a GtkButton has a set_label method, whereas a GtkLabel has a set_text.<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 />
<br />
{{man warn|Environment change|For gramps 4.0 and master, see [[Translation_environment4#Translating_man_pages|new environment]].}}<br />
<br />
You can also translated the man pages into your own language.<br />
<br />
For the development version (master branch) you can find the required starting files under the directory 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 Git. See [[Brief_introduction_to_Git| the introduction to Git]].<br />
<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 />
All changes must be committed and pushed to the server:<br />
git commit -am "Add man page for xx"<br />
git push<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] or [http://po4a.alioth.debian.org/ po4a]. 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. eg, store existing entries from ''/usr/share/locale''.<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>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=News/ru&diff=48064News/ru2014-01-28T08:45:56Z<p>BACbKA: 4.0.3 / 3.4.7 released</p>
<hr />
<div>{{languages/ru|News|}}<br />
<section begin=news_mainpage /><br />
{{Releases/4.0.3/ru}}<br />
{{Releases/3.4.7/ru}}<br />
<section end=news_mainpage /><br />
<section begin=Archive /><br />
{{Releases/4.0.2/ru}}<br />
{{Releases/3.4.6/ru}}<br />
{{Releases/4.0.1/ru}}<br />
{{Releases/3.4.5/ru}}<br />
{{Releases/4.0.0}}<br />
{{Releases/3.4.4}}<br />
{{Releases/4.0.0beta}}<br />
{{Releases/3.4.3}}<br />
{{Releases/4.0.0alpha5/ru}}<br />
{{Releases/4.0.0alpha4/ru}}<br />
{{Releases/4.0.0alpha3}}<br />
{{Releases/4.0.0alpha2}}<br />
{{Releases/4.0.0alpha1}}<br />
{{Releases/3.4.2/ru}}<br />
{{Releases/3.4.1}}<br />
{{Releases/3.4.0}}<br />
{{Releases/3.3.2}}<br />
{{Announcements/20101204_LGCD}}<br />
{{Releases/3.3.1}}<br />
{{Releases/3.3.0}}<br />
{{Releases/3.2.6}}<br />
{{Releases/3.2.5}}<br />
{{Releases/3.2.4}}<br />
{{Releases/3.2.3}}<br />
{{Releases/3.2.2}}<br />
{{Releases/3.2.1}}<br />
{{Releases/3.2.0}}<br />
{{Releases/3.1.3}}<br />
{{Releases/3.1.2}}<br />
{{Releases/3.1.1}}<br />
{{Releases/3.1.0}}<br />
{{Releases/3.0.4}}<br />
{{Releases/3.0.3}}<br />
{{Releases/3.0.2}}<br />
{{Announcements/20080630 LGCD}}<br />
{{Releases/3.0.1}}<br />
{{Releases/3.0.0}}<br />
{{Releases/2.2.10}}<br />
{{Announcements/2007304 LGCD}}<br />
<section end=Archive /></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.3/ru&diff=48063Template:Releases/4.0.3/ru2014-01-28T08:37:53Z<p>BACbKA: translated</p>
<hr />
<div>{{Release/ru|4.0.3 ("It's tomorrow, ask me now", выпуск исправлений)| '''2014.01.27'''<br />
<br />
Разработчики Gramps представляют версию '''4.0.3'''.<br />
<br />
* Исправлено копирование через всплывающее контекстное меню / {{bug|7399}}<br />
* Исправлено чередование элементов интерфейся при нажатии клавиши табуляции в редакторе имён / {{bug|6868}}<br />
* Исправлен грамплет цитат в виде «Документы» / {{bug|7232}}<br />
* Исправлен необработанный сбой при просмотре документов / {{bug|7348}}<br />
* Исправлен фильтр цитат на боковой панели под python3 / {{bug|7370}}<br />
* Исправлен механизм добавки ссылок к заметке в режиме HTML / {{bug|7357}}<br />
* Исправлено сообщение на диалоге создания резервной копии / {{bug|6690}}<br />
* Исправлено размещение в списках выбора / {{bug|7331}} {{bug|7409}}<br />
* Исправлена проверка орфографии с myspell и LANG / {{bug|7339}}<br />
* Исправлено затирание системного графического курсора / {{bug|7336}}<br />
* Улучшено меню недавно открытых файлов / {{bug|7327}}<br />
* Исправлены вертикальные переполнения на диалоге инструмента починки базы данных / {{bug|7316}}<br />
* Исправлена обработка пользовательских полей в инструменте сравнения баз данных / {{bug|7209}}<br />
* Исправлен сбой при обработке информации EXIF в изображениях под Windows / {{bug|7182}}<br />
* Исправлен выбор людей в фильтре поиска под Windows / {{bug|7179}}<br />
* Добавлена возможность запуска Gramps без открытия окна командной строки without под Windows / {{bug|7378}}<br />
* Прочие исправления, связанные с конкретными ОС / {{bug|7313}}<br />
* Те же улучшения, что и в [[Template:Releases/3.4.7/ru|3.4.7]].<br />
* Обновлены переводы: ca, de, fi, fr, ru<br />
<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=45 журнале изменений].<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.3}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/3.4.7/ru&diff=48062Template:Releases/3.4.7/ru2014-01-28T08:12:41Z<p>BACbKA: перевод закончен!</p>
<hr />
<div>{{Release/ru|3.4.7 ("Ask me tomorrow, but not today", выпуск исправлений)| '''2014.01.27'''<br />
<br />
Разработчики Gramps представляют версию '''3.4.7'''.<br />
<br />
<br />
* Новый фильтр, выбирающий цитаты с заданным <текстом> в заметке / {{bug|7183}}<br />
* Добавлена возможность фильтровать не только главных участников события / {{bug|6519}}<br />
* Добавлена группировка событий по группам в меню выбора типа события, для уменьшения вертикального размера меню / {{bug|7342}}<br />
* Все диалоги выбора различных объектов теперь содержат столбец «последнее изменение» / {{bug|5024}}<br />
* Исправлен фильтр на боковой панели цитат (Источник:Заметка) / {{bug|7183}}<br />
* Исправлен URL в грамплете «добро пожаловать!» в режиме плавающего окна / {{bug|7388}}<br />
* Исправлен фильтр связей / {{bug|5123}}<br />
* Улучшена поддержка объектов с цитатами в качестве подобъектов / {{bug|7157}}<br />
* Исправлена работа с метками в видах, отображающих людей / {{bug|7075}}<br />
* Не позволять меньше одного столбца на экране / {{bug|7361}}<br />
* Инструмент «переупорядочить Gramps ID...» теперь работает и с цитатами / {{bug|5775}}<br />
* Эффективнее работает фильтр предков / {{bug|7340}}<br />
* Улучшена поддержка нестандартных полей для GEDCOM (family _UID, _FSFTID, ...) от Энно Боргстеде / {{bug|6380}}<br />
* Уменьшено количетсво столбцов при выборе храма СПД / {{bug|7333}}<br />
* Исправлено меню для недавно открытых древес / {{bug|7327}}<br />
* Улучшен диалог для слияния людей / {{bug|7147}}, {{bug|7001}}<br />
* «Добавить цитату» теперь доступно из всплывающего контекстного меню / {{bug|7300}}<br />
* Улучшена обработка выбранных частей изображений / {{bug|7290}}<br />
* Улучшена обработка изображений при отчётах в формате ODF, спасибо Маттиасу Баслеру за предложенный патч / {{bug|7288}}<br />
* Улучшено размещение в HTML в графических отчётах, использующих GraphViz / {{bug|7256}}<br />
* Различные улучшения, связанные с закладками / {{bug|7229}} , {{bug|7240}}<br />
* Неверные даты (вроде 2013-02-30) больше не приводят к сбою редактора дат или импорта из внешних файлов / {{bug|7212}}<br />
* Улучшена проверка корректности дат в редакторе дат, и соответствующий интерфейс / {{bug|7198}}, {{bug|7212}} , {{bug|7317}}<br />
* Различные исправления при обработке дат / {{bug|7197}}<br />
* Более осмысленные диалоги при подтвержднии стирания большого количества записей / {{bug|7086}}<br />
* Многочисленные улучшения для облегчения поддержки и удобства пользователя.<br />
* Улучшена документация для имён / {{bug|6955}}<br />
* Обновлены праздники во Франции / {{bug|7151}}<br />
* Обновления переводов: de, fr, ru<br />
<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=44 журнале изменений].<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/3.4.7}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/3.4.7&diff=48061Template:Releases/3.4.72014-01-28T08:09:00Z<p>BACbKA: 7086 has nothing to do with CLI...</p>
<hr />
<div>{{Release|3.4.7 (The "Ask me tomorrow, but not today" bug fix)| '''2014.01.27'''<br />
<br />
Gramps team releases version '''3.4.7'''.<br />
<br />
<br />
* Add new filter rule matching citations having a source with a <text> on a note / {{bug|7183}}<br />
* Add primary role option to event filter / {{bug|6519}}<br />
* Add Groups support and reduce number of lines in Event types selector / {{bug|7342}}<br />
* Add 'Last Change' column on selectors, when missing / {{bug|5024}}<br />
* Fix a filter rule on citation sidebar (Source:Note) / {{bug|7183}}<br />
* Fix url in Welcome gramplet when detached / {{bug|7388}}<br />
* Fix bug in associations filter / {{bug|5123}}<br />
* Better support for objects having citations as subobjects / {{bug|7157}}<br />
* Check Tag handling on people views / {{bug|7075}}<br />
* Keep at least one column on views / {{bug|7361}}<br />
* Reorder tool now updates citation IDs / {{bug|5775}}<br />
* Performance improvement in ancestor filter / {{bug|7340}}<br />
* Better support on GEDCOM file format for tags like family _UID, add support for _FSFTID, by Enno Borgsteede / {{bug|6380}}<br />
* Reduce number of columns in LDS temple selector / {{bug|7333}}<br />
* Fix menu action for last recently opened family trees / {{bug|7327}}<br />
* Fix minor visual issue on Merge Person dialog / {{bug|7147}}, {{bug|7001}}<br />
* Use 'Bat Mitzvah' (en_US event name) / {{bug|6921}}<br />
* "Add citation" missing in pop-up menu / {{bug|7300}}<br />
* Improvements on image region handling / {{bug|7290}}<br />
* Some fixes on images for ODF file format, thanks to Matthias Basler for the initial patch / {{bug|7288}}<br />
* Fix HTML spacing on GraphViz output / {{bug|7256}}<br />
* Various fixes related to bookmark handling in navigation views / {{bug|7229}} , {{bug|7240}}<br />
* Invalid dates (like 2013-02-30) no longer crash the date editor or file import / {{bug|7212}}<br />
* Enhancement on date validation into Date Editor / {{bug|7198}}, {{bug|7212}} , {{bug|7317}}<br />
* Various fixes on date handling / {{bug|7197}}<br />
* Consistent GUI confirmation during bulk deletions / {{bug|7086}}<br />
* Multiple maintainability and usability improvements.<br />
* Better documentation for name / {{bug|6955}}<br />
* Update holidays for France / {{bug|7151}}<br />
* Translation update: de, fr, ru<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=44 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/3.4.7}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/3.4.7/ru&diff=48060Template:Releases/3.4.7/ru2014-01-27T21:08:57Z<p>BACbKA: begin translate 3.4.7 release message</p>
<hr />
<div>{{Release/ru|3.4.7 ("Ask me tomorrow, but not today", выпуск исправлений)| '''2014.01.27'''<br />
<br />
Разработчики Gramps представляют версию '''3.4.7'''.<br />
<br />
<br />
* Новый фильтр, выбирающий цитаты с заданным <текстом> в заметке / {{bug|7183}}<br />
* Добавлена возможность фильтровать не только главных участников события / {{bug|6519}}<br />
* Добавлена группировка событий по группам в меню выбора типа события, для уменьшения вертикального размера меню / {{bug|7342}}<br />
* Все диалоги выбора различных объектов теперь содержат столбец «последнее изменение» / {{bug|5024}}<br />
* Исправлен фильтр на боковой панели цитат (Источник:Заметка) / {{bug|7183}}<br />
* Исправлен URL в грамплете «добро пожаловать!» в режиме плавающего окна / {{bug|7388}}<br />
* Исправлен фильтр связей / {{bug|5123}}<br />
* Улучшена поддержка объектов с цитатами в качестве подобъектов / {{bug|7157}}<br />
* Исправлена работа с метками в видах, отображающих людей / {{bug|7075}}<br />
* Не позволять меньше одного столбца на экране / {{bug|7361}}<br />
* Инструмент «переупорядочить Gramps ID...» теперь работает и с цитатами / {{bug|5775}}<br />
* Эффективнее работает фильтр предков / {{bug|7340}}<br />
* Улучшена поддержка нестандартных полей для GEDCOM (family _UID, _FSFTID, ...) от Enno Borgsteede / {{bug|6380}}<br />
* Уменьшено количетсво столбцов при выборе храма СПД / {{bug|7333}}<br />
* Исправлено меню для недавно открытых древес / {{bug|7327}}<br />
* Fix minor visual issue on Merge Person dialog / {{bug|7147}}, {{bug|7001}}<br />
* Use 'Bat Mitzvah' (en_US event name) / {{bug|6921}}<br />
* "Add citation" missing in pop-up menu / {{bug|7300}}<br />
* Improvements on image region handling / {{bug|7290}}<br />
* Some fixes on images for ODF file format, thanks to Matthias Basler for the initial patch / {{bug|7288}}<br />
* Fix HTML spacing on GraphViz output / {{bug|7256}}<br />
* Various fixes related to bookmark handling in navigation views / {{bug|7229}} , {{bug|7240}}<br />
* Invalid dates (like 2013-02-30) no longer crash the date editor or file import / {{bug|7212}}<br />
* Enhancement on date validation into Date Editor / {{bug|7198}}, {{bug|7212}} , {{bug|7317}}<br />
* Various fixes on date handling / {{bug|7197}}<br />
* Consistency on CLI arguments / {{bug|7086}}<br />
* Multiple maintainability and usability improvements.<br />
* Better documentation for name / {{bug|6955}}<br />
* Update holidays for France / {{bug|7151}}<br />
* Translation update: de, fr, ru<br />
<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=44 журнале изменений].<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/3.4.7}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker&diff=47954Using the bug tracker2014-01-22T07:46:07Z<p>BACbKA: /* Resolving bugs */ manual adjustment of target field</p>
<hr />
<div>{{languages|How to report bugs}}<br />
The bug/issue tracker for Gramps is located at the following URL: http://bugs.gramps-project.org<br />
This bug/issue tracker allows users and developers to log new issues and track them as they progress. Please take some time to read the issue tracker instructions below and read '''[[How to create a good bug report|how to create a good bug report]]'''. Also, have a look at '''[[Known_issues|known issues]]''' and '''[[Common_problems|common problems]]'''.<br />
<br />
==Report a bug==<br />
===1. Login===<br />
To report a bug, you must have a login account on http://bugs.gramps-project.org, which is the Gramps bug tracker. When you create a user account, remember that it can take up to 12 hours before a notification email is send to you. Only after clicking on the link in the email can you submit bugs. Your email address will be handled confidentially.<br />
<br />
===2. Search existing bugs===<br />
Perhaps the bug you want to report has been submitted before. To check this, click on 'View Issues'. The top of the page is reserved for filters, which you set. Normally the default filters are just fine. Under these filters, there is a search box. Enter the terms best describing the bug, and click apply filter. If you have an error message, try pasting a part of the error, to see if it is has been reported already.<br />
<br />
If the bug is already reported, read the bug report over, and see if you can add to the information. If so, you can leave a note with extra information to help the developers.<br />
<br />
===3. Submit new bug===<br />
Click on Report Issue, and enter the required information, see below on how to select the project to which the bug belongs. Be verbose, the developers are bad at mind reading. We shall mercilessly close the bugs which have no meaningful information at all, such as #{{bug|7126}}. Do not forget to list the Gramps version you are using. You can check this in Gramps by clicking in the Gramps program the Help menu, option About.<br />
<br />
==== Projects ====<br />
In the upper right corner of the issue tracker, there is a place to select the "project" for the bugs. "Projects" are a way to categorize issues. There are three types of projects in the issue tracker:<br />
<br />
#The '''Feature Requests''' project is a place for recording requests for new features. <br />
#The projects with names that look like '''Gramps x.x.X''' are where issues are reported that apply specifically to a maintenance branch (see [[Brief_introduction_to_Git#Types_of_branches|Types of Branches]]). A separate project exists for each maintenance branch.<br />
#The '''Gramps Trunk''' project should only be used by developers and testers of the latest code. It is a place for recording issues that only apply to the master branch in Git (see [[Brief_introduction_to_Git#Types_of_branches|Types of Branches]]). There is only one "Gramps Trunk" project because there is only one master branch in the Git repository.<br />
<br />
==== How to proceed ====<br />
The first step in submitting an issue on the tracker is to determine which project it belongs to. <br />
<br />
*If the issue represents functionality that does not currently exist in Gramps, then the issue should be filed under the '''Feature Requests''' project.<br />
<br />
*If the issue represents a problem with functionality that has been released in a stable release of code, then the issue should be filed under the project that corresponds to the maintenance branch for that release. For example, a bug found in Gramps 3.2.6 should be filed under the '''Gramps 3.2.X''' project.<br />
<br />
*If the issue represents a problem with functionality that only exists the master branch, or the problem exists in the master branch, but not any stable releases, then the issue should be filed under the '''Gramps Trunk''' project.<br />
<br />
== Resolving bugs ==<br />
This information is for the developers following up on the submitted issues.<br />
<br />
The [http://www.gramps-project.org/bugs/roadmap_page.php roadmap page] of the bug tracker lists the bugs currently prioritized for the next releases. If you are looking for a bug to fix, this is a good place to start. Placement on the roadmap is controlled by the "Target Version" field fo the bug. Special "X.Y.99" phony releases, such as "3.4.99" and "4.0.99", list bugs that we would eventually like to fix for the "X.Y" version, but don't really know the milestone yet. Bugs that really should hold up a release<br />
should be on the roadmap with a real release number, and should only be moved after giving a reason or heads up on the devel list [http://sourceforge.net/mailarchive/message.php?msg_id=31870820]. If you fix a bug scheduled for a later<br />
milestone before a previous one is out, '''please manually adjust the target release field before marking the bug resolved,''' otherwise the roadmap display will be inaccurate [http://sourceforge.net/mailarchive/message.php?msg_id=31870821].<br />
<br />
In general, when resolving an issue, it is always a good idea to add a note with the hash of the commit that fixed the problem.<br />
<br />
When resolving issues in a maintenance branch, one should always set the "Fixed in version" field to the version of the next release that will be made from that branch. This is done so that the issue properly appears in the ChangeLog page for that project (http://bugs.gramps-project.org/changelog_page.php).<br />
<br />
Bugs in maintenance branch projects should not be marked as closed until the developer has committed the change into the corresponding maintenance branch. Additionally, it is the developers responsibility to make sure the change has been merged into the master branch.<br />
<br />
==Bug triage==<br />
<br />
Help the Gramps project [[Bug triage]].<br />
<br />
==Syntax==<br />
<br />
[http://www.mantisbt.org/ Mantis bug tracker] uses its own syntax code :<br />
* ''#'' before a bug number writes a link to the bug.<br />
* ''~'' before a comment number writes a link to the comment, same as : ''{url}#c{comment number}''.<br />
* we can try to use some HTML tags into text field, like : <code> &lt;pre&gt; &lt;/pre&gt; &lt;i&gt; &lt;/i&gt; &lt;b&gt; &lt;/b&gt;</code> <br />
<br />
[[Category:Developers/General]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker&diff=47953Using the bug tracker2014-01-22T07:42:09Z<p>BACbKA: /* Resolving bugs */ add info on the .99 releases</p>
<hr />
<div>{{languages|How to report bugs}}<br />
The bug/issue tracker for Gramps is located at the following URL: http://bugs.gramps-project.org<br />
This bug/issue tracker allows users and developers to log new issues and track them as they progress. Please take some time to read the issue tracker instructions below and read '''[[How to create a good bug report|how to create a good bug report]]'''. Also, have a look at '''[[Known_issues|known issues]]''' and '''[[Common_problems|common problems]]'''.<br />
<br />
==Report a bug==<br />
===1. Login===<br />
To report a bug, you must have a login account on http://bugs.gramps-project.org, which is the Gramps bug tracker. When you create a user account, remember that it can take up to 12 hours before a notification email is send to you. Only after clicking on the link in the email can you submit bugs. Your email address will be handled confidentially.<br />
<br />
===2. Search existing bugs===<br />
Perhaps the bug you want to report has been submitted before. To check this, click on 'View Issues'. The top of the page is reserved for filters, which you set. Normally the default filters are just fine. Under these filters, there is a search box. Enter the terms best describing the bug, and click apply filter. If you have an error message, try pasting a part of the error, to see if it is has been reported already.<br />
<br />
If the bug is already reported, read the bug report over, and see if you can add to the information. If so, you can leave a note with extra information to help the developers.<br />
<br />
===3. Submit new bug===<br />
Click on Report Issue, and enter the required information, see below on how to select the project to which the bug belongs. Be verbose, the developers are bad at mind reading. We shall mercilessly close the bugs which have no meaningful information at all, such as #{{bug|7126}}. Do not forget to list the Gramps version you are using. You can check this in Gramps by clicking in the Gramps program the Help menu, option About.<br />
<br />
==== Projects ====<br />
In the upper right corner of the issue tracker, there is a place to select the "project" for the bugs. "Projects" are a way to categorize issues. There are three types of projects in the issue tracker:<br />
<br />
#The '''Feature Requests''' project is a place for recording requests for new features. <br />
#The projects with names that look like '''Gramps x.x.X''' are where issues are reported that apply specifically to a maintenance branch (see [[Brief_introduction_to_Git#Types_of_branches|Types of Branches]]). A separate project exists for each maintenance branch.<br />
#The '''Gramps Trunk''' project should only be used by developers and testers of the latest code. It is a place for recording issues that only apply to the master branch in Git (see [[Brief_introduction_to_Git#Types_of_branches|Types of Branches]]). There is only one "Gramps Trunk" project because there is only one master branch in the Git repository.<br />
<br />
==== How to proceed ====<br />
The first step in submitting an issue on the tracker is to determine which project it belongs to. <br />
<br />
*If the issue represents functionality that does not currently exist in Gramps, then the issue should be filed under the '''Feature Requests''' project.<br />
<br />
*If the issue represents a problem with functionality that has been released in a stable release of code, then the issue should be filed under the project that corresponds to the maintenance branch for that release. For example, a bug found in Gramps 3.2.6 should be filed under the '''Gramps 3.2.X''' project.<br />
<br />
*If the issue represents a problem with functionality that only exists the master branch, or the problem exists in the master branch, but not any stable releases, then the issue should be filed under the '''Gramps Trunk''' project.<br />
<br />
== Resolving bugs ==<br />
This information is for the developers following up on the submitted issues.<br />
<br />
The [http://www.gramps-project.org/bugs/roadmap_page.php roadmap page] of the bug tracker lists the bugs currently prioritized for the next releases. If you are looking for a bug to fix, this is a good place to start. Placement on the roadmap is controlled by the "Target Version" field fo the bug. Special "X.Y.99" phony releases, such as "3.4.99" and "4.0.99", list bugs that we would eventually like to fix for the "X.Y" version, but don't really know the milestone yet. Bugs that really should hold up a release<br />
should be on the roadmap with a real release number, and should only be moved after giving a reason or heads up on the devel list [http://sourceforge.net/mailarchive/message.php?msg_id=31870820].<br />
<br />
In general, when resolving an issue, it is always a good idea to add a note with the hash of the commit that fixed the problem.<br />
<br />
When resolving issues in a maintenance branch, one should always set the "Fixed in version" field to the version of the next release that will be made from that branch. This is done so that the issue properly appears in the ChangeLog page for that project (http://bugs.gramps-project.org/changelog_page.php).<br />
<br />
Bugs in maintenance branch projects should not be marked as closed until the developer has committed the change into the corresponding maintenance branch. Additionally, it is the developers responsibility to make sure the change has been merged into the master branch.<br />
<br />
==Bug triage==<br />
<br />
Help the Gramps project [[Bug triage]].<br />
<br />
==Syntax==<br />
<br />
[http://www.mantisbt.org/ Mantis bug tracker] uses its own syntax code :<br />
* ''#'' before a bug number writes a link to the bug.<br />
* ''~'' before a comment number writes a link to the comment, same as : ''{url}#c{comment number}''.<br />
* we can try to use some HTML tags into text field, like : <code> &lt;pre&gt; &lt;/pre&gt; &lt;i&gt; &lt;/i&gt; &lt;b&gt; &lt;/b&gt;</code> <br />
<br />
[[Category:Developers/General]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/3.4.7&diff=47688Template:Releases/3.4.72013-12-30T09:32:36Z<p>BACbKA: initial skeleton</p>
<hr />
<div>{{Release|3.4.7 (The "????" bug fix)| '''2014.01.??'''<br />
<br />
Gramps team releases version '''3.4.7'''.<br />
<br />
<br />
* NEWS item #1, translated from dev to user speak... wikilink to manual / link to bugs!<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=44 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/3.4.7}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Testing_Gramps&diff=47668Testing Gramps2013-12-26T19:46:39Z<p>BACbKA: /* Possible improvements */ Automated regression tests for our GUI</p>
<hr />
<div>=Currently used tests and frameworks=<br />
== testing of reports ==<br />
=== test/runtest.sh ===<br />
Runs all possible reports using the report cli interface, based on the example.gramps database. This test is not fully self-contained, in that it depends on various environment settings, such as your locale, your preferred name display formats, and your report options. Last, but not the least, the verification of the resulting reports is entirely manual.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-runtest.sh found-by-runtest.sh]<br />
<br />
== other report testing ==<br />
See more specialized scripts in test/, status unknown.<br />
<br />
==test/impex.sh==<br />
Import/export test for GRAMPS.<br />
<br />
From the file header:<br />
* Import example XML data and create internal Gramps DB<br />
* Open produced Gramps DB, then<br />
** check data for integrity<br />
** output in all formats<br />
* Check resulting XML for well-formedness and validate it against DTD and RelaxNG schema.<br />
* Import every exported file produced if the format is also supported for import, and run a text summary report.<br />
* Diff each report with the summary of the produced example DB.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-impex.sh found-by-impex.sh]<br />
<br />
== Unit testing ==<br />
=== test/RunAllTests.py ===<br />
Runs out-of-tree (not in gramps/) testing code, by looking for any test/*_Test.py files and executing the test suites therein. See the current code in test/*_Test.py for example and python standard unittest docs.<br />
<br />
Starting with gramps40 branch, these tests include non-automated unit tests only. The automated unit tests are all under gramps/.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-RunAllTests.py found-by-RunAllTests.py]<br />
<br />
GtkHandler testing code pops up the GRAMPS error dialog, but this is actually for testing the error reporting itself. Don't be scared by the dialog, it's expected. Your manual work is required to close the dialogs with the "Cancel" button. The relevant tests still pass (unless there's another bug there)...<br />
<br />
=== unit tests in the main tree ===<br />
python setup.py test<br />
<br />
See [[Unit Test Quickstart]] for detailed running instructions.<br />
<br />
{| {{prettytable}}<br />
! File<br />
! Status<br />
! Comments<br />
|-<br />
|gramps/cli/test/cli_test.py<br />
|bgcolor="#80ff80"| OK<br />
|3 tests<br />
|-<br />
|gramps/cli/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|8 tests (6 require mocking to run)<br />
|-<br />
|gramps/gen/test/config_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test<br />
|-<br />
|gramps/gen/test/constfunc_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test (linux only, skipped elsewhere)<br />
|-<br />
|gramps/gen/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test. See #{{bug|7013}} for context<br />
|-<br />
|gramps/gen/datehandler/test/datehandler_test.py<br />
|bgcolor="#80ff80"| OK<br />
|9 tests<br />
|-<br />
|gramps/gen/db/test/cursor_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests, 2 skipped<br />
|-<br />
|gramps/gen/db/test/db_test.py<br />
|bgcolor="#80ff80"| OK<br />
|6 tests<br />
|-<br />
|gramps/gen/db/test/reference_map_test.py<br />
|bgcolor="#80ff80"| OK<br />
|5 tests<br />
|-<br />
|gramps/gen/lib/test/date_test.py<br />
|bgcolor="#80ff80"| OK<br />
|8 tests (locale-based, OK for en, fails for some other locales)<br />
|-<br />
|gramps/gen/lib/test/grampstype_test.py<br />
|bgcolor="#80ff80"| OK<br />
|3 tests<br />
|-<br />
|gramps/gen/lib/test/merge_test.py<br />
|bgcolor="#ff8080"| FAIL<br />
|201 tests, 2 failed skipped {{bug|7027}}<br />
|-<br />
|gramps/gen/merge/test/merge_ref_test.py<br />
|bgcolor="#80ff80"| OK<br />
|53 tests<br />
|-<br />
|gramps/gen/utils/test/callback_test.py<br />
|bgcolor="#80ff80"| OK<br />
|10 tests<br />
|-<br />
|gramps/gen/utils/test/keyword_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests<br />
|-<br />
|gramps/gen/utils/test/place_test.py<br />
|bgcolor="#ff8080"| FAIL<br />
|28 tests, 4 failures (bug #{{bug|7044}})<br />
|-<br />
|gramps/gui/logger/test/rotate_handler_test.py<br />
|bgcolor="#80ff80"| OK<br />
|2 tests<br />
|-<br />
|gramps/gui/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test (requires mocking to run)<br />
|-<br />
|gramps/plugins/export/test/exportvcard_test.py<br />
|bgcolor="#80ff80"| OK<br />
|28 tests<br />
|-<br />
|gramps/plugins/importer/test/importvcard_test.py<br />
|bgcolor="#80ff80"| OK<br />
|66 tests<br />
|-<br />
|gramps/plugins/importer/test/importxml_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests<br />
|-<br />
|gramps/plugins/importer/test/importgeneweb_test.py<br />
|bgcolor="#80ff80"| OK<br />
|2 tests<br />
|-<br />
|gramps/test/test/gedread_util_test.py<br />
|<br />
|No longer required?<br />
|-<br />
|gramps/test/test/test_util_test.py<br />
|<br />
|No longer required?<br />
|-<br />
|gramps/webapp/grampsdb/view/png.py<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
There is also semi-interactive testing via __main__ in some code:<br />
<br />
{| {{prettytable}}<br />
! File<br />
! Status<br />
! Comments<br />
|-<br />
|gramps/gen/relationship.py<br />
|bgcolor="#ff8080"| To Do<br />
|Relationship calculator<br />
|-<br />
|gramps/gen/db/bsddbtxn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/txn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/undoredo.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/write.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/txn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/lib/styledtext.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/utils/place.py<br />
|bgcolor="#80ff80"| OK<br />
|Done<br />
|-<br />
|gramps/gen/utils/docgen/odstab.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/utils/docgen/csvtab.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gui/ddtargets.py<br />
|bgcolor="#ff8080"| To Do<br />
|Not worth running?<br />
|-<br />
|gramps/gui/widgets/undoablebuffer.py<br />
|bgcolor="#ff8080"| To Do<br />
|Not worth running?<br />
|-<br />
|gramps/gui/dialog.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/validatedmaskedentry.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/progressdialog.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/statusbar.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/plugins/lib/libsubstkeyword.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/plugins/rel/rel_*.py<br />
|bgcolor="#ff8080"| To Do<br />
|Relationship calculator plugins<br />
|-<br />
|gramps/plugins/tool/phpgedviewconnector.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|}<br />
<br />
== Manual test plan ==<br />
See TestPlan.txt in gramps toplevel. I believe this is only done at a major release (like 4.0.0).<br />
<br />
=Test status=<br />
We currently don't have a record of tests executed, the platforms and environments they were run upon, and what code they covered. The only indirect evidence is available in open bugs, when people care to fill in these details. :-(<br />
<br />
=Possible improvements=<br />
* unify running all the tests, in- or out- tree<br />
** Try switching the feature tests and non-automated unit tests in test/ from our runner scripts to [http://docs.python.org/2/library/unittest.html#test-discovery python native unittest discovery mechanism]. <br />
** we have a stale gramps/test/regrtest.py runner, notable for logging init. - should we revive that, or maybe integrate into setup.py test runner?<br />
* coverage analysis<br />
* (needs server capacity to be hosted online) continous test status report, coverage, automatic deployment into win/mac/linux VMs (I can dream, can't I?)<br />
* Automated regression tests for our GUI. The following links look interesting:<br />
** http://unpythonic.blogspot.co.il/2007/03/unit-testing-pygtk.html<br />
** http://ldtp.freedesktop.org/wiki/<br />
<br />
=See also=<br />
* [[Unit Test Quickstart]]<br />
<br />
[[Category:Developers/Reference]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Talk:Run_Gramps40_for_Windows_from_source_using_Python_2.7.3&diff=47632Talk:Run Gramps40 for Windows from source using Python 2.7.32013-12-24T10:43:29Z<p>BACbKA: /* archive link for graphviz */ new section</p>
<hr />
<div>== archive link for graphviz ==<br />
<br />
Older versions of graphviz are here:<br />
http://www.graphviz.org/pub/graphviz/ARCHIVE/<br />
[[User:BACbKA|BACbKA]] ([[User talk:BACbKA|talk]]) 03:43, 24 December 2013 (MST)</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Talk:Windows_installer&diff=47625Talk:Windows installer2013-12-22T20:17:22Z<p>BACbKA: correct the bug#</p>
<hr />
<div>* Python 2.5.1 is current<br />
* GTK 2.10.11 is current<br />
http://www.pygtk.org/downloads.html - Source for PyGTK and PyCairo<br />
* PyCairo 1.2.6-1 is current<br />
* PyGTK 2.10.4-1 is current<br />
<br />
I'm testing these current builds now.<br />
<br />
== a graphviz issue with 2.22 through 2.34 ==<br />
<br />
I suggest packaging 2.20, or wait for 2.36 if you don't like {{bug|6999}}. [[User:BACbKA|BACbKA]] ([[User talk:BACbKA|talk]]) 13:16, 22 December 2013 (MST)</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Talk:Windows_installer&diff=47624Talk:Windows installer2013-12-22T20:16:20Z<p>BACbKA: /* a graphviz issue with 2.22 through 2.34 */ new section</p>
<hr />
<div>* Python 2.5.1 is current<br />
* GTK 2.10.11 is current<br />
http://www.pygtk.org/downloads.html - Source for PyGTK and PyCairo<br />
* PyCairo 1.2.6-1 is current<br />
* PyGTK 2.10.4-1 is current<br />
<br />
I'm testing these current builds now.<br />
<br />
== a graphviz issue with 2.22 through 2.34 ==<br />
<br />
I suggest packaging 2.20, or wait for 2.36 if you don't like {{bug|7256}}. [[User:BACbKA|BACbKA]] ([[User talk:BACbKA|talk]]) 13:16, 22 December 2013 (MST)</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Coding_for_translation&diff=47564Coding for translation2013-12-14T15:30:30Z<p>BACbKA: /* Changing translated text message in the source code */</p>
<hr />
<div>Coding guidelines to enable easy and correct translation of strings on the User Interface. <br />
[[Category:Translators/Categories]][[Category:Developers/Tutorials]]<br />
[[Category:Developers/General]]<br />
==Introduction==<br />
Gramps has always been internationalized (see<br />
http://gramps-project.org/2006/04/looking-back-over-5-years).<br />
Therefore, all strings meant<br />
for the user should always be flagged for translation.<br />
<br />
In order to be considered for inclusion in the offical Gramps release, any piece of code must support internationalization. What this means is that the Python module must support [[Translating Gramps|translations]] into different languages. Gramps provides support to make this as easy as possible for the developer. For enabling, a language code must be set on ''configure.in'' file into ''ALL_LINGUAS'' section.<br />
<br />
==How to allow translations==<br />
Gramps is a fully-internationalized application with translations in many languages. All code which presents text to users must provide for that text to be translated. Fortunately, Gramps provides an extension of [http://docs.python.org/3/library/gettext.html gettext] which makes this fairly painless. First, alias the gettext function from the single localization instance:<br />
from gramps.gen.const import GRAMPS_LOCALE as glocale<br />
_ = glocale.translation.gettext<br />
This statement imports the <code>gettext</code> function and aliases it as <code>_</code>. The translation tools treat strings wrapped in _() as translatable and assemble them into catalogs for the translators to work with; by aliasing it to gettext(), we also enable python to retrieve the translation appropriate for the user's locale.<br />
<br />
Example 1:<br />
print "Hello world!"<br />
<br />
In this example, the string will always be printed as specified.<br />
<br />
Example 1 internationalized:<br />
print _("Hello world!")<br />
<br />
In this example, Gramps will attempt to translate the string. If a translation exists, the call to the function will return the translation. If a translation does not exist, the original string is returned.<br />
<br />
=== More complicated translations ===<br />
<br />
In addition to <tt>gettext</tt>, GrampsTranslation offers two more specialized retrieval functions, <tt>ngettext</tt> and <tt>sgettext</tt>. <br />
<br />
In some strings, it's necessary to specify different translations depending upon the number of an argument. For example,<br />
George Smith and Annie Jones have 1 child <br />
George Smith and Annie Jones have 3 children<br />
<br />
We'd code that in python as follows:<br />
_ = glocale.translation.ngettext<br />
_(George Smith and Annie Jones have %(num)d child, George Smith and Annie Jones have %(num)d children, n) % {num : n}<br />
<br />
In other cases, it's necessary to provide a hint to translators, e.g.<br />
_(Remaining names | rest)<br />
<br />
We're making sure that the translators know that this message id means "what's left" rather than "take a nap". When the file is translated, this is no problem, because the translation doesn't include the hint -- but if the user is working in English, we don't want him to see the hint, so we need to alias _ to sgettext:<br />
_ = glocale.translation.sgettext<br />
<br />
Often you need to combine them. While <tt>ngettext</tt> and <tt>sgettext</tt> can each handle plain strings, neither can handle the other's strings. Fortunately the <tt>intltool</tt> message extractor is pretty stupid, so any function name that ends in either <tt>_</tt> or <tt>gettext</tt> will work. This will work pretty well:<br />
<br />
_ = glocale.translation.gettext<br />
N_ = glocale.translation.ngettext<br />
S_ = glocale.translation.sgettext<br />
<br />
Obviously you would pass the translatable string to the right function.<br />
<br />
=== Encoding ===<br />
String handling can be a bit tricky in a localized environment. Gramps's translation facility will always return Unicode-encoded strings. For as long as it is necessary to support both Python2 and Python3, developers will need to understand Unicode string handling in both versions of the language.<br />
<br />
If you use non ASCII characters in a string literal the string must be Unicode.<br />
<br />
'''Don't do this:'''<br />
print _(u"Eg, valid values are 12.0154, 50° 52′ 21.92″N")<br />
<br />
Because the <tt>u</tt> prefix was removed for Python 3.0-3.2. (It was restored in 3.3 for compatibility with 2.7, but it's not necessary.)<br />
Instead, put in the first line of the module<br />
# *-* coding: utf-u *-*<br />
then in the imports section<br />
from __future__ import unicode_literals<br />
which makes all of the literals unicode. Make sure that your editor is set up to save utf-8!<br />
<br />
===Glade files===<br />
<br />
Just enable the translatable attribute on an XML element.<br />
<br />
<property name="label" translatable="yes">_Family:</property><br />
<property name="tooltip" translatable="yes">Abandon changes and close window</property><br />
<property name="label" translatable="no">&lt;b&gt; - &lt;/b&gt; </property><br />
<br />
====Non ASCII characters====<br />
<br />
If you plan to use non ASCII characters in a string, that shall be translated,<br />
do not use escape sequences:<br />
<br />
Eg, valid values are 12.0154, 50<code>&amp;</code>#xB0; 52' 21.92"N<br />
<br />
use instead:<br />
<br />
Eg, valid values are 12.0154, 50° 52′ 21.92″N<br />
<br />
In this case note the unicode characters for deg, min, sec. '''Ensure that your editor is set up to encode the characters in UTF-8!'''<br />
<br />
====Accessibility====<br />
<br />
In addition to [http://developer.gnome.org/gtk/2.24/GtkWidget.html#id1294298 accelerators], ''[http://developer.gnome.org/gtk/2.24/GtkWidget.html GtkWidget]'' also support a custom <accessible> element, which supports actions and relations. Properties on the accessible implementation of an object can be set by accessing the internal child "accessible" of a ''[http://developer.gnome.org/gtk/2.24/GtkWidget.html GtkWidget]''. See [http://developer.gnome.org/gtk/2.24/GtkWidget.html#GtkWidget-BUILDER-UI GtkBuilder UI].<br />
<br />
* Gtk label<br />
<br />
''A [http://developer.gnome.org/gtk/2.24/GtkLabel.html GtkLabel]'' '''with mnemonic support''' will automaticaly generate accessibility keys on linked ''[http://developer.gnome.org/gtk/2.24/GtkEntry.html GtkEntry]'' and ''UndoableEntry'' fields. Remember that Gramps also uses custom widgets like ''StyledTextEditor'' and ''ValidatableMaskedEntry'', which do not always have relation with a ''GtkLabel''.<br />
<br />
* Toggle buttons and Icons on toolbar<br />
<br />
Gramps often uses ''[http://developer.gnome.org/gtk/2.24/GtkToggleButton.html GtkToggleButtons]'' and alone ''[http://developer.gnome.org/gtk/2.24/GtkImage.html GtkImage]'' (image without label), this excludes blind people and generates a poor interface for accessibility.<br />
<br />
See [[Accessibility]].<br />
<br />
===Addons===<br />
<br />
External addons often need to provide their own message catalogs. To pull one in, use<br />
this instead of the usual.<br />
from gramps.gen.const import import GRAMPS_LOCALE as glocale<br />
_ = glocale.get_addon_translator(__file__).gettext<br />
or if you need more than one retrieval function:<br />
_translation = glocale.get_addon_translator(__file__)<br />
_ = _translation.gettext<br />
S_ = _translation.sgettext<br />
<br />
The addon translator is another instance of GrampsTranslation, so the rules for creating<br />
translatable strings and for retrieving the translated values are the same as for internal modules.<br />
<br />
See [[Addons_Development#Localization|Addons development]] for more details.<br />
<br />
==How it works==<br />
<br />
We need at least [http://www.gnu.org/software/gettext/manual/gettext.html GNU gettext], then [http://www.gnu.org/software/autoconf/manual/gettext/msginit-Invocation.html msginit] will generate a standard gettext header.<br />
<br />
Gramps has used different environments according to versions for retrieving strings to translate:<br />
<br />
* [[Translation_environment20|2.0.x]]<br />
* [[Translation_environment22|2.2.x to Gramps 3.4.x]]<br />
* [[Translation_environment4|Trunk]]<br />
<br />
There are two stages to getting a translation to work. <br />
<br />
===Files and directory===<br />
<br />
Translations are stored in a <code>.po</code> file that contains the mappings between the original strings and the translated strings, see [[Translating Gramps]]. <br />
<br />
Translators use a generic file <code>gramps.pot</code> to generate their <code>.po</code> file.<br />
Gramps uses a utility that extracts the strings from the source code to build the <code>.po</code> file. This utility examines the source files for strings that have been marked as translatable. In the python source, these are the strings enclosed in the <code>_()</code> function calls.<br />
<br />
Note that because strings are extracted by a script from the source file, string constants and not variables must be enclosed in the <code>_()</code> call. In the following example, the extraction script will not extract the string.<br />
mystring = "Hello World!"<br />
print _(mystring)<br />
<br />
The correct method would be to use one of the following:<br />
mystring = _("Hello World!")<br />
print mystring<br />
<br />
At run time, the <code>_()</code> calls will translate the string by looking it up in the translation database (created from the <code>.po</code> files) and returning the translated string.<br />
<br />
===Add the reference to the file===<br />
<br />
We need to also add a reference to this file for generating the translation template.<br />
<br />
* [[Translation_environment22#Files_and_directory|2.2.x to Gramps 3.4.x]]<br />
* [[Translation_environment4#Files_and_directory|Gramps 4.0.x, Trunk]]<br />
<br />
==Tips for writing a translatable Python module==<br />
===Use complete sentences===<br />
Don't build up a sentence from phrases. Because a sentence is ordered in a particular way in your language does not mean that it is ordered the same way in another. Providing the entire sentence as a single unit allows the translator to make a meaningful translation. Do not concatenate phrases or terms as they will then show up as separate phrases or terms to be translated and the complete sentence may then show up incorrectly, especially in right-to-left languages (Arabic, Hebrew, etc.).<br />
===Use named %s/%d values===<br />
Python provides a powerful mechanism that allows the reordering of %s values in a string. A translator may need to rearrange the structure of a sentence, and it may not match the order you chose. For example:<br />
print "%s was born in %s" % ('Joe','Toronto')<br />
<br />
In some languages it may make more sense to say:<br />
print "%s is the city in which %s was born" % ('Toronto', 'Joe')<br />
<br />
The problem is that this requires a change to the order of the arguments. Python provides a solution for this. By using named operators and dictionaries, we can say:<br />
print "%(male_name)s was born in %(city)s" % {<br />
'city' : 'Toronto', 'male_name' : 'Joe'}<br />
<br />
In this case, the order of the %s formatters is not important, since the values will be looked up in the dictionary at run time to resolve the value. The translator can reorder the %s formatters, or even remove them without causing any problems.<br />
<br />
Note that Python also allows a variation which some people find easier to read:<br />
print "%(male_name)s was born in %(city)s" % dict(<br />
city = 'Toronto', male_name = 'Joe')<br />
<br />
Some languages are using right-to-left text direction. It is important to use named arguments when there is more than one %s/%d value into a translation string.<br />
<br />
===Provide separate strings for masculine and feminine.===<br />
Many languages have the concept of gender, while others don't. A sentence may need to be phrased differently depending on whether the subject is male or female. By using the named %s values along with a bit of code, this problem can be solved.<br />
<br />
if person.getGender() == Person.male:<br />
print _("%(male_name)s was born in %(city)s\n") % {<br />
'male_name' : name, 'city' : city }<br />
else:<br />
print _("%(female_name)s was born in %(city)s\n") % {<br />
'female_name' : name, 'city' : city }<br />
<br />
This allows languages with gender differences to map nicely into your sentence.<br />
<br />
===Provide support for plural forms.===<br />
<br />
Plurals are handled differently in various languages. Whilst English or German have a singular and a plural form, other languages like Turkish don't distinguish between plural or singular and there are languages which use different plurals for different numbers, e.g. Polish.<br />
<br />
Gramps provides a [[Translating_Gramps#Plural_forms|plural forms]] support, useful for locales with multiples plurals according to a number (''often slavic based languages'') or for Asian family languages (''singular = plural''). <br />
<br />
Note, some locales need singular form with [http://en.wikipedia.org/wiki/Plural#Zero zero] and plural form might be also used in this case.<br />
<br />
We need to call module :<br />
from gen.ggettext import ngettext<br />
<br />
and code like this :<br />
<br />
ngettext("singular %d", "plural %d", n) %n<br />
<br />
Sample:<br />
<br />
msg = ngettext('Import Complete: %d second',<br />
'Import Complete: %d seconds', t ) % t<br />
<br />
===Provide a context support.===<br />
<br />
A translator needs context for a good translation. Keep in mind you can help him/her, by using context on translation string.<br />
<br />
We need to call module :<br />
from gen.ggettext import sgettext as _<br />
or<br />
from gen.ggettext import sngettext as _<br />
(if you use ngettext) # not implemented<br />
<br />
Translation string will use context, but this will be hidden on user interface.<br />
_("context|string")<br />
Translator will see the translation string and a help string without loading program.<br />
Program will only display the string in English or with another locale.<br />
<br />
===Object classes===<br />
<br />
Gramps often displays names of primary objects (''Person, Family, Event, etc ...''), for being consistent on displayed strings (also in english!), there is a ''trans_objclass(objclass_str)'' function on TransUtils module.<br />
<br />
So, when we need to display the primary object name in lower case into a sentence, we can use this function.<br />
<br />
ex:<br />
from gen.ggettext import sgettext as _<br />
from TransUtils import trans_objclass<br />
<br />
_("the object|See %s details") % trans_objclass(objclass)<br />
_("the object|Make %s active") % trans_objclass('Person')<br />
<br />
will display:<br />
<br />
See ''the person'' details # or See ''the family, the event, etc...'' details<br />
Make ''the person'' active<br />
<br />
===Genitive form===<br />
<br />
Genitive (and some other) forms need to modify the name itself into some locales, like Finnish or Swedish.<br />
<br />
Instead of "free form" text that talks about <br />
e.g. <br />
son '''of %s'''<br />
better would be for example some tabulated format like this:<br />
son: %s<br />
daughter: %s<br />
which doesn't require genitive.<br />
<br />
===Punctuation===<br />
<br />
Use of commas, semicolons and spacing can be different than into english.<br />
<br />
''todo''<br />
<br />
==Changing translated text message in the source code==<br />
One of the severities in our bug tracker is "text", which ranks up as easier than "tweak" and "minor", but more difficult than "trivial". If a bug is concerned with readability or correctness of a text that Gramps outputs, whether in GUI, in a console error message, or in a produced report, then "text" is the severity to use. So why is it more than "trivial"?<br />
<br />
As described above, any translated text in the source code gets reflected into tens of *.po files, maintained by the translators. So every time you just change it in the source, ALL the translators need to do the translation again. Normally, the translation environment will give a prudent suggestion, but there is still a manual approval step. If you check in the change, the string will not be translated until the translators pick it up.<br />
<br />
This is why, if what you change is just a couple of spelling mistakes, a missing comma in the middle, or maybe an extra space somewhere in the message, it's a good idea to save the translators' work, by doing a global search and replace of your source message text in the *.po files, and committing these along with your change. <br />
<br />
For short enough messages, that don't span multiple lines in the *po files, you can do it by executing<br />
perl -pi -e 's/YOUR MESSAGE BEFORE CORRECTION/your message after correction/g;' *.po *.pot <br />
in the po/ directory. Make sure you do a "git diff" and observe the results make sense. (You'll probably have to escape some characters in the regular expression, such as | or .).<br />
<br />
To make it easier to port your changes across multiple branches, it's a good idea to separate the changes in the source tree from the po/ ones. This way, you'll be able to quickly re-apply the source changes using normal cross-branch porting workflow (such as `git cherry-pick'), and then adjust and re-run the search-and-replace in the po/ on the new branch, because, most likely, it won't reapply due to the differences in the .po layout.<br />
<br />
'''NOTE: '''to stress it again, only do it for text change that didn't change how it is going to be translated. If you'd like your change to be somehow reflected in the translations, let the translators do the work instead.<br />
<br />
==Textual reports==<br />
Since Gramps-3.2 we are able to select the language for textual reports, see [http://www.gramps-project.org/bugs/view.php?id=2371 this feature]. <br />
<br />
Currently only available on Ancestor report (3.2.x) and detailed reports (3.3.x).<br />
<br />
For providing this option:<br />
# import EnumeratedListOption<br />
# import libtranslate<br />
from gen.plug.menu import EnumeratedListOption <br />
import TransUtils<br />
from libtranslate import Translator, get_language_string<br />
<br />
Sample of code:<br />
<br />
language = menu.get_option_by_name('trans').get_value()<br />
translator = Translator(language)<br />
self._ = translator.gettext<br />
self.__narrator = Narrator(self.database, self.verbose, use_call, <br />
use_fulldate, empty_date, empty_place, <br />
translator=translator,<br />
get_endnote_numbers=self.endnotes)<br />
self.__get_date = translator.get_date<br />
self.__get_type = translator.get_type<br />
<br />
self._("")<br />
self.__get_date(event.get_date_object())<br />
self.__get_type(event.get_type())</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Conversion_from_Subversion_to_Git&diff=47348Conversion from Subversion to Git2013-11-27T18:38:03Z<p>BACbKA: /* Convert get_svn_revision to get_git_revision */ converted on gramps34, too</p>
<hr />
<div>== Repository Changes ==<br />
<br />
=== Revision number ===<br />
<br />
Git uses hashes rather than revision numbers. We plan to keep the subversion revision number in the commit messages, but convert it into a shorter more readable format.<br />
<br />
It will be possible to find a subversion revision with:<br />
<br />
git log --grep=<revision><br />
<br />
=== Properties ===<br />
<br />
Git does not have file-level properties. Instead, file attributes can be defined in the .gitattributes file.<br />
<br />
Line ending characters (CRLF/LF) and file types (text/binary) can be defined in the .gitattributes file. This will replace the svn:eol-style and svn:mime-type properties.<br />
<br />
The svn:ignore properties are replaced by the .gitignore file. This is already present for users of the git mirror.<br />
<br />
It is not easy to implement useful keyword expansion of $Id$ in git, so we don't propose to do so. The same information can be obtained with:<br />
<br />
git log -1 <path><br />
<br />
=== Convention ===<br />
<br />
Rename "trunk" to "master".<br />
<br />
=== Procedural ===<br />
We want to minimize the time window when the commits are not possible during the transition. At some point we'll switch the old SVN repo to read-only mode --- this will be announced on the devel list.<br />
<br />
Can we push our commits from the git repositories that tracked John's repo with git-svn, maybe this should be set up as an interim approach?<br />
<br />
== Code Changes ==<br />
<br />
=== Convert get_svn_revision to get_git_revision ===<br />
<br />
The function to return the latest svn revision number needs to be replaced by one to return the latest commit hash.<br />
<br />
* gramps/gen/svn_revision.py -> gramps/gen/git_revision.py - DONE<br />
* gramps/gen/const.py - DONE<br />
* src/configure.in (gramps34 only) - DONE<br />
<br />
=== Code to skip .svn directories ===<br />
<br />
Two files have code for skipping subversion directories:<br />
<br />
* gramps/plugins/tool/mediamanager.py - DONE<br />
* gramps/test/regrtest.py - DONE<br />
<br />
We can remove this code at some point. Git does not pollute the source code tree with its files.<br />
<br />
=== Repository url needs changing ===<br />
<br />
Three files contain the repository url:<br />
<br />
* gramps/gen/config.py - gramps-addons<br />
* gramps/gen/db/__init__.py - DONE<br />
* gramps/webapp/init.py - DONE<br />
<br />
=== Change svn2cl -> git2cl ===<br />
<br />
There is a reference to svn2cl in the about dialog. There is a git alternative available at http://savannah.nongnu.org/projects/git2cl/.<br />
<br />
* gramps/gui/aboutdialog.py - No change required<br />
<br />
=== Headline News gramplet ===<br />
<br />
Change url to point to Git repository. - DONE (gramps40 and master)<br />
<br />
== Bug Tracker Changes ==<br />
<br />
Rename the "Trunk" project to "Master".<br />
<br />
== Documentation Changes ==<br />
<br />
The main changes required will be to the developer wiki pages:<br />
<br />
* [[Brief introduction to SVN]] -> [[Brief introduction to Git]] - DONE<br />
* [[Getting started with Gramps development]] - DONE<br />
* [[Running a development version of Gramps]] - DONE<br />
* [[Committing policies]] - DONE<br />
* [[What to do for a release]] - DONE<br />
* [[Development using Eclipse and Pydev]] - DONE<br />
* [[Getting started with Gramps Trunk]]<br />
<br />
Other wiki pages that will require minor changes:<br />
<br />
* [[Installation alternatives]] - DONE<br />
* [[Translating Gramps]] - DONE<br />
* [[Coding for translation]] - DONE<br />
* [[Translation environment4]] - DONE<br />
* [[Manual Generation]] - DONE<br />
* [[Using the bug tracker]] - DONE (still refers to Trunk Project on the bug tracker)<br />
* [[Bug triage]] - DONE (still refers to Trunk Project on the bug tracker)<br />
<br />
* [[Relationship Calculator]] - DONE<br />
* [[Date Handler]] - DONE<br />
<br />
* [[Animal pedigree]] - DONE<br />
* [[Geographic Report]] - DONE<br />
* [[HeadlineNewsGramplet]] - DONE<br />
* [[InformationGraph]] - DONE<br />
<br />
* [[Mac OS X:Build from source:Application package]] - DONE<br />
* [[Linux:Build from source]] - DONE<br />
* [[Debian]] - DONE<br />
<br />
* [[Gramps-Connect]]<br />
* [[Gramps SQL Database]]<br />
* [[Gramps Server Mode]]<br />
<br />
* [[GEPS 013: Gramps Webapp: Initial Thoughts]] - DONE<br />
* [[GEPS 013: Gramps Webapp]] - DONE<br />
* [[GEPS 023: Storing data from large sources]] - DONE<br />
<br />
Pages requiring changes when gramps-addons is converted:<br />
<br />
* [[Addons development]]<br />
* [[DescendantsLines]]<br />
* [[GEPS 005: Enhanced Plugin Interface]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Testing_Gramps&diff=47347Testing Gramps2013-11-27T16:00:42Z<p>BACbKA: /* unit tests in the main tree */</p>
<hr />
<div>=Currently used tests and frameworks=<br />
== testing of reports ==<br />
=== test/runtest.sh ===<br />
Runs all possible reports using the report cli interface, based on the example.gramps database. This test is not fully self-contained, in that it depends on various environment settings, such as your locale, your preferred name display formats, and your report options. Last, but not the least, the verification of the resulting reports is entirely manual.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-runtest.sh found-by-runtest.sh]<br />
<br />
== other report testing ==<br />
See more specialized scripts in test/, status unknown.<br />
<br />
==test/impex.sh==<br />
Import/export test for GRAMPS.<br />
<br />
From the file header:<br />
* Import example XML data and create internal Gramps DB<br />
* Open produced Gramps DB, then<br />
** check data for integrity<br />
** output in all formats<br />
* Check resulting XML for well-formedness and validate it against DTD and RelaxNG schema.<br />
* Import every exported file produced if the format is also supported for import, and run a text summary report.<br />
* Diff each report with the summary of the produced example DB.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-impex.sh found-by-impex.sh]<br />
<br />
== Unit testing ==<br />
=== test/RunAllTests.py ===<br />
Runs out-of-tree (not in gramps/) testing code, by looking for any test/*_Test.py files and executing the test suites therein. See the current code in test/*_Test.py for example and python standard unittest docs.<br />
<br />
Starting with gramps40 branch, these tests include non-automated unit tests only. The automated unit tests are all under gramps/.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-RunAllTests.py found-by-RunAllTests.py]<br />
<br />
GtkHandler testing code pops up the GRAMPS error dialog, but this is actually for testing the error reporting itself. Don't be scared by the dialog, it's expected. Your manual work is required to close the dialogs with the "Cancel" button. The relevant tests still pass (unless there's another bug there)...<br />
<br />
=== unit tests in the main tree ===<br />
python setup.py test<br />
<br />
See [[Unit Test Quickstart]] for detailed running instructions.<br />
<br />
{| {{prettytable}}<br />
! File<br />
! Status<br />
! Comments<br />
|-<br />
|gramps/cli/test/cli_test.py<br />
|bgcolor="#80ff80"| OK<br />
|3 tests<br />
|-<br />
|gramps/cli/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|8 tests (6 require mocking to run)<br />
|-<br />
|gramps/gen/test/config_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test<br />
|-<br />
|gramps/gen/test/constfunc_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test (linux only, skipped elsewhere)<br />
|-<br />
|gramps/gen/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test. See #{{bug|7013}} for context<br />
|-<br />
|gramps/gen/datehandler/test/datehandler_test.py<br />
|bgcolor="#80ff80"| OK<br />
|9 tests<br />
|-<br />
|gramps/gen/db/test/cursor_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests, 2 skipped<br />
|-<br />
|gramps/gen/db/test/db_test.py<br />
|bgcolor="#80ff80"| OK<br />
|6 tests<br />
|-<br />
|gramps/gen/db/test/reference_map_test.py<br />
|bgcolor="#80ff80"| OK<br />
|5 tests<br />
|-<br />
|gramps/gen/lib/test/date_test.py<br />
|bgcolor="#80ff80"| OK<br />
|8 tests (locale-based, OK for en, fails for some other locales)<br />
|-<br />
|gramps/gen/lib/test/grampstype_test.py<br />
|bgcolor="#80ff80"| OK<br />
|3 tests<br />
|-<br />
|gramps/gen/lib/test/merge_test.py<br />
|bgcolor="#ff8080"| FAIL<br />
|201 tests, 2 failed skipped {{bug|7027}}<br />
|-<br />
|gramps/gen/merge/test/merge_ref_test.py<br />
|bgcolor="#80ff80"| OK<br />
|53 tests<br />
|-<br />
|gramps/gen/utils/test/callback_test.py<br />
|bgcolor="#80ff80"| OK<br />
|10 tests<br />
|-<br />
|gramps/gen/utils/test/keyword_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests<br />
|-<br />
|gramps/gen/utils/test/place_test.py<br />
|bgcolor="#ff8080"| FAIL<br />
|28 tests, 4 failures (bug #{{bug|7044}})<br />
|-<br />
|gramps/gui/logger/test/rotate_handler_test.py<br />
|bgcolor="#80ff80"| OK<br />
|2 tests<br />
|-<br />
|gramps/gui/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test (requires mocking to run)<br />
|-<br />
|gramps/plugins/export/test/exportvcard_test.py<br />
|bgcolor="#80ff80"| OK<br />
|28 tests<br />
|-<br />
|gramps/plugins/importer/test/importvcard_test.py<br />
|bgcolor="#80ff80"| OK<br />
|66 tests<br />
|-<br />
|gramps/plugins/importer/test/importxml_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests<br />
|-<br />
|gramps/plugins/importer/test/importgeneweb_test.py<br />
|bgcolor="#80ff80"| OK<br />
|2 tests<br />
|-<br />
|gramps/test/test/gedread_util_test.py<br />
|<br />
|No longer required?<br />
|-<br />
|gramps/test/test/test_util_test.py<br />
|<br />
|No longer required?<br />
|-<br />
|gramps/webapp/grampsdb/view/png.py<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
There is also semi-interactive testing via __main__ in some code:<br />
<br />
{| {{prettytable}}<br />
! File<br />
! Status<br />
! Comments<br />
|-<br />
|gramps/gen/relationship.py<br />
|bgcolor="#ff8080"| To Do<br />
|Relationship calculator<br />
|-<br />
|gramps/gen/db/bsddbtxn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/txn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/undoredo.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/write.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/txn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/lib/styledtext.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/utils/place.py<br />
|bgcolor="#80ff80"| OK<br />
|Done<br />
|-<br />
|gramps/gen/utils/docgen/odstab.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/utils/docgen/csvtab.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gui/ddtargets.py<br />
|bgcolor="#ff8080"| To Do<br />
|Not worth running?<br />
|-<br />
|gramps/gui/widgets/undoablebuffer.py<br />
|bgcolor="#ff8080"| To Do<br />
|Not worth running?<br />
|-<br />
|gramps/gui/dialog.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/validatedmaskedentry.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/progressdialog.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/statusbar.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/plugins/lib/libsubstkeyword.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/plugins/rel/rel_*.py<br />
|bgcolor="#ff8080"| To Do<br />
|Relationship calculator plugins<br />
|-<br />
|gramps/plugins/tool/phpgedviewconnector.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|}<br />
<br />
== Manual test plan ==<br />
See TestPlan.txt in gramps toplevel. I believe this is only done at a major release (like 4.0.0).<br />
<br />
=Test status=<br />
We currently don't have a record of tests executed, the platforms and environments they were run upon, and what code they covered. The only indirect evidence is available in open bugs, when people care to fill in these details. :-(<br />
<br />
=Possible improvements=<br />
* unify running all the tests, in- or out- tree<br />
** Try switching the feature tests and non-automated unit tests in test/ from our runner scripts to [http://docs.python.org/2/library/unittest.html#test-discovery python native unittest discovery mechanism]. <br />
** we have a stale gramps/test/regrtest.py runner, notable for logging init. - should we revive that, or maybe integrate into setup.py test runner?<br />
* coverage analysis<br />
* (needs server capacity to be hosted online) continous test status report, coverage, automatic deployment into win/mac/linux VMs (I can dream, can't I?)<br />
<br />
=See also=<br />
* [[Unit Test Quickstart]]<br />
<br />
[[Category:Developers/Reference]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=RU:%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D0%B1%D0%B0%D0%B3-%D1%82%D1%80%D0%B5%D0%BA%D0%B5%D1%80%D0%B0_%D0%B8%D0%BB%D0%B8_%D0%BA%D0%B0%D0%BA_%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B8%D1%82%D1%8C_%D0%BE%D0%B1_%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B5&diff=47346RU:Использование баг-трекера или как сообщить об ошибке2013-11-26T10:57:43Z<p>BACbKA: /* Решение проблем */</p>
<hr />
<div>{{languages/ru|How to report bugs|Как сообщить о ошибке}}<br />
<br />
Баг-трекер для проекта Gramps находится на сайте: http://bugs.gramps-project.org<br />
Этот баг-трекер служит пользователям и разработчикам для регистрации новых проблем и дальнейшего отслеживания. Пожалуйста, уделите немного внимания чтению инструкции для трекера ниже и также прочтите '''[[How to create a good bug report|как сделать хороший отчёт о ошибке]]'''. И ещё: '''[[Known_issues|известные проблемы]]''' и '''[[Common_problems|общие проблемы]]'''.<br />
<br />
==Отчёт о ошибке==<br />
===1. Вход===<br />
Для отчёта о ошибке Вам нужен аккаунт в баг-трекере по адресу http://bugs.gramps-project.org. Когда Вы создадите пользовательский аккаунт, помните что может пройти до 12 часов, прежде чем получите письмо по почте. Только после нажатия на ссылку в письме сможете отправлять отчёты. Ваш адрес почты будет храниться конфиденциально.<br />
<br />
===2. Поиск существующих ощибок===<br />
Возможно, ошибка о которой хотите сообщить, была уже отправлена. Для проверки, нажмите 'View Issues'. Верх страницы занят фильтрами, которые Вы установили. Обычно по умолчанию фильтры только уточняют. Под этими фильтрами есть строка поиска. Введите условия, которые наилучшим образом описывают ошибку и нажмите применить фильтр. Если Вы получили сообщение о ошибке, попробуйте вставить часть ошибки, чтобы увидеть - сообщали ли о ней уже.<br />
<br />
<br />
Если о ошибке уже сообщали, прочтите отчёт, и посмотрите можно ли дополнить информацию. Если так, вы можете оставить заметку с дополнительной информацей, чтоб помочь разработчикам.<br />
<br />
===3. Отправка новой ошибки=== <br />
Нажмите на Report Issue и введите требуемую информацию, посмотрите ниже на выбор какому проекту принадлежит ошибка. Будьте точны и подробны, разработчики очень плохи в чтении мыслей. Не забывайте уточнить какой версией Вы пользуетесь. Вы можете проверить это в программе, кликнув в главном меню Справка -> О программе.<br />
<br />
==== Проекты ====<br />
В верхнем правом углу трекера можете выбрать "проект" для ошибки. "Проекты" это путь для категоризации проблем. Есть три типа проектов в трекере:<br />
<br />
#'''Feature Requests''' место для записи того, что Вы хотели бы видеть в следущих версиях.<br />
#Проекты с именем, выглядящим наподобие '''Gramps x.x.X''' содержат отчёты о ошибках, которые применимы специально к поддерживаемой ветке (смотрите [http://www.gramps-project.org/wiki/index.php?title=Brief_introduction_to_SVN#Types_of_branches Types of Branches]). Отдельные проекты сущетвуют для каждой поддерживаемой ветки.<br />
#Проекты '''Gramps Trunk''' должны использоваться только разработчиками и тестерами последнего кода. Это место для записи проблем, которые относятся только к главной версии ([http://www.gramps-project.org/wiki/index.php?title=Brief_introduction_to_SVN#Types_of_branches Types of Branches]). Это единственный "Gramps Trunk" проект, потому что есть только одна главная версия в репозитарии Subversion.<br />
<br />
==== Алгоритм действий ====<br />
Первым шагом определите какому проекту принадлежит вопрос.<br />
<br />
*Если представляет функциональность, которой ещё нет в GRAMPS, тогда вопрос должен быть послан как '''Feature Requests'''.<br />
<br />
*Если вопрос представляет собой проблему с функциональностью, которая есть в стабильной версии кода, тогда вопрос должен быть зарегестрирован в соответствии с поддерживаемой веткой для этого выпуска. Например, ошибка найденная в Gramps 3.2.6, должна быть отправлена как '''Gramps 3.2.X'''.<br />
<br />
*Если вопрос описывает проблему с функциональностью, которая существует только в основной линии разработки, но не в каком-либо стабильном выпуске, тогда вопрос подается как '''Gramps Trunk'''.<br />
<br />
== Решение проблем ==<br />
<br />
Следующая информация --- для разработчиков, которые вносят исправления в Gramps, сообразно с найденными проблемами.<br />
<br />
[http://www.gramps-project.org/bugs/roadmap_page.php План разработки] приоритизирует проблемы и изменения, которые планируются на следующие версии програмы. Если вы ищете, что бы такого починить, то это --- хорошая точка отправления.<br />
<br />
Когда вы вносите исправления в исходный код, то в соответсвующую страницу ошибки следует добавить упоминание с хэшем git-версии, содержащей ваше исправление.<br />
<br />
Когда чинится ошибка в поддерживаемой ветке, надо всегда ставить поле "Fixed in version" в версию следующюю за выпуском, который был сделан из ветки. Это сделано так, чтоб вопрос точно возникал на странице лога изменений для этого проекта (http://bugs.gramps-project.org/changelog_page.php).<br />
<br />
Ошибки в поддерживаемой версии проектов не должны помечаться закрытыми до того, пока разработчики не закончат изменения в связанной ветке. Также, помечать изменения которые были внесены в основную версию - это ответственность разработчиков. Только после этого ошибку можно пометить как исправленную.<br />
<br />
==Работа над ошибками==<br />
<br />
Помогите проекту Gramps [[Bug triage]].<br />
<br />
==Синтаксис==<br />
<br />
[http://www.mantisbt.org/ Mantis bug tracker] использует собственный синтакс:<br />
* ''#'' перед номером ошибки, записанным в ссылке на баг.<br />
* ''~'' перед номером комментария, записанным в ссылке на комментарий, как ''{url}#c{comment number}''.<br />
* можно попробовать использовать HTML-тэги в текстовых полях, наподобие: <code> < pre >< /pre > < i > < / i > < b > < / b></code> <br />
<br />
[[Category:Developers/General]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker&diff=47345Using the bug tracker2013-11-26T10:47:30Z<p>BACbKA: /* Resolving bugs */ roadmap</p>
<hr />
<div>{{languages|How to report bugs}}<br />
The bug/issue tracker for Gramps is located at the following URL: http://bugs.gramps-project.org<br />
This bug/issue tracker allows users and developers to log new issues and track them as they progress. Please take some time to read the issue tracker instructions below and read '''[[How to create a good bug report|how to create a good bug report]]'''. Also, have a look at '''[[Known_issues|known issues]]''' and '''[[Common_problems|common problems]]'''.<br />
<br />
==Report a bug==<br />
===1. Login===<br />
To report a bug, you must have a login account on http://bugs.gramps-project.org, which is the Gramps bug tracker. When you create a user account, remember that it can take up to 12 hours before a notification email is send to you. Only after clicking on the link in the email can you submit bugs. Your email address will be handled confidentially.<br />
<br />
===2. Search existing bugs===<br />
Perhaps the bug you want to report has been submitted before. To check this, click on 'View Issues'. The top of the page is reserved for filters, which you set. Normally the default filters are just fine. Under these filters, there is a search box. Enter the terms best describing the bug, and click apply filter. If you have an error message, try pasting a part of the error, to see if it is has been reported already.<br />
<br />
If the bug is already reported, read the bug report over, and see if you can add to the information. If so, you can leave a note with extra information to help the developers.<br />
<br />
===3. Submit new bug===<br />
Click on Report Issue, and enter the required information, see below on how to select the project to which the bug belongs. Be verbose, the developers are bad at mind reading. We shall mercilessly close the bugs which have no meaningful information at all, such as #{{bug|7126}}. Do not forget to list the Gramps version you are using. You can check this in Gramps by clicking in the Gramps program the Help menu, option About.<br />
<br />
==== Projects ====<br />
In the upper right corner of the issue tracker, there is a place to select the "project" for the bugs. "Projects" are a way to categorize issues. There are three types of projects in the issue tracker:<br />
<br />
#The '''Feature Requests''' project is a place for recording requests for new features. <br />
#The projects with names that look like '''Gramps x.x.X''' are where issues are reported that apply specifically to a maintenance branch (see [[Brief_introduction_to_Git#Types_of_branches|Types of Branches]]). A separate project exists for each maintenance branch.<br />
#The '''Gramps Trunk''' project should only be used by developers and testers of the latest code. It is a place for recording issues that only apply to the master branch in Git (see [[Brief_introduction_to_Git#Types_of_branches|Types of Branches]]). There is only one "Gramps Trunk" project because there is only one master branch in the Git repository.<br />
<br />
==== How to proceed ====<br />
The first step in submitting an issue on the tracker is to determine which project it belongs to. <br />
<br />
*If the issue represents functionality that does not currently exist in Gramps, then the issue should be filed under the '''Feature Requests''' project.<br />
<br />
*If the issue represents a problem with functionality that has been released in a stable release of code, then the issue should be filed under the project that corresponds to the maintenance branch for that release. For example, a bug found in Gramps 3.2.6 should be filed under the '''Gramps 3.2.X''' project.<br />
<br />
*If the issue represents a problem with functionality that only exists the master branch, or the problem exists in the master branch, but not any stable releases, then the issue should be filed under the '''Gramps Trunk''' project.<br />
<br />
== Resolving bugs ==<br />
This information is for the developers following up on the submitted issues.<br />
<br />
The [http://www.gramps-project.org/bugs/roadmap_page.php roadmap page] of the bug tracker lists the bugs currently prioritized for the next releases. If you are looking for a bug to fix, this is a good place to start.<br />
<br />
In general, when resolving an issue, it is always a good idea to add a note with the hash of the commit that fixed the problem.<br />
<br />
When resolving issues in a maintenance branch, one should always set the "Fixed in version" field to the version of the next release that will be made from that branch. This is done so that the issue properly appears in the ChangeLog page for that project (http://bugs.gramps-project.org/changelog_page.php).<br />
<br />
Bugs in maintenance branch projects should not be marked as closed until the developer has committed the change into the corresponding maintenance branch. Additionally, it is the developers responsibility to make sure the change has been merged into the master branch.<br />
<br />
==Bug triage==<br />
<br />
Help the Gramps project [[Bug triage]].<br />
<br />
==Syntax==<br />
<br />
[http://www.mantisbt.org/ Mantis bug tracker] uses its own syntax code :<br />
* ''#'' before a bug number writes a link to the bug.<br />
* ''~'' before a comment number writes a link to the comment, same as : ''{url}#c{comment number}''.<br />
* we can try to use some HTML tags into text field, like : <code> &lt;pre&gt; &lt;/pre&gt; &lt;i&gt; &lt;/i&gt; &lt;b&gt; &lt;/b&gt;</code> <br />
<br />
[[Category:Developers/General]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Known_issues&diff=47344Known issues2013-11-26T10:34:09Z<p>BACbKA: intro</p>
<hr />
<div>{{languages}}<br />
This page lists some long-standing recurring issues with Gramps. Be sure also to read the instructions on [[using the bug tracker]], and to check the bug tracker to learn what the current actively researched issues are --- they aren't reported here.<br />
<br />
==Dependencies==<br />
===Gramps and some Gtk versions===<br />
* Some Gtk versions seem not to properly refresh the GUI (need to use the mouse cursor), see bug {{bug|4863}}.<br />
* Some Gtk versions have a refresh issue on Citation TreeView (3.4.x) after an edition, see bug {{bug|5688}}.<br />
* Incremental search and synchronization with typed letters, see bug {{bug|1450}}.<br />
* New row/line on Census gramplet (addon), see bug [http://www.gramps-project.org/bugs/view.php?id=5688#c24063 5688].<br />
<br />
===Gramps and some python gobject introspection versions===<br />
* pygobject < 3.4.0: : segfault on expand all nodes/rows into a Tree View, see bug {{bug|6289}}.<br />
<br />
=== Gramps freezes and crashes with ATK / GNOME / GAIL Assistive Technologies enabled ===<br />
There have been multiple reports of long freezes and crashes of Gramps when refreshing the people or place tree view, e.g. after editing a person or changing the Name Display Format. They are related to the use of GNOME Assistive Technologies (ATK/GAIL). <br />
<br />
* Gnome 2.x<br />
If you experience similar problems try going into {{man menu|System -> Preferences -> Assistive Technologies}}, <br />
'''unchecking''' ''Enable assistive technologies''.<br />
* Ubuntu 12.04 LTS<br />
If you experience similar problems try going into {{man menu|System Settings -> Keyboard -> Universal Access}},<br />
'''Disable''' all assistive technologies.<br />
<br />
Then logging out and in again.<br />
<br />
You can also try this into a console:<br />
$ sudo gedit /etc/gconf/gconf.xml.mandatory/%gconf-tree.xml<br />
or<br />
sudo gedit /var/lib/gconf/./%gconf-tree.xml<br />
or<br />
$ sudo gedit /etc/gdm3/greeter.gconf-defaults<br />
or<br />
$ sudo gedit .gconf/desktop/gnome/accessibility/keyboard/%gconf.xml<br />
Locate this part:<br />
<dir name="accessibility"><br />
<dir name="keyboard"><br />
<entry name="enable" ... type="bool" value="true"/><br />
</dir><br />
and set ''enable'' to '''false'''.<br />
<br />
====See also====<br />
* Gramps bug {{bug|3069}}: GtkTreeView is very slow / crashes with Assistive Technologies / ATK / a11y enabled<br />
* [http://bugzilla.gnome.org/show_bug.cgi?id=577098 GNOME Bug 577098 - GtkTreeView (lists, Nautilus) is very slow with Assistive Technologies enabled (at-spi)], Status: UNCONFIRMED<br />
* [http://bugzilla.gnome.org/show_bug.cgi?id=571596 GNOME Bug 571596 - GTK_MODULES=gail:atk-bridge slows down incredibly TreeStore in pygtk ], Status: RESOLVED / DUPLICATE of 577098<br />
* [http://bugzilla.gnome.org/show_bug.cgi?id=587020 GNOME Bug 587020 - GtkTreeView crawls with a11y enabled], Status: RESOLVED / Resolution: DUPLICATE of 577098<br />
<br />
==Database ==<br />
<br />
=== Gramps runs out of locks ===<br />
With a large database, Gramps can "run out of available locks". <br />
For 140.000 people you should use: max_locks 300000 and max_objects 300000<br />
<br />
The easiest way to do this is to create an empty database the add a file DB_CONFIG to the database directory before importing (see gramps -l output for the directory of a specific family tree. Contents of this DB_CONFIG file should be:<br />
<br />
#may want to fiddle with cachesize also<br />
#set_cachesize 0 200000000 2<br />
set_lk_max_locks 300000<br />
set_lk_max_objects 300000<br />
<br />
<br />
See bug report below.<br />
<br />
'''See also'''<br />
* Gramps bugs {{bug|2686}}: crashed importing d03 stress test database, and workarounds<br />
<br />
==Data ==<br />
<br />
=== Gramps and AttributeError ===<br />
<br />
This message is often related to your data into your FamilyTree.<br />
See [[AttributeError:_NoneType_object_has_no_attribute|AttributeError]]<br />
<br />
==Encoding ==<br />
<br />
=== Gramps cannot import media with non-ASCII characters on filename ===<br />
<br />
If Python returns a codec/UTF8 warning and this file was pasted from an external support (CD, HD, USB key), maybe filename has been corrupted ! It seems correct on screen but not on command line. Your OS was not able to properly set the encoding used on your external support.<br />
<br />
The [http://en.wikipedia.org/wiki/Unicode_Specials#Replacement_character replacement character will be often a "�" (black diamond with a white question mark)].<br />
You can try to fix the filename by setting the correct character. Now you will be able to import this file into Gramps !<br />
<br />
==Reports ==<br />
<br />
=== Gramps cannot display some characters into reports ===<br />
<br />
RTF (''C style escape'') and LaTeX (''latin1'') file format backends on output not initially designed for a unicode support.<br />
It is possible to get strange non-ASCII character handling when using these formats.<br />
It could be very specific, because it has been tested and improved since many versions, but still possible.<br />
<br />
==== See also ====<br />
* (resolved) {{bug|6883}} non-Western fonts broken in PS reports<br />
* (resolved) {{bug|6884}} RTF reports backend seems to be non-UTF-aware, breaks non-Western text<br />
<br />
[[Category:Troubleshooting]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Known_issues&diff=47343Known issues2013-11-26T10:27:43Z<p>BACbKA: /* Edition */ rm ancient stuff</p>
<hr />
<div>{{languages}}<br />
==Dependencies==<br />
===Gramps and some Gtk versions===<br />
* Some Gtk versions seem not to properly refresh the GUI (need to use the mouse cursor), see bug {{bug|4863}}.<br />
* Some Gtk versions have a refresh issue on Citation TreeView (3.4.x) after an edition, see bug {{bug|5688}}.<br />
* Incremental search and synchronization with typed letters, see bug {{bug|1450}}.<br />
* New row/line on Census gramplet (addon), see bug [http://www.gramps-project.org/bugs/view.php?id=5688#c24063 5688].<br />
<br />
===Gramps and some python gobject introspection versions===<br />
* pygobject < 3.4.0: : segfault on expand all nodes/rows into a Tree View, see bug {{bug|6289}}.<br />
<br />
=== Gramps freezes and crashes with ATK / GNOME / GAIL Assistive Technologies enabled ===<br />
There have been multiple reports of long freezes and crashes of Gramps when refreshing the people or place tree view, e.g. after editing a person or changing the Name Display Format. They are related to the use of GNOME Assistive Technologies (ATK/GAIL). <br />
<br />
* Gnome 2.x<br />
If you experience similar problems try going into {{man menu|System -> Preferences -> Assistive Technologies}}, <br />
'''unchecking''' ''Enable assistive technologies''.<br />
* Ubuntu 12.04 LTS<br />
If you experience similar problems try going into {{man menu|System Settings -> Keyboard -> Universal Access}},<br />
'''Disable''' all assistive technologies.<br />
<br />
Then logging out and in again.<br />
<br />
You can also try this into a console:<br />
$ sudo gedit /etc/gconf/gconf.xml.mandatory/%gconf-tree.xml<br />
or<br />
sudo gedit /var/lib/gconf/./%gconf-tree.xml<br />
or<br />
$ sudo gedit /etc/gdm3/greeter.gconf-defaults<br />
or<br />
$ sudo gedit .gconf/desktop/gnome/accessibility/keyboard/%gconf.xml<br />
Locate this part:<br />
<dir name="accessibility"><br />
<dir name="keyboard"><br />
<entry name="enable" ... type="bool" value="true"/><br />
</dir><br />
and set ''enable'' to '''false'''.<br />
<br />
====See also====<br />
* Gramps bug {{bug|3069}}: GtkTreeView is very slow / crashes with Assistive Technologies / ATK / a11y enabled<br />
* [http://bugzilla.gnome.org/show_bug.cgi?id=577098 GNOME Bug 577098 - GtkTreeView (lists, Nautilus) is very slow with Assistive Technologies enabled (at-spi)], Status: UNCONFIRMED<br />
* [http://bugzilla.gnome.org/show_bug.cgi?id=571596 GNOME Bug 571596 - GTK_MODULES=gail:atk-bridge slows down incredibly TreeStore in pygtk ], Status: RESOLVED / DUPLICATE of 577098<br />
* [http://bugzilla.gnome.org/show_bug.cgi?id=587020 GNOME Bug 587020 - GtkTreeView crawls with a11y enabled], Status: RESOLVED / Resolution: DUPLICATE of 577098<br />
<br />
==Database ==<br />
<br />
=== Gramps runs out of locks ===<br />
With a large database, Gramps can "run out of available locks". <br />
For 140.000 people you should use: max_locks 300000 and max_objects 300000<br />
<br />
The easiest way to do this is to create an empty database the add a file DB_CONFIG to the database directory before importing (see gramps -l output for the directory of a specific family tree. Contents of this DB_CONFIG file should be:<br />
<br />
#may want to fiddle with cachesize also<br />
#set_cachesize 0 200000000 2<br />
set_lk_max_locks 300000<br />
set_lk_max_objects 300000<br />
<br />
<br />
See bug report below.<br />
<br />
'''See also'''<br />
* Gramps bugs {{bug|2686}}: crashed importing d03 stress test database, and workarounds<br />
<br />
==Data ==<br />
<br />
=== Gramps and AttributeError ===<br />
<br />
This message is often related to your data into your FamilyTree.<br />
See [[AttributeError:_NoneType_object_has_no_attribute|AttributeError]]<br />
<br />
==Encoding ==<br />
<br />
=== Gramps cannot import media with non-ASCII characters on filename ===<br />
<br />
If Python returns a codec/UTF8 warning and this file was pasted from an external support (CD, HD, USB key), maybe filename has been corrupted ! It seems correct on screen but not on command line. Your OS was not able to properly set the encoding used on your external support.<br />
<br />
The [http://en.wikipedia.org/wiki/Unicode_Specials#Replacement_character replacement character will be often a "�" (black diamond with a white question mark)].<br />
You can try to fix the filename by setting the correct character. Now you will be able to import this file into Gramps !<br />
<br />
==Reports ==<br />
<br />
=== Gramps cannot display some characters into reports ===<br />
<br />
RTF (''C style escape'') and LaTeX (''latin1'') file format backends on output not initially designed for a unicode support.<br />
It is possible to get strange non-ASCII character handling when using these formats.<br />
It could be very specific, because it has been tested and improved since many versions, but still possible.<br />
<br />
==== See also ====<br />
* (resolved) {{bug|6883}} non-Western fonts broken in PS reports<br />
* (resolved) {{bug|6884}} RTF reports backend seems to be non-UTF-aware, breaks non-Western text<br />
<br />
[[Category:Troubleshooting]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Committing_policies&diff=47339Committing policies2013-11-23T19:53:07Z<p>BACbKA: /* Log messages */</p>
<hr />
<div>==Log messages==<br />
Every commit to Git must be accompanied by a log message. These messages will be generated into a ChangeLog when a release is made and should conform to the following guidelines:<br />
<br />
* The first line of the commit message should consist of a short summary of the change.<br />
* If the commit fixes a bug on the [http://bugs.gramps-project.org bug tracker], the summary shall include the bug ID and summary from the tracker.<br />
* The summary should be separated from the body of the message by a single blank line.<br />
* Messages should attempt to describe how the change affects the functionality from the user's perspective.<br />
* Use complete sentences when possible.<br />
* It is not necessary to describe minute details about the change nor the files that are affected because that information is already stored by Git and can be viewed with "git diff".<br />
* When committing contributed code, the author should be credited using the --author option.<br />
* If you want to refer to another commit, use the commit short hash (6 hexa digits) in square brackets. It will automatically be expanded to a hyperlink by the SourceForge web interface to the repository, e.g.: [http://sourceforge.net/p/gramps/source/ci/d8acf8e875a06cf89b2cc4d59ed63730539244af/ [d8acf8&#93;]. Note: the default short hash in git is 7 hexa digits (as produced by `git log --oneline' command), and that WILL NOT WORK with auto-hyperlinking of sourceforge :-(<br />
<br />
You can see the last changes with the git log command, an example usage of this command:<br />
git log --oneline<br />
<br />
You can also limit the number of entries shown by passing in the '''-n''' flag to svn. Add '''--stat''' to see the files affected by the commit:<br />
<br />
git log -5<br />
<br />
==Adding new files==<br />
All the files with the translatable strings '''must''' be listed in the po/POTFILES.in or po/POTFILES.skip files. This means that most new files must have their names added to these files.<br />
<br />
Please remember to do this for new files that you add to Git.<br />
<br />
===Check===<br />
<br />
You can make a test on a local copy:<br />
./autogen.sh<br />
PYTHONPATH=../../trunk/src python po/test/po_test.py<br />
<br />
where ../.. is the path to your local copy<br />
<br />
==Removing files==<br />
Remember to remove references to the file from the po/POTFILES.in and po/POTFILES.skip files.<br />
<br />
==Bugfixes in branches==<br />
Whenever a bug is fixed in a maintenance branch, it is the committer's responsibility to make sure the fix is also committed to the master branch. See the [[Brief introduction to Git#Applying a fix to another branch|Brief introduction to Git]] for details.<br />
<br />
[[Category:Developers/General]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47281Template:Releases/4.0.2/ru2013-11-19T14:00:51Z<p>BACbKA: AIO</p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''4.0.2'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Обновления==<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Различные исправления в [[Gramps_4.0_Wiki_Manual_-_Gramplets/ru|грамплетах]]<br />
* Многочисленные исправления в отчётах [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|«веб-сайт»]] и «веб-календарь»<br />
* Улучшения в поддержке дат и календарей<br />
* Исправлен и улучшен [[Gramps-Connect|веб-сервис]]<br />
* Исправлен модуль вычисления различий между разными базами данных<br />
* Улучшен вид [[Gramps_4.0_Wiki_Manual_-_Main_Window/ru#.D0.A6.D0.B8.D1.82.D0.B0.D1.82.D1.8B|«цитаты»]]<br />
* Для разработчиков новых модулей: улучшен интерфейс класса [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User]<br />
* Улучшения и исправления при экспорте в формат Gramps XML<br />
* Версия XML изменена на формат 1.5.1<br />
* Исправлены несколько [[Known_issues#Reports|давно известных проблем при создании отчётов]]<br />
* Улучшена поддержка графического интерфейса и отчётов для пользователей со сложными системами письменности (арабский, иврит, и т.д.)<br />
* Улучшена поддержка выбора языка при создании некоторых отчётов<br />
* Улучшена система уведомления об отсутствующих модулях, требуемых для дополнительных возможностей Gramps<br />
* Улучшена поддержка проверки орфографии<br />
* Исправления ошибок, проявлявшихся под Mac и Windows<br />
* Для всех географических видов добавлена возможность печати<br />
* Добавлен алгоритм [[Date Handler|отображения и разбора дат]] для арабского и греческого<br />
* Внесены исправления в [[Portal:Translators|перевод]] (ar, cs, de, fr, lt, nb, nl, ru, sv) и связанные с переводом исправления программы<br />
* Восстановлены и улучшены [[Testing Gramps|тесты]], сломанные ещё с версии 3.3.x, что улучшило надёжность работы программы<br />
* Добавлена поддержка [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
* Добавлены новые [[Gramps_4.0_Wiki_Manual_-_Command_Line#Available_Gramps_options|параметры командной строки]] -y/--yes и -q/--quiet<br />
<br />
<br />
==Установка==<br />
#OS X: Для Mac OS X вскоре после этого выпуска выдет официальный установщик со всеми компонентами.<br />
#Linux: Ожидаются установочные пакеты для различных дистрибутивов Linux. Gramps 4.0 работает только с дистрибутивами, выпущеными с октября 2012. Для более старых дистрибутивов используйте VirtualBox. Некоторые зависимости пока не доступны на большинстве дистрибутивов. Если у вас такая проблема - устанавливайте Gramps из исходных кодов. Подробнее смотрите в [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|пошаговом руководстве по установке для Ubuntu]]. На Ubuntu компоненты проверки орфографии, географический вид и библиотеку exiv необходимо устанавливать из исходных кодов.<br />
#Windows: В последние месяцы было проделано много работы, чтобы получить стек, необходимый для Gramps для Windows. Первоначальный установщик AIO (всё в одном) доступен со [[Download/ru|страницы загрузки]]. Кроме того, установка возможна [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|из исходных кодов]].<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 журнале изменений].<br />
<br />
<noinclude>{{languages/ru|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Brief_introduction_to_Git&diff=47275Brief introduction to Git2013-11-17T22:22:39Z<p>BACbKA: /* External links */ rm git-svn link, we no longer use it</p>
<hr />
<div>The development source code of Gramps is stored in the Git repository at SourceForge.<br />
<br />
;[http://git.code.sf.net/p/gramps/source/ http://git.code.sf.net/p/gramps/source/]. <br />
<br />
This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably want to do one of two things with Git: either download the latest source or the development version, or else upload your changes (if you have write access to the repository) or [[Brief_introduction_to_SVN#Making_a_patchfile|make a patchfile]] (if you don't have write access).<br />
<br />
== Obtaining a copy of the Gramps repository ==<br />
<br />
Install Git on your system.<br />
* Debian/Ubuntu: <code>apt-get install git</code><br />
* Fedora: <code>yum install git-core</code><br />
<br />
Git includes your name and email address in commits. To configure them, use the following commands: <br />
git config --global user.name "John Smith"<br />
git config --global user.email john@example.com<br />
<br />
Git will automatically convert line endings for you. Use the following settings:<br />
git config --global core.autocrlf true # Windows<br />
git config --global core.autocrlf input # Linux/Mac<br />
<br />
To obtain a copy of the Gramps repository, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
git clone <nowiki>http://git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a SourceForge account, use ssh instead:<code><br />
git clone <nowiki>ssh://<username>@git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You will need a [http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SSH Key] in order to authenticate using this method. '''Before you accept any host keys, make sure you [https://sourceforge.net/p/forge/documentation/Git/#how-to-clone-an-existing-repository verify the fingerprint]''' of git.code.sf.net.<br />
<br />
== Basic Work Flow ==<br />
<br />
The basic work flow after you've checked out the repository is update, develop, commit, update again, push.<br />
To update the current branch, run<br />
<br />
git pull --rebase<br />
<br />
As a general rule ''always'' use <tt>git pull --rebase</tt> to avoid creating unnecessary merge commits. Note that one must have no uncommitted edits when running <tt>git pull</tt>.<br />
<br />
To review your changes before a commit, type:<br />
<br />
git status<br />
<br />
To commit your changes locally, use the following command:<br />
<br />
git commit<br />
<br />
Which will bring up the default $EDITOR to create a commit message. If you are fixing a bug, the first line of the commit message should be the bug number and title, otherwise a brief statement of purpose. Skip a line and describe what you did.<br />
<br />
* All developers should read Gramps [[Committing policies]]<br />
<br />
If the commit is a minor change that can be described entirely in the subject, you can instead use:<br />
<br />
git commit -am "message describing the nature of the change"<br />
<br />
Try to keep your commits digestible and understandable. A large changeset can be broken into several commits that "tell a story" about how the changeset moves the program from its old behavior to its new one.<br />
<br />
To push your changes to the Gramps repository, you need to have cloned the Gramps source code with ssh, and have push access to the Gramps repository (the Gramps admins can give you this, [[Contact|Brian Matherly or Benny Malengier]]). First update again to make sure that you can fast-forward the repository, then push:<br />
<br />
git pull --rebase<br />
git push<br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the git repository. In this case, create a new bug on the [http://bugs.gramps-project.org bug tracker] and attach a patch to it. See the [[Brief_introduction_to_Git#Making_a_patchfile|make a patchfile]] section for details.<br />
<br />
If someone else has made changes that interfere with yours, you will get a conflict error when you pull. You will have to resolve that conflict and re-commit (you can use <tt>git commit --amend</tt> if it affects only the last ''unpushed'' commit) before git will push successfully.<br />
<br />
:Also see: [[Getting started with Gramps Trunk]].<br />
<br />
== Types of branches ==<br />
When you clone the Gramps repository, a branch called ''master'' will be created for you. This contains the latest development version of Gramps. Gramps maintains different branches in several categories:<br />
<br />
* ''master'' - There is only one ''master'' branch. All new feature and most bug-fix development happens in the ''master'' branch. New releases never come from the ''master'' branch.<br />
<br />
* ''maintenance'' - There are many maintenance branches, though usually only one or two are active. A maintenance branch is created from the ''master'' branch when all the features for a release are complete. New features are not committed to maintenance branches. Releases only come from active maintenance branches; a branch is no longer active when no further releases are planned for it. Inactive branches should not have any changes committed to them. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in the ''master'' branch. In order to prevent regressions (fixed bugs reoccurring in later releases), it is a "best practice" to fix bugs on the master branch and then to backport them to the current maintenance branches.<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''master'' branch. 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. ''geps'' 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 />
Tags are created for each Gramps release. 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 the ''master'' branch and are ready for release. A new maintenance branch is created from the ''master'' branch named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in the ''master'' branch 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 />
<br />
There are several versions of the Gramps source code in Git. The development branch for small changes and bug fixes is ''maintenance/gramps{{stable_branch}}''.<br />
<br />
By default, the remote server you cloned the Gramps repository from is called ''origin''.<br />
<br />
To see a list of branches on the server, type:<br />
<br />
git show remote origin<br />
<br />
To create a local branch which tracks a branch on the server, use:<br />
<br />
git checkout -b gramps40 origin/maintenance/gramps40<br />
<br />
This is known as a "tracking" branch.<br />
<br />
To list the available branches, type:<br />
<br />
git branch<br />
<br />
The current branch is marked by an asterisk.<br />
<br />
To switch to another branch, type:<br />
<br />
git checkout <branch><br />
<br />
The following configuration option simplifies pushing a branch back to the server:<br />
<br />
git config --global push.default upstream<br />
<br />
You can then use:<br />
<br />
git push<br />
<br />
=== Where for bugs? ===<br />
<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 />
<br />
If you do not have push 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 tell how to make a patchfile against the ''master'' branch, 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 />
First create a new branch to work in:<br />
<br />
git checkout -b fix<br />
<br />
Then use your favorite editor to change whatever file(s) you want. Add the files you have changed to the staging area and commit them.<br />
<br />
Obtain the latest changes from the server.<br />
<br />
git checkout master<br />
git pull --rebase<br />
<br />
Next, rebase your fix again the ''master'' branch. This will ensure that your patch will apply cleanly.<br />
<br />
git rebase master fix<br />
<br />
This will leave you in the fix branch.<br />
<br />
Finally, create a patchfile, using:<br />
<br />
git format-patch master --stdout > fix.patch<br />
<br />
You now have a patchfile that can be sent by email, or attached to a bug report. The patch can be applied using the 'git apply' command.<br />
<br />
== Working with development branches ==<br />
<br />
Creating branches with Git is quick and easy.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''master'' branch:<br />
<br />
git checkout master<br />
git branch gep-014-fab-feature<br />
<br />
To make this branch available on the server use:<br />
<br />
git push origin gep-014-fab-feature<br />
<br />
=== Merging changes from the branch back into the ''master'' branch ===<br />
<br />
When you are ready to merge your changes back into the ''master'' branch:<br />
<br />
git checkout master<br />
git merge gep-014-fab-feature<br />
git push<br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged into the trunk or have been abandoned. To remove a branch:<br />
<br />
git branch -d gep-014-fab-feature<br />
<br />
To remove a branch from the server, use:<br />
<br />
git push origin :gep-014-fab-feature<br />
<br />
The developers reserve the right to remove branches that have been dormant for more than 1 year.<br />
<br />
=== Applying a fix to another branch ===<br />
<br />
If you write a fix for the master branch, you may need to also apply it to a maintenance branch.<br />
<br />
To apply a commit from the a branch to a maintenance branch:<br />
git checkout gramps40<br />
git cherry-pick fix<br />
<br />
Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to push your changes.<br />
<br />
If you apply a small fix that applies cleanly to another branch, it can be done like this (assuming you've just committed the fix to master in a single commit):<br />
git checkout gramps40<br />
git diff master^ master | git apply<br />
If `git apply' fails, nothing will be changed in the working copy, and you can try to resolve the conflicts by cherry-picking, or manually saving the diff result, using the "patch" program, and resolving the conflicts.<br />
<br />
=== Workflow ===<br />
<br />
Before switching to another branch it is useful to remove untracked files created by the build process. You can do this with the following command:<br />
<br />
git clean -dxf<br />
<br />
== Useful Tips ==<br />
<br />
=== Getting help ===<br />
<br />
Git has excellent man pages. You can view the manual page for a Git command, by using one of the following:<br />
<br />
git help <verb><br />
git <verb> --help<br />
man git-<verb><br />
<br />
For example, to get help on the 'git log' command, type:<br />
<br />
git help log<br />
<br />
=== Configuration settings ===<br />
<br />
You can set your default editor with:<br />
<br />
git config --global core.editor <editor><br />
<br />
To enable colored command line output, use:<br />
<br />
git config --global color.ui auto<br />
<br />
=== Some procedural recommendations ===<br />
<br />
# Always do 'git pull --rebase' before pushing changes to the server. If necessary get advice about handling conflicts.<br />
# Always do 'git status' and look for staged files that are unexpected or unintended. This is a *very important* sanity check. <br />
<br />
;And here are a couple of incidental suggestions<br />
<br />
* avoid grouping unrelated changes; better to divide into separate commits for the following reasons: a better log entry; easier troubleshooting/reverting. (and probably more).<br />
<br />
* similar to above, it may be better to make small incremental changes than one big one (if possible). Interim changes should not introduce breakage, of course. For instance, if you change code in gramps/ and do associated translation changes in po/, you might want to commit the changes in po/ in a commit following the commit(s) with the changes in gramps/.<br />
<br />
* logs are important -- please give some thought to the log message. All developers should read the [[Committing policies]].<br />
<br />
== Browse Git ==<br />
<br />
An alternative to the command line tools to view the Git repository is the [{{Code Browser}} online interface].<br />
<br />
== git2cl ==<br />
<br />
The Gramps project does not keep a ChangeLog file under source control. All change history is captured by git automatically when it is committed. A ChangeLog file is generated from the git commit logs before each release using [[Brief_introduction_to_SVN#How_to_use_git2cl|git2cl]]. Developers should take care to make useful commit log messages when committing changes to git. Please read the [[Committing policies]] for details.<br />
<br />
=== How to use git2cl ===<br />
<br />
Starting with Gramps 3.0.0, we no longer have a <tt>ChangeLog</tt> file. <br />
<br />
Instead, the list of changes is generated automatically using the standard <tt>git2cl</tt> script.<br />
<br />
Note that <tt>git2cl</tt> is not included in the base installation of Git. With a Debian-based distro such as Ubuntu, you can get <tt>git2cl</tt> as follows:<br />
<br />
sudo apt-get install git2cl<br />
<br />
There typically are two <tt>ChangeLog</tt> files needed for releases; one in the main directory, and one in the <tt>po</tt> directory. You can generate these files with the following commands:<br />
<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges -- po | git2cl > po/ChangeLog<br />
<br />
== External links ==<br />
<br />
*[http://git-scm.com/ Git]<br />
*[http://git-scm.com/book Git Book]<br />
*[http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SourceForge SSH Keys]<br />
*[http://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/ SourceForge SSH Key Fingerprints]<br />
<br />
[[Category:Developers/General|B]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Testing_Gramps&diff=47274Testing Gramps2013-11-17T18:37:59Z<p>BACbKA: /* unit tests in the main tree */ +gramps/plugins/importer/test/importxml_test.py</p>
<hr />
<div>=Currently used tests and frameworks=<br />
== testing of reports ==<br />
=== test/runtest.sh ===<br />
Runs all possible reports using the report cli interface, based on the example.gramps database. This test is not fully self-contained, in that it depends on various environment settings, such as your locale, your preferred name display formats, and your report options. Last, but not the least, the verification of the resulting reports is entirely manual.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-runtest.sh found-by-runtest.sh]<br />
<br />
== other report testing ==<br />
See more specialized scripts in test/, status unknown.<br />
<br />
==test/impex.sh==<br />
Import/export test for GRAMPS.<br />
<br />
From the file header:<br />
* Import example XML data and create internal Gramps DB<br />
* Open produced Gramps DB, then<br />
** check data for integrity<br />
** output in all formats<br />
* Check resulting XML for well-formedness and validate it against DTD and RelaxNG schema.<br />
* Import every exported file produced if the format is also supported for import, and run a text summary report.<br />
* Diff each report with the summary of the produced example DB.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-impex.sh found-by-impex.sh]<br />
<br />
== Unit testing ==<br />
=== test/RunAllTests.py ===<br />
Runs out-of-tree (not in gramps/) testing code, by looking for any test/*_Test.py files and executing the test suites therein. See the current code in test/*_Test.py for example and python standard unittest docs.<br />
<br />
Starting with gramps40 branch, these tests include non-automated unit tests only. The automated unit tests are all under gramps/.<br />
<br />
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-RunAllTests.py found-by-RunAllTests.py]<br />
<br />
GtkHandler testing code pops up the GRAMPS error dialog, but this is actually for testing the error reporting itself. Don't be scared by the dialog, it's expected. Your manual work is required to close the dialogs with the "Cancel" button. The relevant tests still pass (unless there's another bug there)...<br />
<br />
=== unit tests in the main tree ===<br />
python setup.py test<br />
<br />
See [[Unit Test Quickstart]] for detailed running instructions.<br />
<br />
{| {{prettytable}}<br />
! File<br />
! Status<br />
! Comments<br />
|-<br />
|gramps/cli/test/cli_test.py<br />
|bgcolor="#80ff80"| OK<br />
|3 tests<br />
|-<br />
|gramps/cli/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|8 tests (6 require mocking to run)<br />
|-<br />
|gramps/gen/test/config_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test<br />
|-<br />
|gramps/gen/test/constfunc_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test (linux only, skipped elsewhere)<br />
|-<br />
|gramps/gen/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test. See #{{bug|7013}} for context<br />
|-<br />
|gramps/gen/datehandler/test/datehandler_test.py<br />
|bgcolor="#80ff80"| OK<br />
|9 tests<br />
|-<br />
|gramps/gen/db/test/cursor_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests, 2 skipped<br />
|-<br />
|gramps/gen/db/test/db_test.py<br />
|bgcolor="#80ff80"| OK<br />
|6 tests<br />
|-<br />
|gramps/gen/db/test/reference_map_test.py<br />
|bgcolor="#80ff80"| OK<br />
|5 tests<br />
|-<br />
|gramps/gen/lib/test/date_test.py<br />
|bgcolor="#80ff80"| OK<br />
|8 tests (locale-based, OK for en, fails for some other locales)<br />
|-<br />
|gramps/gen/lib/test/grampstype_test.py<br />
|bgcolor="#80ff80"| OK<br />
|3 tests<br />
|-<br />
|gramps/gen/lib/test/merge_test.py<br />
|bgcolor="#ff8080"| FAIL<br />
|201 tests, 2 failed skipped {{bug|7027}}<br />
|-<br />
|gramps/gen/merge/test/merge_ref_test.py<br />
|bgcolor="#80ff80"| OK<br />
|53 tests<br />
|-<br />
|gramps/gen/utils/test/callback_test.py<br />
|bgcolor="#80ff80"| OK<br />
|10 tests<br />
|-<br />
|gramps/gen/utils/test/keyword_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests<br />
|-<br />
|gramps/gen/utils/test/place_test.py<br />
|bgcolor="#ff8080"| FAIL<br />
|28 tests, 4 failures (bug #{{bug|7044}})<br />
|-<br />
|gramps/gui/logger/test/rotate_handler_test.py<br />
|bgcolor="#80ff80"| OK<br />
|2 tests<br />
|-<br />
|gramps/gui/test/user_test.py<br />
|bgcolor="#80ff80"| OK<br />
|1 test (requires mocking to run)<br />
|-<br />
|gramps/plugins/export/test/exportvcard_test.py<br />
|bgcolor="#80ff80"| OK<br />
|28 tests<br />
|-<br />
|gramps/plugins/importer/test/importvcard_test.py<br />
|bgcolor="#80ff80"| OK<br />
|66 tests<br />
|-<br />
|gramps/plugins/importer/test/importxml_test.py<br />
|bgcolor="#80ff80"| OK<br />
|4 tests<br />
|-<br />
|gramps/test/test/gedread_util_test.py<br />
|<br />
|No longer required?<br />
|-<br />
|gramps/test/test/test_util_test.py<br />
|<br />
|No longer required?<br />
|-<br />
|gramps/webapp/grampsdb/view/png.py<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
There is also semi-interactive testing via __main__ in some code:<br />
<br />
{| {{prettytable}}<br />
! File<br />
! Status<br />
! Comments<br />
|-<br />
|gramps/gen/relationship.py<br />
|bgcolor="#ff8080"| To Do<br />
|Relationship calculator<br />
|-<br />
|gramps/gen/db/bsddbtxn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/txn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/undoredo.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/write.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/db/txn.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/lib/styledtext.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/utils/place.py<br />
|bgcolor="#80ff80"| OK<br />
|Done<br />
|-<br />
|gramps/gen/utils/docgen/odstab.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gen/utils/docgen/csvtab.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/gui/ddtargets.py<br />
|bgcolor="#ff8080"| To Do<br />
|Not worth running?<br />
|-<br />
|gramps/gui/widgets/undoablebuffer.py<br />
|bgcolor="#ff8080"| To Do<br />
|Not worth running?<br />
|-<br />
|gramps/gui/dialog.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/validatedmaskedentry.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/progressdialog.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/gui/widgets/statusbar.py<br />
|bgcolor="#ff8080"| To Do<br />
|Interactive<br />
|-<br />
|gramps/plugins/lib/libsubstkeyword.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|gramps/plugins/rel/rel_*.py<br />
|bgcolor="#ff8080"| To Do<br />
|Relationship calculator plugins<br />
|-<br />
|gramps/plugins/tool/phpgedviewconnector.py<br />
|bgcolor="#ff8080"| To Do<br />
|<br />
|-<br />
|}<br />
<br />
== Manual test plan ==<br />
See TestPlan.txt in gramps toplevel. I believe this is only done at a major release (like 4.0.0).<br />
<br />
=Test status=<br />
We currently don't have a record of tests executed, the platforms and environments they were run upon, and what code they covered. The only indirect evidence is available in open bugs, when people care to fill in these details. :-(<br />
<br />
=Possible improvements=<br />
* unify running all the tests, in- or out- tree<br />
** Try switching the feature tests and non-automated unit tests in test/ from our runner scripts to [http://docs.python.org/2/library/unittest.html#test-discovery python native unittest discovery mechanism]. <br />
** we have a stale gramps/test/regrtest.py runner, notable for logging init. - should we revive that, or maybe integrate into setup.py test runner?<br />
* coverage analysis<br />
* (needs server capacity to be hosted online) continous test status report, coverage, automatic deployment into win/mac/linux VMs (I can dream, can't I?)<br />
<br />
=See also=<br />
* [[Unit Test Quickstart]]<br />
<br />
[[Category:Developers/Reference]]<br />
[[Category:Developers/Quality Assurance]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Committing_policies&diff=47265Committing policies2013-11-16T08:36:51Z<p>BACbKA: /* Log messages */</p>
<hr />
<div>==Log messages==<br />
Every commit to Git must be accompanied by a log message. These messages will be generated into a ChangeLog when a release is made and should conform to the following guidelines:<br />
<br />
* The first line of the commit message should consist of a short summary of the change.<br />
* If the commit fixes a bug on the [http://bugs.gramps-project.org bug tracker], the summary shall include the bug ID and summary from the tracker.<br />
* The summary should be separated from the body of the message by a single blank line.<br />
* Messages should attempt to describe how the change affects the functionality from the user's perspective.<br />
* Use complete sentences when possible.<br />
* It is not necessary to describe minute details about the change nor the files that are affected because that information is already stored by Git and can be viewed with "git diff".<br />
* When committing contributed code, the author should be credited using the --author option.<br />
* If you want to refer to another commit, use the commit short hash (6 hexa digits) in square brackets. It will automatically be expanded to a hyperlink by the SourceForge web interface to the repository, e.g.: [http://sourceforge.net/p/gramps/source/ci/d8acf8e875a06cf89b2cc4d59ed63730539244af/ [d8acf8&#93;].<br />
<br />
You can see the last changes with the git log command, an example usage of this command:<br />
git log --oneline<br />
<br />
You can also limit the number of entries shown by passing in the '''-n''' flag to svn. Add '''--stat''' to see the files affected by the commit:<br />
<br />
git log -5<br />
<br />
==Adding new files==<br />
All the files with the translatable strings '''must''' be listed in the po/POTFILES.in or po/POTFILES.skip files. This means that most new files must have their names added to these files.<br />
<br />
Please remember to do this for new files that you add to Git.<br />
<br />
===Check===<br />
<br />
You can make a test on a local copy:<br />
./autogen.sh<br />
PYTHONPATH=../../trunk/src python po/test/po_test.py<br />
<br />
where ../.. is the path to your local copy<br />
<br />
==Removing files==<br />
Remember to remove references to the file from the po/POTFILES.in and po/POTFILES.skip files.<br />
<br />
==Bugfixes in branches==<br />
Whenever a bug is fixed in a maintenance branch, it is the committer's responsibility to make sure the fix is also committed to the master branch. See the [[Brief introduction to Git#Applying a fix to another branch|Brief introduction to Git]] for details.<br />
<br />
[[Category:Developers/General]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Committing_policies&diff=47264Committing policies2013-11-16T08:35:26Z<p>BACbKA: /* Log messages */ how to hyperlink to commits</p>
<hr />
<div>==Log messages==<br />
Every commit to Git must be accompanied by a log message. These messages will be generated into a ChangeLog when a release is made and should conform to the following guidelines:<br />
<br />
* The first line of the commit message should consist of a short summary of the change.<br />
* If the commit fixes a bug on the [http://bugs.gramps-project.org bug tracker], the summary shall include the bug ID and summary from the tracker.<br />
* The summary should be separated from the body of the message by a single blank line.<br />
* Messages should attempt to describe how the change affects the functionality from the user's perspective.<br />
* Use complete sentences when possible.<br />
* It is not necessary to describe minute details about the change nor the files that are affected because that information is already stored by Git.<br />
* When committing contributed code, the author should be credited using the --author option.<br />
* If you want to refer to another commit, use the commit short hash (6 hexa digits) in square brackets. It will automatically be expanded to a hyperlink by the SourceForge web interface to the repository, e.g.: [http://sourceforge.net/p/gramps/source/ci/d8acf8e875a06cf89b2cc4d59ed63730539244af/ [d8acf8&#93;].<br />
<br />
You can see the last changes with the git log command, an example usage of this command:<br />
git log --oneline<br />
<br />
You can also limit the number of entries shown by passing in the '''-n''' flag to svn. Add '''--stat''' to see the files affected by the commit:<br />
<br />
git log -5<br />
<br />
==Adding new files==<br />
All the files with the translatable strings '''must''' be listed in the po/POTFILES.in or po/POTFILES.skip files. This means that most new files must have their names added to these files.<br />
<br />
Please remember to do this for new files that you add to Git.<br />
<br />
===Check===<br />
<br />
You can make a test on a local copy:<br />
./autogen.sh<br />
PYTHONPATH=../../trunk/src python po/test/po_test.py<br />
<br />
where ../.. is the path to your local copy<br />
<br />
==Removing files==<br />
Remember to remove references to the file from the po/POTFILES.in and po/POTFILES.skip files.<br />
<br />
==Bugfixes in branches==<br />
Whenever a bug is fixed in a maintenance branch, it is the committer's responsibility to make sure the fix is also committed to the master branch. See the [[Brief introduction to Git#Applying a fix to another branch|Brief introduction to Git]] for details.<br />
<br />
[[Category:Developers/General]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Git&diff=47219Git2013-11-09T21:46:17Z<p>BACbKA: We now use git officialy, point to the relevant page instead of instructions on John's mirror (now deleted) and git-svn</p>
<hr />
<div>#REDIRECT[[Brief_introduction_to_Git]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Getting_started_with_Gramps_development&diff=47218Getting started with Gramps development2013-11-09T21:25:05Z<p>BACbKA: /* Another user */</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 />
Eclipse with 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. Go in the menu "Window"->"Preferences...", then choose "Pydev"->"Interpreter - Python". With "new", you can create a link to "/usr/bin/python2.5". there you are.<br />
<br />
Next, you have to set up a pydev project. Go in the menu "File" -> "New" -> "Project", and choose a Pydev projet. Project name could be "Gramps trunk", uncheck "Use defaults" and choose "~/gramps-trunk" as the project directory. Project type is "Python 2.6", and then you can press "Finish". 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 "trunk/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 />
Some free software projects qualify for a Jetbrains free pycharm usage licences. We have applied for one to use in Gramps development, and currently Gramps has been awarded such a license -- as a consequence of the Gramps distribution terms (GPL). Here's what you should do to get a copy ('''and use it for Gramps development only, not for other work, under this license!'''), according to [[User:Bmcage|Benny]]:<br />
1/ be a gramps developer with commit rights to our repository<br />
2/ write [[User:BACbKA|Vassilii]] with your sourceforge login name and ask him for the license key<br />
3/ keep the license private. We do OSS software so I assume we are all against software piracy.<br />
If you don't have commit rights, you can still use pycharm for 30 day trial period.<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 />
== data ==<br />
You will find here various data files used by gramps : manpages, icons...<br />
<br />
== gramps ==<br />
In this folder, you will find Gramps' source code. There are a lot of subfolders, which are explained in the folowing sections.<br />
<br />
In most folders, there is an __init.py__ file. You may find some explanations there about the package.<br />
<br />
=== gramps/gen ===<br />
This is Gramps' core. It defines genealogy objects (Person, Place, Note...), database classes, generic plugins, and database access :<br />
* '''gramps/gen/db''' : Gramps Database Handling<br />
* '''gramps/gen/lib''' : The core library of Gramps objects<br />
* '''gramps/gen/proxy''' : Proxy class for the Gramps databases. This is a very powerful tool used to propose a filtered view of the database : Objects which are not marked private, (not) living persons...<br />
* '''gramps/gen/utils''' : Common utilities for Gramps code (progess monitor dialog, database utilities, callbacks between UI and database code)<br />
<br />
=== other ===<br />
<br />
Further information about files can be found in [[GEPS 008: File Organization]]. Please note that GEPS 008 is a change proposal completed for Gramps 4.0 and the wiki page does not reflect the actual source tree.<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>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Brief_introduction_to_Git&diff=47217Brief introduction to Git2013-11-09T21:21:06Z<p>BACbKA: /* Obtaining a copy of the Gramps repository */ link to fingerprint verification doc on SF</p>
<hr />
<div>The development source code of Gramps is stored in the Git repository at SourceForge.<br />
<br />
;[http://git.code.sf.net/p/gramps/source/ http://git.code.sf.net/p/gramps/source/]. <br />
<br />
This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably want to do one of two things with Git: either download the latest source or the development version, or else upload your changes (if you have write access to the repository) or [[Brief_introduction_to_SVN#Making_a_patchfile|make a patchfile]] (if you don't have write access).<br />
<br />
== Obtaining a copy of the Gramps repository ==<br />
<br />
Install Git on your system.<br />
* Debian/Ubuntu: <code>apt-get install git</code><br />
* Fedora: <code>yum install git-core</code><br />
<br />
Git includes your name and email address in commits. To configure them, use the following commands: <br />
git config --global user.name "John Smith"<br />
git config --global user.email john@example.com<br />
<br />
Git will automatically convert line endings for you. Use the following settings:<br />
git config --global core.autocrlf true # Windows<br />
git config --global core.autocrlf input # Linux/Mac<br />
<br />
To obtain a copy of the Gramps repository, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
git clone <nowiki>http://git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a SourceForge account, use ssh instead:<code><br />
git clone <nowiki>ssh://<username>@git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You will need a [http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SSH Key] in order to authenticate using this method. '''Before you accept any host keys, make sure you [https://sourceforge.net/p/forge/documentation/Git/#how-to-clone-an-existing-repository verify the fingerprint]''' of git.code.sf.net.<br />
<br />
== Basic Work Flow ==<br />
<br />
The basic work flow after you've checked out the repository is update, develop, commit, update again, push.<br />
To update the current branch, run<br />
<br />
git pull --rebase<br />
<br />
As a general rule ''always'' use <tt>git pull --rebase</tt> to avoid creating unnecessary merge commits. Note that one must have no uncommitted edits when running <tt>git pull</tt>.<br />
<br />
To review your changes before a commit, type:<br />
<br />
git status<br />
<br />
To commit your changes locally, use the following command:<br />
<br />
git commit<br />
<br />
Which will bring up the default $EDITOR to create a commit message. If you are fixing a bug, the first line of the commit message should be the bug number and title, otherwise a brief statement of purpose. Skip a line and describe what you did.<br />
<br />
* All developers should read Gramps [[Committing policies]]<br />
<br />
If the commit is a minor change that can be described entirely in the subject, you can instead use:<br />
<br />
git commit -am "message describing the nature of the change"<br />
<br />
Try to keep your commits digestible and understandable. A large changeset can be broken into several commits that "tell a story" about how the changeset moves the program from its old behavior to its new one.<br />
<br />
To push your changes to the Gramps repository, you need to have cloned the Gramps source code with ssh, and have push access to the Gramps repository (the Gramps admins can give you this, [[Contact|Brian Matherly or Benny Malengier]]). First update again to make sure that you can fast-forward the repository, then push:<br />
<br />
git pull --rebase<br />
git push<br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the git repository. In this case, create a new bug on the [http://bugs.gramps-project.org bug tracker] and attach a patch to it. See the [[Brief_introduction_to_Git#Making_a_patchfile|make a patchfile]] section for details.<br />
<br />
If someone else has made changes that interfere with yours, you will get a conflict error when you pull. You will have to resolve that conflict and re-commit (you can use <tt>git commit --amend</tt> if it affects only the last ''unpushed'' commit) before git will push successfully.<br />
<br />
:Also see: [[Getting started with Gramps Trunk]].<br />
<br />
== Types of branches ==<br />
When you clone the Gramps repository, a branch called ''master'' will be created for you. This contains the latest development version of Gramps. Gramps maintains different branches in several categories:<br />
<br />
* ''master'' - There is only one ''master'' branch. All new feature and most bug-fix development happens in the ''master'' branch. New releases never come from the ''master'' branch.<br />
<br />
* ''maintenance'' - There are many maintenance branches, though usually only one or two are active. A maintenance branch is created from the ''master'' branch when all the features for a release are complete. New features are not committed to maintenance branches. Releases only come from active maintenance branches; a branch is no longer active when no further releases are planned for it. Inactive branches should not have any changes committed to them. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in the ''master'' branch. In order to prevent regressions (fixed bugs reoccurring in later releases), it is a "best practice" to fix bugs on the master branch and then to backport them to the current maintenance branches.<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''master'' branch. 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. ''geps'' 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 />
Tags are created for each Gramps release. 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 the ''master'' branch and are ready for release. A new maintenance branch is created from the ''master'' branch named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in the ''master'' branch 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 />
<br />
There are several versions of the Gramps source code in Git. The development branch for small changes and bug fixes is ''maintenance/gramps{{stable_branch}}''.<br />
<br />
By default, the remote server you cloned the Gramps repository from is called ''origin''.<br />
<br />
To see a list of branches on the server, type:<br />
<br />
git show remote origin<br />
<br />
To create a local branch which tracks a branch on the server, use:<br />
<br />
git checkout -b gramps40 origin/maintenance/gramps40<br />
<br />
This is known as a "tracking" branch.<br />
<br />
To list the available branches, type:<br />
<br />
git branch<br />
<br />
The current branch is marked by an asterisk.<br />
<br />
To switch to another branch, type:<br />
<br />
git checkout <branch><br />
<br />
The following configuration option simplifies pushing a branch back to the server:<br />
<br />
git config --global push.default upstream<br />
<br />
You can then use:<br />
<br />
git push<br />
<br />
=== Where for bugs? ===<br />
<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 />
<br />
If you do not have push 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 tell how to make a patchfile against the ''master'' branch, 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 />
First create a new branch to work in:<br />
<br />
git checkout -b fix<br />
<br />
Then use your favorite editor to change whatever file(s) you want. Add the files you have changed to the staging area and commit them.<br />
<br />
Obtain the latest changes from the server.<br />
<br />
git checkout master<br />
git pull --rebase<br />
<br />
Next, rebase your fix again the ''master'' branch. This will ensure that your patch will apply cleanly.<br />
<br />
git rebase master fix<br />
<br />
This will leave you in the fix branch.<br />
<br />
Finally, create a patchfile, using:<br />
<br />
git format-patch master --stdout > fix.patch<br />
<br />
You now have a patchfile that can be sent by email, or attached to a bug report. The patch can be applied using the 'git apply' command.<br />
<br />
== Working with development branches ==<br />
<br />
Creating branches with Git is quick and easy.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''master'' branch:<br />
<br />
git checkout master<br />
git branch gep-014-fab-feature<br />
<br />
To make this branch available on the server use:<br />
<br />
git push origin gep-014-fab-feature<br />
<br />
=== Merging changes from the branch back into the ''master'' branch ===<br />
<br />
When you are ready to merge your changes back into the ''master'' branch:<br />
<br />
git checkout master<br />
git merge gep-014-fab-feature<br />
git push<br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged into the trunk or have been abandoned. To remove a branch:<br />
<br />
git branch -d gep-014-fab-feature<br />
<br />
To remove a branch from the server, use:<br />
<br />
git push origin :gep-014-fab-feature<br />
<br />
The developers reserve the right to remove branches that have been dormant for more than 1 year.<br />
<br />
=== Applying a fix to another branch ===<br />
<br />
If you write a fix for the master branch, you may need to also apply it to a maintenance branch.<br />
<br />
To apply a commit from the a branch to a maintenance branch:<br />
git checkout gramps40<br />
git cherry-pick fix<br />
<br />
Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to push your changes.<br />
<br />
If you apply a small fix that applies cleanly to another branch, it can be done like this (assuming you've just committed the fix to master in a single commit):<br />
git checkout gramps40<br />
git diff master^ master | git apply<br />
If `git apply' fails, nothing will be changed in the working copy, and you can try to resolve the conflicts by cherry-picking, or manually saving the diff result, using the "patch" program, and resolving the conflicts.<br />
<br />
=== Workflow ===<br />
<br />
Before switching to another branch it is useful to remove untracked files created by the build process. You can do this with the following command:<br />
<br />
git clean -dxf<br />
<br />
== Useful Tips ==<br />
<br />
=== Getting help ===<br />
<br />
Git has excellent man pages. You can view the manual page for a Git command, by using one of the following:<br />
<br />
git help <verb><br />
git <verb> --help<br />
man git-<verb><br />
<br />
For example, to get help on the 'git log' command, type:<br />
<br />
git help log<br />
<br />
=== Configuration settings ===<br />
<br />
You can set your default editor with:<br />
<br />
git config --global core.editor <editor><br />
<br />
To enable colored command line output, use:<br />
<br />
git config --global color.ui auto<br />
<br />
=== Some procedural recommendations ===<br />
<br />
# Always do 'git pull --rebase' before pushing changes to the server. If necessary get advice about handling conflicts.<br />
# Always do 'git status' and look for staged files that are unexpected or unintended. This is a *very important* sanity check. <br />
<br />
;And here are a couple of incidental suggestions<br />
<br />
* avoid grouping unrelated changes; better to divide into separate commits for the following reasons: a better log entry; easier troubleshooting/reverting. (and probably more).<br />
<br />
* similar to above, it may be better to make small incremental changes than one big one (if possible). Interim changes should not introduce breakage, of course. For instance, if you change code in gramps/ and do associated translation changes in po/, you might want to commit the changes in po/ in a commit following the commit(s) with the changes in gramps/.<br />
<br />
* logs are important -- please give some thought to the log message. All developers should read the [[Committing policies]].<br />
<br />
== Browse Git ==<br />
<br />
An alternative to the command line tools to view the Git repository is the [{{Code Browser}} online interface].<br />
<br />
== git2cl ==<br />
<br />
The Gramps project does not keep a ChangeLog file under source control. All change history is captured by git automatically when it is committed. A ChangeLog file is generated from the git commit logs before each release using [[Brief_introduction_to_SVN#How_to_use_git2cl|git2cl]]. Developers should take care to make useful commit log messages when committing changes to git. Please read the [[Committing policies]] for details.<br />
<br />
=== How to use git2cl ===<br />
<br />
Starting with Gramps 3.0.0, we no longer have a <tt>ChangeLog</tt> file. <br />
<br />
Instead, the list of changes is generated automatically using the standard <tt>git2cl</tt> script.<br />
<br />
Note that <tt>git2cl</tt> is not included in the base installation of Git. With a Debian-based distro such as Ubuntu, you can get <tt>git2cl</tt> as follows:<br />
<br />
sudo apt-get install git2cl<br />
<br />
There typically are two <tt>ChangeLog</tt> files needed for releases; one in the main directory, and one in the <tt>po</tt> directory. You can generate these files with the following commands:<br />
<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges -- po | git2cl > po/ChangeLog<br />
<br />
== External links ==<br />
<br />
*[http://git-scm.com/ Git]<br />
*[http://git-scm.com/book Git Book]<br />
*[https://git.wiki.kernel.org/index.php/GitSvnCrashCourse GitSvnCrashCourse]<br />
*[http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SourceForge SSH Keys]<br />
*[http://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/ SourceForge SSH Key Fingerprints]<br />
<br />
[[Category:Developers/General|B]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47216Template:Releases/4.0.2/ru2013-11-09T20:42:42Z<p>BACbKA: sp</p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''4.0.2'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Обновления==<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Различные исправления в [[Gramps_4.0_Wiki_Manual_-_Gramplets/ru|грамплетах]]<br />
* Многочисленные исправления в отчётах [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|«веб-сайт»]] и «веб-календарь»<br />
* Улучшения в поддержке дат и календарей<br />
* Исправлен и улучшен [[Gramps-Connect|веб-сервис]]<br />
* Исправлен модуль вычисления различий между разными базами данных<br />
* Улучшен вид [[Gramps_4.0_Wiki_Manual_-_Main_Window/ru#.D0.A6.D0.B8.D1.82.D0.B0.D1.82.D1.8B|«цитаты»]]<br />
* Для разработчиков новых модулей: улучшен интерфейс класса [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User]<br />
* Улучшения и исправления при экспорте в формат Gramps XML<br />
* Версия XML изменена на формат 1.5.1<br />
* Исправлены несколько [[Known_issues#Reports|давно известных проблем при создании отчётов]]<br />
* Улучшена поддержка графического интерфейса и отчётов для пользователей со сложными системами письменности (арабский, иврит, и т.д.)<br />
* Улучшена поддержка выбора языка при создании некоторых отчётов<br />
* Улучшена система уведомления об отсутствующих модулях, требуемых для дополнительных возможностей Gramps<br />
* Улучшена поддержка проверки орфографии<br />
* Исправления ошибок, проявлявшихся под Mac и Windows<br />
* Для всех географических видов добавлена возможность печати<br />
* Добавлен алгоритм [[Date Handler|отображения и разбора дат]] для арабского и греческого<br />
* Внесены исправления в [[Portal:Translators|перевод]] (ar, cs, de, fr, lt, nb, nl, ru, sv) и связанные с переводом исправления программы<br />
* Восстановлены и улучшены [[Testing Gramps|тесты]], сломанные ещё с версии 3.3.x, что улучшило надёжность работы программы<br />
* Добавлена поддержка [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
* Добавлены новые [[Gramps_4.0_Wiki_Manual_-_Command_Line#Available_Gramps_options|параметры командной строки]] -y/--yes и -q/--quiet<br />
<br />
<br />
==Установка==<br />
#OS X: Для Mac OS X вскоре после этого выпуска выдет официальный установщик со всеми компонентами.<br />
#Linux: Ожидаются установочные пакеты для различных дистрибутивов Linux. Gramps 4.0 работает только с дистрибутивами, выпущеными с октября 2012. Для более старых дистрибутивов используйте VirtualBox. Некоторые зависимости пока не доступны на большинстве дистрибутивов. Если у вас такая проблема - устанавливайте Gramps из исходных кодов. Подробнее смотрите в [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|пошаговом руководстве по установке для Ubuntu]]. На Ubuntu компоненты проверки орфографии, географический вид и библиотеку exiv необходимо устанавливать из исходных кодов.<br />
#Windows: В последние месяцы было проделано много работы, чтобы получить стек, необходимый для Gramps для Windows. Мы надеемся, это позволит разработчикам создать установщик AIO (всё в одном), такой же, как и для версии 3.4. В данный момент установка возможна [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|из исходных кодов]].<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 журнале изменений].<br />
<br />
<noinclude>{{languages/ru|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47215Template:Releases/4.0.2/ru2013-11-09T20:41:36Z<p>BACbKA: -y and -q</p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''4.0.2'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Обновления==<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Различные исправления в [[Gramps_4.0_Wiki_Manual_-_Gramplets/ru|грамплетах]]<br />
* Многочисленные исправления в отчётах [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|«веб-сайт»]] и «веб-календарь»<br />
* Улучшения в поддержке дат и календарей<br />
* Исправлен и улучшен [[Gramps-Connect|веб-сервис]]<br />
* Исправлен модуль вычисления различий между разными базами данных<br />
* Улучшен вид [[Gramps_4.0_Wiki_Manual_-_Main_Window/ru#.D0.A6.D0.B8.D1.82.D0.B0.D1.82.D1.8B|«цитаты»]]<br />
* Для разработчиков новых модулей: улучшен интерфейс класса [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User]<br />
* Улучшения и исправления при экспорте в формат Gramps XML<br />
* Версия XML изменена на формат 1.5.1<br />
* Исправлены несколько [[Known_issues#Reports|давно известных проблем при создании отчётов]]<br />
* Улучшена поддержка графического интерфейса и отчётов для пользователей со сложными системами письменности (арабский, иврит, и т.д.)<br />
* Улучшена поддержка выбора языка при создании некоторых отчётов<br />
* Улучшена система уведомления об отсутствующих модулях, требуемых для дополнительных возможностей Gramps<br />
* Улучшена поддержка проверки орфографии<br />
* Исправления ошибок, проявлявшихся под Mac и Windows<br />
* Для всех географических видов добавлена возможность печати<br />
* Добавлен алгоритм [[Date Handler|отображения и разбора дат]] для арабского и греческого<br />
* Внесены исправления в [[Portal:Translators|перевод]] (ar, cs, de, fr, lt, nb, nl, ru, sv) и связанные с переводом исправления программы<br />
* Восстановлены и улучшены [[Testing Gramps|тесты]], сломанные ещё с версии 3.3.x, что улучшило надёжность работы программы<br />
* Добавлена поддержка [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
* Добавлены новые [[Gramps_4.0_Wiki_Manual_-_Command_Line#Available_Gramps_options|параметры командной строки]] -y/--yes и -q/--quiet<br />
<br />
<br />
==Установка==<br />
#OS X: Для Mac OS X вскоре после этого выпуска выдет официальный установщик со всеми компонентами.<br />
#Linux: Ожидаются установочные пакеты для различных дистрибутивов Linux. Gramps 4.0 работает только с дистрибутивами, выпущеными с октября 2012. Для более старых дистрибутивов используйте VirtuaBox. Некоторые зависимости пока не доступны на большинстве дистрибутивов. Если у вас такая проблема - устанавливайте Gramps из исходных кодов. Подробнее смотрите в [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|пошаговом руководстве по установке для Ubuntu]]. На Ubuntu компоненты проверки орфографии, географический вид и библиотеку exiv необходимо устанавливать из исходных кодов.<br />
#Windows: В последние месяцы было проделано много работы, чтобы получить стек, необходимый для Gramps для Windows. Мы надеемся, это позволит разработчикам создать установщик AIO (всё в одном), такой же, как и для версии 3.4. В данный момент установка возможна [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|из исходных кодов]].<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 журнале изменений].<br />
<br />
<noinclude>{{languages/ru|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2&diff=47214Template:Releases/4.0.22013-11-09T20:38:46Z<p>BACbKA: fix wl</p>
<hr />
<div>{{Release|4.0.2 (The "Welcome to our humble abode" bug-fix release)| '''2013.11.08'''<br />
<br />
Version '''4.0.2''', the '''"Welcome to our humble abode"''', has been released. This is a '''maintenance release''' for the next generation of Gramps, '''don't upgrade before verifying your system can run it'''.<br />
<br />
==Changes==<br />
<br />
* Citation merge works better for all objects with citations<br />
* Fixed citations attached to family events<br />
* Fixed several crashes, hangs, and [[Recover corrupted family tree|data corruption]] scenarios<br />
* Fixed bugs in [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|determining whether a person is alive]], potentially resolving private data leak via export or report<br />
* VCF export/import now support gender information<br />
* Several bugs with filtering fixed, most [[Gramps_4.0_Wiki_Manual_-_Filters|filters]] now support regular expressions<br />
* Fixed bug in Hebrew calendar date calculations<br />
* Fix some regressions on [[GEDCOM]] file format export and enhancement on CONT/CONC handling<br />
* Multiple fixes and improvements on [[Gramps_4.0_Wiki_Manual_-_Gramplets|gramplets]]<br />
* Multiple fixes in the [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|narrated website]] and web calendar reports<br />
* Enhancements on date and calendar<br />
* Some fixes and improvements of the [[Gramps-Connect|webapp]]<br />
* Fix on Database Differences module<br />
* Enhancements of the [[Gramps_4.0_Wiki_Manual_-_Main_Window#Citations_Category|citation tree view (Sources category)]]<br />
* For add-on developers: improvements in [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User] class interface<br />
* Polish and consistency on Gramps XML export<br />
* Bump XML schema to 1.5.1<br />
* Fixed several [[Known_issues#Reports|long-standing problems with report generation]]<br />
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI<br />
* Better support for language selection on some reports<br />
* Better way for displaying missing dependencies<br />
* Better spellchecking support<br />
* Platform-specific fixes for Mac and Windows<br />
* Add printing functionality for all geography views<br />
* New [[Date Handler|date handlers]] for Arabic and Greek<br />
* [[Portal:Translators|Translation]] updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes<br />
* Repaired and enhanced [[Testing Gramps|tests]] broken since 3.3.x, resulting in overall reliability improvements<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
* New [[Gramps_4.0_Wiki_Manual_-_Command_Line#Available_Gramps_options|command-line]] options -y/--yes and -q/--quiet<br />
<br />
<br />
==Installation status==<br />
<br />
#OS X: Mac OS X will see an official installer shortly after release with all components<br />
#Linux: We expect Linux packages for different distributions. Gramps 4.0 will only work on distributions released since October 2012, use virtualbox for older distributions. Some optional dependencies are not available yet on most distribution at the time of release. If you want those, you need to install them from source, see Ubuntu derivatives walkthrough in the [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|installation guide]] for these. Specifically for Ubuntu derivatives spell checking, geography view and exiv image data require installation of source components.<br />
#Windows: Much work has been done the last months to obtain the stack needed for Gramps on Windows. At the moment only a rough [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|guide on source installation]] is present. We hope this will allow windows developers to construct an AIO installer as for the 3.4 version<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2&diff=47213Template:Releases/4.0.22013-11-09T20:37:16Z<p>BACbKA: broken wiki? rm link</p>
<hr />
<div>{{Release|4.0.2 (The "Welcome to our humble abode" bug-fix release)| '''2013.11.08'''<br />
<br />
Version '''4.0.2''', the '''"Welcome to our humble abode"''', has been released. This is a '''maintenance release''' for the next generation of Gramps, '''don't upgrade before verifying your system can run it'''.<br />
<br />
==Changes==<br />
<br />
* Citation merge works better for all objects with citations<br />
* Fixed citations attached to family events<br />
* Fixed several crashes, hangs, and [[Recover corrupted family tree|data corruption]] scenarios<br />
* Fixed bugs in [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|determining whether a person is alive]], potentially resolving private data leak via export or report<br />
* VCF export/import now support gender information<br />
* Several bugs with filtering fixed, most [[Gramps_4.0_Wiki_Manual_-_Filters|filters]] now support regular expressions<br />
* Fixed bug in Hebrew calendar date calculations<br />
* Fix some regressions on [[GEDCOM]] file format export and enhancement on CONT/CONC handling<br />
* Multiple fixes and improvements on [[Gramps_4.0_Wiki_Manual_-_Gramplets|gramplets]]<br />
* Multiple fixes in the [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|narrated website]] and web calendar reports<br />
* Enhancements on date and calendar<br />
* Some fixes and improvements of the [[Gramps-Connect|webapp]]<br />
* Fix on Database Differences module<br />
* Enhancements of the [[Gramps_4.0_Wiki_Manual_-_Main_Window#Citations_Category|citation tree view (Sources category)]]<br />
* For add-on developers: improvements in [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User] class interface<br />
* Polish and consistency on Gramps XML export<br />
* Bump XML schema to 1.5.1<br />
* Fixed several [[Known_issues#Reports|long-standing problems with report generation]]<br />
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI<br />
* Better support for language selection on some reports<br />
* Better way for displaying missing dependencies<br />
* Better spellchecking support<br />
* Platform-specific fixes for Mac and Windows<br />
* Add printing functionality for all geography views<br />
* New [[Date Handler|date handlers]] for Arabic and Greek<br />
* [[Portal:Translators|Translation]] updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes<br />
* Repaired and enhanced [[Testing Gramps|tests]] broken since 3.3.x, resulting in overall reliability improvements<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
* New command-line options -y/--yes and -q/--quiet<br />
<br />
<br />
==Installation status==<br />
<br />
#OS X: Mac OS X will see an official installer shortly after release with all components<br />
#Linux: We expect Linux packages for different distributions. Gramps 4.0 will only work on distributions released since October 2012, use virtualbox for older distributions. Some optional dependencies are not available yet on most distribution at the time of release. If you want those, you need to install them from source, see Ubuntu derivatives walkthrough in the [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|installation guide]] for these. Specifically for Ubuntu derivatives spell checking, geography view and exiv image data require installation of source components.<br />
#Windows: Much work has been done the last months to obtain the stack needed for Gramps on Windows. At the moment only a rough [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|guide on source installation]] is present. We hope this will allow windows developers to construct an AIO installer as for the 3.4 version<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2&diff=47212Template:Releases/4.0.22013-11-09T20:35:07Z<p>BACbKA: add the new cmdline options</p>
<hr />
<div>{{Release|4.0.2 (The "Welcome to our humble abode" bug-fix release)| '''2013.11.08'''<br />
<br />
Version '''4.0.2''', the '''"Welcome to our humble abode"''', has been released. This is a '''maintenance release''' for the next generation of Gramps, '''don't upgrade before verifying your system can run it'''.<br />
<br />
==Changes==<br />
<br />
* Citation merge works better for all objects with citations<br />
* Fixed citations attached to family events<br />
* Fixed several crashes, hangs, and [[Recover corrupted family tree|data corruption]] scenarios<br />
* Fixed bugs in [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|determining whether a person is alive]], potentially resolving private data leak via export or report<br />
* VCF export/import now support gender information<br />
* Several bugs with filtering fixed, most [[Gramps_4.0_Wiki_Manual_-_Filters|filters]] now support regular expressions<br />
* Fixed bug in Hebrew calendar date calculations<br />
* Fix some regressions on [[GEDCOM]] file format export and enhancement on CONT/CONC handling<br />
* Multiple fixes and improvements on [[Gramps_4.0_Wiki_Manual_-_Gramplets|gramplets]]<br />
* Multiple fixes in the [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|narrated website]] and web calendar reports<br />
* Enhancements on date and calendar<br />
* Some fixes and improvements of the [[Gramps-Connect|webapp]]<br />
* Fix on Database Differences module<br />
* Enhancements of the [[Gramps_4.0_Wiki_Manual_-_Main_Window#Citations_Category|citation tree view (Sources category)]]<br />
* For add-on developers: improvements in [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User] class interface<br />
* Polish and consistency on Gramps XML export<br />
* Bump XML schema to 1.5.1<br />
* Fixed several [[Known_issues#Reports|long-standing problems with report generation]]<br />
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI<br />
* Better support for language selection on some reports<br />
* Better way for displaying missing dependencies<br />
* Better spellchecking support<br />
* Platform-specific fixes for Mac and Windows<br />
* Add printing functionality for all geography views<br />
* New [[Date Handler|date handlers]] for Arabic and Greek<br />
* [[Portal:Translators|Translation]] updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes<br />
* Repaired and enhanced [[Testing Gramps|tests]] broken since 3.3.x, resulting in overall reliability improvements<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
* New [http://gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_Command_Line#Available_Gramps_options command-line options] -y/--yes and -q/--quiet<br />
<br />
<br />
==Installation status==<br />
<br />
#OS X: Mac OS X will see an official installer shortly after release with all components<br />
#Linux: We expect Linux packages for different distributions. Gramps 4.0 will only work on distributions released since October 2012, use virtualbox for older distributions. Some optional dependencies are not available yet on most distribution at the time of release. If you want those, you need to install them from source, see Ubuntu derivatives walkthrough in the [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|installation guide]] for these. Specifically for Ubuntu derivatives spell checking, geography view and exiv image data require installation of source components.<br />
#Windows: Much work has been done the last months to obtain the stack needed for Gramps on Windows. At the moment only a rough [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|guide on source installation]] is present. We hope this will allow windows developers to construct an AIO installer as for the 3.4 version<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_Command_Line&diff=47211Gramps 4.0 Wiki Manual - Command Line2013-11-09T20:30:32Z<p>BACbKA: /* Available Gramps options */ gramps -h updated: -q/-y</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.0 Wiki Manual - Keybindings|Gramps 4.0 Wiki Manual - User Directory|4.0}} <br />
<br />
{{languages|Gramps_4.0_Wiki_Manual_-_Command_Line}}<br />
<br />
{{#vardefine:chapter|C}}<br />
{{#vardefine:figure|0}}<br />
<br />
This appendix provides the reference to the command line capabilities available when launching Gramps from the terminal.<br />
<br />
== Start Gramps through the Command Line ==<br />
<br />
Normally Gramps is started through the graphical user interface (GUI) on [[Gramps_4.0_Wiki_Manual_-_Getting_started#Start_Gramps|your platform]].<br />
<br />
It is also possible to start Gramps using a command line interface (CLI). CLI use can<br />
* produce reports that are not available via the GUI, <br />
* create reports, do conversions etc. without opening a window and<br />
* can provide [[Gramps_4.0_Wiki_Manual_-_Main_Window#Seeing_all_the_error_messages|extra information]] in the event of problems.<br />
<br />
This section of the user manual describes how to start Gramps through the CLI, and the features that are available.<br />
<br />
The way you start Gramps through the CLI depends on the operating system you are using.<br />
<br />
For simplicity of description, the examples of use below are written from the point of view of running Gramps on Linux. The examples would need to be changed for other platforms.<br />
<br />
=== Linux ===<br />
<br />
Only the Linux platform is officially supported as Gramps developers use and test the source code on that platform, fixing any problems that arise due to upgrades.<br />
<br />
Assuming you have used the standard Package Manager (either through a CLI or a GUI) for your Linux distribution, you start Gramps through the CLI by typing<br />
gramps<br />
<br />
=== MS Windows ===<br />
<br />
MS Windows is a [[Download#Comunity_supported|community supported]] platform. If you install the [[All_In_One_Gramps_Software_Bundle_for_Windows|Windows AIO]] GrampsAIO32 or GrampsAIO64 executable, then this will place an icon on the desktop as well as a menu iten in the 'Start' menu.<br />
<br />
What is the best way of knowing what command to type?<br />
<br />
Starting Gramps from the command line (cmd.exe) depends on where you have chosen to install Gramps.<br />
* Right click on the ??terminal Gramps application, or the corresponding item in the Start menu.<br />
* Note down the starting directory.<br />
* Select the whole of the command and copy (ctrl-C) it.<br />
* From the Start menu, start cmd.exe.<br />
* Change directory to the starting directory you noted down.<br />
* Right click and select Paste.<br />
* Press {{man key press|Enter}}.<br />
<br />
For example, this might be:<br />
cd "\Program Files\GrampsAIO64\bin<br />
"C:\Program Files\GrampsAIO64\bin\pythonw.exe" -EO ..\share\gramps\gramps.py<br />
<br />
When the instructions below tell you to type something after the start command, you just type this after the last line, for example:<br />
cd "\Program Files\GrampsAIO64\bin<br />
"C:\Program Files\GrampsAIO64\bin\pythonw.exe" -EO ..\share\gramps\gramps.py -L<br />
<br />
There are other ways to install Gramps for MS Windows, but these are much more complicated and are not covered here.<br />
<br />
=== Mac OS X ===<br />
<br />
Mac OS X is a [[Download#Comunity_supported|community supported]] platform. If you download the Mac OS X disk image (.dmg), then you simply drag the application to your application folder (or anywhere else you want to store it) and start Gramps by double clicking on the application in the normal way.<br />
<br />
To run from the command line, you'll need to start Terminal, found in Applications:Utilities.<br />
Once you have a terminal window open, at the prompt type<br />
/path/to/Gramps.app/Contents/MacOS/Gramps<br />
If you installed Gramps in Applications along with most of your other apps, that would be<br />
/Applications/Gramps.app/Contents/MacOS/Gramps<br />
You may use any of the command-line options along with this. For example, to get a detailed listing of all of the Family Tree databases in your default Family Tree folder, you would use<br />
/Applications/Gramps.app/Content/MacOS/Gramps -L<br />
<br />
There are other ways to install Gramps for Mac OS X, but these are much more complicated and are not covered here.<br />
<br />
== Python options ==<br />
<br />
In the examples of different platforms above, and also in commands in various files you may see some options after the 'python' command, for example '-EO' in<br />
"C:\Program Files\GrampsAIO64\bin\pythonw.exe" -EO ..\share\gramps\gramps.py -L<br />
<br />
It is important to distinguish between the '''python options''' in this case:<br />
-EO<br />
and the '''Gramps options''', in this case<br />
-L<br />
<br />
The '''python options''' that you may come across are:<br />
* -E Ignore all PYTHON* environment variables, e.g. PYTHONPATH and PYTHONHOME, that might be set.<br />
* -O Turn on basic optimizations. This changes the filename extension for compiled (bytecode) files from .pyc to .pyo. See also PYTHONOPTIMIZE.<br />
<br />
The -O optimise flag has a number of effects in Gramps:<br />
* If it is not turned on, an additional '''Debug''' entry appears in the '''Tools''' menu.<br />
* If it is not turned on, [[Logging_system#So_how_logging_works_in_Gramps_after_all.3F|info logging messages are output]].<br />
* If it is not turned on, [[Debugging_Gramps#Add_debug_statements|debug statements]] may be activated.<br />
* If it is not turned on, additional features are available in the [[Gramps_4.0_Wiki_Manual_-_Plugin_Manager|Plugin Manager]].<br />
<br />
The '''Gramps options''' are described below.<br />
<br />
== Available Gramps options ==<br />
<br />
This section provides the reference list of all command line options available in Gramps. If you want to know more than just a list of options, see next sections: [[Gramps-command line#Operation|Operation]] and [[Gramps-command line#Examples| Examples]]. The summary below is printed by gramps -h.<br />
<br />
Usage: gramps.py [OPTION...]<br />
--load-modules=MODULE1,MODULE2,... Dynamic modules to load<br />
<br />
Help options<br />
-?, --help Show this help message<br />
--usage Display brief usage message<br />
<br />
Application options<br />
-O, --open=FAMILY_TREE Open Family Tree<br />
-C, --create=FAMILY_TREE Create on open if new Family Tree<br />
-i, --import=FILENAME Import file<br />
-e, --export=FILENAME Export file<br />
-f, --format=FORMAT Specify Family Tree format<br />
-a, --action=ACTION Specify action<br />
-p, --options=OPTIONS_STRING Specify options<br />
-d, --debug=LOGGER_NAME Enable debug logs<br />
-l List Family Trees<br />
-L List Family Trees in Detail<br />
-t List Family Trees, tab delimited<br />
-u, --force-unlock Force unlock of Family Tree<br />
-s, --show Show config settings<br />
-c, --config=[config.setting[:value]] Set config setting(s) and start Gramps<br />
-y, --yes Don't ask to confirm dangerous actions (non-GUI mode only)<br />
-q, --quiet Suppress progress indication output (non-GUI mode only)<br />
-v, --version Show versions<br />
<br />
The usage message is as follows:<br />
<br />
Example of usage of Gramps command line interface<br />
<br />
1. To import four databases (whose formats can be determined from their names)<br />
and then check the resulting database for errors, one may type:<br />
gramps -i file1.ged -i file2.gpkg -i ~/db3.gramps -i file4.wft -a tool -p name=check. <br />
<br />
2. To explicitly specify the formats in the above example, append filenames with appropriate -f options:<br />
gramps -i file1.ged -f gedcom -i file2.gpkg -f gramps-pkg -i ~/db3.gramps -f gramps-xml -i file4.wft -f wft -a tool -p name=check. <br />
<br />
3. To record the database resulting from all imports, supply -e flag<br />
(use -f if the filename does not allow Gramps to guess the format):<br />
gramps -i file1.ged -i file2.gpkg -e ~/new-package -f gramps-pkg<br />
<br />
4. To save any error messages of the above example into files outfile and errfile, run:<br />
gramps -i file1.ged -i file2.dpkg -e ~/new-package -f gramps-pkg >outfile 2>errfile<br />
<br />
5. To import three databases and start interactive Gramps session with the result:<br />
gramps -i file1.ged -i file2.gpkg -i ~/db3.gramps<br />
<br />
6. To open a database and, based on that data, generate timeline report in PDF format<br />
putting the output into the my_timeline.pdf file:<br />
gramps -O 'Family Tree 1' -a report -p name=timeline,off=pdf,of=my_timeline.pdf <br />
<br />
7. To generate a summary of a database:<br />
gramps -O 'Family Tree 1' -a report -p name=summary <br />
<br />
8. Listing report options<br />
Use the name=timeline,show=all to find out about all available options for the timeline report.<br />
To find out details of a particular option, use show=option_name , e.g. name=timeline,show=off string.<br />
To learn about available report names, use name=show string.<br />
<br />
9. To convert a family tree on the fly to a .gramps xml file:<br />
gramps -O 'Family Tree 1' -e output.gramps -f gramps-xml<br />
<br />
10. To generate a web site into an other locale (in german):<br />
LANGUAGE=de_DE; LANG=de_DE.UTF-8 gramps -O 'Family Tree 1' -a report -p name=navwebpage,target=/../de<br />
<br />
11. Finally, to start normal interactive session type:<br />
gramps<br />
<br />
Note: These examples are for bash shell.<br />
Syntax may be different for other shells and for Windows.<br />
<br />
=== List options ===<br />
Print a list of known family trees:<br />
<br />
;Sparse<br />
-l, print a list of known family trees<br />
<br />
[[Image:CommandLineExampleOutput-l-40.png|400px|thumb|right|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Command Line Example Output for ''python gramps.py -l'']]<br />
{{-}}<br />
<br />
;Detailed<br />
-L, print a detailed list of known family trees<br />
<br />
[[Image:CommandLineExampleOutput_L-40.png|400px|thumb|right|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Command Line Example Output for ''python gramps.py -L'']]<br />
<br />
<br clear="all"/><br />
<br />
Note that dates are shown in the default LOCALE format. You change that at the system level. For example, on POSIX-based systems you could:<br />
<br />
LC_TIME=en_AU.UTF-8 gramps -L<br />
<br />
{{-}}<br />
<br />
=== Version options ===<br />
<br />
-v or --version prints version of Gramps and dependencies,<br />
information about environment settings and python and system paths<br />
<br />
[[Image:CommandLineExampleOutput-v-40.png|200px|thumb|right|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Command Line Example Output for ''python gramps.py -v'']]<br />
{{-}}<br />
<br />
=== Format options ===<br />
<br />
The format of any file destined for opening, importing, or exporting can be specified with the <pre>-f format</pre> option. The acceptable <tt>''format''</tt> values are listed below.<br />
<br />
==== Full family tree support ====<br />
These formats contain all your data that is present in a family tree. <br />
<br />
* '''gramps''' - Gramps XML format: This format is available for import, and export. When not specified, it can be guessed if the filename ends with .gramps<br />
* '''gpkg''' - Gramps package XML format: This format is available for import and export. When not specified, it can be guessed if the filename ends with .gpkg. This creates a zip package with your data as xml, and all your media files included<br />
* '''grdb''' - pre Gramps 3.x database: This format is available for import to support the old file format of Gramps. Everything in the grdb file is imported. When not specified, it can be guessed if the filename ends with .grdb<br />
* '''burn''' - GNOME iso burning: export, only available on GNOME where burn protocol exists<br />
<br />
==== Reduced family tree support ====<br />
These formats contain most, but not all data that can be created in Gramps<br />
<br />
*'''ged''' - GEDCOM format: This format is available for import, and export. When not specified, it can be guessed if the filename ends with .ged<br />
*'''gw''' - GeneWeb file: This format is available for import and export. When not specified, it can be guessed if the filename ends with .gw<br />
<br />
==== Subset of your data ====<br />
These formats contain a specific subset of your data<br />
<br />
* '''csv''' - Comma Separated Value: This format is available for import and export. Be careful however, import must be as values created by the export function. Only a part of your data is contained in the output.<br />
* '''vcf''' - VCard format: import and export<br />
* '''vcs''' - VCalandar format: export<br />
* '''def''' - old Pro-Gen format: import<br />
* '''wft''' - Web Family Tree: This format is available for export only. When not specified, it can be guessed if the filename ends with .wft<br />
<br />
=== Opening options ===<br />
<br />
You can open a family tree, or you can ''open'' a file by importing it in an empty family tree.<br />
<br />
To let Gramps handle this automatically, just supply the familytree or filename you want to open:<br />
<br />
python gramps.py 'My Fam Tree'<br />
python gramps.py JohnDoe.ged<br />
<br />
The first opens a family tree, the second imports a gedcom into an empty family tree. <br />
<br />
Additionally, you can pass Gramps the name of the family tree to be opened:<br />
<br />
* use this option : <pre>-O famtree</pre> or <pre>--open=famtree </pre><br />
<br />
-O, Open of a family tree. This can be done also by just typing the name (name or database dir)<br />
<br />
Examples:<br />
python gramps.py 'Family Tree 1'<br />
python gramps.py /home/cristina/.gramps/grampsdb/47320f3d<br />
python gramps.py -O 'Family Tree 1'<br />
python gramps.py -O /home/cristina/.gramps/grampsdb/47320f3d<br />
<br />
<br />
{{Man tip| Tip |If no option is given, just a name, Gramps will ignore the rest of the command line arguments. Use the -O flag to open, -i to import, and do something with the data.}}<br />
<br />
{{Man tip| Tip |Only family trees can be opened directly. For other formats, you will need to use the import option which will set up the empty database and then import data into it.}}<br />
<br />
{{Man tip| Tip |Only a single family tree can be opened. If you need to combine data from several sources, you will need to use the import option.}}<br />
<br />
=== Import options ===<br />
<br />
The files destined for import can be specified with the <pre>-i filename</pre> or <pre>--import=filename</pre> option. The format can be specified with the <pre>-f format</pre> or <pre>--format=format</pre> option, immediately following the ''filename'' . If not specified, the guess will be attempted based on the ''filename''.<br />
<br />
Example: <br />
python gramps.py -i 'Family Tree 1' -i 'Family Tree 2'<br />
python gramps.py -i test.grdb -i data.gramps<br />
<br />
{{man tip | Tip |More than one file can be imported in one command. If this is the case, Gramps will incorporate the data from the next file into the database available at the moment.}}<br />
<br />
When more than one input file is given, each has to be preceded by <pre>-i</pre> flag. The files are imported in the specified order, i.e. <pre> -i file1 -i file2 </pre> and <pre> -i file2 -i file1 </pre> might produce different GRAMPS IDs in the resulting database.<br />
<br />
=== Export options ===<br />
<br />
The files destined for export can be specified with the <pre>-e filename</pre> or <pre>--export=filename</pre> option. The format can be specified with the <pre>-f</pre> option immediately following the ''filename'' . If not specified, the guess will be attempted based on the ''filename'' . For iso format, the ''filename'' is actually the name of directory the Gramps database will be written into. For gramps-xml, gpkg, gedcom, wft, geneweb, and gramps-pkg, the ''filename'' is the name of the resulting file.<br />
<br />
-e, export a family tree in required format. It is not possible to export to a family tree.<br />
<br />
Example:<br />
python gramps.py -i 'Family Tree 1' -i test.grdb -f grdb -e mergedDB.gramps<br />
Note that above does not change 'Family Tree 1' as everything happens via a temporary database, whereas:<br />
python gramps.py -O 'Family Tree 1' -i test.grdb -f grdb -e mergedDB.gramps<br />
will import test.grdb into Family Tree 1, and then export to a file !<br />
<br />
{{man tip| Exporting more files |More than one file can be exported in one command. If this is the case, Gramps will attempt to write several files using the data from the database available at the moment.}}<br />
<br />
When more than one output file is given, each has to be preceded by <pre>-e</pre> flag. The files are written one by one, in the specified order.<br />
<br />
=== Action options ===<br />
<br />
The action to perform on the imported data can be specified with the <pre>-a action</pre> or <pre>--action=action</pre> option. This is done after all imports are successfully completed.<br />
<br />
The following actions remain the same:<br />
<br />
*''report'': This action allows producing reports from the command line.<br />
<br />
*''tool'': This action allows to run a tool from the command line.<br />
<br />
Reports and tools generally have many options of their own, so these actions should be followed by the report/tool option string. The string is given using the <pre>-p option_string</pre> or <pre>--options=option_string</pre> option.<br />
<br />
The actions available in older versions of Gramps which were relocated in Gramps 3.3 are:<br />
<br />
*''summary'': This action was the same as {{man menu|Reports ->View ->Summary}}. In Gramps 3.3 it was replaced by (or renamed to) '''-a report -p name=summary'''.<br />
<br />
*''check'': This action was the same as {{man menu|Tools ->Database Processing ->Check and Repair}}. In Gramps 3.3 it was replaced by (or renamed to) '''-a tool -p name=check'''.<br />
<br />
==== report action option ====<br />
You can generate most reports from the command line using the report action. <br />
<br />
An example:<br />
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html"<br />
<br />
You can provide the css style to use here with the css option:<br />
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html,css=Web_Nebraska.css"<br />
or without css in the html output:<br />
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html,css="<br />
<br />
{{man tip| Report option string |The report option string should satisfy the following conditions: It must not contain any spaces (due to the general nature of the command line interface). If some arguments need to include spaces, the string should be enclosed with quotation marks.<br />
Option string must list pairs of option names and values.<br />
Within a pair, option name and value must be separated by the equal sign.<br />
Different pairs must be separated by commas.}}<br />
<br />
Most of the report options are specific for every report. However, there are some common options.<br />
<br />
*name=report_name: This mandatory option determines which report will be generated. If the supplied report_name does not correspond to any available report, an error message will be printed followed by the list of available reports.<br />
*of : output filename<br />
*off: output format. These are the extension an output format makes available, eg, pdf, html, doc, ...<br />
*style: for text reports, the stylesheet to use. Defaults to 'default'.<br />
*show=all: This will produce the list of names for all options available for a given report.<br />
*show=option_name: This will print the description of the functionality supplied by the option_name, as well as what are the acceptable types and values for this option.<br />
<br />
So, to learn to use a report, do for example:<br />
gramps -O "Family Tree 1" -a report -p "name=family_group,show=all"<br />
<br />
{{man tip| Tip |If an option is not supplied, the last used value will be used. If this report has never been generated before, then the value from last generated report will be used when applicable. Otherwise, the default value will be used.}}<br />
<br />
When more than one output action is given, each has to be preceded by <pre>-a</pre> flag. The actions are performed one by one, in the specified order.<br />
<br />
{{man tip| lists |Some reports have options or arguments which are interpreted (by the report) to be on multiple lines. For instance some reports allow you to format how the information will be shown, perhaps with a name on one line and the person's birth date on the next line. Such multiple-line options or arguments are called "lists" by Gramps.}}<br />
<br />
On the command line such lists must always start with a left square bracket<br />
<pre>[</pre><br />
and must always end with a right square bracket<br />
<pre>]</pre><br />
but since such square brackets are usually "special" to the "shell" (they mean something to the command interpreter<br />
you are typing the command to), you must "escape" them so that they are ignored by your shell.<br />
<br />
The details vary with each shell but (in linux/UNIX) usually you can precede such a square bracket with a backslash<br />
<pre>\</pre><br />
or put quotation marks around the square bracket, usually either "single" or "double" ones.<br />
<br />
The Hourglass Graph report allows you to put a "note" at the top of the report and such a "note" is an example of a "list" option. Here is an example:<br />
gramps -O "Family Tree 1" -a report -p name=hourglass_graph,note='[line one,line two]'<br />
which shows that inside such a list different lines are separated by commas, and that spaces are acceptable since the quotation marks are already there for the square brackets.<br />
<br />
But if you want to have a comma inside your report you have to somehow tell Gramps that comma is not one which separates lines. You do that by enclosing the line with the comma in quotation marks (either single or double).<br />
<br />
But if you are already using a set of quotation marks (to enclose your square brackets) you have to use the other type to enclose<br />
the line with your comma. Here is an example:<br />
gramps -O "Family Tree 1" -a report -p name=hourglass_graph,note="['line one, also line one','line two, also line two']"<br />
<br />
It is possible to include any character in a list but the details are beyond the scope of this command-line introduction to Gramps.<br />
<br />
You will need to know the precise methods available in your particular command shell interpreter to include a character which is "special" to your shell or "special" to Gramps (like the comma in the example above) but in general you will have to "escape" it twice, once to your shell and once again to Gramps, since you don't want your shell to think it is some instruction it should pay attention to and you don't want Gramps to think that either.<br />
<br />
==== tool action option ====<br />
You can run most tools from the command line using the 'tool' action.<br />
To see which ones, say:<br />
gramps -O "Family Tree 1" -a tool -p show=all<br />
To see a tool's available options, for instance the "verify" tool:<br />
gramps -O "Family Tree 1" -a tool -p name=verify,show=all<br />
To run a tool, for instance the "verify" tool:<br />
gramps -O "Family Tree 1" -a tool -p name=verify<br />
<br />
==== book action option (new in 4.0) ====<br />
You can run books from the command line using the 'book' action.<br />
To see which ones, say:<br />
gramps -O "Family Tree 1" -a book<br />
To see a book's available options, for instance a book called "mybook":<br />
gramps -O "Family Tree 1" -a book -p name=mybook,show=all<br />
To run a book, for instance a book called "mybook":<br />
gramps -O "Family Tree 1" -a book -p name=mybook<br />
<br />
=== Force unlock option ===<br />
<br />
-u, you can extend the -O flag with -u to force a locked family to be unlocked. This allows you to recover from a crash that leaves the family tree (database) locked, from the command line.<br />
<br />
An example (to unlock the "Family Tree 1" database):<br />
gramps -O "Family Tree 1" -a report -u > /dev/null<br />
<br />
Note that it is not possible to open family trees that need repair from the command line<br />
<br />
=== Configuration (config) option ===<br />
The option takes three forms:<br />
(the following examples, except 3.2, use behavior.database-path as the configuration variable to change.)<br />
<br />
1) See all config values<br />
<br />
-s or --show<br />
<br />
[[Image:CommandLineExampleOutput-s-40.png|400px|thumb|right|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Command Line Example Output for ''python gramps.py -s'']]<br />
{{-}}<br />
<br />
2) See a value:<br />
<br />
--config=behavior.database-path<br />
or<br />
-c behavior.database-path<br />
<br />
3) Set a value:<br />
<br />
--config=behavior.database-path:'/media/mydb'<br />
or<br />
-c behavior.database-path:'/media/mydb'<br />
<br />
3.1) Set a value to its default:<br />
<br />
--config=behavior.database-path:DEFAULT<br />
or<br />
-c behavior.database-path:DEFAULT<br />
<br />
3.2) Set more than one value:<br />
<br />
--config=behavior.use-tips:False --config=behavior.autoload:True<br />
or<br />
-c behavior.use-tips:False -c behavior.autoload:True<br />
<br />
When all configuration variable(s) are set Gramps will start with these new values.<br />
<br />
== Operation ==<br />
<br />
If the first argument on the command line does not start with a dash (i.e. no flag), Gramps will attempt to open the file with the name given by the first argument and start an interactive session, ignoring the rest of the command line arguments.<br />
<br />
If the <pre>-O</pre> flag is given, then Gramps will try opening the supplied file name and then work with that data, as instructed by the further command line parameters.<br />
<br />
{{man note|1=Note |2=Only one file can be opened in a single invocation of Gramps. If you need to get data from multiple sources, use the importing options by using <pre>-i</pre> flag.}}<br />
<br />
With or without the <pre>-O</pre> flag, there could be multiple imports, exports, and actions specified further on the command line by using <pre>-i</pre> , <pre>-e</pre> , and <pre>-a</pre> flags.<br />
<br />
The order of <pre>-i</pre> , <pre>-e</pre> , or <pre>-a</pre> options with respect to each does not matter. The actual execution order always is: all imports (if any) -> all exports (if any) -> all actions (if any).<br />
<br />
{{man note| Note |But opening must always be first!}}<br />
<br />
If no <pre>-O</pre> or <pre>-i</pre> option is given, Gramps will launch its main window and start the usual interactive session with the empty database, since there is no data to process, anyway. (Unless you have already expressed a "preference" that it start with the last database it used.)<br />
<br />
If no <pre>-e</pre> or <pre>-a</pre> options are given, Gramps will launch its main window and start the usual interactive session with the database resulted from opening and all imports (if any). This database resides in the ''import_db.grdb'' file under the ''~/.gramps/import/'' directory.<br />
<br />
Any errors encountered during import, export, or action, will be either dumped to stdout (if these are exceptions handled by Gramps) or to stderr (if these are not handled). Use usual shell redirections of stdout and stderr to save messages and errors in files.<br />
<br />
== Examples ==<br />
<br />
*To import four databases (whose formats can be determined from their names) and then check the resulting database for errors, one may type:<br />
<br />
:<pre>gramps -i file1.ged -i file2.gpkg -i ~/db3.gramps -i file4.wft -a check</pre><br />
<br />
*To explicitly specify the formats in the above example, append filenames with appropriate -f options:<br />
<br />
:<pre>gramps -i file1.ged -f gedcom -i file2.gpkg -f gramps-pkg -i ~/db3.gramps -f gramps-xml -i file4.wft -f wft -a check</pre><br />
<br />
*To record the database resulting from all imports, supply -e flag (use -f if the filename does not allow Gramps to guess the format):<br />
<br />
:<pre>gramps -i file1.ged -i file2.gpkg -e ~/new-package -f gramps-pkg</pre><br />
<br />
*To save any error messages of the above example into files outfile and errfile, run:<br />
<br />
:<pre>gramps -i file1.ged -i file2.dpkg -e ~/new-package -f gramps-pkg >outfile 2>errfile </pre><br />
<br />
*To import three databases and start interactive Gramps session with the result:<br />
<br />
:<pre>gramps -i file1.ged -i file2.gpkg -i ~/db3.gramps </pre><br />
<br />
*To open a database and, based on that data, generate timeline report in PDF format putting the output into the my_timeline.pdf file:<br />
<br />
:<pre>gramps -O 'Family Tree 1' -a report -p name=timeline,off=pdf,of=my_timeline.pdf </pre><br />
<br />
{{man tip|1=Listing report options |2=Use the <tt>''name=timeline,show=all''</tt> to find out about all available options for the timeline report. To find out details of a particular option, use <tt>''show=option_name''</tt> , e.g. <tt>''name=timeline,show=off''</tt> string. To learn about available report names, use <tt>''name=show''</tt> string.}}<br />
<br />
*To convert a grdb on the fly to a .gramps xml file:<br />
<br />
:<pre>gramps -O 'Family Tree 1' -e output.gramps -f gramps-xml</pre><br />
<br />
* To generate a web site into an other locale (in german):<br />
<br />
<pre>LANGUAGE=de_DE; LANG=de_DE.UTF-8 gramps -O 'Family Tree 1' -a report -p name=navwebpage,target=/../de </pre><br />
<br />
*Finally, to start normal interactive session type:<br />
<br />
:<pre>gramps</pre><br />
<br />
== Environment variables==<br />
<br />
Gramps can take advantage of these environment variables (but do not change them if you do not know what are you doing):<br />
* '''GRAMPSHOME''' - if set, override default path to profile allowing user to use ex. network drive to store data and all settings. For technically advanced users who run multiple versions of Gramps, setting a different $GRAMPSHOME is a way to avoid interference between the different versions in the Gramps user directory.<br />
* '''LANG''' - is used by Gramps to determine which language file should be loaded.<br />
<br />
{{man index|Gramps 4.0 Wiki Manual - Keybindings|Gramps 4.0 Wiki Manual - User Directory|4.0}} <br />
<br />
{{languages|Gramps_4.0_Wiki_Manual_-_Command_Line}}<br />
<br />
[[Category:Documentation]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47210Template:Releases/4.0.2/ru2013-11-09T20:25:30Z<p>BACbKA: </p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''4.0.2'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Обновления==<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Различные исправления в [[Gramps_4.0_Wiki_Manual_-_Gramplets/ru|грамплетах]]<br />
* Многочисленные исправления в отчётах [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|«веб-сайт»]] и «веб-календарь»<br />
* Улучшения в поддержке дат и календарей<br />
* Исправлен и улучшен [[Gramps-Connect|веб-сервис]]<br />
* Исправлен модуль вычисления различий между разными базами данных<br />
* Улучшен вид [[Gramps_4.0_Wiki_Manual_-_Main_Window/ru#.D0.A6.D0.B8.D1.82.D0.B0.D1.82.D1.8B|«цитаты»]]<br />
* Для разработчиков новых модулей: улучшен интерфейс класса [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User]<br />
* Улучшения и исправления при экспорте в формат Gramps XML<br />
* Версия XML изменена на формат 1.5.1<br />
* Исправлены несколько [[Known_issues#Reports|давно известных проблем при создании отчётов]]<br />
* Улучшена поддержка графического интерфейса и отчётов для пользователей со сложными системами письменности (арабский, иврит, и т.д.)<br />
* Улучшена поддержка выбора языка при создании некоторых отчётов<br />
* Улучшена система уведомления об отсутствующих модулях, требуемых для дополнительных возможностей Gramps<br />
* Улучшена поддержка проверки орфографии<br />
* Исправления ошибок, проявлявшихся под Mac и Windows<br />
* Для всех географических видов добавлена возможность печати<br />
* Добавлен алгоритм [[Date Handler|отображения и разбора дат]] для арабского и греческого<br />
* Внесены исправления в [[Portal:Translators|перевод]] (ar, cs, de, fr, lt, nb, nl, ru, sv) и связанные с переводом исправления программы<br />
* Восстановлены и улучшены [[Testing Gramps|тесты]], сломанные ещё с версии 3.3.x, что улучшило надёжность работы программы<br />
* Добавлена поддержка [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
<br />
<br />
==Установка==<br />
#OS X: Для Mac OS X вскоре после этого выпуска выдет официальный установщик со всеми компонентами.<br />
#Linux: Ожидаются установочные пакеты для различных дистрибутивов Linux. Gramps 4.0 работает только с дистрибутивами, выпущеными с октября 2012. Для более старых дистрибутивов используйте VirtuaBox. Некоторые зависимости пока не доступны на большинстве дистрибутивов. Если у вас такая проблема - устанавливайте Gramps из исходных кодов. Подробнее смотрите в [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|пошаговом руководстве по установке для Ubuntu]]. На Ubuntu компоненты проверки орфографии, географический вид и библиотеку exiv необходимо устанавливать из исходных кодов.<br />
#Windows: В последние месяцы было проделано много работы, чтобы получить стек, необходимый для Gramps для Windows. Мы надеемся, это позволит разработчикам создать установщик AIO (всё в одном), такой же, как и для версии 3.4. В данный момент установка возможна [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|из исходных кодов]].<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 журнале изменений].<br />
<br />
<noinclude>{{languages/ru|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=News/ru&diff=47209News/ru2013-11-09T20:24:33Z<p>BACbKA: 4.0.2 released</p>
<hr />
<div>{{languages/ru|News|}}<br />
<section begin=news_mainpage /><br />
{{Releases/4.0.2/ru}}<br />
{{Releases/3.4.6/ru}}<br />
<section end=news_mainpage /><br />
<section begin=Archive /><br />
{{Releases/4.0.1/ru}}<br />
{{Releases/3.4.5/ru}}<br />
{{Releases/4.0.0}}<br />
{{Releases/3.4.4}}<br />
{{Releases/4.0.0beta}}<br />
{{Releases/3.4.3}}<br />
{{Releases/4.0.0alpha5/ru}}<br />
{{Releases/4.0.0alpha4/ru}}<br />
{{Releases/4.0.0alpha3}}<br />
{{Releases/4.0.0alpha2}}<br />
{{Releases/4.0.0alpha1}}<br />
{{Releases/3.4.2/ru}}<br />
{{Releases/3.4.1}}<br />
{{Releases/3.4.0}}<br />
{{Releases/3.3.2}}<br />
{{Announcements/20101204_LGCD}}<br />
{{Releases/3.3.1}}<br />
{{Releases/3.3.0}}<br />
{{Releases/3.2.6}}<br />
{{Releases/3.2.5}}<br />
{{Releases/3.2.4}}<br />
{{Releases/3.2.3}}<br />
{{Releases/3.2.2}}<br />
{{Releases/3.2.1}}<br />
{{Releases/3.2.0}}<br />
{{Releases/3.1.3}}<br />
{{Releases/3.1.2}}<br />
{{Releases/3.1.1}}<br />
{{Releases/3.1.0}}<br />
{{Releases/3.0.4}}<br />
{{Releases/3.0.3}}<br />
{{Releases/3.0.2}}<br />
{{Announcements/20080630 LGCD}}<br />
{{Releases/3.0.1}}<br />
{{Releases/3.0.0}}<br />
{{Releases/2.2.10}}<br />
{{Announcements/2007304 LGCD}}<br />
<section end=Archive /></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Talk:News&diff=47208Talk:News2013-11-09T20:23:57Z<p>BACbKA: </p>
<hr />
<div>Douglas thinks the pause at 87% when starting 3.x is caused by the long News. I've shortened the page to the last 3 announcements. There most likely is a better way to do this, but I've simply removed the old news completely. The old content was:<br />
&lt;section begin=news_mainpage /&gt; { { Releases/3.0.0 } }<br />
{ { Announcements/20070820 Get Involved } }<br />
{ { Releases/2.2.10 } }<br />
{ { Releases/2.2.9 } }<br />
{ { Announcements/2007304 LGCD } }<br />
&lt;section end=news_mainpage /&gt;<br />
&lt;section begin=news_archive /&gt;<br />
{ { Releases/2.2.8 } }<br />
{ { Releases/2.2.7 } }<br />
{ { Announcements/wiki } }<br />
{ { Releases/2.2.6 } }<br />
{ { Releases/2.2.5 } }<br />
&lt;section end=news_archive /&gt;<br />
--[[User:Stephanecharette|Stéphane]] 12:43, 30 March 2008 (EDT)<br />
<br />
Jerome, please update the news for 4.0.2! I can't because I lack the perms. [[User:BACbKA|BACbKA]] ([[User talk:BACbKA|talk]]) 13:23, 9 November 2013 (MST)</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47207Template:Releases/4.0.2/ru2013-11-09T20:22:28Z<p>BACbKA: </p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''3.4.6'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Обновления==<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Различные исправления в [[Gramps_4.0_Wiki_Manual_-_Gramplets/ru|грамплетах]]<br />
* Многочисленные исправления в отчётах [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|«веб-сайт»]] и «веб-календарь»<br />
* Улучшения в поддержке дат и календарей<br />
* Исправлен и улучшен [[Gramps-Connect|веб-сервис]]<br />
* Исправлен модуль вычисления различий между разными базами данных<br />
* Улучшен вид [[Gramps_4.0_Wiki_Manual_-_Main_Window/ru#.D0.A6.D0.B8.D1.82.D0.B0.D1.82.D1.8B|«цитаты»]]<br />
* Для разработчиков новых модулей: улучшен интерфейс класса [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User]<br />
* Улучшения и исправления при экспорте в формат Gramps XML<br />
* Версия XML изменена на формат 1.5.1<br />
* Исправлены несколько [[Known_issues#Reports|давно известных проблем при создании отчётов]]<br />
* Улучшена поддержка графического интерфейса и отчётов для пользователей со сложными системами письменности (арабский, иврит, и т.д.)<br />
* Улучшена поддержка выбора языка при создании некоторых отчётов<br />
* Улучшена система уведомления об отсутствующих модулях, требуемых для дополнительных возможностей Gramps<br />
* Улучшена поддержка проверки орфографии<br />
* Исправления ошибок, проявлявшихся под Mac и Windows<br />
* Для всех географических видов добавлена возможность печати<br />
* Добавлен алгоритм [[Date Handler|отображения и разбора дат]] для арабского и греческого<br />
* Внесены исправления в [[Portal:Translators|перевод]] (ar, cs, de, fr, lt, nb, nl, ru, sv) и связанные с переводом исправления программы<br />
* Восстановлены и улучшены [[Testing Gramps|тесты]], сломанные ещё с версии 3.3.x, что улучшило надёжность работы программы<br />
* Добавлена поддержка [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
<br />
<br />
==Установка==<br />
#OS X: Для Mac OS X вскоре после этого выпуска выдет официальный установщик со всеми компонентами.<br />
#Linux: Ожидаются установочные пакеты для различных дистрибутивов Linux. Gramps 4.0 работает только с дистрибутивами, выпущеными с октября 2012. Для более старых дистрибутивов используйте VirtuaBox. Некоторые зависимости пока не доступны на большинстве дистрибутивов. Если у вас такая проблема - устанавливайте Gramps из исходных кодов. Подробнее смотрите в [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|пошаговом руководстве по установке для Ubuntu]]. На Ubuntu компоненты проверки орфографии, географический вид и библиотеку exiv необходимо устанавливать из исходных кодов.<br />
#Windows: В последние месяцы было проделано много работы, чтобы получить стек, необходимый для Gramps для Windows. Мы надеемся, это позволит разработчикам создать установщик AIO (всё в одном), такой же, как и для версии 3.4. В данный момент установка возможна [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|из исходных кодов]].<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 журнале изменений].<br />
<br />
<noinclude>{{languages/ru|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2&diff=47206Template:Releases/4.0.22013-11-09T20:21:56Z<p>BACbKA: wl User class</p>
<hr />
<div>{{Release|4.0.2 (The "Welcome to our humble abode" bug-fix release)| '''2013.11.08'''<br />
<br />
Version '''4.0.2''', the '''"Welcome to our humble abode"''', has been released. This is a '''maintenance release''' for the next generation of Gramps, '''don't upgrade before verifying your system can run it'''.<br />
<br />
==Changes==<br />
<br />
* Citation merge works better for all objects with citations<br />
* Fixed citations attached to family events<br />
* Fixed several crashes, hangs, and [[Recover corrupted family tree|data corruption]] scenarios<br />
* Fixed bugs in [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|determining whether a person is alive]], potentially resolving private data leak via export or report<br />
* VCF export/import now support gender information<br />
* Several bugs with filtering fixed, most [[Gramps_4.0_Wiki_Manual_-_Filters|filters]] now support regular expressions<br />
* Fixed bug in Hebrew calendar date calculations<br />
* Fix some regressions on [[GEDCOM]] file format export and enhancement on CONT/CONC handling<br />
* Multiple fixes and improvements on [[Gramps_4.0_Wiki_Manual_-_Gramplets|gramplets]]<br />
* Multiple fixes in the [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|narrated website]] and web calendar reports<br />
* Enhancements on date and calendar<br />
* Some fixes and improvements of the [[Gramps-Connect|webapp]]<br />
* Fix on Database Differences module<br />
* Enhancements of the [[Gramps_4.0_Wiki_Manual_-_Main_Window#Citations_Category|citation tree view (Sources category)]]<br />
* For add-on developers: improvements in [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User] class interface<br />
* Polish and consistency on Gramps XML export<br />
* Bump XML schema to 1.5.1<br />
* Fixed several [[Known_issues#Reports|long-standing problems with report generation]]<br />
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI<br />
* Better support for language selection on some reports<br />
* Better way for displaying missing dependencies<br />
* Better spellchecking support<br />
* Platform-specific fixes for Mac and Windows<br />
* Add printing functionality for all geography views<br />
* New [[Date Handler|date handlers]] for Arabic and Greek<br />
* [[Portal:Translators|Translation]] updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes<br />
* Repaired and enhanced [[Testing Gramps|tests]] broken since 3.3.x, resulting in overall reliability improvements<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
<br />
<br />
==Installation status==<br />
<br />
#OS X: Mac OS X will see an official installer shortly after release with all components<br />
#Linux: We expect Linux packages for different distributions. Gramps 4.0 will only work on distributions released since October 2012, use virtualbox for older distributions. Some optional dependencies are not available yet on most distribution at the time of release. If you want those, you need to install them from source, see Ubuntu derivatives walkthrough in the [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|installation guide]] for these. Specifically for Ubuntu derivatives spell checking, geography view and exiv image data require installation of source components.<br />
#Windows: Much work has been done the last months to obtain the stack needed for Gramps on Windows. At the moment only a rough [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|guide on source installation]] is present. We hope this will allow windows developers to construct an AIO installer as for the 3.4 version<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47205Template:Releases/4.0.2/ru2013-11-09T20:20:50Z<p>BACbKA: translated</p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''3.4.6'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Обновления==<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Различные исправления в [[Gramps_4.0_Wiki_Manual_-_Gramplets/ru|грамплетах]]<br />
* Многочисленные исправления в отчётах [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|«веб-сайт»]] и «веб-календарь»<br />
* Улучшения в поддержке дат и календарей<br />
* Исправлен и улучшен [[Gramps-Connect|веб-сервис]]<br />
* Исправлен модуль вычисления различий между разными базами данных<br />
* Улучшен вид [[Gramps_4.0_Wiki_Manual_-_Main_Window/ru#.D0.A6.D0.B8.D1.82.D0.B0.D1.82.D1.8B|«цитаты»]]<br />
* Для разработчиков новых модулей: улучшен интерфейс класса [http://www.gramps-project.org/docs/gen/gen.html#gramps.gen.user.User User]<br />
* Улучшения и исправления при экспорте в формат Gramps XML<br />
* Версия XML изменена на формат 1.5.1<br />
* Исправлены несколько [[Known_issues#Reports|давно известных проблем при создании отчётов]]<br />
* Улучшена поддержка графического интерфейса и отчётов для пользователей со сложными системами письменности (арабский, иврит, и т.д.)<br />
* Улучшена поддержка выбора языка при создании некоторых отчётов<br />
* Улучшена система уведомления об отсутствующих модулях, требуемых для дополнительных возможностей Gramps<br />
* Улучшена поддержка проверки орфографии<br />
* Исправления ошибок, проявлявшихся под Mac и Windows<br />
* Для всех географических видов добавлена возможность печати<br />
* Добавлен алгоритм [[Date Handler|отображения и разбора дат]] для арабского и греческого<br />
* Внесены исправления в [[Portal:Translators|перевод]] (ar, cs, de, fr, lt, nb, nl, ru, sv) и связанные с переводом исправления программы<br />
* Восстановлены и улучшены [[Testing Gramps|тесты]], сломанные ещё с версии 3.3.x, что улучшило надёжность работы программы<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
<br />
<br />
==Установка==<br />
#OS X: Для Mac OS X вскоре после этого выпуска выдет официальный установщик со всеми компонентами.<br />
#Linux: Ожидаются установочные пакеты для различных дистрибутивов Linux. Gramps 4.0 работает только с дистрибутивами, выпущеными с октября 2012. Для более старых дистрибутивов используйте VirtuaBox. Некоторые зависимости пока не доступны на большинстве дистрибутивов. Если у вас такая проблема - устанавливайте Gramps из исходных кодов. Подробнее смотрите в [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|пошаговом руководстве по установке для Ubuntu]]. На Ubuntu компоненты проверки орфографии, географический вид и библиотеку exiv необходимо устанавливать из исходных кодов.<br />
#Windows: В последние месяцы было проделано много работы, чтобы получить стек, необходимый для Gramps для Windows. Мы надеемся, это позволит разработчикам создать установщик AIO (всё в одном), такой же, как и для версии 3.4. В данный момент установка возможна [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|из исходных кодов]].<br />
}}<br />
<br />
Подробнее в [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 журнале изменений].<br />
<br />
<noinclude>{{languages/ru|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2/ru&diff=47175Template:Releases/4.0.2/ru2013-11-09T10:02:25Z<p>BACbKA: 50% translated</p>
<hr />
<div>{{Release/ru|4.0.2 ("Добро пожаловать в нашу скромную обитель", выпуск исправлений)| '''2013.11.08'''<br />
<br />
Разработчики Gramps представляют версию '''3.4.6'''. Это '''выпуск исправлений''' для Gramps следующего поколения, '''не переходите на неё с версий 3.x, пока вы не проверили, что она может работать на вашей системе'''.<br />
<br />
==Changes==<br />
<br />
* Слияние цитат работает правильнее для всех объектов с цитатами<br />
* Исправлен сбой в случае, когда цитаты были указаны для семейных событий<br />
* Исправлено несколько аварийных сбоев, зависаний, и [[Recover corrupted family tree|поломок базы данных]]<br />
* Исправлен алгоритм [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|определения живых и мёртвых]], что устранило возможность утечки личных данных при экспорте в другой формат или при создании отчёта<br />
* Экспорт/импорт в формат VCF теперь поддерживает информацию о поле<br />
* Исправлено несколько ошибок в фильтрах; большинство [[Gramps_4.0_Wiki_Manual_-_Filters/ru|фильтров]] теперь поддерживают регулярные выражения<br />
* Исправлен алгоритм вычисления дат по еврейскому календарю<br />
* Добавлена поддержка пробела в ID Gramps при экспорте/импорте в фомат [[GEDCOM]]<br />
* Multiple fixes and improvements on [[Gramps_4.0_Wiki_Manual_-_Gramplets|gramplets]]<br />
* Multiple fixes in the [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|narrated website]] and web calendar reports<br />
* Enhancements on date and calendar<br />
* Some fixes and improvements of the [[Gramps-Connect|webapp]]<br />
* Fix on Database Differences module<br />
* Enhancements of the [[Gramps_4.0_Wiki_Manual_-_Main_Window#Citations_Category|citation tree view (Sources category)]]<br />
* Improvements on User classes<br />
* Polish and consistency on Gramps XML export<br />
* Bump XML schema to 1.5.1<br />
* Fixed several [[Known_issues#Reports|long-standing problems with report generation]]<br />
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI<br />
* Better support for language selection on some reports<br />
* Better way for displaying missing dependencies<br />
* Better spellchecking support<br />
* Platform-specific fixes for Mac and Windows<br />
* Add printing functionality for all geography views<br />
* New [[Date Handler|date handlers]] for Arabic and Greek<br />
* [[Portal:Translators|Translation]] updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes<br />
* Repaired and enhanced [[Testing Gramps|tests]] broken since 3.3.x, resulting in overall reliability improvements<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
<br />
<br />
==Installation status==<br />
<br />
#OS X: Mac OS X will see an official installer shortly after release with all components<br />
#Linux: We expect Linux packages for different distributions. Gramps 4.0 will only work on distributions released since October 2012, use virtualbox for older distributions. Some optional dependencies are not available yet on most distribution at the time of release. If you want those, you need to install them from source, see Ubuntu derivatives walkthrough in the [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|installation guide]] for these. Specifically for Ubuntu derivatives spell checking, geography view and exiv image data require installation of source components.<br />
#Windows: Much work has been done the last months to obtain the stack needed for Gramps on Windows. At the moment only a rough [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|guide on source installation]] is present. We hope this will allow windows developers to construct an AIO installer as for the 3.4 version<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Brief_introduction_to_Git&diff=47152Brief introduction to Git2013-11-08T17:45:25Z<p>BACbKA: /* Browse Git */ fix the online browser URL (differs from the git repo URL!)</p>
<hr />
<div>The development source code of Gramps is stored in the Git repository at SourceForge.<br />
<br />
;[http://git.code.sf.net/p/gramps/source/ http://git.code.sf.net/p/gramps/source/]. <br />
<br />
This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably want to do one of two things with Git: either download the latest source or the development version, or else upload your changes (if you have write access to the repository) or [[Brief_introduction_to_SVN#Making_a_patchfile|make a patchfile]] (if you don't have write access).<br />
<br />
== Obtaining a copy of the Gramps repository ==<br />
<br />
Install Git on your system.<br />
* Debian/Ubuntu: <code>apt-get install git</code><br />
* Fedora: <code>yum install git-core</code><br />
<br />
Git includes your name and email address in commits. To configure them, use the following commands: <br />
git config --global user.name "John Smith"<br />
git config --global user.email john@example.com <br />
<br />
To obtain a copy of the Gramps repository, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
git clone <nowiki>http://git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a SourceForge account, use ssh instead:<code><br />
git clone <nowiki>ssh://<username>@git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You will need a [http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SSH Key] in order to authenticate using this method.<br />
<br />
== Basic Work Flow ==<br />
<br />
The basic work flow after you've checked out the repository is update, develop, commit, update again, push.<br />
To update the current branch, run<br />
<br />
git pull --rebase<br />
<br />
As a general rule ''always'' use <tt>git pull --rebase</tt> to avoid creating unnecessary merge commits. Note that one must have no uncommitted edits when running <tt>git pull</tt>.<br />
<br />
To commit your changes locally, use the following command:<br />
<br />
git commit<br />
<br />
Which will bring up the default $EDITOR to create a commit message. If you are fixing a bug, the first line of the commit message should be the bug number and title, otherwise a brief statement of purpose. Skip a line and describe what you did.<br />
<br />
* All developers should read Gramps [[Committing policies]]<br />
<br />
If the commit is a minor change that can be described entirely in the subject, you can instead use:<br />
<br />
git commit -am "message describing the nature of the change"<br />
<br />
Try to keep your commits digestible and understandable. A large changeset can be broken into several commits that "tell a story" about how the changeset moves the program from its old behavior to its new one.<br />
<br />
To push your changes to the Gramps repository, you need to have cloned the Gramps source code with ssh, and have push access to the Gramps repository (the Gramps admins can give you this, [[Contact|Brian Matherly or Benny Malengier]]). First update again to make sure that you can fast-forward the repository, then push:<br />
<br />
git pull --rebase<br />
git push<br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the git repository. In this case, create a new bug on the [http://bugs.gramps-project.org bug tracker] and attach a patch to it. See the [[Brief_introduction_to_Git#Making_a_patchfile|make a patchfile]] section for details.<br />
<br />
If someone else has made changes that interfere with yours, you will get a conflict error when you pull. You will have to resolve that conflict and re-commit (you can use <tt>git commit --amend</tt> if it affects only the last ''unpushed'' commit) before git will push successfully.<br />
<br />
:Also see: [[Getting started with Gramps Trunk]].<br />
<br />
== Types of branches ==<br />
When you clone the Gramps repository, a branch called ''master'' will be created for you. This contains the latest development version of Gramps. Gramps maintains different branches in several categories:<br />
<br />
* ''master'' - There is only one ''master'' branch. All new feature and most bug-fix development happens in the ''master'' branch. New releases never come from the ''master'' branch.<br />
<br />
* ''maintenance'' - There are many maintenance branches, though usually only one or two are active. A maintenance branch is created from the ''master'' branch when all the features for a release are complete. New features are not committed to maintenance branches. Releases only come from active maintenance branches; a branch is no longer active when no further releases are planned for it. Inactive branches should not have any changes committed to them. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in the ''master'' branch. In order to prevent regressions (fixed bugs reoccurring in later releases), it is a "best practice" to fix bugs on the master branch and then to backport them to the current maintenance branches.<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''master'' branch. 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. ''geps'' 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 />
Tags are created for each Gramps release. 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 the ''master'' branch and are ready for release. A new maintenance branch is created from the ''master'' branch named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in the ''master'' branch 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 />
<br />
There are several versions of the Gramps source code in Git. The development branch for small changes and bug fixes is ''maintenance/gramps{{stable_branch}}''.<br />
<br />
By default, the remote server you cloned the Gramps repository from is called ''origin''.<br />
<br />
To see a list of branches on the server, type:<br />
<br />
git show remote origin<br />
<br />
To create a local branch which tracks a branch on the server, use:<br />
<br />
git checkout -b gramps40 origin/maintenance/gramps40<br />
<br />
This is known as a "tracking" branch.<br />
<br />
To list the available branches, type:<br />
<br />
git branch<br />
<br />
The current branch is marked by an asterisk.<br />
<br />
To switch to another branch, type:<br />
<br />
git checkout <branch><br />
<br />
=== Where for bugs? ===<br />
<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 />
<br />
If you do not have push 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 tell how to make a patchfile against the ''master'' branch, 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 />
First create a new branch to work in:<br />
<br />
git checkout -b fix<br />
<br />
Then use your favorite editor to change whatever file(s) you want. Add the files you have changed to the staging area and commit them.<br />
<br />
Obtain the latest changes from the server.<br />
<br />
git checkout master<br />
git pull --rebase<br />
<br />
Next, rebase your fix again the ''master'' branch. This will ensure that your patch will apply cleanly.<br />
<br />
git rebase master fix<br />
<br />
This will leave you in the fix branch.<br />
<br />
Finally, create a patchfile, using:<br />
<br />
git format-patch master --stdout > fix.patch<br />
<br />
You now have a patchfile that can be sent by email, or attached to a bug report. The patch can be applied using the 'git apply' command.<br />
<br />
== Working with development branches ==<br />
<br />
Creating branches with Git is quick and easy.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''master'' branch:<br />
<br />
git checkout master<br />
git branch gep-014-fab-feature<br />
<br />
To make this branch available on the server use:<br />
<br />
git push origin gep-014-fab-feature<br />
<br />
=== Merging changes from the branch back into the ''master'' branch ===<br />
<br />
When you are ready to merge your changes back into the ''master'' branch:<br />
<br />
git checkout master<br />
git merge gep-014-fab-feature<br />
git push<br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged into the trunk or have been abandoned. To remove a branch:<br />
<br />
git branch -d gep-014-fab-feature<br />
<br />
To remove a branch from the server, use:<br />
<br />
git push origin :gep-014-fab-feature<br />
<br />
The developers reserve the right to remove branches that have been dormant for more than 1 year.<br />
<br />
=== Applying a fix to another branch ===<br />
<br />
If you write a fix for the master branch, you may need to also apply it to a maintenance branch.<br />
<br />
To apply a commit from the a branch to a maintenance branch:<br />
git checkout gramps40<br />
git cherry-pick fix<br />
<br />
Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to push your changes.<br />
<br />
If you apply a small fix that applies cleanly to another branch, it can be done like this (assuming you've just committed the fix to master in a single commit):<br />
git checkout gramps40<br />
git diff master^ master | git apply<br />
If `git apply' fails, nothing will be changed in the working copy, and you can try to resolve the conflicts by cherry-picking, or manually saving the diff result, using the "patch" program, and resolving the conflicts.<br />
<br />
=== Workflow ===<br />
<br />
Before switching to another branch it is useful to remove untracked files created by the build process. You can do this with the following command:<br />
<br />
git clean -dxf<br />
<br />
== Useful Tips ==<br />
<br />
=== Getting help ===<br />
<br />
Git has excellent man pages. You can view the manual page for a Git command, by using one of the following:<br />
<br />
git help <verb><br />
git <verb> --help<br />
man git-<verb><br />
<br />
For example, to get help on the 'git log' command, type:<br />
<br />
git help log<br />
<br />
=== Some procedural recommendations ===<br />
<br />
# Always do 'git pull' before pushing changes to the server. If necessary get advice about handling conflicts.<br />
# Always do 'git status' and look for staged files that are unexpected or unintended. This is a *very important* sanity check. <br />
<br />
;And here are a couple of incidental suggestions<br />
<br />
* avoid grouping unrelated changes; better to divide into separate commits for the following reasons: a better log entry; easier troubleshooting/reverting. (and probably more).<br />
<br />
* similar to above, it may be better to make small incremental changes than one big one (if possible). Interim changes should not introduce breakage, of course. For instance, if you change code in gramps/ and do associated translation changes in po/, you might want to commit the changes in po/ in a commit following the commit(s) with the changes in gramps/.<br />
<br />
* logs are important -- please give some thought to the log message. All developers should read the [[Committing policies]].<br />
<br />
== Browse Git ==<br />
<br />
An alternative to the command line tools to view the Git repository is the [http://sourceforge.net/p/gramps/source/ online interface].<br />
<br />
== git2cl ==<br />
<br />
The Gramps project does not keep a ChangeLog file under source control. All change history is captured by git automatically when it is committed. A ChangeLog file is generated from the git commit logs before each release using [[Brief_introduction_to_SVN#How_to_use_git2cl|git2cl]]. Developers should take care to make useful commit log messages when committing changes to git. Please read the [[Committing policies]] for details.<br />
<br />
=== How to use git2cl ===<br />
<br />
Starting with Gramps 3.0.0, we no longer have a <tt>ChangeLog</tt> file. <br />
<br />
Instead, the list of changes is generated automatically using the standard <tt>git2cl</tt> script.<br />
<br />
Note that <tt>git2cl</tt> is not included in the base installation of Git. With a Debian-based distro such as Ubuntu, you can get <tt>git2cl</tt> as follows:<br />
<br />
sudo apt-get install git2cl<br />
<br />
There typically are two <tt>ChangeLog</tt> files needed for releases; one in the main directory, and one in the <tt>po</tt> directory. You can generate these files with the following commands:<br />
<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges -- po | git2cl > po/ChangeLog<br />
<br />
== External links ==<br />
<br />
*[http://git-scm.com/ Git]<br />
*[http://git-scm.com/book Git Book]<br />
*[https://git.wiki.kernel.org/index.php/GitSvnCrashCourse GitSvnCrashCourse]<br />
*[http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SourceForge SSH Keys]<br />
<br />
[[Category:Developers/General|B]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template:Releases/4.0.2&diff=47144Template:Releases/4.0.22013-11-08T10:30:56Z<p>BACbKA: minor copyedit</p>
<hr />
<div>{{Release|4.0.2 (The "Welcome to our humble abode" bug-fix release)| '''2013.11.08'''<br />
<br />
Version '''4.0.2''', the '''"Welcome to our humble abode"''', has been released. This is a '''maintenance release''' for the next generation of Gramps, '''don't upgrade before verifying your system can run it'''.<br />
<br />
==Changes==<br />
<br />
* Citation merge works better for all objects with citations<br />
* Fixed citations attached to family events<br />
* Fixed several crashes, hangs, and [[Recover corrupted family tree|data corruption]] scenarios<br />
* Fixed bugs in [[Gramps_4.0_Wiki_Manual_-_Probably_Alive|determining whether a person is alive]], potentially resolving private data leak via export or report<br />
* Fixed bugs on proxies<br />
* VCF export/import now support gender information<br />
* Several bugs with filtering fixed, most [[Gramps_4.0_Wiki_Manual_-_Filters|filters]] now support regular expressions<br />
* Fixed bug in Hebrew calendar date calculations<br />
* Fix some regressions on [[GEDCOM]] file format export and enhancement on CONT/CONC handling<br />
* Multiple fixes and improvements on [[Gramps_4.0_Wiki_Manual_-_Gramplets|gramplets]]<br />
* Multiple fixes in the [[Gramps_4.0_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|narrated website]] and web calendar reports<br />
* Enhancements on date and calendar<br />
* Some fixes and improvements of the [[Gramps-Connect|webapp]]<br />
* Fix on Database Differences module<br />
* Enhancements of the [[Gramps_4.0_Wiki_Manual_-_Main_Window#Citations_Category|citation tree view (Sources category)]]<br />
* Improvements on User classes<br />
* Polish and consistency on Gramps XML export<br />
* Bump XML schema to 1.5.1<br />
* Fixed several [[Known_issues#Reports|long-standing problems with report generation]]<br />
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI<br />
* Better support for language selection on some reports<br />
* Better way for displaying missing dependencies<br />
* Better spellchecking support<br />
* Platform-specific fixes for Mac and Windows<br />
* Add printing functionality for all geography views<br />
* New [[Date Handler|date handlers]] for Arabic and Greek<br />
* [[Portal:Translators|Translation]] updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes<br />
* Repaired and enhanced [[Testing Gramps|tests]] broken since 3.3.x, resulting in overall reliability improvements<br />
* Add a support for [http://people.freedesktop.org/~hughsient/appdata/ AppData]<br />
<br />
<br />
==Installation status==<br />
<br />
#OS X: Mac OS X will see an official installer shortly after release with all components<br />
#Linux: We expect Linux packages for different distributions. Gramps 4.0 will only work on distributions released since October 2012, use virtualbox for older distributions. Some optional dependencies are not available yet on most distribution at the time of release. If you want those, you need to install them from source, see Ubuntu derivatives walkthrough in the [[Linux:Build_from_source#Full_install_walkthrough_Gramps_4.0_Ubuntu_derivatives|installation guide]] for these. Specifically for Ubuntu derivatives spell checking, geography view and exiv image data require installation of source components.<br />
#Windows: Much work has been done the last months to obtain the stack needed for Gramps on Windows. At the moment only a rough [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3|guide on source installation]] is present. We hope this will allow windows developers to construct an AIO installer as for the 3.4 version<br />
<br />
}}<br />
<br />
See the [http://www.gramps-project.org/bugs/changelog_page.php?version_id=43 Changelog] for more details.<br />
<br />
<br />
<noinclude>{{languages|Template:Releases/4.0.2}}</noinclude></div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Template_talk:Releases/4.0.2&diff=47143Template talk:Releases/4.0.22013-11-08T10:26:52Z<p>BACbKA: /* some dev-only language */ new section</p>
<hr />
<div>Feel free to complete [[Template:Releases/4.0.2|4.0.2]].<br />
<br />
<br />
2013-11-06 02:01 dsblank<br />
<br />
* [r23454] gramps/gui/editors/editfamily.py,<br />
gramps/gui/editors/editrepository.py,<br />
gramps/gui/editors/editsource.py: Added callback parameter to<br />
__init__ method so that all editors have a uniform signature<br />
(called from Note Link)<br />
<br />
<s>2013-11-06 01:59 dsblank<br />
<br />
* [r23453] gramps/plugins/lib/libcairodoc.py: Fix long columns of<br />
text that span pages</s><br />
<br />
<s>2013-10-29 17:52 romjerome<br />
<br />
* [r23439] gramps/plugins/lib/holidays.xml.in: 7151: update start<br />
of Ramadan in France</s><br />
<br />
2013-10-22 16:52 paul-franklin<br />
<br />
* [r23366] gramps/gui/viewmanager.py: 7150: crash on backup or<br />
export<br />
<br />
<s>2013-10-22 15:07 vassilii<br />
<br />
* [r23365] gramps/plugins/webreport/webcal.py: 5098: fix a runaway<br />
merge artifact</s><br />
<br />
<s>2013-10-20 16:47 vassilii<br />
<br />
* [r23355] data/grampsxml.dtd, data/grampsxml.rng,<br />
gramps/plugins/importer/importxml.py,<br />
gramps/plugins/lib/libgrampsxml.py: 7125/7102: port my fix from<br />
gramps34</s><br />
<br />
<s>2013-10-20 16:46 paul-franklin<br />
<br />
* [r23353] gramps/gen/plug/report/endnotes.py,<br />
gramps/gen/utils/string.py, gramps/gui/editors/filtereditor.py,<br />
gramps/gui/filters/sidebar/_citationsidebarfilter.py,<br />
gramps/gui/merge/mergecitation.py,<br />
gramps/gui/views/treemodels/citationbasemodel.py,<br />
gramps/plugins/textreport/indivcomplete.py,<br />
gramps/plugins/tool/mergecitations.py,<br />
gramps/plugins/tool/testcasegenerator.py,<br />
gramps/plugins/webreport/narrativeweb.py: 7124: Complete<br />
Individual Report does incomplete translation</s><br />
<br />
2013-10-19 03:02 dsblank<br />
<br />
* [r23337] gramps/gui/editors/displaytabs/gallerytab.py: Fixed new<br />
Gtk Drag/Drop names<br />
<br />
<s>2013-10-17 19:01 paul-franklin<br />
<br />
* [r23333] gramps/cli/test/argparser_test.py,<br />
gramps/cli/test/user_test.py, gramps/gen/test/constfunc_test.py,<br />
gramps/gen/test/user_test.py, gramps/gui/test/user_test.py,<br />
gramps/plugins/lib/maps/cairoprint.py: added SVN properties, and<br />
SVN "Id" lines if needed</s><br />
<br />
<s>2013-10-17 12:07 dsblank<br />
<br />
* [r23330] gramps/gen/merge/diff.py: 6678: Database Differences<br />
Report crashes 4.0 beta svn 21228</s><br />
<br />
2013-10-13 21:10 paul-franklin<br />
<br />
* [r23319] gramps/plugins/textreport/familygroup.py: 7129: the<br />
Family Group Report doesn't show "family" attributes<br />
<br />
<s>2013-10-11 11:46 dsblank<br />
<br />
* [r23306] gramps/plugins/webreport/webcal.py: 7090: wrong age for<br />
dead people reported by webcal</s><br />
<br />
<br />
<s>2013-10-11 00:00 paul-franklin<br />
<br />
* [r23300] gramps/gen/config.py,<br />
gramps/plugins/gramplet/gramplet.gpr.py,<br />
gramps/plugins/view/geography.gpr.py: 7092: API for reporting<br />
issues ["interim" solution, from Nick Hall]</s><br />
<br />
<s>2013-10-09 16:19 paul-franklin<br />
<br />
* [r23288] gramps/plugins/export/exportxml.py: 7102: XML: Gramps<br />
does not export 'very low' value (0) for confidence into citation</s><br />
<br />
<s>2013-10-08 17:12 josipsf<br />
<br />
* [r23283] gramps/gui/spell.py: 0007114: GtkSpell: language code in<br />
a human readable format</s><br />
<br />
<s>2013-10-08 16:40 dsblank<br />
<br />
* [r23282] gramps/plugins/webreport/narrativeweb.py: 7006: double<br />
entries in de gendex.txt file</s><br />
<br />
<s>2013-10-08 13:05 vassilii<br />
<br />
* [r23281] gramps/gen/lib/calendar.py: 7068: back-port from trunk</s><br />
<br />
<s>2013-10-08 12:10 vassilii<br />
<br />
* [r23278] gramps/gen/datehandler/test/datehandler_test.py,<br />
gramps/gen/lib/date.py, gramps/gen/lib/test/date_test.py: 7100:<br />
reapply fix from trunk after CR by dsblank</s><br />
<br />
2013-10-08 01:29 dsblank<br />
<br />
* [r23273] gramps/gui/editors/displaytabs/gallerytab.py: Add<br />
Gallery 'Make Active Media', typo<br />
<br />
2013-10-08 01:12 dsblank<br />
<br />
* [r23272] gramps/gui/editors/displaytabs/gallerytab.py: Add<br />
Gallery 'Make Active Media', typo<br />
<br />
2013-10-08 01:03 dsblank<br />
<br />
* [r23269] gramps/gui/editors/displaytabs/gallerytab.py: Add<br />
Gallery 'Make Active Media'<br />
<br />
<s>2013-10-07 22:03 nick-h<br />
<br />
* [r23266] gramps/plugins/gramplet/attributes.py,<br />
gramps/plugins/gramplet/backlinks.py,<br />
gramps/plugins/gramplet/children.py,<br />
gramps/plugins/gramplet/citations.py,<br />
gramps/plugins/gramplet/events.py,<br />
gramps/plugins/gramplet/personresidence.py: Freeze headings when<br />
scrolling</s><br />
<br />
<s>2013-10-07 14:41 romjerome<br />
<br />
* [r23262] gramps/gen/lib/family.py: 7105: missing event_ref_list<br />
into get_citation_child_list method</s><br />
<br />
<s>2013-10-07 09:38 romjerome<br />
<br />
* [r23259] data/gramps.appdata.xml.in, po/update_po.py: 7110: Add<br />
AppData file<br />
<br />
2013-10-07 09:12 romjerome<br />
<br />
* [r23257] data/gramps.appdata.xml.in, po/update_po.py: 7110: Add<br />
AppData file<br />
<br />
2013-10-07 08:21 romjerome<br />
<br />
* [r23253] data/gramps.appdata.xml.in, po/POTFILES.in, setup.py:<br />
7110: Add AppData file</s><br />
<br />
<s>2013-10-05 16:38 romjerome<br />
<br />
* [r23248] gramps/plugins/lib/maps/geography.py: 7081:<br />
QuestionDialog module moved to gramps.gui.dialog</s><br />
<br />
<s>2013-10-02 08:17 romjerome<br />
<br />
* [r23239] gramps/plugins/export/exportxml.py: 7072: fix level for<br />
citationref into person</s><br />
<br />
2013-09-30 19:29 vassilii<br />
<br />
* [r23231] gramps/grampsapp.py: 7088: remove SDN version reporting<br />
<br />
Revert "7066: Reapply from trunk sdn version reporting"<br />
<br />
This reverts commit dc5f50175abcdaa41ff07eccc688af047bc877e9.<br />
<br />
<s>2013-09-30 17:41 nick-h<br />
<br />
* [r23228] gramps/gen/lib/calendar.py: 7066: Fix hebrew calendar<br />
and remove sdn import</s><br />
<br />
<s>2013-09-30 12:44 nick-h<br />
<br />
* [r23223] gramps/gui/configure.py, gramps/gui/spell.py: Move<br />
missing Gtk Spell warning</s><br />
<br />
<s>2013-09-30 11:45 vassilii<br />
<br />
* [r23220] gramps/gen/lib/calendar.py: 7088: rm warning on `import<br />
sdn' failure</s><br />
<br />
<s>2013-09-28 14:00 nick-h<br />
<br />
* [r23217] gramps/gen/config.py, gramps/gen/lib/calendar.py,<br />
gramps/gui/configure.py, gramps/gui/spell.py,<br />
gramps/plugins/gramplet/gramplet.gpr.py,<br />
gramps/plugins/view/geography.gpr.py: Revert change to suppress<br />
warnings</s><br />
<br />
<s>2013-09-28 00:00 vassilii<br />
<br />
* [r23215] gramps/gen/lib/date.py,<br />
gramps/plugins/drawreport/calendarreport.py,<br />
gramps/plugins/drawreport/statisticschart.py,<br />
gramps/plugins/textreport/birthdayreport.py,<br />
gramps/plugins/webreport/webcal.py: 7089: same bug in 3 more<br />
reports<br />
<br />
reapply r23214 from trunk</s><br />
<br />
<s>2013-09-26 22:05 vassilii<br />
<br />
* [r23208] gramps/plugins/webreport/webcal.py: 7089: webcal<br />
mistreats non-gregorian event dates</s><br />
<br />
<s>2013-09-26 21:52 paul-franklin<br />
<br />
* [r23206] gramps/gen/config.py, gramps/gen/lib/calendar.py,<br />
gramps/gui/configure.py: 7088: provide a config option to<br />
suppress the warning about missing "sdn"</s><br />
<br />
<s>2013-09-25 22:23 vassilii<br />
<br />
* [r23200] gramps/gen/proxy/proxybase.py: 7037: proxy crash with<br />
complex person filter</s><br />
<br />
<s>2013-09-25 15:51 vassilii<br />
<br />
* [r23198] gramps/gen/lib/test/date_test.py: friendlier test<br />
failure diags<br />
<br />
2013-09-25 14:50 vassilii<br />
<br />
* [r23196] gramps/gen/lib/test/date_test.py: skip MatchDateTest on<br />
non-English locales</s><br />
<br />
2013-09-25 11:11 vassilii<br />
<br />
* [r23192] gramps/gui/editors/editfamily.py: 6881: latin_american<br />
broken for partial families<br />
<br />
<s>2013-09-24 16:28 paul-franklin<br />
<br />
* [r23190] gramps/gen/datehandler/__init__.py: enable Arabic date<br />
handler in gramps40</s><br />
<br />
<s>2013-09-24 11:29 kulath<br />
<br />
* [r23188] gramps/plugins/webreport/narrativeweb.py: 0006802: In<br />
Narrative Web report most Family Maps are missing. Problem due to<br />
single apostrophe (closing single quotation mark) which needs to<br />
be escaped.</s><br />
<br />
<s>2013-09-23 15:56 vassilii<br />
<br />
* [r23183] gramps/gen/proxy/proxybase.py: 7037: proxy crash with<br />
complex person filter<br />
<br />
filter parameter shadowed the global filter :-)</s><br />
<br />
<s>2013-09-21 08:58 vassilii<br />
<br />
* [r23178] gramps/gen/lib/date.py: 7045: enable cal switch in<br />
editor on empty dates</s><br />
<br />
<s>2013-09-20 11:27 vassilii<br />
<br />
* [r23170] gramps/gui/logger/_errorreportassistant.py: 6940:<br />
ErrorReportAssistant_Test.test_buffer_recall<br />
<br />
reapply from trunk</s><br />
<br />
<s>2013-09-18 14:48 vassilii<br />
<br />
* [r23161] gramps/gen/utils/alive.py: 7063: endless loop in<br />
probably_alive_range<br />
<br />
Port from gramps34 branch my fix after retest by the bug<br />
submitter.<br />
<br />
Add a hack protection for descendants like we already have for<br />
ancestors, and add a debug printout.</s><br />
<br />
<s>2013-09-17 23:52 dsblank<br />
<br />
* [r23158] gramps/plugins/quickview/ageondate.py: AgeOnDate:<br />
backported changes that show reasoning for dead/alive status and<br />
age estimate</s><br />
<br />
<s>2013-09-17 18:58 vassilii<br />
<br />
* [r23156] gramps/gen/lib/date.py,<br />
gramps/gen/lib/test/date_test.py: 7034,7045,7065: back-merge my<br />
fixes from trunk<br />
<br />
Back-merge from trunk changes to date.py and date_test.py from<br />
the following commits (cumulative, clean apply).<br />
<br />
Tests pass (but need to block the CAL_FRENCH on date_test.py:199,<br />
because of bug# 7068 -- skipping it wasn't back-ported in this<br />
commit as it is about the fully fixed issues only!)<br />
<br />
commit fa49752824bd58802773439b35faa39f2d34b151 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sat Sep 14 15:44:04 2013<br />
+0000<br />
<br />
provide sensible defautls for all Date.set params<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23126<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 3f32597699f3b372324ad87e6f7a04abac6d19e7 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sat Sep 14 15:11:09 2013<br />
+0000<br />
<br />
7045: Setting an invalid date does not raise<br />
<br />
do the sanity checks on a separate date object, so that the<br />
uncertainty expressed with 0 d/m isn't removed<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23124<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 12edf7e97626e01931c4063b2d94bec3b299a2ed Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sat Sep 14 14:23:58 2013<br />
+0000<br />
<br />
7065: Calendar conversion broken for negative date<br />
<br />
fixed, repro steps work as expected now date_test still broken<br />
due to further blocking issues, see #7045<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23123<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 091d4461e9715ab06f1ef6ab3b67517d6608daf3 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sat Sep 14 13:24:40 2013<br />
+0000<br />
<br />
7045: Date.set on invalid date does not raise<br />
<br />
refactor _zero_adjust_ymd out of 3 cut-and-paste cases the bug<br />
with the code inside it remains -- the negative years should not<br />
be clamped to positive ones!!!!<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23122<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 5987046ac4cac407a4be506da9242f7a5000d878 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sat Sep 14 13:00:19 2013<br />
+0000<br />
<br />
7045: Date.set on invalid date does not raise<br />
<br />
Now it does, but another test breaks:<br />
<br />
Traceback (most recent call last): File<br />
"/usr/lib/python2.7/unittest/loader.py", line 252, in _find_tests<br />
module = self._get_module_from_name(name) File<br />
"/usr/lib/python2.7/unittest/loader.py", line 230, in<br />
_get_module_from_name __import__(name) File<br />
"/home/vassilii/Gramps/gramps/gen/lib/test/date_test.py", line<br />
136, in <module><br />
d.set(quality,modifier,calendar,(4,11,-90,False),"Text comment")<br />
File "/home/vassilii/Gramps/gramps/gen/lib/date.py", line 1600,<br />
in set format(original, value)) DateError: Invalid year -90<br />
passed in value (4, 11, -90, False)<br />
<br />
because the corresponding year gets adjusted from -90 to 1...<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23121<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit d8876cceb64629ce0a025ff714e4875768ab88a6 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sat Sep 14 11:50:58 2013<br />
+0000<br />
<br />
7034: fix test_copy_ymd_preserves_orig<br />
<br />
broken in r23083<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23120<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 7c163636c8e48149a5b09c211ff3dc146ebd84b2 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Tue Sep 10 17:19:16 2013<br />
+0000<br />
<br />
7034: add remove_stop_date parameter<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23083<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit b45e20da3bd67d864420f99cf59fbb9929c58851 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Mon Sep 9 19:31:13 2013<br />
+0000<br />
<br />
7034: probably_alive() failing when no birth-death<br />
<br />
further refactoring of set_.../set2_... common code added<br />
accessor get_stop_ymd analogous to get_ymd<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23068<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit f13a3fc23e7f0763c49e605b428b6a175c3f9eeb Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Mon Sep 9 19:31:00 2013<br />
+0000<br />
<br />
7034: probably_alive() failing when no birth-death<br />
<br />
docstring update<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23067<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 9ee312d7ed02520b99d2ca1b28f75c87846aa3c6 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:35:15 2013<br />
+0000<br />
<br />
refactor test<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23059<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 07ca997ebd885ad4d1b205907a00509099ac8f9a Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:23:23 2013<br />
+0000<br />
<br />
consistency between offset and non-offset setters<br />
<br />
added ugly parameter _update2 to set_yr_mon_day, needs<br />
refactoring<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23058<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 67a904c529642668fbe34bfc97ef2915278ecbdb Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:23:12 2013<br />
+0000<br />
<br />
fix set_yr_mon_day_offset for compound dates<br />
<br />
now calls set2_yr_mon_day_offset<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23057<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 3db06c36d6449ec75cde49b433349cddad40d596 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:23:02 2013<br />
+0000<br />
<br />
refactor set_yr_mon_day and set2_yr_mon_day<br />
<br />
refactor common base<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23056<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 4192680c72cc0028c22fa207fe3f1ff0940358b3 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:22:52 2013<br />
+0000<br />
<br />
raise DateError in set2_... if not is_compound()<br />
<br />
refactor Date to always use is_compound instead of repeating its<br />
logic everywhere<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23055<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 44195ede18c5a887d4440b4132bd5321f76ce5ff Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:22:40 2013<br />
+0000<br />
<br />
Add some UT for Date.set2_... and fix bugs<br />
<br />
Cut and paste is evil ;-) fix bugs before I refactor the code...<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23054<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 14f6e3a3f35e0ff7b67006bf4996ce63ae665098 Author: Vassilii<br />
Khachaturov <vassilii@tarunz.org> Date: Sun Sep 8 19:22:30 2013<br />
+0000<br />
<br />
7034: probably_alive() failing when no birth-death<br />
<br />
docstring fix<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23053<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd</s><br />
<br />
<s>2013-09-17 15:15 dsblank<br />
<br />
* [r23154] gramps/gen/utils/grampslocale.py: provide a default null<br />
handler for logging; rename locale debug with leading dot</s><br />
<br />
<s>2013-09-17 10:35 dsblank<br />
<br />
* [r23147] gramps/plugins/webreport/narrativeweb.py: 7069: Narrated<br />
Web Site media pages do not include multiple references</s><br />
<br />
<s>2013-09-16 21:39 kulath<br />
<br />
* [r23142] gramps/gen/filters/rules/citation/__init__.py,<br />
gramps/gen/filters/rules/citation/_hassourceidof.py,<br />
gramps/gen/filters/rules/citation/_regexpsourceidof.py,<br />
gramps/gui/filters/sidebar/_citationsidebarfilter.py,<br />
gramps/gui/views/treemodels/citationtreemodel.py,<br />
gramps/gui/views/treemodels/treebasemodel.py,<br />
gramps/plugins/view/citationtreeview.py: Fix citation filters so<br />
they no longer try to filter citations with a sources filter.<br />
Citation filter now allows specification of both source and<br />
citation data. When a citation is shown in a search or a filtered<br />
citation tree view, the corresponding source is also shown.</s><br />
<br />
<s>2013-09-15 03:01 dsblank<br />
<br />
* [r23136] gramps/gen/proxy/referencedbyselection.py: 6774:<br />
Recursive call in GEDCOM export preview calculation</s><br />
<br />
<s>2013-09-14 23:24 vassilii<br />
<br />
* [r23132] gramps/grampsapp.py: 7066: Reapply from trunk sdn<br />
version reporting<br />
<br />
Merged from commit dbae40dd1edad52023b828d5eef0fe7eb3684fb6<br />
Author: Vassilii Khachaturov <vassilii@tarunz.org> Date: Sat Sep<br />
14 19:42:48 2013 +0000<br />
<br />
7066: use sdn module from Calendar package on pypi<br />
<br />
Unfortunately, no package on ubuntu for sdn...<br />
<br />
Bug fixed on trunk, when sdn is present on the system. Verified<br />
that sdn roundtrip works. date_test now fails on<br />
1789-13-4(French) recognized as invalid, as it probably should --<br />
I guess this one is a test bug.<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23127<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
M gramps/gen/lib/calendar.py --->M gramps/grampsapp.py</s><br />
<br />
<s>2013-09-14 23:18 vassilii<br />
<br />
* [r23131] gramps/gen/lib/calendar.py: 7066: fix our algorithm<br />
based on jewish.c in sdn<br />
<br />
It looks like we had an earlier fork of the same code, and the<br />
upstream had some bugs fixed.</s><br />
<br />
<s>2013-09-14 23:18 vassilii<br />
<br />
* [r23130] gramps/gen/svn_revision.py: Cope with UnicodeDecodeError<br />
on git svn output<br />
<br />
2013-09-13 21:43 vassilii<br />
<br />
* [r23119] gramps/gen/svn_revision.py: add get_git_svn_revision and<br />
fall back to it<br />
<br />
reapply from trunk</s><br />
<br />
<s>2013-09-13 13:01 romjerome<br />
<br />
* [r23114] gramps/gen/const.py: wrap description on about dialog<br />
<br />
2013-09-13 10:46 romjerome<br />
<br />
* [r23113] docs/api.rst: 6028: gen module should be gramps.gen</s><br />
<br />
<s>2013-09-13 08:30 vassilii<br />
<br />
* [r23108] gramps/cli/test/user_test.py, gramps/gen/user.py,<br />
gramps/plugins/drawreport/ancestortree.py,<br />
gramps/plugins/drawreport/calendarreport.py,<br />
gramps/plugins/drawreport/timeline.py,<br />
gramps/plugins/importer/importcsv.py,<br />
gramps/plugins/textreport/birthdayreport.py,<br />
gramps/plugins/textreport/placereport.py,<br />
gramps/plugins/webreport/narrativeweb.py,<br />
gramps/plugins/webreport/webcal.py: 5098: refactor to use<br />
User.progress<br />
<br />
Re-apply the reverted commit now that the underlying problem in<br />
gramps/gui/user.py is fixed.</s><br />
<br />
<s>2013-09-13 08:08 vassilii<br />
<br />
* [r23107] gramps/gen/user.py: 7061: docstring update</s><br />
<br />
<s>2013-09-13 00:08 paul-franklin<br />
<br />
* [r23105] gramps/gen/datehandler/_date_ar.py, po/POTFILES.skip:<br />
add Arabic date handler to gramps40, for further testing</s><br />
<br />
<s>2013-09-12 21:30 vassilii<br />
<br />
* [r23103] gramps/gui/user.py: 7061: rename gui.user.User.progress<br />
to ._progress<br />
<br />
it shadowed the gen.user.User.progress (the context manager),<br />
breaking the ``with user.progress() ... as step:'' idiom!</s><br />
<br />
<s>2013-09-12 20:20 vassilii<br />
<br />
* [r23098] gramps/cli/test/user_test.py, gramps/gen/user.py,<br />
gramps/plugins/drawreport/ancestortree.py,<br />
gramps/plugins/drawreport/calendarreport.py,<br />
gramps/plugins/drawreport/timeline.py,<br />
gramps/plugins/importer/importcsv.py,<br />
gramps/plugins/textreport/birthdayreport.py,<br />
gramps/plugins/textreport/placereport.py,<br />
gramps/plugins/webreport/narrativeweb.py,<br />
gramps/plugins/webreport/webcal.py: Revert "5098: refactor to use<br />
User.progress"<br />
<br />
OOPS. This was tested only with "runtest.sh", but turns out<br />
things are broken with GUI :-) Reverting for now @gramps40, will<br />
investigate on trunk!</s><br />
<br />
<s>2013-09-12 19:50 vassilii<br />
<br />
* [r23097] gramps/plugins/drawreport/ancestortree.py,<br />
gramps/plugins/drawreport/calendarreport.py,<br />
gramps/plugins/drawreport/timeline.py,<br />
gramps/plugins/importer/importcsv.py,<br />
gramps/plugins/textreport/birthdayreport.py,<br />
gramps/plugins/textreport/placereport.py,<br />
gramps/plugins/webreport/narrativeweb.py,<br />
gramps/plugins/webreport/webcal.py: 5098: refactor old code to<br />
use User.progress<br />
<br />
Reapply from trunk. Now that #7061 is done, all the old code<br />
should no longer use User.begin_.../step_.../end_progress<br />
directly any more, preferring the context manager instead.</s><br />
<br />
<big>'''The only reject is on gramps/gen/merge/diff.py that doesn't have any progress callbacks on gramps40. I'm leaving it untouched.'''</big><br />
<br />
<s>2013-09-12 17:56 vassilii<br />
<br />
* [r23094] gramps/cli/test/user_test.py, gramps/gen/user.py: 7061:<br />
Add User.progress context manager<br />
<br />
reapply from trunk</s><br />
<br />
<s>2013-09-11 02:13 dsblank<br />
<br />
* [r23085] gramps/gen/proxy/living.py: living proxy did not exclude<br />
living people with iter_people()</s><br />
<br />
<s>2013-09-10 16:49 dsblank<br />
<br />
* [r23079] gramps/plugins/lib/libgedcom.py: Ignore meaningless<br />
@IDENT@ on CONT or CONC line as detailed at<br />
http://www.tamurajones.net/IdentCONT.xhtml</s><br />
<br />
<s>2013-09-10 12:42 vassilii<br />
<br />
* [r23078] gramps/cli/test/user_test.py, gramps/cli/user.py: 7013:<br />
strip underscores from accept/reject labels<br />
<br />
reapply from trunk</s><br />
<br />
<s>2013-09-10 10:09 dsblank<br />
<br />
* [r23075] gramps/gen/relationship.py: 7053: Narrated Website<br />
report crashes; check for family == None on lookup</s><br />
<br />
<s>2013-09-09 20:55 paul-franklin<br />
<br />
* [r23069] gramps/gen/config.py, gramps/gui/configure.py,<br />
gramps/gui/spell.py: enable suppression of minor missing-package<br />
warning (spell checking)</s><br />
<br />
<s>2013-09-09 15:31 noirauds<br />
<br />
* [r23065] gramps/plugins/view/geoplaces.py: Geography :<br />
bug#0006930 : incorrect string in geoplaces</s><br />
<br />
<s>2013-09-09 11:27 kulath<br />
<br />
* [r23062] gramps/gui/views/treemodels/treebasemodel.py: Fix error<br />
where displaying Date or Confidence in Citation Tree View gave<br />
AttributeError: 'NoneType' object has no attribute 'encode'</s><br />
<br />
<s>2013-09-07 09:36 romjerome<br />
<br />
* [r23050] docs/corecli/cli.rst: 6028: same change for cli (thank<br />
you Nick); still something wrong with my config (GrampsLocale<br />
init)</s><br />
<br />
<s>2013-09-06 23:09 nick-h<br />
<br />
* [r23048] docs/conf.py, docs/coregui/gui.rst, docs/date.rst,<br />
docs/gen/gen.rst, docs/gen/gen_db.rst, docs/gen/gen_display.rst,<br />
docs/gen/gen_lib.rst, docs/gen/gen_plug.rst,<br />
docs/gen/gen_proxy.rst, docs/gen/gen_utils.rst, docs/html.rst,<br />
docs/relationship.rst, docs/simple.rst: 6028: Fix imports for<br />
documentation generation</s><br />
<br />
2013-09-06 19:10 jralls<br />
<br />
* [r23047] gramps/gui/utils.py: [r23046]Bug 7040: 4.0.2 svn 23029M<br />
fails to start catastrophically<br />
<br />
2013-09-06 11:32 vassilii<br />
<br />
* [r23043] gramps/gui/utils.py: 7040: gramps40 svn fails to start<br />
catastrophically<br />
<br />
indentation fix<br />
<br />
<s>2013-09-06 09:25 romjerome<br />
<br />
* [r23042] docs/conf.py: 6028: try to update API(s) documentation</s><br />
<br />
<s>2013-09-05 22:46 nick-h<br />
<br />
* [r23040] gramps/gui/widgets/grampletpane.py: Fix bug listing<br />
gramplets already in gramplet bar</s><br />
<br />
<s>2013-09-05 08:32 vassilii<br />
<br />
* [r23038] gramps/gen/datehandler/test/datehandler_test.py: add<br />
__main__ for stand-alone test runs</s><br />
<br />
<s>2013-09-05 08:31 vassilii<br />
<br />
* [r23037] .get_packages_list.py: rm obsolete utility pre-gramps40<br />
file</s><br />
<br />
2013-09-04 14:06 jralls<br />
<br />
* [r23031] gramps/gui/utils.py: [r23030]Bug 7040: 4.0.2 svn 23029M<br />
fails to start catastrophically<br />
<br />
<s>2013-09-04 10:39 dsblank<br />
<br />
* [r23027] gramps/gen/lib/date.py: 7034 and 6965: missing method</s><br />
<br />
<s>2013-09-04 02:49 dsblank<br />
<br />
* [r23022] gramps/gen/lib/date.py, gramps/gen/utils/alive.py: 7034:<br />
probably_alive() failing when no birth-death dates specified;<br />
6965: Probably Alive fails when birth date is a range</s><br />
<br />
<s>2013-09-03 23:31 jralls<br />
<br />
* [r23020] gramps/gen/utils/grampslocale.py: [r20136]Change<br />
grampslocale logger to use __name__ instead of 'grampslocale'<br />
<br />
Attempt to suppress 'No handler for logger grampslocale' messages<br />
by enrolling the logger in the module hierarchy.</s><br />
<br />
2013-09-03 23:31 jralls<br />
<br />
* [r23019] gramps/gui/display.py, gramps/gui/utils.py:<br />
[r23015]Simplify display_url to just use htmlview or webbrowser<br />
<br />
<s>2013-09-03 23:30 jralls<br />
<br />
* [r23018] gramps/gen/relationship.py: [r23014]Avoid bogus rel-calc<br />
translation error message in C locale</s><br />
<br />
2013-09-03 23:30 jralls<br />
<br />
* [r23017] gramps/gui/utils.py: [r23013]minor cleanup<br />
<br />
<s>2013-09-03 17:44 jralls<br />
<br />
* [r23012] gramps/gen/utils/grampslocale.py: [r23011]Bug 7036:<br />
[Win32]Setting LANG crashes Gramps<br />
<br />
Also fixes Bug 6919: No automatic language selection in Windows<br />
Thanks to Helge Herz.</s><br />
<br />
2013-09-03 16:36 jralls<br />
<br />
* [r23010] gramps/gui/display.py, gramps/gui/utils.py: [r23009]Bug<br />
7017: Consolidate run_file into<br />
open_file_with_default_application<br />
<br />
<s>2013-09-01 13:04 dsblank<br />
<br />
* [r22996] gramps/webapp/empty.sql: Webapp: update empty.sql to<br />
latest db design<br />
<br />
2013-09-01 12:32 dsblank<br />
<br />
* [r22994] gramps/webapp/grampsdb/views.py: Webapp: search<br />
refinements<br />
<br />
2013-09-01 11:42 dsblank<br />
<br />
* [r22990] gramps/webapp/grampsdb/models.py,<br />
gramps/webapp/utils.py: Webapp: use cuni for python3<br />
compatibility</s><br />
<br />
2013-09-01 11:20 dsblank<br />
<br />
* [r22987] gramps/gen/simple/_simpletable.py: Use cuni rather than<br />
unicode<br />
<br />
2013-09-01 11:05 dsblank<br />
<br />
* [r22985] gramps/gui/views/treemodels/treebasemodel.py: 7025:<br />
issue with python3 and unicode string<br />
<br />
<s>2013-09-01 07:39 vassilii<br />
<br />
* [r22984] gramps/cli/test/cli_test.py,<br />
gramps/gen/test/config_test.py: clean up tmp test files in the<br />
end<br />
<br />
reapply from trunk</s><br />
<br />
2013-09-01 04:34 jralls<br />
<br />
* [r22982] gramps/gui/utils.py: [r22981]Fix misguided change to<br />
poll_external signature<br />
<br />
2013-09-01 02:34 dsblank<br />
<br />
* [r22979] gramps/gui/utils.py: 7025: 4.0.2 svn 22976M fails to<br />
start catastrophically<br />
<br />
<s>2013-09-01 02:12 dsblank<br />
<br />
* [r22978] gramps/webapp/grampsdb/views.py: Webapp: put .distinct()<br />
last to remove duplicate matches in queries<br />
<br />
2013-08-31 13:46 dsblank<br />
<br />
* [r22976] gramps/gen/simple/_simpletable.py,<br />
gramps/webapp/grampsdb/models.py, gramps/webapp/utils.py: Webapp<br />
changes to properly show unicode data in html</s><br />
<br />
<s>2013-08-31 10:15 nick-h<br />
<br />
* [r22973] gramps/gui/filters/sidebar/_citationsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_eventsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_placesidebarfilter.py,<br />
gramps/gui/filters/sidebar/_reposidebarfilter.py,<br />
gramps/gui/filters/sidebar/_sourcesidebarfilter.py: Remove<br />
tagging code introduced in error</s><br />
<br />
2013-08-30 22:43 vassilii<br />
<br />
* [r22971] gramps/gen/lib/src.py,<br />
gramps/gen/merge/mergecitationquery.py,<br />
gramps/plugins/tool/mergecitations.py: 6960: Error merging<br />
citations<br />
<br />
Reapply from trunk these commits: commit<br />
1594f61ea2dbd9eddb44a800c26f170ff5702491 Author: vassilii<br />
<vassilii@4ae1f11a-8b86-4847-b8af-ab372f36d1fd> Date: Fri Aug 30<br />
22:33:58 2013 +0000<br />
<br />
6960: Bless Source with an IndirectCitationBase<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22970<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
commit 6ec4b56d6530bd98638cb66365e6205d057f48ca Author: vassilii<br />
<vassilii@4ae1f11a-8b86-4847-b8af-ab372f36d1fd> Date: Fri Aug 30<br />
22:03:14 2013 +0000<br />
<br />
6960: mergecitations has broken copy of MCQ<br />
<br />
The MergeCitations batch tool had a cut-and-pasted code<br />
replicating MergeCitationQuery logic. Naturally, it diverged :-)<br />
Removed MergeCitations.Merge and use MergeCitationQuery instead.<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22969<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
<s>2013-08-30 20:34 nick-h<br />
<br />
* [r22967] gramps/gui/filters/sidebar/_citationsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_eventsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_familysidebarfilter.py,<br />
gramps/gui/filters/sidebar/_mediasidebarfilter.py,<br />
gramps/gui/filters/sidebar/_notesidebarfilter.py,<br />
gramps/gui/filters/sidebar/_personsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_placesidebarfilter.py,<br />
gramps/gui/filters/sidebar/_reposidebarfilter.py,<br />
gramps/gui/filters/sidebar/_sourcesidebarfilter.py: Fix regular<br />
expressions in sidebar filters</s><br />
<br />
2013-08-30 19:14 vassilii<br />
<br />
* [r22963] gramps/gen/lib/citation.py: Finish merging bug# 6960 fix<br />
from trunk<br />
<br />
I don't know why git diff didn't pick up citation.py :(<br />
<br />
<s>2013-08-30 19:00 vassilii<br />
<br />
* [r22962] gramps/gen/lib/citationbase.py,<br />
gramps/gen/lib/eventref.py, gramps/gen/lib/repo.py,<br />
gramps/gen/merge/test/merge_ref_test.py: 6960: Error merging<br />
citations<br />
<br />
Merge back to gramps40 my work on the bug fix.<br />
<br />
2013-08-30 19:00 vassilii<br />
<br />
* [r22961] gramps/gen/merge/test/merge_ref_test.py: flags<br />
HAS_CLIMERGE and HAS_EXPORTRAW to skip tests<br />
<br />
Reapply from trunk my commit r22948</s><br />
<br />
<s>2013-08-30 18:09 nick-h<br />
<br />
* [r22958] gramps/gui/widgets/grampletpane.py,<br />
gramps/plugins/gramplet/attributesgramplet.py,<br />
gramps/plugins/gramplet/gramplet.gpr.py, po/POTFILES.in: 6874:<br />
Use shorter names in add gramplet list. Remove old attributes<br />
gramplet.</s><br />
<br />
<s>2013-08-30 16:06 nick-h<br />
<br />
* [r22955] gramps/gui/editors/displaytabs/backreflist.py,<br />
gramps/gui/utils.py, gramps/plugins/gramplet/backlinks.py: 6786:<br />
Invoke editor on double-click in backlinks gramplet</s><br />
<br />
2013-08-29 23:31 jralls<br />
<br />
* [r22951] gramps/gui/editors/editmedia.py, gramps/gui/utils.py:<br />
[r22949]Bug 7017 GUI stuck when external viewer launched<br />
<br />
subprocess.checked_call seems to wait on the process that<br />
xdg-open starts, but subprocess.wait doesn't.<br />
<br />
<s>2013-08-29 23:31 jralls<br />
<br />
* [r22950] gramps/gen/utils/grampslocale.py: [r22842]Clean up some<br />
leftovers from 22841</s><br />
<br />
<s>2013-08-29 19:14 dsblank<br />
<br />
* [r22946] gramps/webapp/grampsdb/models.py,<br />
gramps/webapp/libdjango.py, gramps/webapp/settings.py,<br />
gramps/webapp/utils.py: Fix dbdjango to be up to date with bsddb<br />
of gramps40: added checksum for Media; SourceAttribute and<br />
CitationAttribute gained a private flag; all primary objects got<br />
tags</s><br />
<br />
<s>2013-08-29 18:06 kulath<br />
<br />
* [r22940] gramps/gui/selectors/selectcitation.py,<br />
gramps/gui/views/treemodels/citationtreemodel.py,<br />
gramps/gui/views/treemodels/treebasemodel.py,<br />
gramps/plugins/view/citationtreeview.py: 0006849:<br />
citationtreeview with search bar only searches in sources, not<br />
citation data 0006848: citationtreeview corrupts when search bar<br />
open and edit occurs 0006829: Searching into source/citation<br />
selector disallows to select all related citations, only matching<br />
rows<br />
<br />
by fixing treebasemodel so it properly deals with secondary<br />
objects, and also citationtreemodel so it adds secondary odes<br />
even when the parent is not present.</s><br />
<br />
<s>2013-08-29 16:20 vassilii<br />
<br />
* [r22937] gramps/gen/merge/mergecitationquery.py: 6960: error<br />
merging citations<br />
<br />
merge_ref_test still fails...<br />
<br />
2013-08-29 12:54 vassilii<br />
<br />
* [r22934] gramps/gui/test, gramps/gui/test/__init__.py,<br />
gramps/gui/test/user_test.py: Back-merge the UT for gui.user as<br />
well</s><br />
<br />
2013-08-29 12:44 vassilii<br />
<br />
* [r22933] gramps/cli/arghandler.py: 7021: pass ArgHandler.user to<br />
import_new_db<br />
<br />
reapply r22929 from trunk<br />
<br />
<s>2013-08-29 12:41 vassilii<br />
<br />
* [r22932] gramps/cli/arghandler.py, gramps/cli/argparser.py,<br />
gramps/cli/test/argparser_test.py, gramps/cli/test/user_test.py,<br />
gramps/cli/user.py, gramps/gen/const.py, gramps/gen/user.py,<br />
test/impex.sh: 7016: new cmdline switches -y/--yes and -q/--quiet<br />
<br />
reapply r22916 from trunk<br />
<br />
testing on gramps40: UT</s><br />
<br />
<s>2013-08-29 12:35 vassilii<br />
<br />
* [r22931] gramps/cli/test/user_test.py, gramps/cli/user.py,<br />
gramps/gen/test/user_test.py, gramps/gen/user.py,<br />
gramps/gui/user.py: 7013: Impl. User.prompt based on<br />
QuestionDialog2<br />
<br />
Reapply r22914 from trunk<br />
<br />
Unit tests pass</s><br />
<br />
<s>2013-08-29 01:19 dsblank<br />
<br />
* [r22928] gramps/webapp/utils.py: languages was set to a list;<br />
should be a :-separated string</s><br />
<br />
<s>2013-08-28 23:51 dsblank<br />
<br />
* [r22927] data/images, data/images/Web_Gender_Female.png,<br />
data/images/Web_Gender_Male.png, data/images/Web_Mainz_Bkgd.png,<br />
data/images/Web_Mainz_Header.png, data/images/Web_Mainz_Mid.png,<br />
data/images/Web_Mainz_MidLight.png, data/images/blank.gif,<br />
data/images/crosshairs.png, data/images/favicon.ico,<br />
data/images/favicon2.ico, data/images/gramps-geo-altmap.png,<br />
data/images/gramps-geo-birth.png,<br />
data/images/gramps-geo-death.png,<br />
data/images/gramps-geo-mainmap.png,<br />
data/images/gramps-geo-marriage.png,<br />
data/images/somerights20.gif, data/jhtmlarea,<br />
gramps/plugins/webstuff/jhtmlarea, gramps/webapp/urls.py: Move<br />
css, javascript and web images to data so that they can be found<br />
by webapp</s><br />
<br />
2013-08-28 23:34 nick-h<br />
<br />
* [r22925] gramps/gen/plug/utils.py, gramps/gui/configure.py,<br />
gramps/gui/displaystate.py, gramps/gui/plug/_windows.py,<br />
gramps/gui/utils.py, gramps/gui/viewmanager.py: 4735: Check for<br />
updates in a separate thread<br />
<br />
<s>2013-08-28 23:08 dsblank<br />
<br />
* [r22923] gramps/webapp/settings.py, gramps/webapp/shell.py:<br />
Changes for webapp to work with gramps40</s><br />
<br />
<s>2013-08-28 11:52 dsblank<br />
<br />
* [r22917] gramps/gen/filters/rules/person/_hasfamilyevent.py,<br />
gramps/gui/configure.py: 7020: Date filtering fails to work on<br />
Family Events in 3.4.6 or 4.0.2; typo, missing 'not'; changed<br />
date before and after max to be 9999</s><br />
<br />
2013-08-22 22:39 vassilii<br />
<br />
* [r22909] gramps/gen/constfunc.py: 7009: endless exception loop<br />
starting w/o DISPLAY<br />
<br />
constfunc.has_display() was using check_init(), which, on Gtk3,<br />
was happy to initalize even that the display was N/A. Amended the<br />
test with an attempt to actually get the Gdk default display.<br />
<br />
<s>2013-08-22 22:39 vassilii<br />
<br />
* [r22908] gramps/gen/test/constfunc_test.py: 7009: endless<br />
exception loop starting w/o DISPLAY<br />
<br />
Building testing ground for the bug investigation, after reading<br />
the grampsgui.py code...</s><br />
<br />
<s>2013-08-22 17:13 nick-h<br />
<br />
* [r22904] gramps/gui/editors/filtereditor.py,<br />
gramps/gui/filters/sidebar/_citationsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_eventsidebarfilter.py,<br />
gramps/gui/filters/sidebar/_mediasidebarfilter.py,<br />
gramps/gui/filters/sidebar/_personsidebarfilter.py,<br />
gramps/gui/widgets/__init__.py, gramps/gui/widgets/dateentry.py,<br />
po/POTFILES.skip: Add date validation to filters</s><br />
<br />
<s>2013-08-21 18:54 vassilii<br />
<br />
* [r22901] gramps/plugins/importer/importcsv.py: 6878: CLI<br />
import/export plugins broken w/o DISPLAY<br />
<br />
Replace a hardwired ProgressMeter with proper calls to User<br />
<br />
Tested with impex.sh with and without DISPLAY env</s><br />
<br />
2013-08-21 18:54 vassilii<br />
<br />
* [r22900] gramps/plugins/importer/importvcard.py: 6957: support<br />
gender in vcard import<br />
<br />
forgotten merge cleanup<br />
<br />
2013-08-21 17:24 vassilii<br />
<br />
* [r22899] gramps/gui/plug/_windows.py, gramps/gui/plug/tool.py,<br />
gramps/plugins/tool/changenames.py,<br />
gramps/plugins/tool/changetypes.py, gramps/plugins/tool/check.py,<br />
gramps/plugins/tool/eventnames.py,<br />
gramps/plugins/tool/extractcity.py,<br />
gramps/plugins/tool/mergecitations.py,<br />
gramps/plugins/tool/patchnames.py,<br />
gramps/plugins/tool/reorderids.py,<br />
gramps/plugins/tool/testcasegenerator.py: 6953: remove "undo<br />
history warning" under CLI<br />
<br />
Port my fix from gramps34. In addition, the Check tool now has a<br />
hardwired dependency on ProgressMeter. Make a nullifying mock<br />
locally and only set it to the real thing only under GUI.<br />
<br />
Tested with impex.sh (further stages after check still fail, see<br />
bug #6878).<br />
<br />
2013-08-21 17:24 vassilii<br />
<br />
* [r22898] gramps/grampsapp.py, gramps/gui/plug/__init__.py: action<br />
'tool' CLI handler broken w/o DISPLAY<br />
<br />
Preparing to port my fix for 6953: remove "undo history warning"<br />
when the BatchTool run from cli (e.g., "check") from gramps34,<br />
the ground state was worse in gramps40...<br />
<br />
<s>2013-08-21 16:55 paul-franklin<br />
<br />
* [r22896] gramps/gen/datehandler/__init__.py,<br />
gramps/gen/datehandler/_date_el.py, po/POTFILES.skip: add and<br />
enable Greek date handler (from Zissis Papadopoulos)</s><br />
<br />
<s>2013-08-21 07:32 vassilii<br />
<br />
* [r22890] gramps/gui/widgets/multitreeview.py: 6871: workaround<br />
gtk RTL bug in MultiTreeView<br />
<br />
optimizing cleanup<br />
<br />
2013-08-20 21:51 vassilii<br />
<br />
* [r22887] gramps/gui/plug/quick/_quicktable.py,<br />
gramps/gui/widgets/multitreeview.py: 6871: workaround gtk RTL bug<br />
in MultiTreeView<br />
<br />
Blend of Nick's and my fix for the bug.</s><br />
<br />
<s>2013-08-20 19:46 nick-h<br />
<br />
* [r22884] gramps/gen/datehandler/test,<br />
gramps/gen/datehandler/test/__init__.py,<br />
gramps/gen/datehandler/test/datehandler_test.py: Add datehandler<br />
unit test</s><br />
<br />
<s>2013-08-20 16:06 nick-h<br />
<br />
* [r22882] gramps/gui/plug/quick/_quicktable.py: 6871: Remove<br />
vertical grid lines for RTL display</s><br />
<br />
2013-08-15 22:08 nick-h<br />
<br />
* [r22871] gramps/gui/displaystate.py, gramps/gui/viewmanager.py,<br />
gramps/gui/widgets/statusbar.py: Simplify status bar and fix<br />
justification of filter status<br />
<br />
2013-08-14 22:43 paul-franklin<br />
<br />
* [r22868] gramps/plugins/lib/libtreebase.py: 6998: Descendant Tree<br />
Report crashes gramps 4.0.2 svn 22863M<br />
<br />
<s>2013-08-13 18:39 nick-h<br />
<br />
* [r22861] gramps/gen/filters/rules/_hasnoteregexbase.py: Fix bug<br />
in note filters</s><br />
<br />
<s>2013-08-13 18:23 nick-h<br />
<br />
* [r22858] gramps/gen/filters/rules/event/_hascitation.py: 6995:<br />
Fix bug in event citation filter<br />
<br />
2013-08-11 14:12 nick-h<br />
<br />
* [r22854] gramps/gen/filters/_filterparser.py: Automatic update<br />
for old rules using regular expressions</s><br />
<br />
<s>2013-08-11 13:32 vassilii<br />
<br />
* [r22851] gramps/plugins/export/exportgedcom.py: 6909: Gedcom<br />
export adds birth place/date in death<br />
<br />
_remaining_events method did the _dump_event_stats<br />
indiscriminately, even if the event in question was skipped<br />
during processing as a birth/death one. Moving the call into the<br />
_process_person_event thus aligning the logic with<br />
_remaining_events's docstring.</s><br />
<br />
2013-08-10 18:37 paul-franklin<br />
<br />
* [r22845] gramps/gui/plug/report/_graphvizreportdialog.py: give<br />
the graphvizdialog's format_str a more-unique name<br />
<br />
(to help distinguish it from the name displayer's format_str)<br />
<br />
<s>2013-08-09 22:19 jralls<br />
<br />
* [r22841] gramps/gen/utils/grampslocale.py: [r22840]Consolidate<br />
mslocales and self._lang_map<br />
<br />
into a single dict for easier maintenance<br />
<br />
Thanks to Paul Franklin for suggesting it</s><br />
<br />
<s>2013-08-09 21:36 nick-h<br />
<br />
* [r22838] gramps/gen/filters/rules/person/_hasnameof.py,<br />
gramps/gen/filters/rules/person/_regexpname.py: Remove redundant<br />
imports</s><br />
<br />
<s>2013-08-09 20:01 jralls<br />
<br />
* [r22836] gramps/gen/utils/cast.py: [r22833]Fix crash when Gramps<br />
is passed an invalid locale<br />
<br />
2013-08-09 20:01 jralls<br />
<br />
* [r22835] gramps/gen/utils/grampslocale.py: [r22832]Ensure en_US<br />
encoding is UTF-8</s><br />
<br />
<s>2013-08-09 20:01 jralls<br />
<br />
* [r22834] gramps/gen/utils/grampslocale.py:<br />
[r22831]GrampsLocale:Add Greek and English to MSlocales</s><br />
<br />
<s>2013-08-09 17:31 nick-h<br />
<br />
* [r22829] gramps/gen/filters/rules/person/_hasnameof.py,<br />
gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py:<br />
Convert old rules to use regular expression code in the base<br />
class</s><br />
<br />
<s>2013-08-09 14:06 nick-h<br />
<br />
* [r22827] gramps/gen/filters/rules/family/__init__.py,<br />
gramps/gen/filters/rules/family/_childhasidof.py,<br />
gramps/gen/filters/rules/family/_childregexpidof.py,<br />
gramps/gen/filters/rules/family/_fatherhasidof.py,<br />
gramps/gen/filters/rules/family/_fatherregexpidof.py,<br />
gramps/gen/filters/rules/family/_motherhasidof.py,<br />
gramps/gen/filters/rules/family/_motherregexpidof.py,<br />
po/POTFILES.in: Combine three new rules with existing rules</s><br />
<br />
<s>2013-08-08 22:51 nick-h<br />
<br />
* [r22822] gramps/gen/filters/rules/__init__.py,<br />
gramps/gen/filters/rules/_hasattributebase.py,<br />
gramps/gen/filters/rules/_hasnoteregexbase.py,<br />
gramps/gen/filters/rules/_regexpidbase.py,<br />
gramps/gen/filters/rules/citation/__init__.py,<br />
gramps/gen/filters/rules/citation/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/citation/_matchespagesubstringof.py,<br />
gramps/gen/filters/rules/citation/_regexpidof.py,<br />
gramps/gen/filters/rules/event/__init__.py,<br />
gramps/gen/filters/rules/event/_hascitation.py,<br />
gramps/gen/filters/rules/event/_hasdata.py,<br />
gramps/gen/filters/rules/event/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/event/_regexpidof.py,<br />
gramps/gen/filters/rules/family/__init__.py,<br />
gramps/gen/filters/rules/family/_childregexpidof.py,<br />
gramps/gen/filters/rules/family/_fatherregexpidof.py,<br />
gramps/gen/filters/rules/family/_hascitation.py,<br />
gramps/gen/filters/rules/family/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/family/_motherregexpidof.py,<br />
gramps/gen/filters/rules/family/_regexpidof.py,<br />
gramps/gen/filters/rules/media/__init__.py,<br />
gramps/gen/filters/rules/media/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/media/_regexpidof.py,<br />
gramps/gen/filters/rules/note/__init__.py,<br />
gramps/gen/filters/rules/note/_hasnote.py,<br />
gramps/gen/filters/rules/note/_matchesregexpof.py,<br />
gramps/gen/filters/rules/note/_regexpidof.py,<br />
gramps/gen/filters/rules/person/__init__.py,<br />
gramps/gen/filters/rules/person/_hasbirth.py,<br />
gramps/gen/filters/rules/person/_hasdeath.py,<br />
gramps/gen/filters/rules/person/_hasfamilyattribute.py,<br />
gramps/gen/filters/rules/person/_hasfamilyevent.py,<br />
gramps/gen/filters/rules/person/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/person/_regexpidof.py,<br />
gramps/gen/filters/rules/person/_regexpname.py,<br />
gramps/gen/filters/rules/place/__init__.py,<br />
gramps/gen/filters/rules/place/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/place/_regexpidof.py,<br />
gramps/gen/filters/rules/repository/__init__.py,<br />
gramps/gen/filters/rules/repository/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/repository/_matchesnamesubstringof.py,<br />
gramps/gen/filters/rules/repository/_regexpidof.py,<br />
gramps/gen/filters/rules/source/__init__.py,<br />
gramps/gen/filters/rules/source/_hasnoteregexp.py,<br />
gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py,<br />
gramps/gen/filters/rules/source/_matchestitlesubstringof.py,<br />
gramps/gen/filters/rules/source/_regexpidof.py, po/POTFILES.in:<br />
Add regular expressions to rules</s><br />
<br />
<s>2013-08-08 13:01 nick-h<br />
<br />
* [r22820] gramps/gen/db/dictionary.py: python3 fix</s><br />
<br />
<s>2013-08-08 12:45 nick-h<br />
<br />
* [r22818] gramps/plugins/export/test/exportvcard_test.py: Fix for<br />
Windows line separator</s><br />
<br />
<s>2013-08-07 23:25 nick-h<br />
<br />
* [r22815] gramps/gen/filters/rules/event/__init__.py,<br />
gramps/gen/filters/rules/event/_matchesplacefilter.py,<br />
gramps/gui/editors/filtereditor.py, po/POTFILES.in: 6950: Add new<br />
rule for events with places matching filter</s><br />
<br />
<s>2013-08-07 08:20 vassilii<br />
<br />
* [r22812] gramps/plugins/docgen/cairodoc.py: comment/docstring<br />
fixes<br />
<br />
2013-08-06 22:26 vassilii<br />
<br />
* [r22810] gramps/plugins/docgen/cairodoc.py,<br />
gramps/plugins/docgen/docgen.gpr.py,<br />
gramps/plugins/docgen/pdfdoc.py,<br />
gramps/plugins/docgen/psdrawdoc.py,<br />
gramps/plugins/lib/libcairodoc.py, po/POTFILES.in,<br />
po/POTFILES.skip, test/runtest.sh: 6883: non-Western fonts broken<br />
in PS reports<br />
<br />
Port my fix from gramps34 branch. Ditches old PSDrawDoc code,<br />
instead we have a common backend for PDF and PS generation using<br />
Cairo. Added bonus: PS is now an available backend for text<br />
reports, too!</s><br />
<br />
<s>2013-08-06 22:25 vassilii<br />
<br />
* [r22809] .gitignore: Added tags file</s><br />
<br />
<s>2013-08-06 18:47 nick-h<br />
<br />
* [r22806] gramps/plugins/export/test/exportvcard_test.py,<br />
gramps/plugins/importer/test/importvcard_test.py: Convert VCard<br />
unit tests to use ElementTree</s><br />
<br />
<s>2013-08-05 18:35 nick-h<br />
<br />
* [r22800] gramps/gui/widgets/grampletbar.py: 6969: Connect to<br />
switch-page signal after the initial gramplets have been added</s><br />
<br />
<s>2013-08-03 16:46 nick-h<br />
<br />
* [r22793] gramps/gen/db/test/cursor_test.py: Close database files<br />
before removing them</s><br />
<br />
<s>2013-08-01 20:45 nick-h<br />
<br />
* [r22791] gramps/gen/utils/test/place_test.py: Add unit test for<br />
latitide/longitude conversion<br />
<br />
2013-07-31 20:11 nick-h<br />
<br />
* [r22788] gramps/gen/utils/test/callback_test.py: Convert callback<br />
test to use assert methods<br />
<br />
2013-07-31 18:21 nick-h<br />
<br />
* [r22786] setup.py: Add command to run unit tests from setup.py</s><br />
<br />
<s>2013-07-31 16:47 nick-h<br />
<br />
* [r22784] gramps/gui/logger/test,<br />
gramps/gui/logger/test/__init__.py,<br />
gramps/gui/logger/test/rotate_handler_test.py,<br />
test/GrampsLogger/RotateLogger_Test.py: Move rotate handler test</s><br />
<br />
<s>2013-07-30 22:06 nick-h<br />
<br />
* [r22782] gramps/gen/db/test/cursor_test.py,<br />
gramps/gen/db/test/grampsdbtestbase.py,<br />
gramps/gen/db/test/reference_map_test.py,<br />
gramps/gen/lib/test/merge_test.py: Unit test python3 fixes<br />
<br />
2013-07-30 19:59 nick-h<br />
<br />
* [r22780] gramps/gen/lib/test/date_test.py: Fix date unit test<br />
<br />
2013-07-30 16:58 nick-h<br />
<br />
* [r22778] gramps/plugins/export/test/exportvcard_test.py,<br />
gramps/plugins/importer/test/importvcard_test.py: Remove<br />
superfluous console output in unit tests<br />
<br />
2013-07-30 16:51 nick-h<br />
<br />
* [r22776] gramps/plugins/export/exportvcard.py: Remove redundant<br />
import</s><br />
<br />
2013-07-30 15:10 vassilii<br />
<br />
* [r22774] gramps/gen/recentfiles.py, gramps/gui/displaystate.py:<br />
6663: RecentFiles.do_save() doesn't do XML escape<br />
<br />
ported my fix from gramps34, changes to gtk3 negligible<br />
<br />
<s>2013-07-30 00:20 nick-h<br />
<br />
* [r22771] gramps/gen/merge/test/__init__.py,<br />
gramps/gen/merge/test/merge_ref_test.py: Fix merge ref unit test<br />
<br />
2013-07-29 16:52 nick-h<br />
<br />
* [r22769] test/RunAllTests.py: Fix bug in unit test script</s><br />
<br />
<s>2013-07-29 16:34 nick-h<br />
<br />
* [r22767] gramps/gen/db/test/cursor_test.py,<br />
gramps/gen/db/test/grampsdbtestbase.py,<br />
gramps/gen/db/test/reference_map_test.py,<br />
test/GrampsDb/Cursor_Test.py, test/GrampsDb/GrampsDbBase_Test.py,<br />
test/GrampsDb/GrampsDbTestBase.py: Fix and move db unit tests</s><br />
<br />
<s>2013-07-29 16:28 romjerome<br />
<br />
* [r22765] debian/changelog, debian/control: .deb package more<br />
compliant according to Debian policy</s><br />
<br />
<s>2013-07-29 08:53 vassilii<br />
<br />
* [r22763] gramps/plugins/export/exportvcard.py,<br />
gramps/plugins/importer/importvcard.py: 6957: VCF export/import<br />
should support [x-]gender<br />
<br />
port from gramps34</s><br />
<br />
<s>2013-07-28 18:54 nick-h<br />
<br />
* [r22760] gramps/gen/db/test/__init__.py,<br />
gramps/gen/db/test/db_test.py: Convert db unit test to use<br />
unittest module<br />
<br />
2013-07-28 18:10 nick-h<br />
<br />
* [r22758] gramps/gen/utils/test/keyword_test.py,<br />
gramps/test/utils_test.py: Fix and move keyword unit test<br />
<br />
2013-07-28 17:33 nick-h<br />
<br />
* [r22756] gramps/gen/test, gramps/gen/test/__init__.py,<br />
gramps/gen/test/config_test.py, gramps/test/config_test.py: Fix<br />
and move config unit test<br />
<br />
2013-07-28 16:20 nick-h<br />
<br />
* [r22754] gramps/cli/test, gramps/cli/test/__init__.py,<br />
gramps/cli/test/cli_test.py, gramps/test/gramps_cli_test.py: Fix<br />
and move CLI unit test<br />
<br />
2013-07-28 14:57 nick-h<br />
<br />
* [r22752] gramps/gen/lib/test/__init__.py,<br />
gramps/gen/lib/test/grampstype_test.py,<br />
gramps/gen/lib/test/merge_test.py,<br />
gramps/gen/utils/test/__init__.py,<br />
gramps/gen/utils/test/callback_test.py,<br />
gramps/plugins/export/test/__init__.py,<br />
gramps/plugins/export/test/exportvcard_test.py,<br />
gramps/plugins/importer/test/__init__.py,<br />
gramps/plugins/importer/test/importvcard_test.py: Fix unit tests<br />
<br />
2013-07-28 14:21 nick-h<br />
<br />
* [r22750] gramps/cli/user.py: 6954: Output command line messages<br />
and progress information to stderr rather than stdout<br />
<br />
2013-07-28 13:50 vassilii<br />
<br />
* [r22746] test/impex.sh: 6951: import/export test suite runner<br />
broken<br />
<br />
Ported from gramps34 my commits r22744,5. Adjusted for gramps40<br />
path layout changes.</s><br />
<br />
2013-07-26 19:12 paul-franklin<br />
<br />
* [r22738] gramps/gen/db/upgrade.py: 6946: global name 'UNITYPE' is<br />
not defined - can't open old database<br />
<br />
2013-07-24 19:11 paul-franklin<br />
<br />
* [r22735] gramps/gui/widgets/monitoredwidgets.py: show more LDS<br />
temples on the screen<br />
<br />
2013-07-24 16:27 paul-franklin<br />
<br />
* [r22732] gramps/gen/plug/docgen/graphdoc.py: 6872: wrong size of<br />
svg image in Family Lines Graph<br />
<br />
<s>2013-07-24 06:23 vassilii<br />
<br />
* [r22729] test/GrampsDb/Cursor_Test.py,<br />
test/GrampsDb/GrampsDbBase_Test.py,<br />
test/GrampsDb/GrampsDbTestBase.py,<br />
test/GrampsLogger/ErrorReportAssistant_Test.py,<br />
test/GrampsLogger/GtkHandler_Test.py,<br />
test/GrampsLogger/RotateLogger_Test.py,<br />
test/LosHawlos_bsddbtest.py, test/LosHawlos_dbtest.py,<br />
test/RelLib/RelLib_Test.py, test/RunAllTests.py: Reviving<br />
RunAllTests.py on gramps40/trunk<br />
<br />
Porting from gramps34 my fix for 6935, 6937, 6938.<br />
<br />
Import with full "gramps." qualification from the tests, to<br />
overcome the relative import problem (see bug# 6938 for context).<br />
<br />
All testing code has been adjusted to the filename and paths<br />
changes since gramps34. Same as on gramps34, one test fails<br />
still, will investigate if it is a test or a code bug: ERROR:<br />
test_buffer_recall<br />
(ErrorReportAssistant_Test.ErrorReportAssistantTest) Test that<br />
simple recall of messages works.<br />
----------------------------------------------------------------------<br />
Traceback (most recent call last): File<br />
"./GrampsLogger/ErrorReportAssistant_Test.py", line 60, in<br />
test_buffer_recall rotate_handler=rh) File<br />
"../gramps/gui/logger/_errorreportassistant.py", line 81, in<br />
__init__ self.build_page1() File<br />
"../gramps/gui/logger/_errorreportassistant.py", line 267, in<br />
build_page1 self._reset_error_details() File<br />
"../gramps/gui/logger/_errorreportassistant.py", line 178, in<br />
_reset_error_details self._error_detail.get_record()))<br />
AttributeError: 'str' object has no attribute 'get_record'</s><br />
<br />
2013-07-24 00:01 paul-franklin<br />
<br />
* [r22727] gramps/cli/argparser.py: CLI --config values should be<br />
enterable in gramps.ini form (e.g. 0 or 1)<br />
<br />
<s>2013-07-22 21:03 vassilii<br />
<br />
* [r22721] gramps/plugins/rel/rel_ru.py: 6936: spelling and other<br />
fixes in RU rel calc</s><br />
<br />
2013-07-22 12:00 vassilii<br />
<br />
* [r22716] gramps/gen/const.py, gramps/gui/grampsgui.py: 6932:<br />
check for broken GTK install on linux only<br />
<br />
<s>2013-07-21 20:48 paul-franklin<br />
<br />
* [r22712] gramps/gen/utils/cast.py, po/POTFILES.in,<br />
po/POTFILES.skip: add the missing import to the 3139 fix I added,<br />
sigh</s><br />
<br />
<s>2013-07-21 20:24 jralls<br />
<br />
* [r22711] gramps/gen/utils/grampslocale.py: [r22710]GrampsLocale:<br />
Don't set to 'C' if LANG is en_US<br />
<br />
Not required, Gtk has an 'en' translation<br />
<br />
Ref. http://www.gramps-project.org/bugs/view.php?id=6867</s><br />
<br />
2013-07-21 20:04 paul-franklin<br />
<br />
* [r22708] gramps/gen/utils/cast.py: 3139: boolean command line<br />
options have to be specified as foo=true ...<br />
<br />
The solution was suggested by Doug Blank.<br />
<br />
<s>2013-07-21 19:28 jralls<br />
<br />
* [r22706] gramps/gen/plug/report/_paper.py: [r22705]Bug 6928:<br />
Windows: If LANG not equal en_GB Graphic Reports<br />
<br />
in some cases produce empty PDF sheets or force graphviz to crash<br />
<br />
Problem was due to calling localized float() when parsing a<br />
C-locale xml file</s><br />
<br />
<s>2013-07-21 11:08 vassilii<br />
<br />
* [r22703] gramps/plugins/docgen/rtfdoc.py: 2974: .rtf docgen<br />
doesn't escape backslashes</s><br />
<br />
2013-07-21 06:57 vassilii<br />
<br />
* [r22700] gramps/plugins/importer/importxml.py, po/ar.po,<br />
<br />
<s>2013-07-20 16:33 vassilii<br />
<br />
* [r22697] gramps/plugins/docgen/rtfdoc.py: 6884: RTF reports<br />
broken for intl chars<br />
<br />
Re-applied my fix from trunk</s><br />
<br />
2013-07-16 17:21 vassilii<br />
<br />
* [r22691] gramps/plugins/tool/notrelated.py: 6915: not related<br />
tool treats siblings as not rel.<br />
<br />
Applied patch from ennoborg, thanks! (merge from trunk)<br />
<br />
<s>2013-07-16 11:21 vassilii<br />
<br />
* [r22686] test/runtest.sh: 6923: runtest.sh broken in<br />
gramps40/trunk<br />
<br />
Merged fix from trunk: Fixed the file locations to work for the<br />
gramps40/trunk layout.<br />
<br />
Also porting my fix from gramps34 branch for 6837: runtest.sh<br />
runs some reports that no longer exist<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22684<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd</s><br />
<br />
2013-07-16 11:20 vassilii<br />
<br />
* [r22685] gramps/gui/grampsgui.py: 6867: warn on gtk translation<br />
missing<br />
<br />
Merge the fix from trunk: Give a dev-oriented warning on console<br />
and pop up a UI warning dialog for the user, when an inconsistent<br />
translation configuration is detected between gramps and gtk<br />
(happens when a langpack is missing on Ubuntu systems, e.g.)<br />
<br />
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22683<br />
4ae1f11a-8b86-4847-b8af-ab372f36d1fd<br />
<br />
2013-07-15 18:37 paul-franklin<br />
<br />
* [r22681] gramps/plugins/export/exportpkg.py: 6922: Export gpkg<br />
crashes in svn 22654M<br />
<br />
2013-07-14 12:25 noirauds<br />
<br />
* [r22679] gramps/gui/plug/_guioptions.py: Bug #6917 : Gtk2 to Gtk3<br />
port of colorsel to get_color_selection()<br />
<br />
<s>2013-07-13 20:56 paul-franklin<br />
<br />
* [r22677] gramps/gen/datehandler/_date_fi.py: revert the Finnish<br />
date-format change (remove the four I added)<br />
<br />
2013-07-13 20:02 paul-franklin<br />
<br />
* [r22674] gramps/gen/datehandler/_date_fi.py: correct the Finnish<br />
date-format choices (add the other four)<br />
<br />
2013-07-13 18:00 paul-franklin<br />
<br />
* [r22671] gramps/gen/datehandler/_date_bg.py,<br />
gramps/gen/datehandler/_date_ca.py,<br />
gramps/gen/datehandler/_date_cs.py,<br />
gramps/gen/datehandler/_date_da.py,<br />
gramps/gen/datehandler/_date_de.py,<br />
gramps/gen/datehandler/_date_es.py,<br />
gramps/gen/datehandler/_date_fi.py,<br />
gramps/gen/datehandler/_date_fr.py,<br />
gramps/gen/datehandler/_date_hr.py,<br />
gramps/gen/datehandler/_date_it.py,<br />
gramps/gen/datehandler/_date_lt.py,<br />
gramps/gen/datehandler/_date_nb.py,<br />
gramps/gen/datehandler/_date_nl.py,<br />
gramps/gen/datehandler/_date_pl.py,<br />
gramps/gen/datehandler/_date_pt.py,<br />
gramps/gen/datehandler/_date_ru.py,<br />
gramps/gen/datehandler/_date_sk.py,<br />
gramps/gen/datehandler/_date_sl.py,<br />
gramps/gen/datehandler/_date_sr.py,<br />
gramps/gen/datehandler/_date_sv.py,<br />
gramps/gen/datehandler/_date_uk.py,<br />
gramps/gen/datehandler/_datedisplay.py,<br />
gramps/gen/datehandler/_datehandler.py,<br />
gramps/gen/datehandler/_dateparser.py,<br />
gramps/gen/datehandler/_dateutils.py: added and/or clarified<br />
various date handler comments<br />
<br />
also slightly reformatted a few date handler lines and fixed one<br />
(locale-specific) date handler typo<br />
<br />
2013-07-09 01:31 paul-franklin<br />
<br />
* [r22666] gramps/gen/datehandler/_date_sr.py: standardize date<br />
handler's internal argument names, for easier comparisons</s><br />
<br />
2013-07-08 21:52 paul-franklin<br />
<br />
* [r22663] gramps/plugins/lib/librecords.py: ignore bad Record<br />
Gramplet/Report data (the data-verification tool catches them)<br />
<br />
<s>2013-07-08 01:44 paul-franklin<br />
<br />
* [r22656] gramps/gen/lib/date.py: Span maximums and minimums must<br />
always be positive numbers</s><br />
<br />
<s>2013-07-05 18:08 noirauds<br />
<br />
* [r22654] gramps/plugins/lib/maps/cairoprint.py: Geography : add<br />
Id property to cairoprint.py<br />
<br />
2013-07-05 17:30 noirauds<br />
<br />
* [r22651] gramps/plugins/lib/maps/cairoprint.py,<br />
gramps/plugins/lib/maps/geography.py,<br />
gramps/plugins/view/geoclose.py,<br />
gramps/plugins/view/geoevents.py,<br />
gramps/plugins/view/geofamclose.py,<br />
gramps/plugins/view/geofamily.py,<br />
gramps/plugins/view/geomoves.py,<br />
gramps/plugins/view/geoperson.py,<br />
gramps/plugins/view/geoplaces.py: Geography : add printing<br />
functionality for all geography views.</s><br />
<br />
<s>2013-07-03 20:23 dsblank<br />
<br />
* [r22646] gramps/plugins/export/exportxml.py: Undo changes for<br />
6878</s><br />
<br />
2013-07-03 12:54 dsblank<br />
<br />
* [r22644] gramps/cli/clidbman.py: 6081: Crash after double-click<br />
on .gpkg file<br />
<br />
<s>2013-07-03 01:09 dsblank<br />
<br />
* [r22641] gramps/plugins/export/exportxml.py: 6878: Running CLI<br />
options when DISPLAY not set barfs</s><br />
<br />
2013-07-01 16:59 paul-franklin<br />
<br />
* [r22637] gramps/plugins/graph/gvrelgraph.py: 6818: Enable<br />
Relationships support on RelationshipGraph (GraphViz)<br />
<br />
2013-07-01 08:42 bmcage<br />
<br />
* [r22635] gramps/gui/widgets/styledtexteditor.py: GTK3 wants to<br />
deprecate unicode menu<br />
<br />
2013-06-30 17:51 paul-franklin<br />
<br />
* [r22632] gramps/plugins/drawreport/calendarreport.py,<br />
gramps/plugins/quickview/all_relations.py,<br />
gramps/plugins/quickview/siblings.py: make sure relationship<br />
calculator's relationships are in the UI language<br />
<br />
2013-06-30 15:52 bmcage<br />
<br />
* [r22631] gramps/gui/widgets/validatedmaskedentry.py: 6807:<br />
validatedmaskedentry: no attribute '_block_changed'<br />
<br />
<s>2013-06-30 13:41 bmcage<br />
<br />
* [r22629] gramps/gui/widgets/grampletbar.py: GTK3: make sure menu<br />
shows up</s><br />
<br />
2013-06-30 07:54 bmcage<br />
<br />
* [r22626] gramps/gui/widgets/styledtexteditor.py: GTK 3.9 removes<br />
unicode-menu<br />
<br />
<s>2013-06-28 17:53 paul-franklin<br />
<br />
* [r22623] gramps/gen/config.py, gramps/gui/configure.py,<br />
gramps/plugins/gramplet/gramplet.gpr.py,<br />
gramps/plugins/view/geography.gpr.py: enable suppression of two<br />
minor missing-package warnings</s><br />
<br />
<s>2013-06-27 13:08 nick-h<br />
<br />
* [r22617] gramps/plugins/gramplet/recordsgramplet.py: 6841: Fix<br />
RTL text style bug</s><br />
<br />
<s>2013-06-25 22:10 bmcage<br />
<br />
* [r22609] gramps/gui/views/treemodels/treebasemodel.py: 6848:<br />
citationtreeview corrupts when search bar open and edit occurs</s><br />
<br />
2013-06-25 22:07 bmcage<br />
<br />
* [r22608] gramps/gui/views/listview.py: In case of errors with<br />
fg_color, enormous amount of error messages. This patch grabs<br />
wrong fg_color, and skips action, avoiding the error messages.<br />
Error goes to debug.<br />
<br />
2013-06-25 22:06 bmcage<br />
<br />
* [r22607] gramps/gui/displaystate.py: avoid critical gdk error by<br />
processing events only when window visible : Gdk-CRITICAL **:<br />
gdk_error_trap_pop_internal: assertion `trap != NULL' failed<br />
<br />
<s>2013-06-24 19:30 paul-franklin<br />
<br />
* [r22597] test/GrampsDb/Cursor_Test.py,<br />
test/GrampsDb/GrampsDbBase_Test.py,<br />
test/GrampsDb/GrampsDbTestBase.py,<br />
test/GrampsLogger/ErrorReportAssistant_Test.py,<br />
test/GrampsLogger/GtkHandler_Test.py,<br />
test/GrampsLogger/RotateLogger_Test.py,<br />
test/LosHawlos_bsddbtest.py, test/LosHawlos_dbtest.py,<br />
test/RelLib/RelLib_Test.py, test/RunAllTests.py, test/dates.sh,<br />
test/det_ancestor_report.sh, test/det_descendant_report.sh,<br />
test/impex.sh, test/runtest.sh, test/tools.sh: added GPL<br />
"boilerplate", SVN properties, and SVN Id line as needed</s><br />
<br />
2013-06-24 18:14 vassilii<br />
<br />
* [r22595] gramps/cli/plug/__init__.py: 6838: report cli crash<br />
ignoring unknown param<br />
<br />
Port my fix from gramps34<br />
<br />
<s>2013-06-24 18:14 jralls<br />
<br />
* [r22594] mac/Info.plist, mac/gramps.modules: Update for<br />
Gramps-4.0.1</s><br />
<br />
<s>2013-06-24 12:23 vassilii<br />
<br />
* [r22589] gramps/gui/utilscairo.py: std propset for a new file.</s><br />
<br />
<s>2013-06-24 12:12 vassilii<br />
<br />
* [r22588] gramps/gui/utilscairo.py,<br />
gramps/gui/widgets/fanchart.py: 4571: RTL support in fanchart<br />
<br />
Merge my work on trunk to gramps40 now that 4.0.1 is out, as this<br />
fix is targeted for 4.0.2.</s><br />
<br />
== some dev-only language ==<br />
<br />
We don't really tell the regular users much about the proxies in the manual, they're a technical detail behind the scenes. While this is appropriate in the NEWS for those browsing the source code, I wonder if we need this news item on the wiki? [[User:BACbKA|BACbKA]] ([[User talk:BACbKA|talk]]) 03:26, 8 November 2013 (MST)</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Brief_introduction_to_Git&diff=47138Brief introduction to Git2013-11-07T23:41:09Z<p>BACbKA: /* Applying a fix to another branch */</p>
<hr />
<div>The development source code of Gramps is stored in the Git repository at SourceForge.<br />
<br />
;[http://git.code.sf.net/p/gramps/source/ http://git.code.sf.net/p/gramps/source/]. <br />
<br />
This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably want to do one of two things with Git: either download the latest source or the development version, or else upload your changes (if you have write access to the repository) or [[Brief_introduction_to_SVN#Making_a_patchfile|make a patchfile]] (if you don't have write access).<br />
<br />
== Obtaining a copy of the Gramps repository ==<br />
<br />
Install Git on your system.<br />
* Debian/Ubuntu: <code>apt-get install git</code><br />
* Fedora: <code>yum install git-core</code><br />
<br />
Git includes your name and email address in commits. To configure them, use the following commands: <br />
git config --global user.name "John Smith"<br />
git config --global user.email john@example.com <br />
<br />
To obtain a copy of the Gramps repository, type the following in the command line if you '''don't have a sourceforge account''': <code><br />
git clone <nowiki>http://git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You should see the downloading progress reported in your terminal.<br />
<br />
If you have a SourceForge account, use ssh instead:<code><br />
git clone <nowiki>ssh://<username>@git.code.sf.net/p/gramps/source</nowiki> Gramps</code><br />
<br />
You will need a [http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SSH Key] in order to authenticate using this method.<br />
<br />
== Basic Work Flow ==<br />
<br />
The basic work flow after you've checked out the repository is update, develop, commit, update again, push.<br />
To update the current branch, run<br />
<br />
git pull --rebase<br />
<br />
As a general rule ''always'' use <tt>git pull --rebase</tt> to avoid creating unnecessary merge commits. Note that one must have no uncommitted edits when running <tt>git pull</tt>.<br />
<br />
To commit your changes locally, use the following command:<br />
<br />
git commit<br />
<br />
Which will bring up the default $EDITOR to create a commit message. If you are fixing a bug, the first line of the commit message should be the bug number and title, otherwise a brief statement of purpose. Skip a line and describe what you did.<br />
<br />
* All developers should read Gramps [[Committing policies]]<br />
<br />
If the commit is a minor change that can be described entirely in the subject, you can instead use:<br />
<br />
git commit -am "message describing the nature of the change"<br />
<br />
Try to keep your commits digestible and understandable. A large changeset can be broken into several commits that "tell a story" about how the changeset moves the program from its old behavior to its new one.<br />
<br />
To push your changes to the Gramps repository, you need to have cloned the Gramps source code with ssh, and have push access to the Gramps repository (the Gramps admins can give you this, [[Contact|Brian Matherly or Benny Malengier]]). First update again to make sure that you can fast-forward the repository, then push:<br />
<br />
git pull --rebase<br />
git push<br />
<br />
Since uploading is a potentially dangerous operation, most people do not obtain write access to the git repository. In this case, create a new bug on the [http://bugs.gramps-project.org bug tracker] and attach a patch to it. See the [[Brief_introduction_to_Git#Making_a_patchfile|make a patchfile]] section for details.<br />
<br />
If someone else has made changes that interfere with yours, you will get a conflict error when you pull. You will have to resolve that conflict and re-commit (you can use <tt>git commit --amend</tt> if it affects only the last ''unpushed'' commit) before git will push successfully.<br />
<br />
:Also see: [[Getting started with Gramps Trunk]].<br />
<br />
== Types of branches ==<br />
When you clone the Gramps repository, a branch called ''master'' will be created for you. This contains the latest development version of Gramps. Gramps maintains different branches in several categories:<br />
<br />
* ''master'' - There is only one ''master'' branch. All new feature and most bug-fix development happens in the ''master'' branch. New releases never come from the ''master'' branch.<br />
<br />
* ''maintenance'' - There are many maintenance branches, though usually only one or two are active. A maintenance branch is created from the ''master'' branch when all the features for a release are complete. New features are not committed to maintenance branches. Releases only come from active maintenance branches; a branch is no longer active when no further releases are planned for it. Inactive branches should not have any changes committed to them. The purpose of maintenance branches is to allow the line of code to stabilize while new features are added in the ''master'' branch. In order to prevent regressions (fixed bugs reoccurring in later releases), it is a "best practice" to fix bugs on the master branch and then to backport them to the current maintenance branches.<br />
<br />
* ''geps'' - These are meant for development of [[Portal:Enhancement_Proposals|Gramps Enhancement Proposals]]. Most of the time GEPS are developed in the ''master'' branch. 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. ''geps'' 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 />
Tags are created for each Gramps release. 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 the ''master'' branch and are ready for release. A new maintenance branch is created from the ''master'' branch named 8.4 (or possibly 9.0 depending on the nature of the new features). New features continue to be added in the ''master'' branch 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 />
<br />
There are several versions of the Gramps source code in Git. The development branch for small changes and bug fixes is ''maintenance/gramps{{stable_branch}}''.<br />
<br />
By default, the remote server you cloned the Gramps repository from is called ''origin''.<br />
<br />
To see a list of branches on the server, type:<br />
<br />
git show remote origin<br />
<br />
To create a local branch which tracks a branch on the server, use:<br />
<br />
git checkout -b gramps40 origin/maintenance/gramps40<br />
<br />
This is known as a "tracking" branch.<br />
<br />
To list the available branches, type:<br />
<br />
git branch<br />
<br />
The current branch is marked by an asterisk.<br />
<br />
To switch to another branch, type:<br />
<br />
git checkout <branch><br />
<br />
=== Where for bugs? ===<br />
<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 />
<br />
If you do not have push 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 tell how to make a patchfile against the ''master'' branch, 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 />
First create a new branch to work in:<br />
<br />
git checkout -b fix<br />
<br />
Then use your favorite editor to change whatever file(s) you want. Add the files you have changed to the staging area and commit them.<br />
<br />
Obtain the latest changes from the server.<br />
<br />
git checkout master<br />
git pull --rebase<br />
<br />
Next, rebase your fix again the ''master'' branch. This will ensure that your patch will apply cleanly.<br />
<br />
git rebase master fix<br />
<br />
This will leave you in the fix branch.<br />
<br />
Finally, create a patchfile, using:<br />
<br />
git format-patch master --stdout > fix.patch<br />
<br />
You now have a patchfile that can be sent by email, or attached to a bug report. The patch can be applied using the 'git apply' command.<br />
<br />
== Working with development branches ==<br />
<br />
Creating branches with Git is quick and easy.<br />
<br />
Here is a quick crib sheet:<br />
<br />
=== Creating a branch ===<br />
<br />
To create a branch from the ''master'' branch:<br />
<br />
git checkout master<br />
git branch gep-014-fab-feature<br />
<br />
To make this branch available on the server use:<br />
<br />
git push origin gep-014-fab-feature<br />
<br />
=== Merging changes from the branch back into the ''master'' branch ===<br />
<br />
When you are ready to merge your changes back into the ''master'' branch:<br />
<br />
git checkout master<br />
git merge gep-014-fab-feature<br />
git push<br />
<br />
=== Removing branches ===<br />
<br />
It is important that branches are removed once they have been merged into the trunk or have been abandoned. To remove a branch:<br />
<br />
git branch -d gep-014-fab-feature<br />
<br />
To remove a branch from the server, use:<br />
<br />
git push origin :gep-014-fab-feature<br />
<br />
The developers reserve the right to remove branches that have been dormant for more than 1 year.<br />
<br />
=== Applying a fix to another branch ===<br />
<br />
If you write a fix for the master branch, you may need to also apply it to a maintenance branch.<br />
<br />
To apply a commit from the a branch to a maintenance branch:<br />
git checkout gramps40<br />
git cherry-pick fix<br />
<br />
Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to push your changes.<br />
<br />
If you apply a small fix that applies cleanly to another branch, it can be done like this (assuming you've just committed the fix to master in a single commit):<br />
git checkout gramps40<br />
git diff master^ master | git apply<br />
If `git apply' fails, nothing will be changed in the working copy, and you can try to resolve the conflicts by cherry-picking, or manually saving the diff result, using the "patch" program, and resolving the conflicts.<br />
<br />
=== Workflow ===<br />
<br />
Before switching to another branch it is useful to remove untracked files created by the build process. You can do this with the following command:<br />
<br />
git clean -dxf<br />
<br />
== Useful Tips ==<br />
<br />
=== Getting help ===<br />
<br />
Git has excellent man pages. You can view the manual page for a Git command, by using one of the following:<br />
<br />
git help <verb><br />
git <verb> --help<br />
man git-<verb><br />
<br />
For example, to get help on the 'git log' command, type:<br />
<br />
git help log<br />
<br />
=== Some procedural recommendations ===<br />
<br />
# Always do 'git pull' before pushing changes to the server. If necessary get advice about handling conflicts.<br />
# Always do 'git status' and look for staged files that are unexpected or unintended. This is a *very important* sanity check. <br />
<br />
;And here are a couple of incidental suggestions<br />
<br />
* avoid grouping unrelated changes; better to divide into separate commits for the following reasons: a better log entry; easier troubleshooting/reverting. (and probably more).<br />
<br />
* similar to above, it may be better to make small incremental changes than one big one (if possible). Interim changes should not introduce breakage, of course. For instance, if you change code in gramps/ and do associated translation changes in po/, you might want to commit the changes in po/ in a commit following the commit(s) with the changes in gramps/.<br />
<br />
* logs are important -- please give some thought to the log message. All developers should read the [[Committing policies]].<br />
<br />
== Browse Git ==<br />
<br />
An alternative to the command line tools to view the Git repository is the [http://git.code.sf.net/p/gramps/source/ online interface].<br />
<br />
== git2cl ==<br />
<br />
The Gramps project does not keep a ChangeLog file under source control. All change history is captured by git automatically when it is committed. A ChangeLog file is generated from the git commit logs before each release using [[Brief_introduction_to_SVN#How_to_use_git2cl|git2cl]]. Developers should take care to make useful commit log messages when committing changes to git. Please read the [[Committing policies]] for details.<br />
<br />
=== How to use git2cl ===<br />
<br />
Starting with Gramps 3.0.0, we no longer have a <tt>ChangeLog</tt> file. <br />
<br />
Instead, the list of changes is generated automatically using the standard <tt>git2cl</tt> script.<br />
<br />
Note that <tt>git2cl</tt> is not included in the base installation of Git. With a Debian-based distro such as Ubuntu, you can get <tt>git2cl</tt> as follows:<br />
<br />
sudo apt-get install git2cl<br />
<br />
There typically are two <tt>ChangeLog</tt> files needed for releases; one in the main directory, and one in the <tt>po</tt> directory. You can generate these files with the following commands:<br />
<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog<br />
git log gramps-4.0.1.. --pretty --numstat --summary --no-merges -- po | git2cl > po/ChangeLog<br />
<br />
== External links ==<br />
<br />
*[http://git-scm.com/ Git]<br />
*[http://git-scm.com/book Git Book]<br />
*[https://git.wiki.kernel.org/index.php/GitSvnCrashCourse GitSvnCrashCourse]<br />
*[http://sourceforge.net/p/forge/documentation/SSH%20Keys/ SourceForge SSH Keys]<br />
<br />
[[Category:Developers/General|B]]</div>BACbKAhttps://www.gramps-project.org/wiki/index.php?title=Talk:Committing_policies&diff=47137Talk:Committing policies2013-11-07T23:34:42Z<p>BACbKA: /* git commit summary length limit */ new section</p>
<hr />
<div>I'd like to see a paragraph discussing who may commit and how authorization to commit is acquired.<br />
<br />
== git commit summary length limit ==<br />
<br />
Git commit summary preferred length is 50 chars; with a 4-digit bug#, a colon, and a space, that leaves 46 chars for the summary, which is, sometimes, longer than the mantis bug summary. I propose we explicitly say we should adher to the git limit here and summarize it shorter than in mantis if needed; extra words can be put into the commit detailed description. [[User:BACbKA|BACbKA]] ([[User talk:BACbKA|talk]]) 16:34, 7 November 2013 (MST)</div>BACbKA