xref: /webtrees/app/CustomTags/Ancestry.php (revision d11be7027e34e3121be11cc025421873364403f9)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2023 webtrees development team
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\CustomTags;
21
22use Fisharebest\Webtrees\Contracts\CustomTagInterface;
23use Fisharebest\Webtrees\Contracts\ElementInterface;
24use Fisharebest\Webtrees\Elements\AddressWebPage;
25use Fisharebest\Webtrees\Elements\AutomatedRecordId;
26use Fisharebest\Webtrees\Elements\CustomElement;
27use Fisharebest\Webtrees\Elements\CustomEvent;
28use Fisharebest\Webtrees\Elements\CustomFact;
29use Fisharebest\Webtrees\Elements\DateValue;
30use Fisharebest\Webtrees\Elements\LdsInitiatory;
31use Fisharebest\Webtrees\Elements\PlaceName;
32use Fisharebest\Webtrees\Elements\SubmitterText;
33use Fisharebest\Webtrees\I18N;
34
35/**
36 * GEDCOM files created by Ancestry
37 *
38 * @see https://www.ancestry.com/
39 * @see https://www.webtrees.net/index.php/en/forum/help-for-release-2-1-x/36664-2-1-beta-support-for-indi-even-sour-data-note-and-the-like
40 */
41class Ancestry implements CustomTagInterface
42{
43    /**
44     * The name of the application.
45     *
46     * @return string
47     */
48    public function name(): string
49    {
50        return 'Ancestry';
51    }
52
53    /**
54     * Tags created by this application.
55     *
56     * @return array<string,ElementInterface>
57     */
58    public function tags(): array
59    {
60        return [
61            'HEAD:SOUR:_TREE'       => new CustomElement(I18N::translate('Family tree')),
62            'HEAD:SOUR:_TREE:NOTE'  => new SubmitterText(I18N::translate('Note')),
63            'HEAD:SOUR:_TREE:RIN'   => new AutomatedRecordId(I18N::translate('Record ID number')),
64            'INDI:*:SOUR:_APID'     => /* I18N: GEDCOM tag _APID */ new CustomElement(I18N::translate('Ancestry PID')),
65            'INDI:*:SOUR:DATA:NOTE' => new SubmitterText(I18N::translate('Note')),
66            'INDI:_EMPLOY'          => new CustomFact(I18N::translate('Occupation')),
67            'INDI:_FUN'             => new CustomEvent(I18N::translate('Funeral')),
68            'INDI:_INIT'            => new LdsInitiatory(I18N::translate('LDS initiatory')),
69            'INDI:_ORDI'            => new CustomEvent(I18N::translate('Ordination')),
70            'INDI:_ORIG'            => new CustomFact(I18N::translate('Origin')),
71            'INDI:_DEST'            => new CustomFact(I18N::translate('Destination')),
72            'OBJE:DATE'             => new DateValue(I18N::translate('Date')),
73            'OBJE:PLAC'             => new PlaceName(I18N::translate('Place')),
74            'OBJE:_CREA'            => /* I18N: GEDCOM tag _CREA */ new CustomElement(I18N::translate('Created at')),
75            'OBJE:_ORIG'            => /* I18N: GEDCOM tag _ORIG */ new CustomElement(I18N::translate('Original text')),
76            'OBJE:_ORIG:_URL'       => new AddressWebPage(I18N::translate('URL')),
77        ];
78    }
79}
80