From 9a443a72311062076c6d648f096dd960e537a2a2 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sun, 26 Jan 2014 21:56:48 +0000 Subject: #1268131 - Marriage of close relatives - type is not translated --- includes/functions/functions_print_facts.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php index 6f5a280df2..a7f7f7f718 100644 --- a/includes/functions/functions_print_facts.php +++ b/includes/functions/functions_print_facts.php @@ -307,8 +307,16 @@ function print_fact(WT_Fact $fact, WT_GedcomRecord $record) { // Print the type of this fact/event if ($type) { - // We don't have a translation for $type - but a custom translation might exist. - echo WT_Gedcom_Tag::getLabelValue('TYPE', WT_I18N::translate(WT_Filter::escapeHtml($type))); + $utype = strtoupper($type); + // Events of close relatives, e.g. _MARR_CHIL + if (substr($fact->getTag(), 0, 6) == '_MARR_' && ($utype == 'CIVIL' || $utype == 'PARTNERS' || $utype == 'RELIGIOUS')) { + // Translate MARR/TYPE using the code that supports MARR_CIVIL, etc. tags + $type = WT_Gedcom_Tag::getLabel('MARR_'.$utype); + } else { + // Allow (custom) translations for other types + $type = WT_I18N::translate($type); + } + echo WT_Gedcom_Tag::getLabelValue('TYPE', WT_Filter::escapeHtml($type)); } // Print the date of this fact/event -- cgit v1.3