mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-08-02 00:51:47 +00:00
Added support for EVEN tag.https://github.com/PeWu/topola/issues/13
This commit is contained in:
@@ -12,8 +12,8 @@ interface Props {
|
|||||||
indi: string;
|
indi: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EVENT_TAGS = ['BIRT', 'BAPM', 'CHR', 'DEAT', 'BURI'];
|
const EVENT_TAGS = ['BIRT', 'BAPM', 'CHR', 'DEAT', 'BURI', 'EVEN'];
|
||||||
const EXCLUDED_TAGS = ['NAME', 'SEX', 'FAMC', 'FAMS', 'NOTE'];
|
const EXCLUDED_TAGS = ['NAME', 'SEX', 'FAMC', 'FAMS', 'NOTE', 'SOUR'];
|
||||||
const TAG_DESCRIPTIONS = new Map([
|
const TAG_DESCRIPTIONS = new Map([
|
||||||
['BAPM', 'Baptism'],
|
['BAPM', 'Baptism'],
|
||||||
['BIRT', 'Birth'],
|
['BIRT', 'Birth'],
|
||||||
@@ -21,6 +21,7 @@ const TAG_DESCRIPTIONS = new Map([
|
|||||||
['CHR', 'Christening'],
|
['CHR', 'Christening'],
|
||||||
['DEAT', 'Death'],
|
['DEAT', 'Death'],
|
||||||
['EMAIL', 'E-mail'],
|
['EMAIL', 'E-mail'],
|
||||||
|
['EVEN', 'Event'],
|
||||||
['OCCU', 'Occupation'],
|
['OCCU', 'Occupation'],
|
||||||
['TITL', 'Title'],
|
['TITL', 'Title'],
|
||||||
['WWW', 'WWW'],
|
['WWW', 'WWW'],
|
||||||
@@ -67,6 +68,9 @@ function getData(entry: GedcomEntry) {
|
|||||||
|
|
||||||
function eventDetails(entry: GedcomEntry, intl: InjectedIntl) {
|
function eventDetails(entry: GedcomEntry, intl: InjectedIntl) {
|
||||||
const lines = [];
|
const lines = [];
|
||||||
|
if (entry.data && entry.data.length > 1) {
|
||||||
|
lines.push(<i>{entry.data}</i>);
|
||||||
|
}
|
||||||
const date = entry.tree.find((subentry) => subentry.tag === 'DATE');
|
const date = entry.tree.find((subentry) => subentry.tag === 'DATE');
|
||||||
if (date && date.data) {
|
if (date && date.data) {
|
||||||
lines.push(translateDate(date.data, intl));
|
lines.push(translateDate(date.data, intl));
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
"gedcom.CHR": "Chrzest",
|
"gedcom.CHR": "Chrzest",
|
||||||
"gedcom.DEAT": "Śmierć",
|
"gedcom.DEAT": "Śmierć",
|
||||||
"gedcom.EMAIL": "E-mail",
|
"gedcom.EMAIL": "E-mail",
|
||||||
|
"gedcom.EVEN": "Wydarzenie",
|
||||||
"gedcom.OCCU": "Zawód",
|
"gedcom.OCCU": "Zawód",
|
||||||
"gedcom.TITL": "Tytuł",
|
"gedcom.TITL": "Tytuł",
|
||||||
"gedcom.WWW": "Strona WWW",
|
"gedcom.WWW": "Strona WWW",
|
||||||
|
|||||||
Reference in New Issue
Block a user