Replace intltool with gettext tools

The build now requires gettext v0.19.7 or above.

Removed obsolete files:
  * gramps.applications
  * gramps.keys
  * gramps.mime

Created ITS rules for holidays.xml and tips.xml files.

Included ITS files for shared-mime-info from a gettext v0.20.2
installation.
This commit is contained in:
Nick Hall 2020-08-21 22:27:23 +01:00
parent 3ca82e2ebc
commit 60f1866292
20 changed files with 303 additions and 670 deletions

3
.gitignore vendored
View File

@ -7,9 +7,6 @@ build/
dist/ dist/
# Gramps # Gramps
data/tips.xml
data/holidays.xml
po/.intltool-merge-cache
docs/_build/ docs/_build/
# Editing # Editing

View File

@ -22,9 +22,6 @@ recursive-include test *
recursive-include windows * recursive-include windows *
# Remove files created in the build # Remove files created in the build
exclude data/tips.xml
exclude data/holidays.xml
exclude po/.intltool-merge-cache
global-exclude *.pyc global-exclude *.pyc
global-exclude *.pyo global-exclude *.pyo

View File

@ -1,7 +0,0 @@
gramps
command=gramps
name=GRAMPS
can_open_multiple_files=false
expects_uris=false
requires_terminal=false
mime_types=application/x-gramps,application/x-gedcom,application/x-gramps-package,application/x-gramps-xml,application/x-geneweb

View File

@ -1,13 +1,13 @@
[Desktop Entry] [Desktop Entry]
_Name=Gramps Name=Gramps
_GenericName=Genealogy System GenericName=Genealogy System
_X-GNOME-FullName=Gramps Genealogy System X-GNOME-FullName=Gramps Genealogy System
_Comment=Manage genealogical information, perform genealogical research and analysis Comment=Manage genealogical information, perform genealogical research and analysis
Icon=gramps Icon=gramps
Terminal=false Terminal=false
Type=Application Type=Application
StartupNotify=true StartupNotify=true
Categories=GTK;Office; Categories=GTK;Office;
_Keywords=Genealogy;Family History;Research;Family Tree;GEDCOM; Keywords=Genealogy;Family History;Research;Family Tree;GEDCOM;
MimeType=application/x-gramps;application/x-gedcom;application/x-gramps-package;application/x-gramps-xml; MimeType=application/x-gramps;application/x-gedcom;application/x-gramps-package;application/x-gramps-xml;
Exec=gramps %F Exec=gramps %F

View File

@ -1,54 +0,0 @@
application/x-gramps:
_description=Gramps database
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
short_list_application_ids_for_intermediate_user_level=gramps
short_list_application_ids_for_advanced_user_level=gramps
category=Documents/Genealogy
icon-filename=/usr/share/gramps/gramps.png
open=gramps %f
application/x-gramps-package:
_description=Gramps package
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
short_list_application_ids_for_intermediate_user_level=gramps
short_list_application_ids_for_advanced_user_level=gramps
category=Documents/Genealogy
icon-filename=/usr/share/gramps/gramps.png
open=gramps %f
application/x-gramps-xml:
_description=Gramps XML database
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
short_list_application_ids_for_intermediate_user_level=gramps
short_list_application_ids_for_advanced_user_level=gramps
category=Documents/Genealogy
icon-filename=/usr/share/gramps/gramps.png
open=gramps %f
application/x-gedcom:
_description=GEDCOM
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
short_list_application_ids_for_intermediate_user_level=gramps
short_list_application_ids_for_advanced_user_level=gramps
category=Documents/Genealogy
icon-filename=/usr/share/gramps/gramps.png
open=gramps %f
application/x-geneweb:
_description=GeneWeb
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
short_list_application_ids_for_intermediate_user_level=gramps
short_list_application_ids_for_advanced_user_level=gramps
category=Documents/Genealogy
icon-filename=/usr/share/gramps/gramps.png
open=gramps %f

View File

