Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/location levels #531

Merged
merged 11 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion locales/Belarusian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Chinese Simplified.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Dutch.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/English.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Hungarian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Icelandic.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Japanese.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Kazakh (Cyrillic).lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Portuguese.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Serbian (Latin).lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/Spanish.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/czech.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/french.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/german.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
1 change: 1 addition & 0 deletions locales/help_enu/gkhHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>Change log</h1>

<p>
<b>??.??.2024 [v2.29.0 &amp; v3.5.0]</b><ul>
<li>Added the "Extended locations" option, which includes substitution of full place names depending on the date of events when using the historical ATD hierarchy.
<li>Added a tool for batch adding photos.
<li>Added support for multiple names and date periods in location records (GEDCOM 5.5 EL).
<li>Added a non-standard date attribute to source records (for clarifying and sorting censuses, parish books, confession books and personal documents).
Expand Down
1 change: 1 addition & 0 deletions locales/help_rus/gkhHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>История версий</h1>

<p>
<b>??.??.2024 [v2.29.0 &amp; v3.5.0]</b><ul>
<li>Добавлена опция "Расширенная обработка мест", включающая подстановку полных названий мест в зависимости от даты событий при использовании иерархии исторического АТД.
<li>Добавлен инструмент пакетного добавления фотографий.
<li>Добавлена поддержка множественных названий и периодов дат в записи мест (GEDCOM 5.5 EL).
<li>Добавлен нестандартный атрибут даты в записи источников (для уточнения и сортировки переписей, метрических книг, ревизских сказок, исповедных книг и личных документов).
Expand Down
4 changes: 4 additions & 0 deletions locales/help_rus/gkhOptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,10 @@ <h3>Список персон</h3>
<dt>Расширенное определение родства</dt>
<dd>В калькуляторе родственных связей и в деревьях с включенным отображением родства, будут определяться такие связи как единокровные и единоутробные братья и сестры,
усыновления/удочерения, родные и неродные родители, гражданские браки.</dd>

<dt>Расширенная обработка мест</dt>
<dd>Все операции по обработке и подстановке местоположений с участием записей мест будут учитывать возможное наличие исторических сведений о привязке названий мест
к датам, возможное наличие иерархических связей между местами (см. <a href="gkhRec_Place.html">Записи географических мест</a>).</dd>
</dl>

<hr />
Expand Down
41 changes: 41 additions & 0 deletions locales/help_rus/gkhRec_Place.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,47 @@ <h1>Записи географических мест</h1>
можно просмотреть список всех фактов событий персон или семей, которые ссылаются на данную.
</p>

<hr />
<p align="center"><img src="images/dlgLocHistory.png"></p>
<p>
Данный диалог предназначен для ввода и управления историческими сведениями о месте: привязками названий мест и ссылок на верхние уровни
иерархии административно-территориального деления к периоду действия. Т.е. если определенный нас.пункт на протяжении истории несколько раз менял своё название -
в данном диалоге можно ввести все названия и указать в какие интервалы времени они действовали. Если некая деревня или город в разные периоды входили в разные
волости или районы - это можно ввести в нижней секции диалога - "Ссылки на верхние уровни".
</p>
<p>
Возможно использование различных подходов к ведению справочника мест:<ul>
<li>не использовать исторические привязки имен и иерархию;
<li>использовать только одноуровневую модель: в список имен вводятся длинные полные имена, от самого нижнего уровня - до верхнего (или наоборот), и их периоды;
<li>использовать полную многоуровневую модель: в имя вводится только непосредственная часть (название города или волости, или губернии, и т.д.), прочие части
распределяются по уровням, каждое конкретное место получает собственную запись, со своими названиями и ссылками на верхние уровни.
</ul>
</p>
<p>
Внимание: при включении опции "Настройки \ Особое \ Расширенная обработка мест" и подключении иерархически организованных мест к датам в диалоге редактирования событий -
места начинают автоматически подстраиваться при изменении даты (определяется полное длинное название места в конкретную дату события). Также этот механизм будет работать
при использовании инструмента управления местами и на этапе верификации загружаемых файлов.
</p>

<hr />
<p align="center"><img src="images/dlgLocName.png"></p>
<p>
Диалог предназначен для редактирования названия места и его периода действия. Например: "Вятское наместничество", период действия названия с 11/09/1780 по 30/12/1796.
</p>

<hr />
<p align="center"><img src="images/dlgLocLink.png"></p>
<p>
Диалог предназначен для редактирования ссылки на запись места более высокого уровня и периода подчинения. Например, "Вятская провинция/наместничество" входила
в "Сибирская губерния" с 29/05/1719 по 28/04/1727 и в "Казанская губерния" с 29/04/1727 по 10/09/1780.
</p>

<hr />
<p>
Пример полного заполнения истории:
</p>
<p align="center"><img src="images/dlgLocHistSample.png"></p>

