summaryrefslogtreecommitdiff
path: root/includes/functions/functions_print_facts.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/functions/functions_print_facts.php')
-rw-r--r--includes/functions/functions_print_facts.php12
1 files 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