@ -1,14 +0,0 @@
application/x-gramps
ext: grdb
application/x-gramps-xml
ext: gramps
application/x-gramps-package
ext: gpkg
application/x-gedcom
ext: ged gedcom GED GEDCOM
application/x-geneweb
ext: gw GW

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<calendar> <calendar>
<country _name="Bulgaria"> <country name="Bulgaria">
<date name="Нова Година" value="*/1/1" type="national" /> <date name="Нова Година" value="*/1/1" type="national" />
<date name="Освобождение на България от Османско иго" value="*/3/3" type="national" /> <date name="Освобождение на България от Османско иго" value="*/3/3" type="national" />
<date name="Ден на труда" value="*/5/1" type="national" /> <date name="Ден на труда" value="*/5/1" type="national" />
@ -49,7 +49,7 @@
<date name="Възнесение господне" value="2011/6/2" type="religious" /> <date name="Възнесение господне" value="2011/6/2" type="religious" />
<date name="Възнесение господне" value="2012/5/24" type="religious" /> <date name="Възнесение господне" value="2012/5/24" type="religious" />
</country> </country>
<country _name="Canada"> <country name="Canada">
<date name="New Year's Day" value="*/1/1" type="national" /> <date name="New Year's Day" value="*/1/1" type="national" />
<date name="Groundhog Day" value="*/2/2" type="secular" /> <date name="Groundhog Day" value="*/2/2" type="secular" />
<date name="Valentine's Day" value="*/2/14" type="secular" /> <date name="Valentine's Day" value="*/2/14" type="secular" />
@ -81,7 +81,7 @@
<date name="Christmas" value="*/12/25" type="national" /> <date name="Christmas" value="*/12/25" type="national" />
<date name="Boxing Day" value="*/12/26" type="national" /> <date name="Boxing Day" value="*/12/26" type="national" />
</country> </country>
<country _name="Chile"> <country name="Chile">
<date name="Año nuevo" value="*/1/1" type="national" /> <date name="Año nuevo" value="*/1/1" type="national" />
<date name="Viernes Santo" value="2007/4/6" type="religious" /> <date name="Viernes Santo" value="2007/4/6" type="religious" />
<date name="Viernes Santo" value="2008/3/21" type="religious" /> <date name="Viernes Santo" value="2008/3/21" type="religious" />
@ -104,10 +104,10 @@
<date name="Inmaculada Concepción" value="*/12/8" type="religious" /> <date name="Inmaculada Concepción" value="*/12/8" type="religious" />
<date name="Navidad" value="*/12/25" type="national" /> <date name="Navidad" value="*/12/25" type="national" />
</country> </country>
<country _name="China"> <country name="China">
<date name="Chinese New Year" value="2006/1/29" type="national" /> <date name="Chinese New Year" value="2006/1/29" type="national" />
</country> </country>
<country _name="Croatia"> <country name="Croatia">
<date name="Nova godina" value="*/1/1" type="national" /> <date name="Nova godina" value="*/1/1" type="national" />
<date name="Sveta tri kralja" value="*/1/6" type="national" /> <date name="Sveta tri kralja" value="*/1/6" type="national" />
<date name="Uskrs" value="> easter(y)" type="national" /> <date name="Uskrs" value="> easter(y)" type="national" />
@ -123,7 +123,7 @@
<date name="Božić" value="*/12/25" type="national" /> <date name="Božić" value="*/12/25" type="national" />
<date name="Sveti Stjepan" value="*/12/26" type="national" /> <date name="Sveti Stjepan" value="*/12/26" type="national" />
</country> </country>
<country _name="Czech Republic"> <country name="Czech Republic">
<date name="Nový rok" value="*/1/1" type="national" /> <date name="Nový rok" value="*/1/1" type="national" />
<date name="Den obnovy samostatného českého státu" value="*/1/1" type="national" /> <date name="Den obnovy samostatného českého státu" value="*/1/1" type="national" />
<date name="Velikonoce" type="religious" value="> easter(y)" /> <date name="Velikonoce" type="religious" value="> easter(y)" />
@ -138,7 +138,7 @@
<date name="1. svátek vánoční" value="*/12/25" type="national" /> <date name="1. svátek vánoční" value="*/12/25" type="national" />
<date name="2. svátek vánoční" value="*/12/26" type="national" /> <date name="2. svátek vánoční" value="*/12/26" type="national" />
</country> </country>
<country _name="England"> <country name="England">
<date name="New Year's Day" value="*/1/1" type="national" /> <date name="New Year's Day" value="*/1/1" type="national" />
<date name="Bank Holiday" value="*/1/1" offset="+1" if="dow(y, m, d) == 7" type="national" /> <date name="Bank Holiday" value="*/1/1" offset="+1" if="dow(y, m, d) == 7" type="national" />
<date name="Bank Holiday" value="*/1/1" offset="+2" if="dow(y, m, d) == 6" type="national" /> <date name="Bank Holiday" value="*/1/1" offset="+2" if="dow(y, m, d) == 6" type="national" />
@ -168,7 +168,7 @@
<date name="Armistice Day" value="*/11/11" type="secular" /> <date name="Armistice Day" value="*/11/11" type="secular" />
<date name="Remembrance Sunday" value="*/2/sun/nov" type="secular" /> <date name="Remembrance Sunday" value="*/2/sun/nov" type="secular" />
</country> </country>
<country _name="Finland"> <country name="Finland">
<date name="Loppiainen" value="*/1/6" type="religious" if="not(y>=1973)" /> <date name="Loppiainen" value="*/1/6" type="religious" if="not(y>=1973)" />
<date name="Loppiainen" value="*/1/6" offset="sat" type="religious" if="(y>=1973) and not(y>=1992)" /> <date name="Loppiainen" value="*/1/6" offset="sat" type="religious" if="(y>=1973) and not(y>=1992)" />
<date name="Loppiainen" value="*/1/6" type="religious" if="(y>=1992)" /> <date name="Loppiainen" value="*/1/6" type="religious" if="(y>=1992)" />
@ -262,7 +262,7 @@
<date name="Jean Sibeliuksen päivä" value="*/12/8" type="national" if="(y>=2011)" /> <date name="Jean Sibeliuksen päivä" value="*/12/8" type="national" if="(y>=2011)" />
<date name="Uudenvuodenaatto" value="*/12/31" type="national" if="(y>=1846)" /> <date name="Uudenvuodenaatto" value="*/12/31" type="national" if="(y>=1846)" />
</country> </country>
<country _name="France"> <country name="France">
<date name="Jour de l'an" value="*/1/1" type="national" /> <date name="Jour de l'an" value="*/1/1" type="national" />
<date name="Fête du travail" value="*/5/1" type="national" /> <date name="Fête du travail" value="*/5/1" type="national" />
<date name="Victoire 1945" value="*/5/8" type="national" /> <date name="Victoire 1945" value="*/5/8" type="national" />
@ -298,7 +298,7 @@
<date name="début Ramadan" value="2016/06/08" type="religious" /> <date name="début Ramadan" value="2016/06/08" type="religious" />
<date name="Saint Étienne (Alsace/Moselle)" value="*/12/26" type="religious" /> <date name="Saint Étienne (Alsace/Moselle)" value="*/12/26" type="religious" />
</country> </country>
<country _name="Germany"> <country name="Germany">
<date name="Neujahr" type="national" value="*/1/1" /> <date name="Neujahr" type="national" value="*/1/1" />
<date name="Hl. Drei Könige BW,BY,ST" type="religious" value="*/1/6" /> <date name="Hl. Drei Könige BW,BY,ST" type="religious" value="*/1/6" />
<date name="Karfreitag" type="religious" value="> easter(y)" offset="-2" /> <date name="Karfreitag" type="religious" value="> easter(y)" offset="-2" />
@ -315,7 +315,7 @@
<date name="1. Weihnachtsfeiertag" type="religious" value="*/12/25" /> <date name="1. Weihnachtsfeiertag" type="religious" value="*/12/25" />
<date name="2. Weihnachtsfeiertag" type="religious" value="*/12/26" /> <date name="2. Weihnachtsfeiertag" type="religious" value="*/12/26" />
</country> </country>
<country _name="Japan"> <country name="Japan">
<date name="元日" value="*/1/1" /> <date name="元日" value="*/1/1" />
<date name="成人の日" value="*/2/mon/jan" /> <date name="成人の日" value="*/2/mon/jan" />
<date name="建国記念の日" value="*/2/11" /> <date name="建国記念の日" value="*/2/11" />
@ -338,37 +338,37 @@
<date name="天皇(明仁)即位記念" value="1990/11/12" /> <date name="天皇(明仁)即位記念" value="1990/11/12" />
<date name="皇太子徳仁親王の結婚" value="1993/6/9" /> <date name="皇太子徳仁親王の結婚" value="1993/6/9" />
</country> </country>
<country _name="Jewish Holidays"> <country name="Jewish Holidays">
<date _name="Purim" value="> passover(y)" offset="-30"/> <date name="Purim" value="> passover(y)" offset="-30"/>
<date _name="Passover" value="> passover(y)" offset="0"/> <date name="Passover" value="> passover(y)" offset="0"/>
<date _name="2 of Passover" value="> passover(y)" offset="1"/> <date name="2 of Passover" value="> passover(y)" offset="1"/>
<date _name="3 of Passover" value="> passover(y)" offset="2"/> <date name="3 of Passover" value="> passover(y)" offset="2"/>
<date _name="4 of Passover" value="> passover(y)" offset="3"/> <date name="4 of Passover" value="> passover(y)" offset="3"/>
<date _name="5 of Passover" value="> passover(y)" offset="4"/> <date name="5 of Passover" value="> passover(y)" offset="4"/>
<date _name="6 of Passover" value="> passover(y)" offset="5"/> <date name="6 of Passover" value="> passover(y)" offset="5"/>
<date _name="7 of Passover" value="> passover(y)" offset="6"/> <date name="7 of Passover" value="> passover(y)" offset="6"/>
<date _name="Shavuot" value="> passover(y)" offset="50"/> <date name="Shavuot" value="> passover(y)" offset="50"/>
<date _name="Rosh Ha'Shana" value="> passover(y)" offset="163"/> <date name="Rosh Ha'Shana" value="> passover(y)" offset="163"/>
<date _name="Rosh Ha'Shana 2" value="> passover(y)" offset="164"/> <date name="Rosh Ha'Shana 2" value="> passover(y)" offset="164"/>
<date _name="Yom Kippur" value="> passover(y)" offset="172"/> <date name="Yom Kippur" value="> passover(y)" offset="172"/>
<date _name="Sukot" value="> passover(y)" offset="177"/> <date name="Sukot" value="> passover(y)" offset="177"/>
<date _name="2 of Sukot" value="> passover(y)" offset="178"/> <date name="2 of Sukot" value="> passover(y)" offset="178"/>
<date _name="3 of Sukot" value="> passover(y)" offset="179"/> <date name="3 of Sukot" value="> passover(y)" offset="179"/>
<date _name="4 of Sukot" value="> passover(y)" offset="180"/> <date name="4 of Sukot" value="> passover(y)" offset="180"/>
<date _name="5 of Sukot" value="> passover(y)" offset="181"/> <date name="5 of Sukot" value="> passover(y)" offset="181"/>
<date _name="6 of Sukot" value="> passover(y)" offset="182"/> <date name="6 of Sukot" value="> passover(y)" offset="182"/>
<date _name="7 of Sukot" value="> passover(y)" offset="183"/> <date name="7 of Sukot" value="> passover(y)" offset="183"/>
<date _name="Simhat Tora" value="> passover(y)" offset="184"/> <date name="Simhat Tora" value="> passover(y)" offset="184"/>
<date _name="Hanuka" value="> hanuka(y)" offset="0"/> <date name="Hanuka" value="> hanuka(y)" offset="0"/>
<date _name="2 of Hanuka" value="> hanuka(y)" offset="1"/> <date name="2 of Hanuka" value="> hanuka(y)" offset="1"/>
<date _name="3 of Hanuka" value="> hanuka(y)" offset="2"/> <date name="3 of Hanuka" value="> hanuka(y)" offset="2"/>
<date _name="4 of Hanuka" value="> hanuka(y)" offset="3"/> <date name="4 of Hanuka" value="> hanuka(y)" offset="3"/>
<date _name="5 of Hanuka" value="> hanuka(y)" offset="4"/> <date name="5 of Hanuka" value="> hanuka(y)" offset="4"/>
<date _name="6 of Hanuka" value="> hanuka(y)" offset="5"/> <date name="6 of Hanuka" value="> hanuka(y)" offset="5"/>
<date _name="7 of Hanuka" value="> hanuka(y)" offset="6"/> <date name="7 of Hanuka" value="> hanuka(y)" offset="6"/>
<date _name="8 of Hanuka" value="> hanuka(y)" offset="7"/> <date name="8 of Hanuka" value="> hanuka(y)" offset="7"/>
</country> </country>
<country _name="New Zealand"> <country name="New Zealand">
<date value="*/1/1" type="national" name="New Year's Day"/> <date value="*/1/1" type="national" name="New Year's Day"/>
<date value="*/1/2" type="national" name="Day After New Year's Day"/> <date value="*/1/2" type="national" name="Day After New Year's Day"/>
<date value="*/1/1" type="national" offset="+1" name="New Years Day Holiday" if="dow(y, m, d) == 7"/> <date value="*/1/1" type="national" offset="+1" name="New Years Day Holiday" if="dow(y, m, d) == 7"/>
@ -384,7 +384,7 @@
<date value="*/dec/25" type="national" offset="+2" name="Christmas Day Holiday" if="dow(y, m, d) > 5"/> <date value="*/dec/25" type="national" offset="+2" name="Christmas Day Holiday" if="dow(y, m, d) > 5"/>
<date value="*/dec/26" type="national" offset="+2" name="Boxing Day Holiday" if="dow(y, m, d) > 5"/> <date value="*/dec/26" type="national" offset="+2" name="Boxing Day Holiday" if="dow(y, m, d) > 5"/>
</country> </country>
<country _name="Russia"> <country name="Russia">
<date value="*/1/7" type="religious" name="Рождество Христово" /> <date value="*/1/7" type="religious" name="Рождество Христово" />
<date value="*/1/19" type="religious" name="Крещение Господне" /> <date value="*/1/19" type="religious" name="Крещение Господне" />
<date value="*/2/23" type="national" name="День защитника" /> <date value="*/2/23" type="national" name="День защитника" />
@ -397,7 +397,7 @@
<date value="*/11/4" type="national" name="День народного единства" /> <date value="*/11/4" type="national" name="День народного единства" />
<date value="*/12/31" offset="+2" type="national" name="Новый год" /> <date value="*/12/31" offset="+2" type="national" name="Новый год" />
</country> </country>
<country _name="Serbia"> <country name="Serbia">
<date value="*/1/1" type="national" name="Нова Година" /> <date value="*/1/1" type="national" name="Нова Година" />
<date value="*/1/7" type="religious" name="Божић" /> <date value="*/1/7" type="religious" name="Божић" />
<date value="*/2/15" type="national" name="Дан државности Србије" /> <date value="*/2/15" type="national" name="Дан државности Србије" />
@ -412,7 +412,7 @@
<date value="*/6/28" type="religious" name="Видовдан" /> <date value="*/6/28" type="religious" name="Видовдан" />
<date value="*/10/21" type="national" name="Дан сећања на српске жртве у Другом светском рату" /> <date value="*/10/21" type="national" name="Дан сећања на српске жртве у Другом светском рату" />
</country> </country>
<country _name="Serbia (Latin)"> <country name="Serbia (Latin)">
<date value="*/1/1" type="national" name="Nova godina" /> <date value="*/1/1" type="national" name="Nova godina" />
<date value="*/1/7" type="religious" name="Božić" /> <date value="*/1/7" type="religious" name="Božić" />
<date value="*/2/15" type="national" name="Dan državnosti Srbije" /> <date value="*/2/15" type="national" name="Dan državnosti Srbije" />
@ -427,7 +427,7 @@
<date value="*/6/28" type="religious" name="Vidovdan" /> <date value="*/6/28" type="religious" name="Vidovdan" />
<date value="*/10/21" type="national" name="Dan sećanja na srpske žrtve u Drugom svetskom ratu" /> <date value="*/10/21" type="national" name="Dan sećanja na srpske žrtve u Drugom svetskom ratu" />
</country> </country>
<country _name="Slovakia"> <country name="Slovakia">
<date name="Deň vzniku Slovenskej republiky" value="*/1/1" type="national" /> <date name="Deň vzniku Slovenskej republiky" value="*/1/1" type="national" />
<date name="Zjavenie Pána (Traja králi)" value="*/1/6" type="religious" /> <date name="Zjavenie Pána (Traja králi)" value="*/1/6" type="religious" />
<date name="Veľký piatok" value="> easter(y)" offset="-2" type="religious" /> <date name="Veľký piatok" value="> easter(y)" offset="-2" type="religious" />
@ -444,7 +444,7 @@
<date name="Prvý sviatok vianočný" value="*/12/25" type="national" /> <date name="Prvý sviatok vianočný" value="*/12/25" type="national" />
<date name="Druhý sviatok vianočný" value="*/12/26" type="national" /> <date name="Druhý sviatok vianočný" value="*/12/26" type="national" />
</country> </country>
<country _name="Sweden"> <country name="Sweden">
<date name="Nyårsafton" value="*/12/31" type="national" /> <date name="Nyårsafton" value="*/12/31" type="national" />
<date name="Trettondedag jul" value="*/1/6" type="religious" /> <date name="Trettondedag jul" value="*/1/6" type="religious" />
<date name="Alla helgons dag" value="*/oct/31" offset="sat" type="religious" if="(y>=1953)" /> <date name="Alla helgons dag" value="*/oct/31" offset="sat" type="religious" if="(y>=1953)" />
@ -471,7 +471,7 @@
<date name="Midsommardagen" value="*/jun/24" type="religious" if="not(y>=1953)" /> <date name="Midsommardagen" value="*/jun/24" type="religious" if="not(y>=1953)" />
<date name="Fars dag" value="*/2/sun/nov" type="national" /> <date name="Fars dag" value="*/2/sun/nov" type="national" />
</country> </country>
<country _name="Ukraine"> <country name="Ukraine">
<date value="*/1/1" type="national" name="Новий Рік"/> <date value="*/1/1" type="national" name="Новий Рік"/>
<date value="*/1/6" type="religious" name="Святий Вечір"/> <date value="*/1/6" type="religious" name="Святий Вечір"/>
<date value="*/1/7" type="religious" name="Різдво"/> <date value="*/1/7" type="religious" name="Різдво"/>
@ -498,7 +498,7 @@
<date value="*/12/19" type="religious" name="Миколая"/> <date value="*/12/19" type="religious" name="Миколая"/>
<date value="*/12/21" type="secular" name="Осіннє Сонцестояння"/> <date value="*/12/21" type="secular" name="Осіннє Сонцестояння"/>
</country> </country>
<country _name="United States of America"> <country name="United States of America">
<date name="New Year's Eve" value="*/12/31" type="national" /> <date name="New Year's Eve" value="*/12/31" type="national" />
<date name="New Year's Day" value="*/1/1" type="national" /> <date name="New Year's Day" value="*/1/1" type="national" />
<date name="ML Kings's Birthday" value="*/3/mon/jan" type="secular" /> <date name="ML Kings's Birthday" value="*/3/mon/jan" type="secular" />

