From 7354cabd29835c2391cd65ac0650161b5bd2b5e4 Mon Sep 17 00:00:00 2001 From: Przemek Wiech Date: Sat, 23 Nov 2019 23:39:52 +0100 Subject: [PATCH] Added support for EVEN tag.https://github.com/PeWu/topola/issues/13 --- src/details.tsx | 8 ++++++-- src/translations/pl.json | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/details.tsx b/src/details.tsx index b5c20ea..85395e2 100644 --- a/src/details.tsx +++ b/src/details.tsx @@ -12,8 +12,8 @@ interface Props { indi: string; } -const EVENT_TAGS = ['BIRT', 'BAPM', 'CHR', 'DEAT', 'BURI']; -const EXCLUDED_TAGS = ['NAME', 'SEX', 'FAMC', 'FAMS', 'NOTE']; +const EVENT_TAGS = ['BIRT', 'BAPM', 'CHR', 'DEAT', 'BURI', 'EVEN']; +const EXCLUDED_TAGS = ['NAME', 'SEX', 'FAMC', 'FAMS', 'NOTE', 'SOUR']; const TAG_DESCRIPTIONS = new Map([ ['BAPM', 'Baptism'], ['BIRT', 'Birth'], @@ -21,6 +21,7 @@ const TAG_DESCRIPTIONS = new Map([ ['CHR', 'Christening'], ['DEAT', 'Death'], ['EMAIL', 'E-mail'], + ['EVEN', 'Event'], ['OCCU', 'Occupation'], ['TITL', 'Title'], ['WWW', 'WWW'], @@ -67,6 +68,9 @@ function getData(entry: GedcomEntry) { function eventDetails(entry: GedcomEntry, intl: InjectedIntl) { const lines = []; + if (entry.data && entry.data.length > 1) { + lines.push({entry.data}); + } const date = entry.tree.find((subentry) => subentry.tag === 'DATE'); if (date && date.data) { lines.push(translateDate(date.data, intl)); diff --git a/src/translations/pl.json b/src/translations/pl.json index a907f04..cc72908 100644 --- a/src/translations/pl.json +++ b/src/translations/pl.json @@ -31,6 +31,7 @@ "gedcom.CHR": "Chrzest", "gedcom.DEAT": "Śmierć", "gedcom.EMAIL": "E-mail", + "gedcom.EVEN": "Wydarzenie", "gedcom.OCCU": "Zawód", "gedcom.TITL": "Tytuł", "gedcom.WWW": "Strona WWW",