<hr />
<p>
Также смотрите: <a href="gkhRec_Event.html">События/факты</a>, <a href="gkhRec_Note.html">Заметки</a>, <a href="gkhRec_Media.html">Мультимедиа-материалы</a>,
Expand Down
Binary file added locales/help_rus/images/dlgLocHistSample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locales/help_rus/images/dlgLocHistory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locales/help_rus/images/dlgLocLink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locales/help_rus/images/dlgLocName.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion locales/italian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/polish.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
4 changes: 3 additions & 1 deletion locales/russian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Анализ переписей
937=Персона может быть найдена в переписи `{0}`
938=История
939=Периоды названий места пересекаются. Это приведет к ошибкам при поиске названия места по дате.
939=Периоды пересекаются. Это приведет к ошибкам при поиске названия места по дате.
940=Расширенная обработка мест
941=Пакетное добавление фотографий
942=Добавлено {0} фотографий из {1}.
943=Ссылки на верхний уровень
944=Удалить ссылку на верхний уровень?
4 changes: 3 additions & 1 deletion locales/ukrainian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@
936=Census analysis
937=The person can be found in the census `{0}`
938=History
939=The periods of place names overlap. This will cause errors when searching for a place name by date.
939=The periods overlap. This will cause errors when searching for a place name by date.
940=Extended locations
941=Photos batch adding
942=Added {0} photos from {1}.
943=Top level links
944=Remove top level link?
29 changes: 6 additions & 23 deletions projects/GKCore/GDModel/GDMCustomDate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public bool Equals(GDMCustomDate other)
return abs1.Equals(abs2);
}

public abstract void GetDateRange(out GDMDate dateStart, out GDMDate dateEnd);

public static GDMDate CreateApproximated(GDMDate date, GDMApproximated approximated)
{
GDMDate result = new GDMDate();
Expand All @@ -181,36 +183,17 @@ public static GDMDateRange CreateRange(GDMDate dateAfter, GDMDate dateBefore)
return result;
}


public static void GetDateRange(GDMCustomDate date, out GDMDate dateStart, out GDMDate dateEnd)
{
if (date is GDMDateRange) {
GDMDateRange dtRange = date as GDMDateRange;
dateStart = dtRange.After;
dateEnd = dtRange.Before;
} else if (date is GDMDatePeriod) {
GDMDatePeriod dtPeriod = date as GDMDatePeriod;
dateStart = dtPeriod.DateFrom;
dateEnd = dtPeriod.DateTo;
} else {
var dt = date as GDMDate;
dateStart = dt;
dateEnd = dt;
}
}

public static GDMDatePeriod GetIntersection(GDMCustomDate range1, GDMCustomDate range2)
{
if (range1 == null || range1.IsEmpty() || range2 == null || range2.IsEmpty())
return GDMDatePeriod.Empty;

GDMDate r1start, r1end, r2start, r2end;
range1.GetDateRange(out r1start, out r1end);
range2.GetDateRange(out r2start, out r2end);

GetDateRange(range1, out r1start, out r1end);
GetDateRange(range2, out r2start, out r2end);

GDMDate greatestStart = r1start.CompareTo(r2start) > 0 ? r1start : r2start;
GDMDate smallestEnd = r1end.CompareTo(r2end) < 0 ? r1end : r2end;
GDMDate greatestStart = r1start.IsEmpty() ? r2start : (r2start.IsEmpty() ? r1start : (r1start.CompareTo(r2start) > 0) ? r1start : r2start);
GDMDate smallestEnd = r1end.IsEmpty() ? r2end : (r2end.IsEmpty() ? r1end : (r1end.CompareTo(r2end) < 0) ? r1end : r2end);

// no intersection
if (greatestStart.CompareTo(smallestEnd) > 0) {
Expand Down
8 changes: 8 additions & 0 deletions projects/GKCore/GDModel/GDMDate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ namespace GDModel
/// </summary>
public class GDMDate : GDMCustomDate
{
public static readonly GDMDate Empty = new GDMDate();

public const int UNKNOWN_YEAR = -1;

private GDMApproximated fApproximated;
Expand Down Expand Up @@ -585,5 +587,11 @@ public override string GetDisplayStringExt(DateFormat format, bool sign, bool sh
}

#endregion

public override void GetDateRange(out GDMDate dateStart, out GDMDate dateEnd)
{
dateStart = this;
dateEnd = this;
}
}
}
6 changes: 6 additions & 0 deletions projects/GKCore/GDModel/GDMDatePeriod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,11 @@ public override string GetDisplayStringExt(DateFormat format, bool sign, bool sh

return result;
}

public override void GetDateRange(out GDMDate dateStart, out GDMDate dateEnd)
{
dateStart = fDateFrom;
dateEnd = fDateTo;
}
}
}
6 changes: 6 additions & 0 deletions projects/GKCore/GDModel/GDMDateRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,11 @@ public override string GetDisplayStringExt(DateFormat format, bool sign, bool sh

return result;
}

public override void GetDateRange(out GDMDate dateStart, out GDMDate dateEnd)
{
dateStart = fDateAfter;
dateEnd = fDateBefore;
}
}
}
15 changes: 15 additions & 0 deletions projects/GKCore/GDModel/GDMDateValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,20 @@ public override string GetDisplayStringExt(DateFormat format, bool sign, bool sh
string result = (fValue == null) ? string.Empty : fValue.GetDisplayStringExt(format, sign, showCalendar, shorten);
return result;
}

public override string ToString()
{
return GetDisplayStringExt(DateFormat.dfDD_MM_YYYY, true, true, false);
}

public override void GetDateRange(out GDMDate dateStart, out GDMDate dateEnd)
{
if (fValue == null) {
dateStart = null;
dateEnd = null;
} else {
fValue.GetDateRange(out dateStart, out dateEnd);
}
}
}
}
Loading
Loading