130
data/tips.xml Normal file
View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<tips>
<tip number="1"><b>Working with Dates</b><br/>A range of dates can be given by using the format &quot;between January 4, 2000 and March 20, 2003&quot;. You can also indicate the level of confidence in a date and even choose between seven different calendars. Try the button next to the date field in the Events Editor.</tip>
<tip number="2"><b>Editing Objects</b><br/>In most cases double clicking on a name, source, place or media entry will bring up a window to allow you to edit the object. Note that the result can be dependent on context. For example, in the Family View clicking on a parent or child will bring up the Relationship Editor.</tip>
<tip number="3"><b>Adding Images</b><br/>An image can be added to any gallery or the Media View by dragging and dropping it from a file manager or a web browser. Actually you can add any type of file like this, useful for scans of documents and other digital sources.</tip>
<tip number="4"><b>Ordering Children in a Family</b><br/>The birth order of children in a family can be set by using drag and drop. This order is preserved even when they do not have birth dates.</tip>
<tip number="5"><b>Talk to Relatives Before It Is Too Late</b><br/>Your oldest relatives can be your most important source of information. They usually know things about the family that haven't been written down. They might tell you nuggets about people that may one day lead to a new avenue of research. At the very least, you will get to hear some great stories. Don't forget to record the conversations!</tip>
<tip number="7"><b>Filtering People</b><br/>In the People View, you can 'filter' individuals based on many criteria. To define a new filter go to &quot;Edit &gt; Person Filter Editor&quot;. There you can name your filter and add and combine rules using the many preset rules. For example, you can define a filter to find all adopted people in the family tree. People without a birth date mentioned can also be filtered. To get the results save your filter and select it at the bottom of the Filter Sidebar, then click Apply. If the Filter Sidebar is not visible, select View &gt; Filter.</tip>
<tip number="8"><b>Inverted Filtering</b><br/>Filters can easily be reversed by using the 'invert' option. For instance, by inverting the 'People with children' filter you can select all people without children.</tip>
<tip number="9"><b>Locating People</b><br/>By default, each surname in the People View is listed only once. By clicking on the arrow to the left of a name, the list will expand to show all individuals with that last name. To locate any Family Name from a long list, select a Family Name (not a person) and start typing. The view will jump to the first Family Name matching the letters you enter.</tip>
<tip number="10"><b>The Family View</b><br/>The Family View is used to display a typical family unit as two parents and their children.</tip>
<tip number="11"><b>Changing the Active Person</b><br/>Changing the Active Person in views is easy. In the Relationship view just click on anyone. In the Ancestry View doubleclick on the person or right click to select any of their spouses, siblings, children or parents.</tip>
<tip number="12"><b>Who Was Born When?</b><br/>Under &quot;Tools &gt; Analysis and exploration &gt; Compare Individual Events...&quot; you can compare the data of individuals in your database. This is useful, say, if you wish to list the birth dates of everyone in your database. You can use a custom filter to narrow the results.</tip>
<tip number="13"><b>Gramps Tools</b><br/>Gramps comes with a rich set of tools. These allow you to undertake operations such as checking the database for errors and consistency. There are research and analysis tools such as event comparison, finding duplicate people, interactive descendant browser, and many others. All tools can be accessed through the &quot;Tools&quot; menu.</tip>
<tip number="14"><b>Calculating Relationships</b><br/>To check if two people in the database are related (by blood, not marriage) try the tool under &quot;Tools &gt; Utilities &gt; Relationship Calculator...&quot;. The exact relationship as well as all common ancestors are reported.</tip>
<tip number="15"><b>SoundEx can help with family research</b><br/>SoundEx solves a long standing problem in genealogy, how to handle spelling variations. The SoundEx Gramplet takes a surname and generates a simplified form that is equivalent for similar sounding names. Knowing the SoundEx Code for a surname is very helpful for researching Census Data files (microfiche) at a library or other research facility. To view the SoundEx codes for surnames in your database, add the SoundEx Gramplet.</tip>
<tip number="16"><b>Setting Your Preferences</b><br/>&quot;Edit &gt; Preferences...&quot; lets you modify a number of settings, such as the path to your media files, and allows you to adjust many aspects of the Gramps presentation to your needs. Each separate view can also be configured under &quot;View &gt; Configure View...&quot;</tip>
<tip number="17"><b>Gramps Reports</b><br/>Gramps offers a wide variety of reports. The Graphical Reports and Graphs can present complex relationships easily and the Text Reports are particularly useful if you want to send the results of your family tree to members of the family via email. If you're ready to make a website for your family tree then there's a report for that as well.</tip>
<tip number="18"><b>Starting a New Family Tree</b><br/>A good way to start a new family tree is to enter all the members of the family into the database using the Person View (use &quot;Edit &gt; Add...&quot; or click on the Add a new person button from the People View). Then go to the Relationship View and create relationships between people.</tip>
<tip number="19"><b>What's That For?</b><br/>Unsure what a button does? Simply hold the mouse over a button and a tooltip will appear.</tip>
<tip number="20"><b>Unsure of a Date?</b><br/>If you're unsure about the date an event occurred, Gramps allows you to enter a wide range of date formats based on a guess or an estimate. For instance, &quot;about 1908&quot; is a valid entry for a birth date in Gramps. Click the Date button next to the date field and see the Gramps Manual to learn more.</tip>
<tip number="21"><b>Duplicate Entries</b><br/>&quot;Tools &gt; Database Processing &gt; Find Possible Duplicate People...&quot; allows you to locate (and merge) entries of the same person entered more than once in the database.</tip>
<tip number="22"><b>Merging Entries</b><br/>The function &quot;Edit &gt; Compare and Merge...&quot; allows you to combine separately listed people into one. Select the second entry by holding the Control key as you click. This is very useful for combining two databases with overlapping people, or combining erroneously entered differing names for one individual. This also works for the Places, Sources and Repositories views.</tip>
<tip number="23"><b>Organising the Views</b><br/>Many of the views can present your data as either a hierarchical tree or as a simple list. Each view can also be configured to the way you like it. Have a look to the right of the top toolbar or under the &quot;View&quot; menu.</tip>
<tip number="24"><b>Navigating Back and Forward</b><br/>Gramps maintains a list of previous active objects such as People and Events. You can move forward and backward through the list using &quot;Go &gt; Forward&quot; and &quot;Go &gt; Back&quot; or the arrow buttons.</tip>
<tip number="25"><b>Keyboard Shortcuts</b><br/>Tired of having to take your hand off the keyboard to use the mouse? Many functions in Gramps have keyboard shortcuts. If one exists for a function it is displayed on the right side of the menu.</tip>
<tip number="26"><b>Read the Manual</b><br/>Don't forget to read the Gramps manual, &quot;Help &gt; User Manual&quot;. The developers have worked hard to make most operations intuitive but the manual is full of information that will make your time spent on genealogy more productive.</tip>
<tip number="27"><b>Adding Children</b><br/>To add children in Gramps there are two options. You can find one of their parents in the Families View and open the family. Then choose to create a new person or add an existing person. You can also add children (or siblings) from inside the Family Editor.</tip>
<tip number="28"><b>Editing the Parent-Child Relationship</b><br/> You can edit the relationship of a child to its parents by double clicking the child in the Family Editor. Relationships can be any of Adopted, Birth, Foster, None, Sponsored, Stepchild and Unknown.</tip>
<tip number="29"><b>Show All Checkbutton</b><br/>When adding an existing person as a spouse, the list of people shown is filtered to display only people who could realistically fit the role (based on dates in the database). In case Gramps is wrong in making this choice, you can override the filter by checking the Show All checkbutton.</tip>
<tip number="31"><b>Improving Gramps</b><br/>Users are encouraged to request enhancements to Gramps. Requesting an enhancement can be done either through the gramps-users or gramps-devel mailing lists, or by going to https://gramps-project.org/bugs/ and creating a Feature Request. Filing a Feature Request is preferred but it can be good to discuss your ideas on the email lists.</tip>
<tip number="32"><b>Gramps Mailing Lists</b><br/>Want answers to your questions about Gramps? Check out the gramps-users email list. Many helpful people are on the list, so you're likely to get an answer quickly. If you have questions related to the development of Gramps, try the gramps-devel list. You can see the lists by selecting &quot;Help &gt; Gramps Mailing Lists&quot;.</tip>
<tip number="33"><b>Contributing to Gramps</b><br/>Want to help with Gramps but can't write programs? Not a problem! A project as large as Gramps requires people with a wide variety of skills. Contributions can be anything from writing documentation to testing development versions and helping with the web site. Start by subscribing to the Gramps developers mailing list, gramps-devel, and introducing yourself. Subscription information can be found at &quot;Help &gt; Gramps Mailing Lists&quot;</tip>
<tip number="34"><b>So What's in a Name?</b><br/>The name Gramps was suggested to the original developer, Don Allingham, by his father. It stands for <i>Genealogical Research and Analysis Management Program System</i>. It is a full-featured genealogy program letting you store, edit, and research genealogical data. The Gramps database back end is so robust that some users are managing genealogies containing hundreds of thousands of people.</tip>
<tip number="36"><b>Bookmarking Individuals</b><br/>The Bookmarks menu is a convenient place to store the names of frequently used individuals. Selecting a bookmark will make that person the Active Person. To bookmark someone make them the Active Person then go to &quot;Bookmarks &gt; Add Bookmark&quot; or press Ctrl+D. You can also bookmark most of the other objects.</tip>
<tip number="37"><b>Incorrect Dates</b><br/>Everyone occasionally enters dates with an invalid format. Incorrect date formats will show up in Gramps with a either a reddish background or a red dot on the right edge of the field. You can fix the date using the Date Selection dialog which can be opened by clicking on the date button. The format of the date is set under &quot;Edit &gt; Preferences &gt; Display&quot;.</tip>
<tip number="38"><b>Listing Events</b><br/>Events are added using the editor opened with &quot;Person &gt; Edit Person &gt; Events&quot;. There is a long list of preset event types. You can add your own event types by typing in the text field, they will be added to the available events, but not translated.</tip>
<tip number="39"><b>Managing Names</b><br/>It is easy to manage people with several names in Gramps. In the Person Editor select the Names tab. You can add names of different types and set the preferred name by dragging it to the Preferred Name section.</tip>
<tip number="40"><b>Ancestor View</b><br/>The Ancestry View displays a traditional pedigree chart. Hold the mouse over an individual to see more information about them or right click on an individual to access other family members and settings. Play with the settings to see the different options.</tip>
<tip number="41"><b>Managing Sources</b><br/>The Sources View shows a list of all sources in a single window. From here you can edit your sources, merge duplicates and see which individuals reference each source. You can use filters to group your sources.</tip>
<tip number="42"><b>Managing Places</b><br/>The Places View shows a list of all places in the database. The list can be sorted by a number of different criteria, such as City, County or State.</tip>
<tip number="43"><b>Media View</b><br/>The Media View shows a list of all media entered in the database. These can be graphic images, videos, sound clips, spreadsheets, documents, and more.</tip>
<tip number="44"><b>Filters</b><br/>Filters allow you to limit the people seen in the People View. In addition to the many preset filters, Custom Filters can be created limited only by your imagination. Custom filters are created from &quot;Edit &gt; Person Filter Editor&quot;.</tip>
<tip number="45"><b>The GEDCOM File Format</b><br/>Gramps allows you to import from, and export to, the GEDCOM format. There is extensive support for the industry standard GEDCOM version 5.5, so you can exchange Gramps information to and from users of most other genealogy programs. Filters exist that make importing and exporting GEDCOM files trivial.</tip>
<tip number="46"><b>The Gramps XML Package</b><br/>You can export your Family Tree as a Gramps XML Package. This is a compressed file containing your family tree data and all the media files connected to the database (images for example). This file is completely portable so is useful for backups or sharing with other Gramps users. This format has the key advantage over GEDCOM that no information is ever lost when exporting and importing.</tip>
<tip number="48"><b>Web Family Tree Format</b><br/>Gramps can export data to the Web Family Tree (WFT) format. This format allows a family tree to be displayed online using a single file, instead of many html files.</tip>
<tip number="49"><b>Making a Genealogy Website</b><br/>You can easily export your family tree to a web page. Select the entire database, family lines or selected individuals to a collection of web pages ready for upload to the World Wide Web.</tip>
<tip number="50"><b>Reporting Bugs in Gramps</b><br/>The best way to report a bug in Gramps is to use the Gramps bug tracking system at https://gramps-project.org/bugs/</tip>
<tip number="51"><b>The Gramps Homepage</b><br/>The Gramps homepage is at http://gramps-project.org/</tip>
<tip number="53"><b>Privacy in Gramps</b><br/>Gramps helps you to keep personal information secure by allowing you to mark information as private. Data marked as private can be excluded from reports and data exports. Look for the padlock which toggles records between private and public.</tip>
<tip number="54"><b>Keeping Good Records</b><br/>Be accurate when recording genealogical information. Don't make assumptions while recording primary information; write it exactly as you see it. Use bracketed comments to indicate your additions, deletions or comments. Use of the Latin 'sic' is recommended to confirm the accurate transcription of what appears to be an error in a source.</tip>
<tip number="57"><b>Extra Reports and Tools</b><br/>Extra tools and reports can be added to Gramps with the &quot;Addon&quot; system. See them under &quot;Help &gt; Extra Reports/Tools&quot;. This is the best way for advanced users to experiment and create new functionality.</tip>
<tip number="58"><b>Book Reports</b><br/>The Book report under &quot;Reports &gt; Books &gt; Book Report...&quot;, allows you to collect a variety of reports into a single document. This single report is easier to distribute than multiple reports, especially when printed.</tip>
<tip number="59"><b>Gramps Announcements</b><br/>Interested in getting notified when a new version of Gramps is released? Join the Gramps-announce mailing list at &quot;Help &gt; Gramps Mailing Lists&quot;</tip>
<tip number="60"><b>Record Your Sources</b><br/>Information collected about your family is only as good as the source it came from. Take the time and trouble to record all the details of where the information came from. Whenever possible get a copy of original documents.</tip>
<tip number="61"><b>Directing Your Research</b><br/>Go from what you know to what you do not. Always record everything that is known before making conjectures. Often the facts at hand suggest plenty of direction for more research. Don't waste time looking through thousands of records hoping for a trail when you have other unexplored leads.</tip>
<tip number="62"><b>The 'How and Why' of Your Genealogy</b><br/> Genealogy isn't only about dates and names. It is about people. Be descriptive. Include why things happened, and how descendants might have been shaped by the events they went through. Narratives go a long way in making your family history come alive.</tip>
<tip number="63"><b>Don't speak English?</b><br/>Volunteers have translated Gramps into more than 40 languages. If Gramps supports your language and it is not being displayed, set the default language in your operating system and restart Gramps.</tip>
<tip number="64"><b>Gramps Translators</b><br/>Gramps has been designed so that new translations can easily be added with little development effort. If you are interested in participating please email gramps-devel@lists.sf.net</tip>
<tip number="66"><b>Hello, привет or 喂</b><br/>Whatever script you use Gramps offers full Unicode support. Characters for all languages are properly displayed.</tip>
<tip number="67"><b>The Home Person</b><br/>Anyone can be chosen as the Home Person in Gramps. Use &quot;Edit &gt; Set Home Person&quot; in the Person View. The home person is the person who is selected when the database is opened or when the home button is pressed.</tip>
<tip number="70"><b>The Gramps Code</b><br/>Gramps is written in a computer language called Python using the GTK and GNOME libraries for the graphical interface. Gramps is supported on any computer system where these programs have been ported. Gramps is known to be run on Linux, BSD, Solaris, Windows and Mac OS X.</tip>
<tip number="71"><b>Open Source Software</b><br/>The Free/Libre and Open Source Software (FLOSS) development model means Gramps can be extended by any programmer since all of the source code is freely available under its license. So it's not just about free beer, it's also about freedom to study and change the tool. For more about Open Source software lookup the Free Software Foundation and the Open Source Initiative.</tip>
<tip number="72"><b>The Gramps Software License</b><br/>You are free to use and share Gramps with others. Gramps is freely distributable under the GNU General Public License, see http://www.gnu.org/licenses/licenses.html#GPL to read about the rights and restrictions of this license.</tip>
<tip number="73"><b>Gramps for Gnome or KDE?</b><br/>For Linux users Gramps works with whichever desktop environment you prefer. As long as the required GTK libraries are installed it will run fine.</tip>
</tips>

