diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-01-26 21:56:48 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-01-26 21:56:48 +0000 |
| commit | 9a443a72311062076c6d648f096dd960e537a2a2 (patch) | |
| tree | 6a70da3e856c4fae1111bbcf7430c202296db8a0 /includes | |
| parent | af3bb3d13e62bee19b9c94fbacbdfa6a91720874 (diff) | |
| download | webtrees-9a443a72311062076c6d648f096dd960e537a2a2.tar.gz webtrees-9a443a72311062076c6d648f096dd960e537a2a2.tar.bz2 webtrees-9a443a72311062076c6d648f096dd960e537a2a2.zip | |
#1268131 - Marriage of close relatives - type is not translated
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/functions/functions_print_facts.php | 12 |
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 |