View File

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<tips>
<_tip number="1"><b>Working with Dates</b><br/>A range of dates can be given by using the format &quot;between January 4, 2000 and March 20, 2003&quot;. You can also indicate the level of confidence in a date and even choose between seven different calendars. Try the button next to the date field in the Events Editor.</_tip>
<_tip number="2"><b>Editing Objects</b><br/>In most cases double clicking on a name, source, place or media entry will bring up a window to allow you to edit the object. Note that the result can be dependent on context. For example, in the Family View clicking on a parent or child will bring up the Relationship Editor.</_tip>
<_tip number="3"><b>Adding Images</b><br/>An image can be added to any gallery or the Media View by dragging and dropping it from a file manager or a web browser. Actually you can add any type of file like this, useful for scans of documents and other digital sources.</_tip>
<_tip number="4"><b>Ordering Children in a Family</b><br/>The birth order of children in a family can be set by using drag and drop. This order is preserved even when they do not have birth dates.</_tip>
<_tip number="5"><b>Talk to Relatives Before It Is Too Late</b><br/>Your oldest relatives can be your most important source of information. They usually know things about the family that haven't been written down. They might tell you nuggets about people that may one day lead to a new avenue of research. At the very least, you will get to hear some great stories. Don't forget to record the conversations!</_tip>
<_tip number="7"><b>Filtering People</b><br/>In the People View, you can 'filter' individuals based on many criteria. To define a new filter go to &quot;Edit &gt; Person Filter Editor&quot;. There you can name your filter and add and combine rules using the many preset rules. For example, you can define a filter to find all adopted people in the family tree. People without a birth date mentioned can also be filtered. To get the results save your filter and select it at the bottom of the Filter Sidebar, then click Apply. If the Filter Sidebar is not visible, select View &gt; Filter.</_tip>
<_tip number="8"><b>Inverted Filtering</b><br/>Filters can easily be reversed by using the 'invert' option. For instance, by inverting the 'People with children' filter you can select all people without children.</_tip>
<_tip number="9"><b>Locating People</b><br/>By default, each surname in the People View is listed only once. By clicking on the arrow to the left of a name, the list will expand to show all individuals with that last name. To locate any Family Name from a long list, select a Family Name (not a person) and start typing. The view will jump to the first Family Name matching the letters you enter.</_tip>
<_tip number="10"><b>The Family View</b><br/>The Family View is used to display a typical family unit as two parents and their children.</_tip>
<_tip number="11"><b>Changing the Active Person</b><br/>Changing the Active Person in views is easy. In the Relationship view just click on anyone. In the Ancestry View doubleclick on the person or right click to select any of their spouses, siblings, children or parents.</_tip>
<_tip number="12"><b>Who Was Born When?</b><br/>Under &quot;Tools &gt; Analysis and exploration &gt; Compare Individual Events...&quot; you can compare the data of individuals in your database. This is useful, say, if you wish to list the birth dates of everyone in your database. You can use a custom filter to narrow the results.</_tip>
<_tip number="13"><b>Gramps Tools</b><br/>Gramps comes with a rich set of tools. These allow you to undertake operations such as checking the database for errors and consistency. There are research and analysis tools such as event comparison, finding duplicate people, interactive descendant browser, and many others. All tools can be accessed through the &quot;Tools&quot; menu.</_tip>
<_tip number="14"><b>Calculating Relationships</b><br/>To check if two people in the database are related (by blood, not marriage) try the tool under &quot;Tools &gt; Utilities &gt; Relationship Calculator...&quot;. The exact relationship as well as all common ancestors are reported.</_tip>
<_tip number="15"><b>SoundEx can help with family research</b><br/>SoundEx solves a long standing problem in genealogy, how to handle spelling variations. The SoundEx Gramplet takes a surname and generates a simplified form that is equivalent for similar sounding names. Knowing the SoundEx Code for a surname is very helpful for researching Census Data files (microfiche) at a library or other research facility. To view the SoundEx codes for surnames in your database, add the SoundEx Gramplet.</_tip>
<_tip number="16"><b>Setting Your Preferences</b><br/>&quot;Edit &gt; Preferences...&quot; lets you modify a number of settings, such as the path to your media files, and allows you to adjust many aspects of the Gramps presentation to your needs. Each separate view can also be configured under &quot;View &gt; Configure View...&quot;</_tip>
<_tip number="17"><b>Gramps Reports</b><br/>Gramps offers a wide variety of reports. The Graphical Reports and Graphs can present complex relationships easily and the Text Reports are particularly useful if you want to send the results of your family tree to members of the family via email. If you're ready to make a website for your family tree then there's a report for that as well.</_tip>
<_tip number="18"><b>Starting a New Family Tree</b><br/>A good way to start a new family tree is to enter all the members of the family into the database using the Person View (use &quot;Edit &gt; Add...&quot; or click on the Add a new person button from the People View). Then go to the Relationship View and create relationships between people.</_tip>
<_tip number="19"><b>What's That For?</b><br/>Unsure what a button does? Simply hold the mouse over a button and a tooltip will appear.</_tip>
<_tip number="20"><b>Unsure of a Date?</b><br/>If you're unsure about the date an event occurred, Gramps allows you to enter a wide range of date formats based on a guess or an estimate. For instance, &quot;about 1908&quot; is a valid entry for a birth date in Gramps. Click the Date button next to the date field and see the Gramps Manual to learn more.</_tip>
<_tip number="21"><b>Duplicate Entries</b><br/>&quot;Tools &gt; Database Processing &gt; Find Possible Duplicate People...&quot; allows you to locate (and merge) entries of the same person entered more than once in the database.</_tip>
<_tip number="22"><b>Merging Entries</b><br/>The function &quot;Edit &gt; Compare and Merge...&quot; allows you to combine separately listed people into one. Select the second entry by holding the Control key as you click. This is very useful for combining two databases with overlapping people, or combining erroneously entered differing names for one individual. This also works for the Places, Sources and Repositories views.</_tip>
<_tip number="23"><b>Organising the Views</b><br/>Many of the views can present your data as either a hierarchical tree or as a simple list. Each view can also be configured to the way you like it. Have a look to the right of the top toolbar or under the &quot;View&quot; menu.</_tip>
<_tip number="24"><b>Navigating Back and Forward</b><br/>Gramps maintains a list of previous active objects such as People and Events. You can move forward and backward through the list using &quot;Go &gt; Forward&quot; and &quot;Go &gt; Back&quot; or the arrow buttons.</_tip>
<_tip number="25"><b>Keyboard Shortcuts</b><br/>Tired of having to take your hand off the keyboard to use the mouse? Many functions in Gramps have keyboard shortcuts. If one exists for a function it is displayed on the right side of the menu.</_tip>
<_tip number="26"><b>Read the Manual</b><br/>Don't forget to read the Gramps manual, &quot;Help &gt; User Manual&quot;. The developers have worked hard to make most operations intuitive but the manual is full of information that will make your time spent on genealogy more productive.</_tip>
<_tip number="27"><b>Adding Children</b><br/>To add children in Gramps there are two options. You can find one of their parents in the Families View and open the family. Then choose to create a new person or add an existing person. You can also add children (or siblings) from inside the Family Editor.</_tip>
<_tip number="28"><b>Editing the Parent-Child Relationship</b><br/> You can edit the relationship of a child to its parents by double clicking the child in the Family Editor. Relationships can be any of Adopted, Birth, Foster, None, Sponsored, Stepchild and Unknown.</_tip>
<_tip number="29"><b>Show All Checkbutton</b><br/>When adding an existing person as a spouse, the list of people shown is filtered to display only people who could realistically fit the role (based on dates in the database). In case Gramps is wrong in making this choice, you can override the filter by checking the Show All checkbutton.</_tip>
<_tip number="31"><b>Improving Gramps</b><br/>Users are encouraged to request enhancements to Gramps. Requesting an enhancement can be done either through the gramps-users or gramps-devel mailing lists, or by going to https://gramps-project.org/bugs/ and creating a Feature Request. Filing a Feature Request is preferred but it can be good to discuss your ideas on the email lists.</_tip>
<_tip number="32"><b>Gramps Mailing Lists</b><br/>Want answers to your questions about Gramps? Check out the gramps-users email list. Many helpful people are on the list, so you're likely to get an answer quickly. If you have questions related to the development of Gramps, try the gramps-devel list. You can see the lists by selecting &quot;Help &gt; Gramps Mailing Lists&quot;.</_tip>
<_tip number="33"><b>Contributing to Gramps</b><br/>Want to help with Gramps but can't write programs? Not a problem! A project as large as Gramps requires people with a wide variety of skills. Contributions can be anything from writing documentation to testing development versions and helping with the web site. Start by subscribing to the Gramps developers mailing list, gramps-devel, and introducing yourself. Subscription information can be found at &quot;Help &gt; Gramps Mailing Lists&quot;</_tip>
<_tip number="34"><b>So What's in a Name?</b><br/>The name Gramps was suggested to the original developer, Don Allingham, by his father. It stands for <i>Genealogical Research and Analysis Management Program System</i>. It is a full-featured genealogy program letting you store, edit, and research genealogical data. The Gramps database back end is so robust that some users are managing genealogies containing hundreds of thousands of people.</_tip>
<_tip number="36"><b>Bookmarking Individuals</b><br/>The Bookmarks menu is a convenient place to store the names of frequently used individuals. Selecting a bookmark will make that person the Active Person. To bookmark someone make them the Active Person then go to &quot;Bookmarks &gt; Add Bookmark&quot; or press Ctrl+D. You can also bookmark most of the other objects.</_tip>
<_tip number="37"><b>Incorrect Dates</b><br/>Everyone occasionally enters dates with an invalid format. Incorrect date formats will show up in Gramps with a either a reddish background or a red dot on the right edge of the field. You can fix the date using the Date Selection dialog which can be opened by clicking on the date button. The format of the date is set under &quot;Edit &gt; Preferences &gt; Display&quot;.</_tip>
<_tip number="38"><b>Listing Events</b><br/>Events are added using the editor opened with &quot;Person &gt; Edit Person &gt; Events&quot;. There is a long list of preset event types. You can add your own event types by typing in the text field, they will be added to the available events, but not translated.</_tip>
<_tip number="39"><b>Managing Names</b><br/>It is easy to manage people with several names in Gramps. In the Person Editor select the Names tab. You can add names of different types and set the preferred name by dragging it to the Preferred Name section.</_tip>
<_tip number="40"><b>Ancestor View</b><br/>The Ancestry View displays a traditional pedigree chart. Hold the mouse over an individual to see more information about them or right click on an individual to access other family members and settings. Play with the settings to see the different options.</_tip>
<_tip number="41"><b>Managing Sources</b><br/>The Sources View shows a list of all sources in a single window. From here you can edit your sources, merge duplicates and see which individuals reference each source. You can use filters to group your sources.</_tip>
<_tip number="42"><b>Managing Places</b><br/>The Places View shows a list of all places in the database. The list can be sorted by a number of different criteria, such as City, County or State.</_tip>
<_tip number="43"><b>Media View</b><br/>The Media View shows a list of all media entered in the database. These can be graphic images, videos, sound clips, spreadsheets, documents, and more.</_tip>
<_tip number="44"><b>Filters</b><br/>Filters allow you to limit the people seen in the People View. In addition to the many preset filters, Custom Filters can be created limited only by your imagination. Custom filters are created from &quot;Edit &gt; Person Filter Editor&quot;.</_tip>
<_tip number="45"><b>The GEDCOM File Format</b><br/>Gramps allows you to import from, and export to, the GEDCOM format. There is extensive support for the industry standard GEDCOM version 5.5, so you can exchange Gramps information to and from users of most other genealogy programs. Filters exist that make importing and exporting GEDCOM files trivial.</_tip>
<_tip number="46"><b>The Gramps XML Package</b><br/>You can export your Family Tree as a Gramps XML Package. This is a compressed file containing your family tree data and all the media files connected to the database (images for example). This file is completely portable so is useful for backups or sharing with other Gramps users. This format has the key advantage over GEDCOM that no information is ever lost when exporting and importing.</_tip>
<_tip number="48"><b>Web Family Tree Format</b><br/>Gramps can export data to the Web Family Tree (WFT) format. This format allows a family tree to be displayed online using a single file, instead of many html files.</_tip>
<_tip number="49"><b>Making a Genealogy Website</b><br/>You can easily export your family tree to a web page. Select the entire database, family lines or selected individuals to a collection of web pages ready for upload to the World Wide Web.</_tip>
<_tip number="50"><b>Reporting Bugs in Gramps</b><br/>The best way to report a bug in Gramps is to use the Gramps bug tracking system at https://gramps-project.org/bugs/</_tip>
<_tip number="51"><b>The Gramps Homepage</b><br/>The Gramps homepage is at http://gramps-project.org/</_tip>
<_tip number="53"><b>Privacy in Gramps</b><br/>Gramps helps you to keep personal information secure by allowing you to mark information as private. Data marked as private can be excluded from reports and data exports. Look for the padlock which toggles records between private and public.</_tip>
<_tip number="54"><b>Keeping Good Records</b><br/>Be accurate when recording genealogical information. Don't make assumptions while recording primary information; write it exactly as you see it. Use bracketed comments to indicate your additions, deletions or comments. Use of the Latin 'sic' is recommended to confirm the accurate transcription of what appears to be an error in a source.</_tip>
<_tip number="57"><b>Extra Reports and Tools</b><br/>Extra tools and reports can be added to Gramps with the &quot;Addon&quot; system. See them under &quot;Help &gt; Extra Reports/Tools&quot;. This is the best way for advanced users to experiment and create new functionality.</_tip>
<_tip number="58"><b>Book Reports</b><br/>The Book report under &quot;Reports &gt; Books &gt; Book Report...&quot;, allows you to collect a variety of reports into a single document. This single report is easier to distribute than multiple reports, especially when printed.</_tip>
<_tip number="59"><b>Gramps Announcements</b><br/>Interested in getting notified when a new version of Gramps is released? Join the Gramps-announce mailing list at &quot;Help &gt; Gramps Mailing Lists&quot;</_tip>
<_tip number="60"><b>Record Your Sources</b><br/>Information collected about your family is only as good as the source it came from. Take the time and trouble to record all the details of where the information came from. Whenever possible get a copy of original documents.</_tip>
<_tip number="61"><b>Directing Your Research</b><br/>Go from what you know to what you do not. Always record everything that is known before making conjectures. Often the facts at hand suggest plenty of direction for more research. Don't waste time looking through thousands of records hoping for a trail when you have other unexplored leads.</_tip>
<_tip number="62"><b>The 'How and Why' of Your Genealogy</b><br/> Genealogy isn't only about dates and names. It is about people. Be descriptive. Include why things happened, and how descendants might have been shaped by the events they went through. Narratives go a long way in making your family history come alive.</_tip>
<_tip number="63"><b>Don't speak English?</b><br/>Volunteers have translated Gramps into more than 40 languages. If Gramps supports your language and it is not being displayed, set the default language in your operating system and restart Gramps.</_tip>
<_tip number="64"><b>Gramps Translators</b><br/>Gramps has been designed so that new translations can easily be added with little development effort. If you are interested in participating please email gramps-devel@lists.sf.net</_tip>
<_tip number="66"><b>Hello, привет or 喂</b><br/>Whatever script you use Gramps offers full Unicode support. Characters for all languages are properly displayed.</_tip>
<_tip number="67"><b>The Home Person</b><br/>Anyone can be chosen as the Home Person in Gramps. Use &quot;Edit &gt; Set Home Person&quot; in the Person View. The home person is the person who is selected when the database is opened or when the home button is pressed.</_tip>
<_tip number="70"><b>The Gramps Code</b><br/>Gramps is written in a computer language called Python using the GTK and GNOME libraries for the graphical interface. Gramps is supported on any computer system where these programs have been ported. Gramps is known to be run on Linux, BSD, Solaris, Windows and Mac OS X.</_tip>
<_tip number="71"><b>Open Source Software</b><br/>The Free/Libre and Open Source Software (FLOSS) development model means Gramps can be extended by any programmer since all of the source code is freely available under its license. So it's not just about free beer, it's also about freedom to study and change the tool. For more about Open Source software lookup the Free Software Foundation and the Open Source Initiative.</_tip>
<_tip number="72"><b>The Gramps Software License</b><br/>You are free to use and share Gramps with others. Gramps is freely distributable under the GNU General Public License, see http://www.gnu.org/licenses/licenses.html#GPL to read about the rights and restrictions of this license.</_tip>
<_tip number="73"><b>Gramps for Gnome or KDE?</b><br/>For Linux users Gramps works with whichever desktop environment you prefer. As long as the required GTK libraries are installed it will run fine.</_tip>
</tips>

37
po/LINGUAS Normal file
View File

@ -0,0 +1,37 @@
# this list MUST be a subset of _LOCALE_NAMES in gen/utils/grampslocale.py
# (that is, if you add a new language here, be sure it's in _LOCALE_NAMES too)
ar
bg
ca
cs
da
de
el
en_GB
eo
es
fi
fr
he
hr
hu
is
it
ja
lt
nb
nl
nn
pl
pt_BR pt_PT
ru
sk
sl
sq
sr
sv
ta
tr
uk
vi
zh_CN zh_HK zh_TW

View File

@ -808,9 +808,8 @@ gramps/plugins/webstuff/webstuff.py
# #
# Files to extract from and then merge into # Files to extract from and then merge into
# #
data/gramps.desktop.in
data/gramps.keys.in
data/gramps.xml.in data/gramps.xml.in
data/holidays.xml.in
data/tips.xml.in
data/gramps.appdata.xml.in data/gramps.appdata.xml.in
data/gramps.desktop.in
data/holidays.xml
data/tips.xml

View File

@ -1,7 +0,0 @@
#!/bin/sh
# Make translation files
# additional keywords must always be kept in sync with those in update_po.py
XGETTEXT_ARGS='--keyword=_T_ --keyword=trans_text' \
intltool-update -g gramps -o gramps.pot -p

6
po/its/holidays.its Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule selector="//country/@name" translate="yes"/>
<its:translateRule selector="//country[@name='Jewish Holidays']/date/@name"
translate="yes"/>
</its:rules>

4
po/its/holidays.loc Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="Holidays" pattern="holidays.xml" target="holidays.its"/>
</locatingRules>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its"
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
xmlns:mi="http://www.freedesktop.org/standards/shared-mime-info"
version="2.0">
<its:translateRule translate="yes" selector="//mi:comment"/>
<its:translateRule translate="no" selector="//mi:expanded-acronym"/>
<its:translateRule translate="no" selector="//mi:acronym"/>
</its:rules>

View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="shared-mime-info" pattern="*.xml">
<documentRule localName="mime-info" target="shared-mime-info.its"/>
</locatingRule>
</locatingRules>

5
po/its/tips.its Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:withinTextRule selector="//tip/*" withinText="yes"/>
<its:translateRule selector="//tip" translate="yes"/>
</its:rules>

4
po/its/tips.loc Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="Tips" pattern="tips.xml" target="tips.its"/>
</locatingRules>

View File

@ -6,6 +6,7 @@
# Copyright (C) 2006 Brian Matherly # Copyright (C) 2006 Brian Matherly
# Copyright (C) 2008 Stephen George # Copyright (C) 2008 Stephen George
# Copyright (C) 2012 # Copyright (C) 2012
# Copyright (C) 2020 Nick Hall
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -133,232 +134,6 @@ def tests():
except: except:
print ('Please, install python') print ('Please, install python')
def TipsParse(filename, mark):
"""
Experimental alternative to 'intltool-extract' for 'tips.xml'.
"""
from xml.etree import ElementTree
tree = ElementTree.parse(filename)
root = tree.getroot()
'''
<?xml version="1.0" encoding="UTF-8"?>
<tips>
<_tip number="1">
<b>Working with Dates</b>
<br/>
A range of dates can be given by using the format &quot;between
January 4, 2000 and March 20, 2003&quot;. You can also indicate
the level of confidence in a date and even choose between seven
different calendars. Try the button next to the date field in the
Events Editor.
</_tip>
char *s = N_("<b>Working with Dates</b><br/>A range of dates can be
given by using the format &quot;between January 4, 2000 and March 20,
2003&quot;. You can also indicate the level of confidence in a date
and even choose between seven different calendars. Try the button
next to the date field in the Events Editor.");
gramps.pot:
msgid ""
"<b>Working with Dates</b><br/>A range of dates can be given by using the "
"format &quot;between January 4, 2000 and March 20, 2003&quot;. You can also "
"indicate the level of confidence in a date and even choose between seven "
"different calendars. Try the button next to the date field in the Events "
"Editor."
'''
with open('../data/tips.xml.in.h', 'w', encoding='utf-8') as tips:
marklist = root.iter(mark)
for key in marklist:
tip = ElementTree.tostring(key, encoding="UTF-8", method="xml")
if sys.version_info[0] < 3:
tip = tip.replace("<?xml version='1.0' encoding='UTF-8'?>", "")
tip = tip.replace('\n<_tip number="%(number)s">' % key.attrib, "")
else: # python3 support
tip = tip.decode("utf-8")
tip = tip.replace('<_tip number="%(number)s">' % key.attrib, "")
tip = tip.replace("<br />", "<br/>")
#tip = tip.replace("\n</_tip>\n", "</_tip>\n") # special case tip 7
#tip = tip.replace("\n<b>", "<b>") # special case tip 18
tip = tip.replace("</_tip>\n\n", "")
tip = tip.replace('"', '&quot;')
tips.write('char *s = N_("%s");\n' % tip)
print ('Wrote ../data/tips.xml.in.h')
root.clear()
def HolidaysParse(filename, mark):
"""
Experimental alternative to 'intltool-extract' for 'holidays.xml'.
"""
from xml.etree import ElementTree
tree = ElementTree.parse(filename)
root = tree.getroot()
ellist = root.iter()
'''
<?xml version="1.0" encoding="utf-8"?>
calendar>
<country _name="Bulgaria">
..
<country _name="Jewish Holidays">
<date _name="Yom Kippur" value="> passover(y)" offset="172"/>
char *s = N_("Bulgaria");
char *s = N_("Jewish Holidays");
char *s = N_("Yom Kippur");
gramps.pot:
msgid "Bulgaria"
msgid "Jewish Holidays"
msgid "Yom Kippur"
'''
with open('../data/holidays.xml.in.h', 'w') as holidays:
for key in ellist:
if key.attrib.get(mark):
line = key.attrib
string = line.items
# mapping via the line dict (_name is the key)
name = 'char *s = N_("%(_name)s");\n' % line
holidays.write(name)
print ('Wrote ../data/holidays.xml.in.h')
root.clear()
def XmlParse(filename, mark):
"""
Experimental alternative to 'intltool-extract' for 'file.xml.in'.
"""
from xml.etree import ElementTree
tree = ElementTree.parse(filename)
root = tree.getroot()
'''
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-gramps">
<_comment>Gramps database</_comment>
<glob pattern="*.grdb"/>
</mime-type>
<mime-type type="application/x-gedcom">
<_comment>GEDCOM</_comment>
<glob pattern="*.ged"/>
<glob pattern="*.gedcom"/>
<glob pattern="*.GED"/>
<glob pattern="*.GEDCOM"/>
msgid "Gramps database"
msgid "GEDCOM"
<description>
<_p> Gramps is a free software project and community.
We strive to produce a genealogy program that is both intuitive for hobbyists
and feature-complete for professional genealogists.
</p>
</description>
'''
with open(filename + '.h', 'w') as head:
for key in root.iter():
if key.tag == '{http://www.freedesktop.org/standards/shared-mime-info}%s' % mark:
comment = 'char *s = N_("%s");\n' % key.text
head.write(comment)
if key.tag == mark: #appdata
comment = 'char *s = N_("%s");\n' % key.text
head.write(comment)
if root.tag == 'application':
for key in root.iter():
if key.tag == mark:
comment = 'char *s = N_("%s");\n' % key.text
head.write(comment)
print ('Wrote %s' % filename)
root.clear()
def DesktopParse(filename):
"""
Experimental alternative to 'intltool-extract' for 'gramps.desktop'.
"""
'''
[Desktop Entry]
_Name=Gramps
_GenericName=Genealogy System
_X-GNOME-FullName=Gramps Genealogy System
_Comment=Manage genealogical information,
perform genealogical research and analysis
msgid "Gramps"
msgid "Genealogy System"
msgid "Gramps Genealogy System"
msgid ""
"Manage genealogical information,
perform genealogical research and analysis"
'''
with open('../data/gramps.desktop.in.h', 'w') as desktop:
with open(filename) as f:
lines = [file.strip() for file in f]
for line in lines:
if line[0] == '_':
for i in range(len(line)):
if line[i] == '=':
val = 'char *s = N_("%s");\n' % line[i+1:len(line)]
desktop.write(val)
print ('Wrote ../data/gramps.desktop.in.h')
def KeyParse(filename, mark):
"""
Experimental alternative to 'intltool-extract' for 'gramps.keys'.
"""
'''
application/x-gramps-xml:
_description=Gramps XML database
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
short_list_application_ids_for_intermediate_user_level=gramps
short_list_application_ids_for_advanced_user_level=gramps
category=Documents/Genealogy
icon-filename=/usr/share/gramps/gramps.png
open=gramps %f
application/x-gedcom:
_description=GEDCOM
default_action_type=application
msgid "Gramps XML database"
msgid "GEDCOM"
'''
with open('../data/gramps.keys.in.h', 'w') as key:
with open(filename) as f:
lines = [file for file in f]
temp = []
for line in lines:
for i in range(len(line)):
if line[i:i+12] == mark:
temp.append(line.strip())
for t in temp:
for i in range(len(t)):
if t[i] == '=':
val = 'char *s = N_("%s");\n' % t[i+1:len(t)]
key.write(val)
print ('Wrote ../data/gramps.keys.in.h')
def main(): def main():
""" """
The utility for handling translation stuff. The utility for handling translation stuff.
@ -522,20 +297,6 @@ def headers():
headers = [] headers = []
# in.h; extract_xml # in.h; extract_xml
if os.path.isfile('''../data/tips.xml.in.h'''):
headers.append('''../data/tips.xml.in.h''')
if os.path.isfile('''../data/holidays.xml.in.h'''):
headers.append('''../data/holidays.xml.in.h''')
if os.path.isfile('''../data/gramps.xml.in.h'''):
headers.append('''../data/gramps.xml.in.h''')
if os.path.isfile('''../data/gramps.desktop.in.h'''):
headers.append('''../data/gramps.desktop.in.h''')
if os.path.isfile('''../data/gramps.keys.in.h'''):
headers.append('''../data/gramps.keys.in.h''')
if os.path.isfile('''../data/gramps.appdata.xml.in.h'''):
headers.append('''../data/gramps.appdata.xml.in.h''')
if os.path.isfile('''gtklist.h'''):
headers.append('''gtklist.h''')
if os.path.isfile('''fragments.pot'''): if os.path.isfile('''fragments.pot'''):
headers.append('''fragments.pot''') headers.append('''fragments.pot''')
@ -543,15 +304,23 @@ def headers():
def extract_xml(): def extract_xml():
""" """
Extract translation strings from XML based, keys, mime and desktop Extract translation strings from XML based, mime and desktop files.
files. Own XML files parsing and custom translation marks. Uses custom ITS rules found in the po/its directory.
""" """
HolidaysParse('../data/holidays.xml.in', '_name') if not os.path.isfile('gramps.pot'):
TipsParse('../data/tips.xml.in', '_tip') create_template()
XmlParse('../data/gramps.xml.in', '_comment')
XmlParse('../data/gramps.appdata.xml.in', '_p') for input_file in ['../data/holidays.xml',
DesktopParse('../data/gramps.desktop.in') '../data/tips.xml',
KeyParse('../data/gramps.keys.in', '_description') '../data/gramps.xml.in',
'../data/gramps.appdata.xml.in',
'../data/gramps.desktop.in']:
os.system(('GETTEXTDATADIR=. %(xgettext)s -F -j '
'-o gramps.pot --from-code=UTF-8 %(inputfile)s')
% {'xgettext': xgettextCmd,
'inputfile': input_file}
)
print (input_file)
def create_template(): def create_template():
""" """
@ -573,58 +342,6 @@ def extract_glade():
% {'xgettext': xgettextCmd} % {'xgettext': xgettextCmd}
) )
def extract_gtkbuilder():
"""
Temp workaround for xgettext bug (< gettext 0.18.3)
https://savannah.gnu.org/bugs/index.php?29216
See bug reports #6595, #5621
"""
from xml.etree import ElementTree
'''
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkListStore" id="model1">
<columns>
<!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">All rules must apply</col>
</row>
<row>
<col id="0" translatable="yes">At least one rule must apply</col>
</row>
<row>
<col id="0" translatable="yes">Exactly one rule must apply</col>
</row>
</data>
</object>
msgid "All rules must apply"
msgid "At least one rule must apply"
msgid "Exactly one rule must apply"
'''
files = ['../gramps/plugins/importer/importgedcom.glade', '../gramps/gui/glade/rule.glade']
with open('gtklist.h', 'w') as temp:
for filename in files:
tree = ElementTree.parse(filename)
root = tree.getroot()
for line in root.iter():
att = line.attrib
if att == {'id': '0', 'translatable': 'yes'}:
col = 'char *s = N_("%s");\n' % line.text
temp.write(col)
root.clear()
print ('Wrote gtklist.h')
def xml_fragments(): def xml_fragments():
""" search through the file for xml fragments that contain the """ search through the file for xml fragments that contain the
'translate="yes">string<' pattern. These need to be added to the message 'translate="yes">string<' pattern. These need to be added to the message
@ -698,10 +415,6 @@ def retrieve():
""" """
Extract messages from all files used by Gramps (python, glade, xml) Extract messages from all files used by Gramps (python, glade, xml)
""" """
extract_xml()
extract_gtkbuilder()
create_template() create_template()
create_filesfile() create_filesfile()
@ -718,6 +431,7 @@ def retrieve():
) )
extract_glade() extract_glade()
extract_xml()
# C format header (.h extension) # C format header (.h extension)
for h in headers(): for h in headers():

119
setup.py
View File

@ -3,9 +3,9 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2012 Nick Hall # Copyright (C) 2012,2020 Nick Hall
# Copyright (C) 2012 Rob G. Healey # Copyright (C) 2012 Rob G. Healey
# Copyright (C) 2012 Benny Malengier # Copyright (C) 2012 Benny Malengier
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -45,14 +45,6 @@ from gramps.version import VERSION
import unittest import unittest
import argparse import argparse
# this list MUST be a subset of _LOCALE_NAMES in gen/utils/grampslocale.py
# (that is, if you add a new language here, be sure it's in _LOCALE_NAMES too)
ALL_LINGUAS = ('ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB',
'eo', 'es', 'fi', 'fr', 'he', 'hr', 'hu', 'is', 'it',
'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR', 'pt_PT',
'ru', 'sk', 'sl', 'sq', 'sr', 'sv', 'ta', 'tr', 'uk', 'vi',
'zh_CN', 'zh_HK', 'zh_TW')
_FILES = ('data/tips.xml', 'data/holidays.xml')
svem_flag = '--single-version-externally-managed' svem_flag = '--single-version-externally-managed'
if svem_flag in sys.argv: if svem_flag in sys.argv:
@ -65,34 +57,6 @@ argparser.add_argument("--no-compress-manpages", dest="no_compress_manpages",
args, passthrough = argparser.parse_known_args() args, passthrough = argparser.parse_known_args()
sys.argv = [sys.argv[0]] + passthrough sys.argv = [sys.argv[0]] + passthrough
def intltool_version():
'''
Return the version of intltool as a tuple.
'''
if sys.platform == 'win32':
cmd = ["perl",
r"-e print qx(intltool-update --version) =~ m/(\d+.\d+.\d+)/;"]
try:
ver, ret = subprocess.Popen(cmd ,stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True).communicate()
ver = ver.decode("utf-8")
if ver > "":
version_str = ver
else:
return (0,0,0)
except:
return (0,0,0)
else:
cmd = 'intltool-update --version 2> /dev/null' # pathological case
retcode, version_str = subprocess.getstatusoutput(cmd)
if retcode != 0:
return None
cmd = 'intltool-update --version 2> /dev/null | head -1 | cut -d" " -f3'
retcode, version_str = subprocess.getstatusoutput(cmd)
if retcode != 0: # unlikely but just barely imaginable, so leave it
return None
return tuple([int(num) for num in version_str.split('.')])
def substitute_variables(filename_in, filename_out, subst_vars): def substitute_variables(filename_in, filename_out, subst_vars):
''' '''
Substitute variables in a file. Substitute variables in a file.
@ -106,12 +70,24 @@ def substitute_variables(filename_in, filename_out, subst_vars):
f_in.close() f_in.close()
f_out.close() f_out.close()
def get_linguas():
'''
Read the po/LINGUAS file to get a list of all linguas.
'''
all_linguas = []
with open(os.path.join('po', 'LINGUAS'), 'r', encoding='utf-8') as linguas:
for line in linguas:
if '#' in line:
line = line[:line.find('#')]
all_linguas.extend(line.split())
return all_linguas
def build_trans(build_cmd): def build_trans(build_cmd):
''' '''
Translate the language files into gramps.mo Translate the language files into gramps.mo
''' '''
data_files = build_cmd.distribution.data_files data_files = build_cmd.distribution.data_files
for lang in ALL_LINGUAS: for lang in get_linguas():
po_file = os.path.join('po', lang + '.po') po_file = os.path.join('po', lang + '.po')
mo_file = os.path.join(build_cmd.build_base, 'mo', lang, 'LC_MESSAGES', mo_file = os.path.join(build_cmd.build_base, 'mo', lang, 'LC_MESSAGES',
'gramps.mo') 'gramps.mo')
@ -183,21 +159,12 @@ def build_intl(build_cmd):
''' '''
Merge translation files into desktop and mime files Merge translation files into desktop and mime files
''' '''
for filename in _FILES:
filename = convert_path(filename)
strip_files(filename + '.in', filename, ['_tip', '_name'])
i_v = intltool_version()
if i_v is None or i_v < (0, 25, 0):
log.info('No intltool or version < 0.25.0, build_intl is aborting')
return
data_files = build_cmd.distribution.data_files data_files = build_cmd.distribution.data_files
base = build_cmd.build_base base = build_cmd.build_base
merge_files = (('data/gramps.desktop', 'share/applications', '-d'), merge_files = (('data/gramps.desktop', 'share/applications', '--desktop'),
('data/gramps.keys', 'share/mime-info', '-k'), ('data/gramps.xml', 'share/mime/packages', '--xml'),
('data/gramps.xml', 'share/mime/packages', '-x'), ('data/gramps.appdata.xml', 'share/metainfo', '--xml'))
('data/gramps.appdata.xml', 'share/metainfo', '-x'))
for filename, target, option in merge_files: for filename, target, option in merge_files:
filenamelocal = convert_path(filename) filenamelocal = convert_path(filename)
@ -208,46 +175,17 @@ def build_intl(build_cmd):
merge(filenamelocal + '.in', newfile, option) merge(filenamelocal + '.in', newfile, option)
data_files.append((target, [base + '/' + filename])) data_files.append((target, [base + '/' + filename]))
def strip_files(in_file, out_file, mark): def merge(in_file, out_file, option, po_dir='po'):
''' '''
strip the file of the first character (typically an underscore) in each Run the msgfmt command.
keyword (in the "mark" argument list) in the file -- so this method is an
Alternative to intltool-merge command.
''' '''
if (not os.path.exists(out_file) and os.path.exists(in_file)): if (not os.path.exists(out_file) and os.path.exists(in_file)):
old = open(in_file, 'r', encoding='utf-8') cmd = (('GETTEXTDATADIR=%(po_dir)s msgfmt %(opt)s '
with open(out_file, 'w', encoding='utf-8', errors='strict') as fb: '--template %(in_file)s -d %(po_dir)s -o %(out_file)s') %
for line in old: {'opt' : option,
for marker in mark: 'po_dir' : po_dir,
line = line.replace(marker, marker[1:]) 'in_file' : in_file,
fb.write(line) 'out_file' : out_file})
old.close()
log.info('Compiling %s >> %s', in_file, out_file)
def merge(in_file, out_file, option, po_dir='po', cache=True):
'''
Run the intltool-merge command.
'''
option += ' -u'
if cache:
cache_file = os.path.join('po', '.intltool-merge-cache')
option += ' -c ' + cache_file
if (not os.path.exists(out_file) and os.path.exists(in_file)):
if sys.platform == 'win32':
cmd = (('set LC_ALL=C && perl -S intltool-merge %(opt)s %(po_dir)s %(in_file)s '
'%(out_file)s') %
{'opt' : option,
'po_dir' : po_dir,
'in_file' : in_file,
'out_file' : out_file})
else:
cmd = (('LC_ALL=C intltool-merge %(opt)s %(po_dir)s %(in_file)s '
'%(out_file)s') %
{'opt' : option,
'po_dir' : po_dir,
'in_file' : in_file,
'out_file' : out_file})
if os.system(cmd) != 0: if os.system(cmd) != 0:
msg = ('ERROR: %s was not merged into the translation files!\n' % msg = ('ERROR: %s was not merged into the translation files!\n' %
out_file) out_file)
@ -391,8 +329,7 @@ package_data = package_data_core + package_data_gui
# Resources # Resources
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
data_files_core = [('share/mime-info', ['data/gramps.mime']), data_files_core = [('share/icons', ['images/gramps.png'])]
('share/icons', ['images/gramps.png'])]
DOC_FILES = ['AUTHORS', 'COPYING', 'FAQ', 'INSTALL', 'NEWS', 'README.md', DOC_FILES = ['AUTHORS', 'COPYING', 'FAQ', 'INSTALL', 'NEWS', 'README.md',
'TODO'] 'TODO']
GEDCOM_FILES = glob.glob(os.path.join('example', 'gedcom', '*.*')) GEDCOM_FILES = glob.glob(os.path.join('example', 'gedcom', '*.*'))