Passed
Push — 1.7 ( 23cbb7...8df8a8 )
by Greg
08:15
created
app/Census/CensusOfWales1841.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,28 +19,28 @@
 block discarded – undo
19 19
  * Definitions for a census
20 20
  */
21 21
 class CensusOfWales1841 extends CensusOfWales implements CensusInterface {
22
-	/**
23
-	 * When did this census occur.
24
-	 *
25
-	 * @return string
26
-	 */
27
-	public function censusDate() {
28
-		return '06 JUN 1841';
29
-	}
22
+    /**
23
+     * When did this census occur.
24
+     *
25
+     * @return string
26
+     */
27
+    public function censusDate() {
28
+        return '06 JUN 1841';
29
+    }
30 30
 
31
-	/**
32
-	 * The columns of the census.
33
-	 *
34
-	 * @return CensusColumnInterface[]
35
-	 */
36
-	public function columns() {
37
-		return array(
38
-			new CensusColumnFullName($this, 'Name', 'Name'),
39
-			new CensusColumnAgeMale5Years($this, 'AgeM', 'Age (males)'),
40
-			new CensusColumnAgeFemale5Years($this, 'AgeF', 'Age (females)'),
41
-			new CensusColumnOccupation($this, 'Occupation', 'Profession, trade, employment or of independent means'),
42
-			new CensusColumnNull($this, 'BiC', 'Born in same county'),
43
-			new CensusColumnBornForeignParts($this, 'SIF', 'Born in Scotland, Ireland or foreign parts'),
44
-		);
45
-	}
31
+    /**
32
+     * The columns of the census.
33
+     *
34
+     * @return CensusColumnInterface[]
35
+     */
36
+    public function columns() {
37
+        return array(
38
+            new CensusColumnFullName($this, 'Name', 'Name'),
39
+            new CensusColumnAgeMale5Years($this, 'AgeM', 'Age (males)'),
40
+            new CensusColumnAgeFemale5Years($this, 'AgeF', 'Age (females)'),
41
+            new CensusColumnOccupation($this, 'Occupation', 'Profession, trade, employment or of independent means'),
42
+            new CensusColumnNull($this, 'BiC', 'Born in same county'),
43
+            new CensusColumnBornForeignParts($this, 'SIF', 'Born in Scotland, Ireland or foreign parts'),
44
+        );
45
+    }
46 46
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,13 +18,15 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Definitions for a census
20 20
  */
21
-class CensusOfWales1841 extends CensusOfWales implements CensusInterface {
21
+class CensusOfWales1841 extends CensusOfWales implements CensusInterface
22
+{
22 23
 	/**
23 24
 	 * When did this census occur.
24 25
 	 *
25 26
 	 * @return string
26 27
 	 */
27
-	public function censusDate() {
28
+	public function censusDate()
29
+	{
28 30
 		return '06 JUN 1841';
29 31
 	}
30 32
 
@@ -33,7 +35,8 @@  discard block
 block discarded – undo
33 35
 	 *
34 36
 	 * @return CensusColumnInterface[]
35 37
 	 */
36
-	public function columns() {
38
+	public function columns()
39
+	{
37 40
 		return array(
38 41
 			new CensusColumnFullName($this, 'Name', 'Name'),
39 42
 			new CensusColumnAgeMale5Years($this, 'AgeM', 'Age (males)'),
Please login to merge, or discard this patch.
app/Census/CensusOfFrance1881.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -19,27 +19,27 @@
 block discarded – undo
19 19
  * Definitions for a census
20 20
  */
21 21
 class CensusOfFrance1881 extends CensusOfFrance implements CensusInterface {
22
-	/**
23
-	 * When did this census occur.
24
-	 *
25
-	 * @return string
26
-	 */
27
-	public function censusDate() {
28
-		return '20 JAN 1881';
29
-	}
22
+    /**
23
+     * When did this census occur.
24
+     *
25
+     * @return string
26
+     */
27
+    public function censusDate() {
28
+        return '20 JAN 1881';
29
+    }
30 30
 
31
-	/**
32
-	 * The columns of the census.
33
-	 *
34
-	 * @return CensusColumnInterface[]
35
-	 */
36
-	public function columns() {
37
-		return array(
38
-			new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
39
-			new CensusColumnGivenNames($this, 'Prénoms', ''),
40
-			new CensusColumnAge($this, 'Âge', ''),
41
-			new CensusColumnOccupation($this, 'Profession', ''),
42
-			new CensusColumnRelationToHead($this, 'Position', 'Position dans le ménage'),
43
-		);
44
-	}
31
+    /**
32
+     * The columns of the census.
33
+     *
34
+     * @return CensusColumnInterface[]
35
+     */
36
+    public function columns() {
37
+        return array(
38
+            new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
39
+            new CensusColumnGivenNames($this, 'Prénoms', ''),
40
+            new CensusColumnAge($this, 'Âge', ''),
41
+            new CensusColumnOccupation($this, 'Profession', ''),
42
+            new CensusColumnRelationToHead($this, 'Position', 'Position dans le ménage'),
43
+        );
44
+    }
45 45
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,13 +18,15 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Definitions for a census
20 20
  */
21
-class CensusOfFrance1881 extends CensusOfFrance implements CensusInterface {
21
+class CensusOfFrance1881 extends CensusOfFrance implements CensusInterface
22
+{
22 23
 	/**
23 24
 	 * When did this census occur.
24 25
 	 *
25 26
 	 * @return string
26 27
 	 */
27
-	public function censusDate() {
28
+	public function censusDate()
29
+	{
28 30
 		return '20 JAN 1881';
29 31
 	}
30 32
 
@@ -33,7 +35,8 @@  discard block
 block discarded – undo
33 35
 	 *
34 36
 	 * @return CensusColumnInterface[]
35 37
 	 */
36
-	public function columns() {
38
+	public function columns()
39
+	{
37 40
 		return array(
38 41
 			new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
39 42
 			new CensusColumnGivenNames($this, 'Prénoms', ''),
Please login to merge, or discard this patch.
app/Census/CensusColumnConditionFrenchFille.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,23 +19,23 @@
 block discarded – undo
19 19
  * Marital status.
20 20
  */
21 21
 class CensusColumnConditionFrenchFille extends AbstractCensusColumnCondition {
22
-	/* Text to display for married individuals */
23
-	protected $husband = '';
24
-	protected $wife    = '';
22
+    /* Text to display for married individuals */
23
+    protected $husband = '';
24
+    protected $wife    = '';
25 25
 
26
-	/* Text to display for unmarried individuals */
27
-	protected $bachelor = '';
28
-	protected $spinster = '1';
26
+    /* Text to display for unmarried individuals */
27
+    protected $bachelor = '';
28
+    protected $spinster = '1';
29 29
 
30
-	/* Text to display for children */
31
-	protected $boy  = '';
32
-	protected $girl = '1';
30
+    /* Text to display for children */
31
+    protected $boy  = '';
32
+    protected $girl = '1';
33 33
 
34
-	/* Text to display for divorced individuals */
35
-	protected $divorce  = '';
36
-	protected $divorcee = '';
34
+    /* Text to display for divorced individuals */
35
+    protected $divorce  = '';
36
+    protected $divorcee = '';
37 37
 
38
-	/* Text to display for widowed individuals (not yet implemented) */
39
-	protected $widower = '';
40
-	protected $widow   = '';
38
+    /* Text to display for widowed individuals (not yet implemented) */
39
+    protected $widower = '';
40
+    protected $widow   = '';
41 41
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
 /**
19 19
  * Marital status.
20 20
  */
21
-class CensusColumnConditionFrenchFille extends AbstractCensusColumnCondition {
21
+class CensusColumnConditionFrenchFille extends AbstractCensusColumnCondition
22
+{
22 23
 	/* Text to display for married individuals */
23 24
 	protected $husband = '';
24 25
 	protected $wife    = '';
Please login to merge, or discard this patch.
app/Statement.php 3 patches
Indentation   +201 added lines, -201 removed lines patch added patch discarded remove patch
@@ -22,205 +22,205 @@
 block discarded – undo
22 22
  * Extend PHP's native PDOStatement class.
23 23
  */
24 24
 class Statement {
25
-	/** @var PDOStatement A prepared statement. */
26
-	private $pdo_statement;
27
-
28
-	/** @var bool Keep track of calls to execute(), so we can do it automatically. */
29
-	private $executed = false;
30
-
31
-	/**
32
-	 * Create a Statement object from a PDOStatement object.
33
-	 *
34
-	 * @param PDOStatement $pdo_statement
35
-	 */
36
-	public function __construct(PDOStatement $pdo_statement) {
37
-		$this->pdo_statement = $pdo_statement;
38
-	}
39
-
40
-	/**
41
-	 * Execute a query
42
-	 *
43
-	 * @param array $bind_variables
44
-	 *
45
-	 * @throws \Exception
46
-	 *
47
-	 * @return Statement
48
-	 */
49
-	public function execute($bind_variables = array()) {
50
-		if ($this->executed) {
51
-			throw new \Exception('Statement::execute() called twice.');
52
-		}
53
-
54
-		// Parameters may be either named (e.g. :foo) or positional (e.g. ?).
55
-		// Named parameters may take any type. Positional parameters are always strings.
56
-		// Queries should use one format or the other.
57
-		foreach ($bind_variables as $key => $bind_variable) {
58
-			if (is_numeric($key)) {
59
-				// Positional parameters are numeric (starting at 1)
60
-				$key = 1 + $key;
61
-			} else {
62
-				// Named parameters are prefixed with a colon
63
-				$key = ':' . $key;
64
-			}
65
-			switch (gettype($bind_variable)) {
66
-			case 'NULL':
67
-				$this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_NULL);
68
-				break;
69
-			case 'boolean':
70
-				$this->pdo_statement->bindValue($key, (int) $bind_variable, PDO::PARAM_INT);
71
-				break;
72
-			case 'integer':
73
-				$this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_INT);
74
-				break;
75
-			default:
76
-				$this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_STR);
77
-				break;
78
-			}
79
-		}
80
-
81
-		$start = microtime(true);
82
-		$this->pdo_statement->execute();
83
-		$end = microtime(true);
84
-		// If it was a SELECT statement, we cannot run it again.
85
-		$this->executed = strpos($this->pdo_statement->queryString, 'SELECT') === 0;
86
-
87
-		Database::logQuery($this->pdo_statement->queryString, $this->pdo_statement->rowCount(), $end - $start, $bind_variables);
88
-
89
-		return $this;
90
-	}
91
-
92
-	/**
93
-	 * Close the cursor, and mark it as not-executed, so we can execute
94
-	 * it again (perhaps with different parameters).
95
-	 */
96
-	public function closeCursor() {
97
-		$this->pdo_statement->closeCursor();
98
-		$this->executed = false;
99
-	}
100
-
101
-	/**
102
-	 * Fetch the next row from the cursor.
103
-	 *
104
-	 * Execute the query, if necessary. Typically when there are no parameters.
105
-	 *
106
-	 * @param int $fetch_style
107
-	 *
108
-	 * @return \stdClass|array|false
109
-	 */
110
-	public function fetch($fetch_style = PDO::FETCH_OBJ) {
111
-		if (!$this->executed) {
112
-			$this->execute();
113
-		}
114
-
115
-		return $this->pdo_statement->fetch($fetch_style);
116
-	}
117
-
118
-	/**
119
-	 * Fetch all rows from the cursor, and close it.
120
-	 *
121
-	 * Execute the query, if necessary. Typically when there are no parameters.
122
-	 *
123
-	 * @param int $fetch_style
124
-	 *
125
-	 * @return \stdClass[]|string[][]
126
-	 */
127
-	public function fetchAll($fetch_style = PDO::FETCH_OBJ) {
128
-		if (!$this->executed) {
129
-			$this->execute();
130
-		}
131
-
132
-		$rows = $this->pdo_statement->fetchAll($fetch_style);
133
-		$this->closeCursor();
134
-
135
-		return $rows;
136
-	}
137
-
138
-	/**
139
-	 * Fetch one row, and close the cursor. e.g. SELECT * FROM foo WHERE pk=bar
140
-	 *
141
-	 * Execute the query, if necessary. Typically when there are no parameters.
142
-	 *
143
-	 * @param int $fetch_style
144
-	 *
145
-	 * @return \stdClass|array|null
146
-	 */
147
-	public function fetchOneRow($fetch_style = PDO::FETCH_OBJ) {
148
-		if (!$this->executed) {
149
-			$this->execute();
150
-		}
151
-
152
-		$row = $this->pdo_statement->fetch($fetch_style);
153
-		$this->closeCursor();
154
-
155
-		return $row === false ? null : $row;
156
-	}
157
-
158
-	/**
159
-	 * Fetch one value and close the cursor. e.g. SELECT MAX(foo) FROM bar
160
-	 *
161
-	 * Execute the query, if necessary. Typically when there are no parameters.
162
-	 *
163
-	 * @return string|null
164
-	 */
165
-	public function fetchOne() {
166
-		if (!$this->executed) {
167
-			$this->execute();
168
-		}
169
-
170
-		$value = $this->pdo_statement->fetchColumn();
171
-		$this->closeCursor();
172
-
173
-		return $value === false ? null : $value;
174
-	}
175
-
176
-	/**
177
-	 * Fetch two columns, and return an associative array of col1=>col2
178
-	 *
179
-	 * Execute the query, if necessary. Typically when there are no parameters.
180
-	 *
181
-	 * @return string[]
182
-	 */
183
-	public function fetchAssoc() {
184
-		if (!$this->executed) {
185
-			$this->execute();
186
-		}
187
-
188
-		$rows = array();
189
-		while ($row = $this->pdo_statement->fetch(PDO::FETCH_NUM)) {
190
-			$rows[$row[0]] = $row[1];
191
-		}
192
-		$this->closeCursor();
193
-
194
-		return $rows;
195
-	}
196
-
197
-	/**
198
-	 * Fetch all the first column, as an array.
199
-	 *
200
-	 * Execute the query, if necessary. Typically when there are no parameters.
201
-	 *
202
-	 * @return string[]
203
-	 */
204
-	public function fetchOneColumn() {
205
-		if (!$this->executed) {
206
-			$this->execute();
207
-		}
208
-
209
-		$list = array();
210
-		while ($row = $this->pdo_statement->fetch(PDO::FETCH_NUM)) {
211
-			$list[] = $row[0];
212
-		}
213
-		$this->closeCursor();
214
-
215
-		return $list;
216
-	}
217
-
218
-	/**
219
-	 * How many rows were affected by this statement.
220
-	 *
221
-	 * @return int
222
-	 */
223
-	public function rowCount() {
224
-		return $this->pdo_statement->rowCount();
225
-	}
25
+    /** @var PDOStatement A prepared statement. */
26
+    private $pdo_statement;
27
+
28
+    /** @var bool Keep track of calls to execute(), so we can do it automatically. */
29
+    private $executed = false;
30
+
31
+    /**
32
+     * Create a Statement object from a PDOStatement object.
33
+     *
34
+     * @param PDOStatement $pdo_statement
35
+     */
36
+    public function __construct(PDOStatement $pdo_statement) {
37
+        $this->pdo_statement = $pdo_statement;
38
+    }
39
+
40
+    /**
41
+     * Execute a query
42
+     *
43
+     * @param array $bind_variables
44
+     *
45
+     * @throws \Exception
46
+     *
47
+     * @return Statement
48
+     */
49
+    public function execute($bind_variables = array()) {
50
+        if ($this->executed) {
51
+            throw new \Exception('Statement::execute() called twice.');
52
+        }
53
+
54
+        // Parameters may be either named (e.g. :foo) or positional (e.g. ?).
55
+        // Named parameters may take any type. Positional parameters are always strings.
56
+        // Queries should use one format or the other.
57
+        foreach ($bind_variables as $key => $bind_variable) {
58
+            if (is_numeric($key)) {
59
+                // Positional parameters are numeric (starting at 1)
60
+                $key = 1 + $key;
61
+            } else {
62
+                // Named parameters are prefixed with a colon
63
+                $key = ':' . $key;
64
+            }
65
+            switch (gettype($bind_variable)) {
66
+            case 'NULL':
67
+                $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_NULL);
68
+                break;
69
+            case 'boolean':
70
+                $this->pdo_statement->bindValue($key, (int) $bind_variable, PDO::PARAM_INT);
71
+                break;
72
+            case 'integer':
73
+                $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_INT);
74
+                break;
75
+            default:
76
+                $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_STR);
77
+                break;
78
+            }
79
+        }
80
+
81
+        $start = microtime(true);
82
+        $this->pdo_statement->execute();
83
+        $end = microtime(true);
84
+        // If it was a SELECT statement, we cannot run it again.
85
+        $this->executed = strpos($this->pdo_statement->queryString, 'SELECT') === 0;
86
+
87
+        Database::logQuery($this->pdo_statement->queryString, $this->pdo_statement->rowCount(), $end - $start, $bind_variables);
88
+
89
+        return $this;
90
+    }
91
+
92
+    /**
93
+     * Close the cursor, and mark it as not-executed, so we can execute
94
+     * it again (perhaps with different parameters).
95
+     */
96
+    public function closeCursor() {
97
+        $this->pdo_statement->closeCursor();
98
+        $this->executed = false;
99
+    }
100
+
101
+    /**
102
+     * Fetch the next row from the cursor.
103
+     *
104
+     * Execute the query, if necessary. Typically when there are no parameters.
105
+     *
106
+     * @param int $fetch_style
107
+     *
108
+     * @return \stdClass|array|false
109
+     */
110
+    public function fetch($fetch_style = PDO::FETCH_OBJ) {
111
+        if (!$this->executed) {
112
+            $this->execute();
113
+        }
114
+
115
+        return $this->pdo_statement->fetch($fetch_style);
116
+    }
117
+
118
+    /**
119
+     * Fetch all rows from the cursor, and close it.
120
+     *
121
+     * Execute the query, if necessary. Typically when there are no parameters.
122
+     *
123
+     * @param int $fetch_style
124
+     *
125
+     * @return \stdClass[]|string[][]
126
+     */
127
+    public function fetchAll($fetch_style = PDO::FETCH_OBJ) {
128
+        if (!$this->executed) {
129
+            $this->execute();
130
+        }
131
+
132
+        $rows = $this->pdo_statement->fetchAll($fetch_style);
133
+        $this->closeCursor();
134
+
135
+        return $rows;
136
+    }
137
+
138
+    /**
139
+     * Fetch one row, and close the cursor. e.g. SELECT * FROM foo WHERE pk=bar
140
+     *
141
+     * Execute the query, if necessary. Typically when there are no parameters.
142
+     *
143
+     * @param int $fetch_style
144
+     *
145
+     * @return \stdClass|array|null
146
+     */
147
+    public function fetchOneRow($fetch_style = PDO::FETCH_OBJ) {
148
+        if (!$this->executed) {
149
+            $this->execute();
150
+        }
151
+
152
+        $row = $this->pdo_statement->fetch($fetch_style);
153
+        $this->closeCursor();
154
+
155
+        return $row === false ? null : $row;
156
+    }
157
+
158
+    /**
159
+     * Fetch one value and close the cursor. e.g. SELECT MAX(foo) FROM bar
160
+     *
161
+     * Execute the query, if necessary. Typically when there are no parameters.
162
+     *
163
+     * @return string|null
164
+     */
165
+    public function fetchOne() {
166
+        if (!$this->executed) {
167
+            $this->execute();
168
+        }
169
+
170
+        $value = $this->pdo_statement->fetchColumn();
171
+        $this->closeCursor();
172
+
173
+        return $value === false ? null : $value;
174
+    }
175
+
176
+    /**
177
+     * Fetch two columns, and return an associative array of col1=>col2
178
+     *
179
+     * Execute the query, if necessary. Typically when there are no parameters.
180
+     *
181
+     * @return string[]
182
+     */
183
+    public function fetchAssoc() {
184
+        if (!$this->executed) {
185
+            $this->execute();
186
+        }
187
+
188
+        $rows = array();
189
+        while ($row = $this->pdo_statement->fetch(PDO::FETCH_NUM)) {
190
+            $rows[$row[0]] = $row[1];
191
+        }
192
+        $this->closeCursor();
193
+
194
+        return $rows;
195
+    }
196
+
197
+    /**
198
+     * Fetch all the first column, as an array.
199
+     *
200
+     * Execute the query, if necessary. Typically when there are no parameters.
201
+     *
202
+     * @return string[]
203
+     */
204
+    public function fetchOneColumn() {
205
+        if (!$this->executed) {
206
+            $this->execute();
207
+        }
208
+
209
+        $list = array();
210
+        while ($row = $this->pdo_statement->fetch(PDO::FETCH_NUM)) {
211
+            $list[] = $row[0];
212
+        }
213
+        $this->closeCursor();
214
+
215
+        return $list;
216
+    }
217
+
218
+    /**
219
+     * How many rows were affected by this statement.
220
+     *
221
+     * @return int
222
+     */
223
+    public function rowCount() {
224
+        return $this->pdo_statement->rowCount();
225
+    }
226 226
 }
Please login to merge, or discard this patch.
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -63,18 +63,18 @@
 block discarded – undo
63 63
 				$key = ':' . $key;
64 64
 			}
65 65
 			switch (gettype($bind_variable)) {
66
-			case 'NULL':
67
-				$this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_NULL);
68
-				break;
69
-			case 'boolean':
70
-				$this->pdo_statement->bindValue($key, (int) $bind_variable, PDO::PARAM_INT);
71
-				break;
72
-			case 'integer':
73
-				$this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_INT);
74
-				break;
75
-			default:
76
-				$this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_STR);
77
-				break;
66
+			    case 'NULL':
67
+				    $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_NULL);
68
+				    break;
69
+			    case 'boolean':
70
+				    $this->pdo_statement->bindValue($key, (int) $bind_variable, PDO::PARAM_INT);
71
+				    break;
72
+			    case 'integer':
73
+				    $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_INT);
74
+				    break;
75
+			    default:
76
+				    $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_STR);
77
+				    break;
78 78
 			}
79 79
 		}
80 80
 
Please login to merge, or discard this patch.
Braces   +22 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * Extend PHP's native PDOStatement class.
23 23
  */
24
-class Statement {
24
+class Statement
25
+{
25 26
 	/** @var PDOStatement A prepared statement. */
26 27
 	private $pdo_statement;
27 28
 
@@ -33,7 +34,8 @@  discard block
 block discarded – undo
33 34
 	 *
34 35
 	 * @param PDOStatement $pdo_statement
35 36
 	 */
36
-	public function __construct(PDOStatement $pdo_statement) {
37
+	public function __construct(PDOStatement $pdo_statement)
38
+	{
37 39
 		$this->pdo_statement = $pdo_statement;
38 40
 	}
39 41
 
@@ -46,7 +48,8 @@  discard block
 block discarded – undo
46 48
 	 *
47 49
 	 * @return Statement
48 50
 	 */
49
-	public function execute($bind_variables = array()) {
51
+	public function execute($bind_variables = array())
52
+	{
50 53
 		if ($this->executed) {
51 54
 			throw new \Exception('Statement::execute() called twice.');
52 55
 		}
@@ -93,7 +96,8 @@  discard block
 block discarded – undo
93 96
 	 * Close the cursor, and mark it as not-executed, so we can execute
94 97
 	 * it again (perhaps with different parameters).
95 98
 	 */
96
-	public function closeCursor() {
99
+	public function closeCursor()
100
+	{
97 101
 		$this->pdo_statement->closeCursor();
98 102
 		$this->executed = false;
99 103
 	}
@@ -107,7 +111,8 @@  discard block
 block discarded – undo
107 111
 	 *
108 112
 	 * @return \stdClass|array|false
109 113
 	 */
110
-	public function fetch($fetch_style = PDO::FETCH_OBJ) {
114
+	public function fetch($fetch_style = PDO::FETCH_OBJ)
115
+	{
111 116
 		if (!$this->executed) {
112 117
 			$this->execute();
113 118
 		}
@@ -124,7 +129,8 @@  discard block
 block discarded – undo
124 129
 	 *
125 130
 	 * @return \stdClass[]|string[][]
126 131
 	 */
127
-	public function fetchAll($fetch_style = PDO::FETCH_OBJ) {
132
+	public function fetchAll($fetch_style = PDO::FETCH_OBJ)
133
+	{
128 134
 		if (!$this->executed) {
129 135
 			$this->execute();
130 136
 		}
@@ -144,7 +150,8 @@  discard block
 block discarded – undo
144 150
 	 *
145 151
 	 * @return \stdClass|array|null
146 152
 	 */
147
-	public function fetchOneRow($fetch_style = PDO::FETCH_OBJ) {
153
+	public function fetchOneRow($fetch_style = PDO::FETCH_OBJ)
154
+	{
148 155
 		if (!$this->executed) {
149 156
 			$this->execute();
150 157
 		}
@@ -162,7 +169,8 @@  discard block
 block discarded – undo
162 169
 	 *
163 170
 	 * @return string|null
164 171
 	 */
165
-	public function fetchOne() {
172
+	public function fetchOne()
173
+	{
166 174
 		if (!$this->executed) {
167 175
 			$this->execute();
168 176
 		}
@@ -180,7 +188,8 @@  discard block
 block discarded – undo
180 188
 	 *
181 189
 	 * @return string[]
182 190
 	 */
183
-	public function fetchAssoc() {
191
+	public function fetchAssoc()
192
+	{
184 193
 		if (!$this->executed) {
185 194
 			$this->execute();
186 195
 		}
@@ -201,7 +210,8 @@  discard block
 block discarded – undo
201 210
 	 *
202 211
 	 * @return string[]
203 212
 	 */
204
-	public function fetchOneColumn() {
213
+	public function fetchOneColumn()
214
+	{
205 215
 		if (!$this->executed) {
206 216
 			$this->execute();
207 217
 		}
@@ -220,7 +230,8 @@  discard block
 block discarded – undo
220 230
 	 *
221 231
 	 * @return int
222 232
 	 */
223
-	public function rowCount() {
233
+	public function rowCount()
234
+	{
224 235
 		return $this->pdo_statement->rowCount();
225 236
 	}
226 237
 }
Please login to merge, or discard this patch.
app/Menu.php 2 patches
Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -21,281 +21,281 @@
 block discarded – undo
21 21
  * System for generating menus.
22 22
  */
23 23
 class Menu {
24
-	/** @var string The text to be displayed in the mneu */
25
-	private $label;
26
-
27
-	/** @var string The target URL or href*/
28
-	private $link;
29
-
30
-	/** @var string The CSS class used to style this menu item */
31
-	private $class;
32
-
33
-	/** @var string[] A list of optional HTML attributes, such as onclick or data-xxx */
34
-	private $attrs;
35
-
36
-	/** @var Menu[] An optional list of sub-menus. */
37
-	private $submenus;
38
-
39
-	/** @var string Used internally to create javascript menus */
40
-	private $parentmenu;
41
-
42
-	/** @var string Used to format javascript menus */
43
-	private $submenuclass;
44
-
45
-	/** @var string Used to format javascript menus */
46
-	private $menuclass;
47
-
48
-	/**
49
-	 * Constructor for the menu class
50
-	 *
51
-	 * @param string   $label    The label for the menu item
52
-	 * @param string   $link     The target URL
53
-	 * @param string   $class    A CSS class
54
-	 * @param string[] $attrs    Optional attributes, such as onclick or data-xxx
55
-	 * @param Menu[]   $submenus Any submenus
56
-	 */
57
-	public function __construct($label, $link = '#', $class = '', array $attrs = array(), array $submenus = array()) {
58
-		$this
59
-			->setLabel($label)
60
-			->setLink($link)
61
-			->setClass($class)
62
-			->setAttrs($attrs)
63
-			->setSubmenus($submenus);
64
-	}
65
-
66
-	/**
67
-	 * Convert this menu to an HTML list, for easy rendering of
68
-	 * lists of menus/nulls.
69
-	 *
70
-	 * @return string
71
-	 */
72
-	public function __toString() {
73
-		return $this->getMenuAsList();
74
-	}
75
-
76
-	/**
77
-	 * Render this menu using Bootstrap markup
78
-	 *
79
-	 * @return string
80
-	 */
81
-	public function bootstrap() {
82
-		if ($this->submenus) {
83
-			$submenus = '';
84
-			foreach ($this->submenus as $submenu) {
85
-				$submenus .= $submenu->bootstrap();
86
-			}
87
-
88
-			return
89
-				'<li class="' . $this->class . ' dropdown">' .
90
-				'<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">' .
91
-				$this->label .
92
-				' <span class="caret"></span></a>' .
93
-				'<ul class="dropdown-menu" role="menu">' .
94
-				$submenus .
95
-				'</ul>' .
96
-				'</li>';
97
-		} else {
98
-			$attrs = '';
99
-			foreach ($this->attrs as $key => $value) {
100
-				$attrs .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
101
-			}
102
-
103
-			return '<li class="' . $this->class . '"><a href="' . $this->link . '"' . $attrs . '>' . $this->label . '</a></li>';
104
-		}
105
-	}
106
-
107
-	/**
108
-	 * Get the optional attributes.
109
-	 *
110
-	 * @return string[]
111
-	 */
112
-	public function getAttrs() {
113
-		return $this->attrs;
114
-	}
115
-
116
-	/**
117
-	 * Set the optional attributes.
118
-	 *
119
-	 * @param string[] $attrs
120
-	 *
121
-	 * @return $this
122
-	 */
123
-	public function setAttrs(array $attrs) {
124
-		$this->attrs = $attrs;
125
-
126
-		return $this;
127
-	}
128
-
129
-	/**
130
-	 * Set the CSS classes for the (legacy) javascript menus
131
-	 *
132
-	 * @param string $menuclass
133
-	 * @param string $submenuclass
134
-	 */
135
-	public function addClass($menuclass, $submenuclass = '') {
136
-		$this->menuclass    = $menuclass;
137
-		$this->submenuclass = $submenuclass;
138
-	}
139
-
140
-	/**
141
-	 * Get the class.
142
-	 *
143
-	 * @return string
144
-	 */
145
-	public function getClass() {
146
-		return $this->class;
147
-	}
148
-
149
-	/**
150
-	 * Set the class.
151
-	 *
152
-	 * @param string $class
153
-	 *
154
-	 * @return $this
155
-	 */
156
-	public function setClass($class) {
157
-		$this->class = $class;
158
-
159
-		return $this;
160
-	}
161
-
162
-	/**
163
-	 * Get the label.
164
-	 *
165
-	 * @return string
166
-	 */
167
-	public function getLabel() {
168
-		return $this->label;
169
-	}
170
-
171
-	/**
172
-	 * Set the label.
173
-	 *
174
-	 * @param string $label
175
-	 *
176
-	 * @return $this
177
-	 */
178
-	public function setLabel($label) {
179
-		$this->label = $label;
180
-
181
-		return $this;
182
-	}
183
-
184
-	/**
185
-	 * Get the link.
186
-	 *
187
-	 * @return string
188
-	 */
189
-	public function getLink() {
190
-		return $this->link;
191
-	}
192
-
193
-	/**
194
-	 * Set the link.
195
-	 *
196
-	 * @param string $link
197
-	 *
198
-	 * @return $this
199
-	 */
200
-	public function setLink($link) {
201
-		$this->link = $link;
202
-
203
-		return $this;
204
-	}
205
-
206
-	/**
207
-	 * Add a submenu to this menu
208
-	 *
209
-	 * @param Menu $menu
210
-	 *
211
-	 * @return $this
212
-	 */
213
-	public function addSubmenu($menu) {
214
-		$this->submenus[] = $menu;
215
-
216
-		return $this;
217
-	}
218
-
219
-	/**
220
-	 * Render this menu using javascript popups..
221
-	 *
222
-	 * @return string
223
-	 */
224
-	public function getMenu() {
225
-		$menu_id     = 'menu-' . Uuid::uuid4();
226
-		$sub_menu_id = 'sub-' . $menu_id;
227
-
228
-		$html = '<a href="' . $this->link . '"';
229
-		foreach ($this->attrs as $key => $value) {
230
-			$html .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
231
-		}
232
-		if (!empty($this->submenus)) {
233
-			$html .= ' onmouseover="show_submenu(\'' . $sub_menu_id . '\', \'' . $menu_id . '\');"';
234
-			$html .= ' onmouseout="timeout_submenu(\'' . $sub_menu_id . '\');"';
235
-		}
236
-		$html .= '>' . $this->label . '</a>';
237
-
238
-		if (!empty($this->submenus)) {
239
-			$html .= '<div id="' . $sub_menu_id . '" class="' . $this->submenuclass . '"';
240
-			$html .= ' style="position: absolute; visibility: hidden; z-index: 100; text-align: ' . (I18N::direction() === 'ltr' ? 'left' : 'right') . '"';
241
-			$html .= ' onmouseover="show_submenu(\'' . $this->parentmenu . '\'); show_submenu(\'' . $sub_menu_id . '\');"';
242
-			$html .= ' onmouseout="timeout_submenu(\'' . $sub_menu_id . '\');">';
243
-			foreach ($this->submenus as $submenu) {
244
-				$submenu->parentmenu = $sub_menu_id;
245
-				$html .= $submenu->getMenu();
246
-			}
247
-			$html .= '</div>';
248
-		}
249
-
250
-		return '<div id="' . $menu_id . '" class="' . $this->menuclass . '">' . $html . '</div>';
251
-	}
252
-
253
-	/**
254
-	 * Render this menu as an HTML list
255
-	 *
256
-	 * @return string
257
-	 */
258
-	public function getMenuAsList() {
259
-		$attrs = '';
260
-		foreach ($this->attrs as $key => $value) {
261
-			$attrs .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
262
-		}
263
-		if ($this->link) {
264
-			$link = ' href="' . $this->link . '"';
265
-		} else {
266
-			$link = '';
267
-		}
268
-		$html = '<a' . $link . $attrs . '>' . $this->label . '</a>';
269
-		if ($this->submenus) {
270
-			$html .= '<ul>';
271
-			foreach ($this->submenus as $submenu) {
272
-				$html .= $submenu->getMenuAsList();
273
-			}
274
-			$html .= '</ul>';
275
-		}
276
-
277
-		return '<li class="' . $this->class . '">' . $html . '</li>';
278
-	}
279
-
280
-	/**
281
-	 * Get the sub-menus.
282
-	 *
283
-	 * @return Menu[]
284
-	 */
285
-	public function getSubmenus() {
286
-		return $this->submenus;
287
-	}
288
-
289
-	/**
290
-	 * Set the sub-menus.
291
-	 *
292
-	 * @param Menu[] $submenus
293
-	 *
294
-	 * @return $this
295
-	 */
296
-	public function setSubmenus(array $submenus) {
297
-		$this->submenus = $submenus;
298
-
299
-		return $this;
300
-	}
24
+    /** @var string The text to be displayed in the mneu */
25
+    private $label;
26
+
27
+    /** @var string The target URL or href*/
28
+    private $link;
29
+
30
+    /** @var string The CSS class used to style this menu item */
31
+    private $class;
32
+
33
+    /** @var string[] A list of optional HTML attributes, such as onclick or data-xxx */
34
+    private $attrs;
35
+
36
+    /** @var Menu[] An optional list of sub-menus. */
37
+    private $submenus;
38
+
39
+    /** @var string Used internally to create javascript menus */
40
+    private $parentmenu;
41
+
42
+    /** @var string Used to format javascript menus */
43
+    private $submenuclass;
44
+
45
+    /** @var string Used to format javascript menus */
46
+    private $menuclass;
47
+
48
+    /**
49
+     * Constructor for the menu class
50
+     *
51
+     * @param string   $label    The label for the menu item
52
+     * @param string   $link     The target URL
53
+     * @param string   $class    A CSS class
54
+     * @param string[] $attrs    Optional attributes, such as onclick or data-xxx
55
+     * @param Menu[]   $submenus Any submenus
56
+     */
57
+    public function __construct($label, $link = '#', $class = '', array $attrs = array(), array $submenus = array()) {
58
+        $this
59
+            ->setLabel($label)
60
+            ->setLink($link)
61
+            ->setClass($class)
62
+            ->setAttrs($attrs)
63
+            ->setSubmenus($submenus);
64
+    }
65
+
66
+    /**
67
+     * Convert this menu to an HTML list, for easy rendering of
68
+     * lists of menus/nulls.
69
+     *
70
+     * @return string
71
+     */
72
+    public function __toString() {
73
+        return $this->getMenuAsList();
74
+    }
75
+
76
+    /**
77
+     * Render this menu using Bootstrap markup
78
+     *
79
+     * @return string
80
+     */
81
+    public function bootstrap() {
82
+        if ($this->submenus) {
83
+            $submenus = '';
84
+            foreach ($this->submenus as $submenu) {
85
+                $submenus .= $submenu->bootstrap();
86
+            }
87
+
88
+            return
89
+                '<li class="' . $this->class . ' dropdown">' .
90
+                '<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">' .
91
+                $this->label .
92
+                ' <span class="caret"></span></a>' .
93
+                '<ul class="dropdown-menu" role="menu">' .
94
+                $submenus .
95
+                '</ul>' .
96
+                '</li>';
97
+        } else {
98
+            $attrs = '';
99
+            foreach ($this->attrs as $key => $value) {
100
+                $attrs .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
101
+            }
102
+
103
+            return '<li class="' . $this->class . '"><a href="' . $this->link . '"' . $attrs . '>' . $this->label . '</a></li>';
104
+        }
105
+    }
106
+
107
+    /**
108
+     * Get the optional attributes.
109
+     *
110
+     * @return string[]
111
+     */
112
+    public function getAttrs() {
113
+        return $this->attrs;
114
+    }
115
+
116
+    /**
117
+     * Set the optional attributes.
118
+     *
119
+     * @param string[] $attrs
120
+     *
121
+     * @return $this
122
+     */
123
+    public function setAttrs(array $attrs) {
124
+        $this->attrs = $attrs;
125
+
126
+        return $this;
127
+    }
128
+
129
+    /**
130
+     * Set the CSS classes for the (legacy) javascript menus
131
+     *
132
+     * @param string $menuclass
133
+     * @param string $submenuclass
134
+     */
135
+    public function addClass($menuclass, $submenuclass = '') {
136
+        $this->menuclass    = $menuclass;
137
+        $this->submenuclass = $submenuclass;
138
+    }
139
+
140
+    /**
141
+     * Get the class.
142
+     *
143
+     * @return string
144
+     */
145
+    public function getClass() {
146
+        return $this->class;
147
+    }
148
+
149
+    /**
150
+     * Set the class.
151
+     *
152
+     * @param string $class
153
+     *
154
+     * @return $this
155
+     */
156
+    public function setClass($class) {
157
+        $this->class = $class;
158
+
159
+        return $this;
160
+    }
161
+
162
+    /**
163
+     * Get the label.
164
+     *
165
+     * @return string
166
+     */
167
+    public function getLabel() {
168
+        return $this->label;
169
+    }
170
+
171
+    /**
172
+     * Set the label.
173
+     *
174
+     * @param string $label
175
+     *
176
+     * @return $this
177
+     */
178
+    public function setLabel($label) {
179
+        $this->label = $label;
180
+
181
+        return $this;
182
+    }
183
+
184
+    /**
185
+     * Get the link.
186
+     *
187
+     * @return string
188
+     */
189
+    public function getLink() {
190
+        return $this->link;
191
+    }
192
+
193
+    /**
194
+     * Set the link.
195
+     *
196
+     * @param string $link
197
+     *
198
+     * @return $this
199
+     */
200
+    public function setLink($link) {
201
+        $this->link = $link;
202
+
203
+        return $this;
204
+    }
205
+
206
+    /**
207
+     * Add a submenu to this menu
208
+     *
209
+     * @param Menu $menu
210
+     *
211
+     * @return $this
212
+     */
213
+    public function addSubmenu($menu) {
214
+        $this->submenus[] = $menu;
215
+
216
+        return $this;
217
+    }
218
+
219
+    /**
220
+     * Render this menu using javascript popups..
221
+     *
222
+     * @return string
223
+     */
224
+    public function getMenu() {
225
+        $menu_id     = 'menu-' . Uuid::uuid4();
226
+        $sub_menu_id = 'sub-' . $menu_id;
227
+
228
+        $html = '<a href="' . $this->link . '"';
229
+        foreach ($this->attrs as $key => $value) {
230
+            $html .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
231
+        }
232
+        if (!empty($this->submenus)) {
233
+            $html .= ' onmouseover="show_submenu(\'' . $sub_menu_id . '\', \'' . $menu_id . '\');"';
234
+            $html .= ' onmouseout="timeout_submenu(\'' . $sub_menu_id . '\');"';
235
+        }
236
+        $html .= '>' . $this->label . '</a>';
237
+
238
+        if (!empty($this->submenus)) {
239
+            $html .= '<div id="' . $sub_menu_id . '" class="' . $this->submenuclass . '"';
240
+            $html .= ' style="position: absolute; visibility: hidden; z-index: 100; text-align: ' . (I18N::direction() === 'ltr' ? 'left' : 'right') . '"';
241
+            $html .= ' onmouseover="show_submenu(\'' . $this->parentmenu . '\'); show_submenu(\'' . $sub_menu_id . '\');"';
242
+            $html .= ' onmouseout="timeout_submenu(\'' . $sub_menu_id . '\');">';
243
+            foreach ($this->submenus as $submenu) {
244
+                $submenu->parentmenu = $sub_menu_id;
245
+                $html .= $submenu->getMenu();
246
+            }
247
+            $html .= '</div>';
248
+        }
249
+
250
+        return '<div id="' . $menu_id . '" class="' . $this->menuclass . '">' . $html . '</div>';
251
+    }
252
+
253
+    /**
254
+     * Render this menu as an HTML list
255
+     *
256
+     * @return string
257
+     */
258
+    public function getMenuAsList() {
259
+        $attrs = '';
260
+        foreach ($this->attrs as $key => $value) {
261
+            $attrs .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
262
+        }
263
+        if ($this->link) {
264
+            $link = ' href="' . $this->link . '"';
265
+        } else {
266
+            $link = '';
267
+        }
268
+        $html = '<a' . $link . $attrs . '>' . $this->label . '</a>';
269
+        if ($this->submenus) {
270
+            $html .= '<ul>';
271
+            foreach ($this->submenus as $submenu) {
272
+                $html .= $submenu->getMenuAsList();
273
+            }
274
+            $html .= '</ul>';
275
+        }
276
+
277
+        return '<li class="' . $this->class . '">' . $html . '</li>';
278
+    }
279
+
280
+    /**
281
+     * Get the sub-menus.
282
+     *
283
+     * @return Menu[]
284
+     */
285
+    public function getSubmenus() {
286
+        return $this->submenus;
287
+    }
288
+
289
+    /**
290
+     * Set the sub-menus.
291
+     *
292
+     * @param Menu[] $submenus
293
+     *
294
+     * @return $this
295
+     */
296
+    public function setSubmenus(array $submenus) {
297
+        $this->submenus = $submenus;
298
+
299
+        return $this;
300
+    }
301 301
 }
Please login to merge, or discard this patch.
Braces   +36 added lines, -18 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
 /**
21 21
  * System for generating menus.
22 22
  */
23
-class Menu {
23
+class Menu
24
+{
24 25
 	/** @var string The text to be displayed in the mneu */
25 26
 	private $label;
26 27
 
@@ -54,7 +55,8 @@  discard block
 block discarded – undo
54 55
 	 * @param string[] $attrs    Optional attributes, such as onclick or data-xxx
55 56
 	 * @param Menu[]   $submenus Any submenus
56 57
 	 */
57
-	public function __construct($label, $link = '#', $class = '', array $attrs = array(), array $submenus = array()) {
58
+	public function __construct($label, $link = '#', $class = '', array $attrs = array(), array $submenus = array())
59
+	{
58 60
 		$this
59 61
 			->setLabel($label)
60 62
 			->setLink($link)
@@ -69,7 +71,8 @@  discard block
 block discarded – undo
69 71
 	 *
70 72
 	 * @return string
71 73
 	 */
72
-	public function __toString() {
74
+	public function __toString()
75
+	{
73 76
 		return $this->getMenuAsList();
74 77
 	}
75 78
 
@@ -78,7 +81,8 @@  discard block
 block discarded – undo
78 81
 	 *
79 82
 	 * @return string
80 83
 	 */
81
-	public function bootstrap() {
84
+	public function bootstrap()
85
+	{
82 86
 		if ($this->submenus) {
83 87
 			$submenus = '';
84 88
 			foreach ($this->submenus as $submenu) {
@@ -109,7 +113,8 @@  discard block
 block discarded – undo
109 113
 	 *
110 114
 	 * @return string[]
111 115
 	 */
112
-	public function getAttrs() {
116
+	public function getAttrs()
117
+	{
113 118
 		return $this->attrs;
114 119
 	}
115 120
 
@@ -120,7 +125,8 @@  discard block
 block discarded – undo
120 125
 	 *
121 126
 	 * @return $this
122 127
 	 */
123
-	public function setAttrs(array $attrs) {
128
+	public function setAttrs(array $attrs)
129
+	{
124 130
 		$this->attrs = $attrs;
125 131
 
126 132
 		return $this;
@@ -132,7 +138,8 @@  discard block
 block discarded – undo
132 138
 	 * @param string $menuclass
133 139
 	 * @param string $submenuclass
134 140
 	 */
135
-	public function addClass($menuclass, $submenuclass = '') {
141
+	public function addClass($menuclass, $submenuclass = '')
142
+	{
136 143
 		$this->menuclass    = $menuclass;
137 144
 		$this->submenuclass = $submenuclass;
138 145
 	}
@@ -142,7 +149,8 @@  discard block
 block discarded – undo
142 149
 	 *
143 150
 	 * @return string
144 151
 	 */
145
-	public function getClass() {
152
+	public function getClass()
153
+	{
146 154
 		return $this->class;
147 155
 	}
148 156
 
@@ -153,7 +161,8 @@  discard block
 block discarded – undo
153 161
 	 *
154 162
 	 * @return $this
155 163
 	 */
156
-	public function setClass($class) {
164
+	public function setClass($class)
165
+	{
157 166
 		$this->class = $class;
158 167
 
159 168
 		return $this;
@@ -164,7 +173,8 @@  discard block
 block discarded – undo
164 173
 	 *
165 174
 	 * @return string
166 175
 	 */
167
-	public function getLabel() {
176
+	public function getLabel()
177
+	{
168 178
 		return $this->label;
169 179
 	}
170 180
 
@@ -175,7 +185,8 @@  discard block
 block discarded – undo
175 185
 	 *
176 186
 	 * @return $this
177 187
 	 */
178
-	public function setLabel($label) {
188
+	public function setLabel($label)
189
+	{
179 190
 		$this->label = $label;
180 191
 
181 192
 		return $this;
@@ -186,7 +197,8 @@  discard block
 block discarded – undo
186 197
 	 *
187 198
 	 * @return string
188 199
 	 */
189
-	public function getLink() {
200
+	public function getLink()
201
+	{
190 202
 		return $this->link;
191 203
 	}
192 204
 
@@ -197,7 +209,8 @@  discard block
 block discarded – undo
197 209
 	 *
198 210
 	 * @return $this
199 211
 	 */
200
-	public function setLink($link) {
212
+	public function setLink($link)
213
+	{
201 214
 		$this->link = $link;
202 215
 
203 216
 		return $this;
@@ -210,7 +223,8 @@  discard block
 block discarded – undo
210 223
 	 *
211 224
 	 * @return $this
212 225
 	 */
213
-	public function addSubmenu($menu) {
226
+	public function addSubmenu($menu)
227
+	{
214 228
 		$this->submenus[] = $menu;
215 229
 
216 230
 		return $this;
@@ -221,7 +235,8 @@  discard block
 block discarded – undo
221 235
 	 *
222 236
 	 * @return string
223 237
 	 */
224
-	public function getMenu() {
238
+	public function getMenu()
239
+	{
225 240
 		$menu_id     = 'menu-' . Uuid::uuid4();
226 241
 		$sub_menu_id = 'sub-' . $menu_id;
227 242
 
@@ -255,7 +270,8 @@  discard block
 block discarded – undo
255 270
 	 *
256 271
 	 * @return string
257 272
 	 */
258
-	public function getMenuAsList() {
273
+	public function getMenuAsList()
274
+	{
259 275
 		$attrs = '';
260 276
 		foreach ($this->attrs as $key => $value) {
261 277
 			$attrs .= ' ' . $key . '="' . Filter::escapeHtml($value) . '"';
@@ -282,7 +298,8 @@  discard block
 block discarded – undo
282 298
 	 *
283 299
 	 * @return Menu[]
284 300
 	 */
285
-	public function getSubmenus() {
301
+	public function getSubmenus()
302
+	{
286 303
 		return $this->submenus;
287 304
 	}
288 305
 
@@ -293,7 +310,8 @@  discard block
 block discarded – undo
293 310
 	 *
294 311
 	 * @return $this
295 312
 	 */
296
-	public function setSubmenus(array $submenus) {
313
+	public function setSubmenus(array $submenus)
314
+	{
297 315
 		$this->submenus = $submenus;
298 316
 
299 317
 		return $this;
Please login to merge, or discard this patch.
app/Log.php 2 patches
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -19,107 +19,107 @@
 block discarded – undo
19 19
  * Record webtrees events in the database
20 20
  */
21 21
 class Log {
22
-	// We can log the following types of message in the wt_log table.
23
-	const TYPE_AUTHENTICATION = 'auth';
24
-	const TYPE_CONFIGURATION  = 'config';
25
-	const TYPE_DEBUG          = 'debug';
26
-	const TYPE_EDIT           = 'edit';
27
-	const TYPE_ERROR          = 'error';
28
-	const TYPE_MEDIA          = 'media';
29
-	const TYPE_SEARCH         = 'search';
22
+    // We can log the following types of message in the wt_log table.
23
+    const TYPE_AUTHENTICATION = 'auth';
24
+    const TYPE_CONFIGURATION  = 'config';
25
+    const TYPE_DEBUG          = 'debug';
26
+    const TYPE_EDIT           = 'edit';
27
+    const TYPE_ERROR          = 'error';
28
+    const TYPE_MEDIA          = 'media';
29
+    const TYPE_SEARCH         = 'search';
30 30
 
31
-	/**
32
-	 * Store a new message (of the appropriate type) in the message log.
33
-	 *
34
-	 * @param string    $message
35
-	 * @param string    $log_type
36
-	 * @param Tree|null $tree
37
-	 */
38
-	private static function addLog($message, $log_type, Tree $tree = null) {
39
-		global $WT_TREE;
31
+    /**
32
+     * Store a new message (of the appropriate type) in the message log.
33
+     *
34
+     * @param string    $message
35
+     * @param string    $log_type
36
+     * @param Tree|null $tree
37
+     */
38
+    private static function addLog($message, $log_type, Tree $tree = null) {
39
+        global $WT_TREE;
40 40
 
41
-		if (!$tree) {
42
-			$tree = $WT_TREE;
43
-		}
41
+        if (!$tree) {
42
+            $tree = $WT_TREE;
43
+        }
44 44
 
45
-		Database::prepare(
46
-			"INSERT INTO `##log` (log_type, log_message, ip_address, user_id, gedcom_id) VALUES (?, ?, ?, ?, ?)"
47
-		)->execute(array(
48
-					$log_type,
49
-					$message,
50
-					WT_CLIENT_IP,
51
-					Auth::id(),
52
-					$tree ? $tree->getTreeId() : null,
53
-		));
54
-	}
45
+        Database::prepare(
46
+            "INSERT INTO `##log` (log_type, log_message, ip_address, user_id, gedcom_id) VALUES (?, ?, ?, ?, ?)"
47
+        )->execute(array(
48
+                    $log_type,
49
+                    $message,
50
+                    WT_CLIENT_IP,
51
+                    Auth::id(),
52
+                    $tree ? $tree->getTreeId() : null,
53
+        ));
54
+    }
55 55
 
56
-	/**
57
-	 * Store an authentication message in the message log.
58
-	 *
59
-	 * @param string $message
60
-	 */
61
-	public static function addAuthenticationLog($message) {
62
-		self::addLog($message, self::TYPE_AUTHENTICATION);
63
-	}
56
+    /**
57
+     * Store an authentication message in the message log.
58
+     *
59
+     * @param string $message
60
+     */
61
+    public static function addAuthenticationLog($message) {
62
+        self::addLog($message, self::TYPE_AUTHENTICATION);
63
+    }
64 64
 
65
-	/**
66
-	 * Store a configuration message in the message log.
67
-	 *
68
-	 * @param string       $message
69
-	 * @param Tree|null $tree
70
-	 */
71
-	public static function addConfigurationLog($message, Tree $tree = null) {
72
-		self::addLog($message, self::TYPE_CONFIGURATION, $tree);
73
-	}
65
+    /**
66
+     * Store a configuration message in the message log.
67
+     *
68
+     * @param string       $message
69
+     * @param Tree|null $tree
70
+     */
71
+    public static function addConfigurationLog($message, Tree $tree = null) {
72
+        self::addLog($message, self::TYPE_CONFIGURATION, $tree);
73
+    }
74 74
 
75
-	/**
76
-	 * Store a debug message in the message log.
77
-	 *
78
-	 * @param string $message
79
-	 */
80
-	public static function addDebugLog($message) {
81
-		self::addLog($message, self::TYPE_DEBUG);
82
-	}
75
+    /**
76
+     * Store a debug message in the message log.
77
+     *
78
+     * @param string $message
79
+     */
80
+    public static function addDebugLog($message) {
81
+        self::addLog($message, self::TYPE_DEBUG);
82
+    }
83 83
 
84
-	/**
85
-	 * Store an edit message in the message log.
86
-	 *
87
-	 * @param string $message
88
-	 */
89
-	public static function addEditLog($message) {
90
-		self::addLog($message, self::TYPE_EDIT);
91
-	}
84
+    /**
85
+     * Store an edit message in the message log.
86
+     *
87
+     * @param string $message
88
+     */
89
+    public static function addEditLog($message) {
90
+        self::addLog($message, self::TYPE_EDIT);
91
+    }
92 92
 
93
-	/**
94
-	 * Store an error message in the message log.
95
-	 *
96
-	 * @param string $message
97
-	 */
98
-	public static function addErrorLog($message) {
99
-		self::addLog($message, self::TYPE_ERROR);
100
-	}
93
+    /**
94
+     * Store an error message in the message log.
95
+     *
96
+     * @param string $message
97
+     */
98
+    public static function addErrorLog($message) {
99
+        self::addLog($message, self::TYPE_ERROR);
100
+    }
101 101
 
102
-	/**
103
-	 * Store an media management message in the message log.
104
-	 *
105
-	 * @param string $message
106
-	 */
107
-	public static function addMediaLog($message) {
108
-		self::addLog($message, self::TYPE_MEDIA);
109
-	}
102
+    /**
103
+     * Store an media management message in the message log.
104
+     *
105
+     * @param string $message
106
+     */
107
+    public static function addMediaLog($message) {
108
+        self::addLog($message, self::TYPE_MEDIA);
109
+    }
110 110
 
111
-	/**
112
-	 * Store a search event in the message log.
113
-	 *
114
-	 * Unlike most webtrees activity, search is not restricted to a single tree,
115
-	 * so we need to record which trees were searchecd.
116
-	 *
117
-	 * @param string    $message
118
-	 * @param Tree[] $trees Which trees were searched
119
-	 */
120
-	public static function addSearchLog($message, array $trees) {
121
-		foreach ($trees as $tree) {
122
-			self::addLog($message, self::TYPE_SEARCH, $tree);
123
-		}
124
-	}
111
+    /**
112
+     * Store a search event in the message log.
113
+     *
114
+     * Unlike most webtrees activity, search is not restricted to a single tree,
115
+     * so we need to record which trees were searchecd.
116
+     *
117
+     * @param string    $message
118
+     * @param Tree[] $trees Which trees were searched
119
+     */
120
+    public static function addSearchLog($message, array $trees) {
121
+        foreach ($trees as $tree) {
122
+            self::addLog($message, self::TYPE_SEARCH, $tree);
123
+        }
124
+    }
125 125
 }
Please login to merge, or discard this patch.
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Record webtrees events in the database
20 20
  */
21
-class Log {
21
+class Log
22
+{
22 23
 	// We can log the following types of message in the wt_log table.
23 24
 	const TYPE_AUTHENTICATION = 'auth';
24 25
 	const TYPE_CONFIGURATION  = 'config';
@@ -35,7 +36,8 @@  discard block
 block discarded – undo
35 36
 	 * @param string    $log_type
36 37
 	 * @param Tree|null $tree
37 38
 	 */
38
-	private static function addLog($message, $log_type, Tree $tree = null) {
39
+	private static function addLog($message, $log_type, Tree $tree = null)
40
+	{
39 41
 		global $WT_TREE;
40 42
 
41 43
 		if (!$tree) {
@@ -58,7 +60,8 @@  discard block
 block discarded – undo
58 60
 	 *
59 61
 	 * @param string $message
60 62
 	 */
61
-	public static function addAuthenticationLog($message) {
63
+	public static function addAuthenticationLog($message)
64
+	{
62 65
 		self::addLog($message, self::TYPE_AUTHENTICATION);
63 66
 	}
64 67
 
@@ -68,7 +71,8 @@  discard block
 block discarded – undo
68 71
 	 * @param string       $message
69 72
 	 * @param Tree|null $tree
70 73
 	 */
71
-	public static function addConfigurationLog($message, Tree $tree = null) {
74
+	public static function addConfigurationLog($message, Tree $tree = null)
75
+	{
72 76
 		self::addLog($message, self::TYPE_CONFIGURATION, $tree);
73 77
 	}
74 78
 
@@ -77,7 +81,8 @@  discard block
 block discarded – undo
77 81
 	 *
78 82
 	 * @param string $message
79 83
 	 */
80
-	public static function addDebugLog($message) {
84
+	public static function addDebugLog($message)
85
+	{
81 86
 		self::addLog($message, self::TYPE_DEBUG);
82 87
 	}
83 88
 
@@ -86,7 +91,8 @@  discard block
 block discarded – undo
86 91
 	 *
87 92
 	 * @param string $message
88 93
 	 */
89
-	public static function addEditLog($message) {
94
+	public static function addEditLog($message)
95
+	{
90 96
 		self::addLog($message, self::TYPE_EDIT);
91 97
 	}
92 98
 
@@ -95,7 +101,8 @@  discard block
 block discarded – undo
95 101
 	 *
96 102
 	 * @param string $message
97 103
 	 */
98
-	public static function addErrorLog($message) {
104
+	public static function addErrorLog($message)
105
+	{
99 106
 		self::addLog($message, self::TYPE_ERROR);
100 107
 	}
101 108
 
@@ -104,7 +111,8 @@  discard block
 block discarded – undo
104 111
 	 *
105 112
 	 * @param string $message
106 113
 	 */
107
-	public static function addMediaLog($message) {
114
+	public static function addMediaLog($message)
115
+	{
108 116
 		self::addLog($message, self::TYPE_MEDIA);
109 117
 	}
110 118
 
@@ -117,7 +125,8 @@  discard block
 block discarded – undo
117 125
 	 * @param string    $message
118 126
 	 * @param Tree[] $trees Which trees were searched
119 127
 	 */
120
-	public static function addSearchLog($message, array $trees) {
128
+	public static function addSearchLog($message, array $trees)
129
+	{
121 130
 		foreach ($trees as $tree) {
122 131
 			self::addLog($message, self::TYPE_SEARCH, $tree);
123 132
 		}
Please login to merge, or discard this patch.
app/GedcomTag.php 3 patches
Indentation   +1945 added lines, -1945 removed lines patch added patch discarded remove patch
@@ -21,1966 +21,1966 @@
 block discarded – undo
21 21
  * Static GEDCOM data for tags
22 22
  */
23 23
 class GedcomTag {
24
-	/** @var string[] All tags that webtrees knows how to translate - including special/internal tags */
25
-	private static $ALL_TAGS = array(
26
-		'ABBR', 'ADDR', 'ADR1', 'ADR2', 'ADOP', 'ADOP:DATE', 'ADOP:PLAC',
27
-		'AFN', 'AGE', 'AGNC', 'ALIA', 'ANCE', 'ANCI', 'ANUL', 'ASSO', 'AUTH', 'BAPL',
28
-		'BAPL:DATE', 'BAPL:PLAC', 'BAPM', 'BAPM:DATE', 'BAPM:PLAC', 'BARM',
29
-		'BARM:DATE', 'BARM:PLAC', 'BASM', 'BASM:DATE', 'BASM:PLAC',
30
-		'BIRT', 'BIRT:DATE', 'BIRT:PLAC', 'BLES', 'BLES:DATE',
31
-		'BLES:PLAC', 'BLOB', 'BURI', 'BURI:DATE', 'BURI:PLAC',
32
-		'CALN', 'CAST', 'CAUS', 'CEME', 'CENS', 'CENS:DATE', 'CENS:PLAC', 'CHAN', 'CHAN:DATE', 'CHAN:_WT_USER', 'CHAR',
33
-		'CHIL', 'CHR', 'CHR:DATE', 'CHR:PLAC', 'CHRA', 'CITN', 'CITY',
34
-		'COMM', 'CONC', 'CONT', 'CONF', 'CONF:DATE', 'CONF:PLAC', 'CONL',
35
-		'COPR', 'CORP', 'CREM', 'CREM:DATE', 'CREM:PLAC', 'CTRY', 'DATA',
36
-		'DATA:DATE', 'DATE', 'DEAT', 'DEAT:CAUS', 'DEAT:DATE', 'DEAT:PLAC',
37
-		'DESC', 'DESI', 'DEST', 'DIV', 'DIVF', 'DSCR', 'EDUC', 'EDUC:AGNC', 'EMAI',
38
-		'EMAIL', 'EMAL', 'EMIG', 'EMIG:DATE', 'EMIG:PLAC', 'ENDL', 'ENDL:DATE',
39
-		'ENDL:PLAC', 'ENGA', 'ENGA:DATE', 'ENGA:PLAC', 'EVEN', 'EVEN:DATE',
40
-		'EVEN:PLAC', 'EVEN:TYPE', 'FACT', 'FACT:TYPE', 'FAM', 'FAMC', 'FAMF', 'FAMS', 'FAMS:CENS:DATE', 'FAMS:CENS:PLAC',
41
-		'FAMS:DIV:DATE', 'FAMS:MARR:DATE', 'FAMS:MARR:PLAC', 'FAMS:NOTE',
42
-		'FAX', 'FCOM', 'FCOM:DATE',
43
-		'FCOM:PLAC', 'FILE', 'FONE', 'FORM', 'GEDC', 'GIVN', 'GRAD',
44
-		'HEAD', 'HUSB', 'IDNO', 'IMMI', 'IMMI:DATE', 'IMMI:PLAC', 'INDI', 'INFL',
45
-		'LANG', 'LATI', 'LEGA', 'LONG', 'MAP', 'MARB', 'MARB:DATE', 'MARB:PLAC',
46
-		'MARC', 'MARL', 'MARR', 'MARR:DATE', 'MARR:PLAC',
47
-		'MARR_CIVIL', 'MARR_PARTNERS', 'MARR_RELIGIOUS', 'MARR_UNKNOWN', 'MARS',
48
-		'MEDI', 'NAME', 'NAME:FONE', 'NAME:_HEB', 'NATI', 'NATU', 'NATU:DATE', 'NATU:PLAC',
49
-		'NCHI', 'NICK', 'NMR', 'NOTE', 'NPFX', 'NSFX', 'OBJE', 'OCCU', 'OCCU:AGNC',
50
-		'ORDI', 'ORDN', 'ORDN:AGNC', 'ORDN:DATE', 'ORDN:PLAC', 'PAGE', 'PEDI', 'PHON',
51
-		'PLAC', 'PLAC:FONE', 'PLAC:ROMN', 'PLAC:_HEB', 'POST', 'PROB', 'PROP', 'PUBL',
52
-		'QUAY', 'REFN', 'RELA', 'RELI', 'REPO', 'RESI', 'RESI:DATE', 'RESI:PLAC', 'RESN',
53
-		'RETI', 'RETI:AGNC', 'RFN', 'RIN', 'ROLE', 'ROMN', 'SERV', 'SEX', 'SHARED_NOTE',
54
-		'SLGC', 'SLGC:DATE', 'SLGC:PLAC', 'SLGS', 'SLGS:DATE', 'SLGS:PLAC', 'SOUR',
55
-		'SPFX', 'SSN', 'STAE', 'STAT', 'STAT:DATE', 'SUBM', 'SUBN', 'SURN', 'TEMP',
56
-		'TEXT', 'TIME', 'TITL', 'TITL:FONE', 'TITL:ROMN', 'TITL:_HEB', 'TRLR', 'TYPE',
57
-		'URL', 'VERS', 'WIFE', 'WILL', 'WWW', '_ADOP_CHIL', '_ADOP_GCHI', '_ADOP_GCH1',
58
-		'_ADOP_GCH2', '_ADOP_HSIB', '_ADOP_SIBL', '_ADPF', '_ADPM', '_AKA', '_AKAN', '_ASSO',
59
-		'_BAPM_CHIL', '_BAPM_GCHI', '_BAPM_GCH1', '_BAPM_GCH2', '_BAPM_HSIB', '_BAPM_SIBL',
60
-		'_BIBL', '_BIRT_CHIL', '_BIRT_GCHI', '_BIRT_GCH1', '_BIRT_GCH2', '_BIRT_HSIB', '_BIRT_SIBL',
61
-		'_BRTM', '_BRTM:DATE', '_BRTM:PLAC', '_BURI_CHIL',
62
-		'_BURI_GCHI', '_BURI_GCH1', '_BURI_GCH2', '_BURI_GPAR', '_BURI_HSIB', '_BURI_SIBL', '_BURI_SPOU',
63
-		'_CHR_CHIL', '_CHR_GCHI', '_CHR_GCH1', '_CHR_GCH2', '_CHR_HSIB', '_CHR_SIBL', '_COML',
64
-		'_CREM_CHIL', '_CREM_GCHI', '_CREM_GCH1', '_CREM_GCH2', '_CREM_GPAR', '_CREM_HSIB', '_CREM_SIBL', '_CREM_SPOU',
65
-		'_DBID', '_DEAT_CHIL', '_DEAT_GCHI', '_DEAT_GCH1', '_DEAT_GCH2', '_DEAT_GPAR', '_DEAT_GPA1', '_DEAT_GPA2',
66
-		'_DEAT_HSIB', '_DEAT_PARE', '_DEAT_SIBL', '_DEAT_SPOU', '_DEG', '_DETS', '_DNA',
67
-		'_EMAIL', '_EYEC', '_FA1', '_FA2', '_FA3', '_FA4', '_FA5', '_FA6', '_FA7', '_FA8',
68
-		'_FA9', '_FA10', '_FA11', '_FA12', '_FA13', '_FNRL', '_FREL', '_GEDF', '_GODP', '_HAIR',
69
-		'_HEB', '_HEIG', '_HNM', '_HOL', '_INTE', '_LOC', '_MARB_CHIL', '_MARB_FAMC', '_MARB_GCHI',
70
-		'_MARB_GCH1', '_MARB_GCH2', '_MARB_HSIB', '_MARB_PARE', '_MARB_SIBL', '_MARI',
71
-		'_MARNM', '_PRIM', '_MARNM_SURN', '_MARR_CHIL', '_MARR_FAMC', '_MARR_GCHI',
72
-		'_MARR_GCH1', '_MARR_GCH2', '_MARR_HSIB', '_MARR_PARE', '_MARR_SIBL', '_MBON',
73
-		'_MDCL', '_MEDC', '_MEND', '_MILI', '_MILT', '_MREL', '_MSTAT', '_NAME', '_NAMS',
74
-		'_NLIV', '_NMAR', '_NMR', '_WT_USER', '_PRMN', '_SCBK', '_SEPR', '_SSHOW', '_STAT',
75
-		'_SUBQ', '_TODO', '_TYPE', '_UID', '_URL', '_WEIG', '_WITN', '_YART', '__BRTM_CHIL',
76
-		'__BRTM_GCHI', '__BRTM_GCH1', '__BRTM_GCH2', '__BRTM_HSIB', '__BRTM_SIBL',
77
-		// These pseudo-tags are generated dynamically to display media object attributes
78
-		'__FILE_SIZE__', '__IMAGE_SIZE__',
79
-	);
24
+    /** @var string[] All tags that webtrees knows how to translate - including special/internal tags */
25
+    private static $ALL_TAGS = array(
26
+        'ABBR', 'ADDR', 'ADR1', 'ADR2', 'ADOP', 'ADOP:DATE', 'ADOP:PLAC',
27
+        'AFN', 'AGE', 'AGNC', 'ALIA', 'ANCE', 'ANCI', 'ANUL', 'ASSO', 'AUTH', 'BAPL',
28
+        'BAPL:DATE', 'BAPL:PLAC', 'BAPM', 'BAPM:DATE', 'BAPM:PLAC', 'BARM',
29
+        'BARM:DATE', 'BARM:PLAC', 'BASM', 'BASM:DATE', 'BASM:PLAC',
30
+        'BIRT', 'BIRT:DATE', 'BIRT:PLAC', 'BLES', 'BLES:DATE',
31
+        'BLES:PLAC', 'BLOB', 'BURI', 'BURI:DATE', 'BURI:PLAC',
32
+        'CALN', 'CAST', 'CAUS', 'CEME', 'CENS', 'CENS:DATE', 'CENS:PLAC', 'CHAN', 'CHAN:DATE', 'CHAN:_WT_USER', 'CHAR',
33
+        'CHIL', 'CHR', 'CHR:DATE', 'CHR:PLAC', 'CHRA', 'CITN', 'CITY',
34
+        'COMM', 'CONC', 'CONT', 'CONF', 'CONF:DATE', 'CONF:PLAC', 'CONL',
35
+        'COPR', 'CORP', 'CREM', 'CREM:DATE', 'CREM:PLAC', 'CTRY', 'DATA',
36
+        'DATA:DATE', 'DATE', 'DEAT', 'DEAT:CAUS', 'DEAT:DATE', 'DEAT:PLAC',
37
+        'DESC', 'DESI', 'DEST', 'DIV', 'DIVF', 'DSCR', 'EDUC', 'EDUC:AGNC', 'EMAI',
38
+        'EMAIL', 'EMAL', 'EMIG', 'EMIG:DATE', 'EMIG:PLAC', 'ENDL', 'ENDL:DATE',
39
+        'ENDL:PLAC', 'ENGA', 'ENGA:DATE', 'ENGA:PLAC', 'EVEN', 'EVEN:DATE',
40
+        'EVEN:PLAC', 'EVEN:TYPE', 'FACT', 'FACT:TYPE', 'FAM', 'FAMC', 'FAMF', 'FAMS', 'FAMS:CENS:DATE', 'FAMS:CENS:PLAC',
41
+        'FAMS:DIV:DATE', 'FAMS:MARR:DATE', 'FAMS:MARR:PLAC', 'FAMS:NOTE',
42
+        'FAX', 'FCOM', 'FCOM:DATE',
43
+        'FCOM:PLAC', 'FILE', 'FONE', 'FORM', 'GEDC', 'GIVN', 'GRAD',
44
+        'HEAD', 'HUSB', 'IDNO', 'IMMI', 'IMMI:DATE', 'IMMI:PLAC', 'INDI', 'INFL',
45
+        'LANG', 'LATI', 'LEGA', 'LONG', 'MAP', 'MARB', 'MARB:DATE', 'MARB:PLAC',
46
+        'MARC', 'MARL', 'MARR', 'MARR:DATE', 'MARR:PLAC',
47
+        'MARR_CIVIL', 'MARR_PARTNERS', 'MARR_RELIGIOUS', 'MARR_UNKNOWN', 'MARS',
48
+        'MEDI', 'NAME', 'NAME:FONE', 'NAME:_HEB', 'NATI', 'NATU', 'NATU:DATE', 'NATU:PLAC',
49
+        'NCHI', 'NICK', 'NMR', 'NOTE', 'NPFX', 'NSFX', 'OBJE', 'OCCU', 'OCCU:AGNC',
50
+        'ORDI', 'ORDN', 'ORDN:AGNC', 'ORDN:DATE', 'ORDN:PLAC', 'PAGE', 'PEDI', 'PHON',
51
+        'PLAC', 'PLAC:FONE', 'PLAC:ROMN', 'PLAC:_HEB', 'POST', 'PROB', 'PROP', 'PUBL',
52
+        'QUAY', 'REFN', 'RELA', 'RELI', 'REPO', 'RESI', 'RESI:DATE', 'RESI:PLAC', 'RESN',
53
+        'RETI', 'RETI:AGNC', 'RFN', 'RIN', 'ROLE', 'ROMN', 'SERV', 'SEX', 'SHARED_NOTE',
54
+        'SLGC', 'SLGC:DATE', 'SLGC:PLAC', 'SLGS', 'SLGS:DATE', 'SLGS:PLAC', 'SOUR',
55
+        'SPFX', 'SSN', 'STAE', 'STAT', 'STAT:DATE', 'SUBM', 'SUBN', 'SURN', 'TEMP',
56
+        'TEXT', 'TIME', 'TITL', 'TITL:FONE', 'TITL:ROMN', 'TITL:_HEB', 'TRLR', 'TYPE',
57
+        'URL', 'VERS', 'WIFE', 'WILL', 'WWW', '_ADOP_CHIL', '_ADOP_GCHI', '_ADOP_GCH1',
58
+        '_ADOP_GCH2', '_ADOP_HSIB', '_ADOP_SIBL', '_ADPF', '_ADPM', '_AKA', '_AKAN', '_ASSO',
59
+        '_BAPM_CHIL', '_BAPM_GCHI', '_BAPM_GCH1', '_BAPM_GCH2', '_BAPM_HSIB', '_BAPM_SIBL',
60
+        '_BIBL', '_BIRT_CHIL', '_BIRT_GCHI', '_BIRT_GCH1', '_BIRT_GCH2', '_BIRT_HSIB', '_BIRT_SIBL',
61
+        '_BRTM', '_BRTM:DATE', '_BRTM:PLAC', '_BURI_CHIL',
62
+        '_BURI_GCHI', '_BURI_GCH1', '_BURI_GCH2', '_BURI_GPAR', '_BURI_HSIB', '_BURI_SIBL', '_BURI_SPOU',
63
+        '_CHR_CHIL', '_CHR_GCHI', '_CHR_GCH1', '_CHR_GCH2', '_CHR_HSIB', '_CHR_SIBL', '_COML',
64
+        '_CREM_CHIL', '_CREM_GCHI', '_CREM_GCH1', '_CREM_GCH2', '_CREM_GPAR', '_CREM_HSIB', '_CREM_SIBL', '_CREM_SPOU',
65
+        '_DBID', '_DEAT_CHIL', '_DEAT_GCHI', '_DEAT_GCH1', '_DEAT_GCH2', '_DEAT_GPAR', '_DEAT_GPA1', '_DEAT_GPA2',
66
+        '_DEAT_HSIB', '_DEAT_PARE', '_DEAT_SIBL', '_DEAT_SPOU', '_DEG', '_DETS', '_DNA',
67
+        '_EMAIL', '_EYEC', '_FA1', '_FA2', '_FA3', '_FA4', '_FA5', '_FA6', '_FA7', '_FA8',
68
+        '_FA9', '_FA10', '_FA11', '_FA12', '_FA13', '_FNRL', '_FREL', '_GEDF', '_GODP', '_HAIR',
69
+        '_HEB', '_HEIG', '_HNM', '_HOL', '_INTE', '_LOC', '_MARB_CHIL', '_MARB_FAMC', '_MARB_GCHI',
70
+        '_MARB_GCH1', '_MARB_GCH2', '_MARB_HSIB', '_MARB_PARE', '_MARB_SIBL', '_MARI',
71
+        '_MARNM', '_PRIM', '_MARNM_SURN', '_MARR_CHIL', '_MARR_FAMC', '_MARR_GCHI',
72
+        '_MARR_GCH1', '_MARR_GCH2', '_MARR_HSIB', '_MARR_PARE', '_MARR_SIBL', '_MBON',
73
+        '_MDCL', '_MEDC', '_MEND', '_MILI', '_MILT', '_MREL', '_MSTAT', '_NAME', '_NAMS',
74
+        '_NLIV', '_NMAR', '_NMR', '_WT_USER', '_PRMN', '_SCBK', '_SEPR', '_SSHOW', '_STAT',
75
+        '_SUBQ', '_TODO', '_TYPE', '_UID', '_URL', '_WEIG', '_WITN', '_YART', '__BRTM_CHIL',
76
+        '__BRTM_GCHI', '__BRTM_GCH1', '__BRTM_GCH2', '__BRTM_HSIB', '__BRTM_SIBL',
77
+        // These pseudo-tags are generated dynamically to display media object attributes
78
+        '__FILE_SIZE__', '__IMAGE_SIZE__',
79
+    );
80 80
 
81
-	/** @var string[] Possible values for the Object-File-Format types */
82
-	private static $OBJE_FILE_FORM_TYPE = array(
83
-		'audio', 'book', 'card', 'certificate', 'coat', 'document', 'electronic',
84
-		'fiche', 'film', 'magazine', 'manuscript', 'map', 'newspaper', 'photo',
85
-		'tombstone', 'video', 'painting', 'other',
86
-	);
81
+    /** @var string[] Possible values for the Object-File-Format types */
82
+    private static $OBJE_FILE_FORM_TYPE = array(
83
+        'audio', 'book', 'card', 'certificate', 'coat', 'document', 'electronic',
84
+        'fiche', 'film', 'magazine', 'manuscript', 'map', 'newspaper', 'photo',
85
+        'tombstone', 'video', 'painting', 'other',
86
+    );
87 87
 
88
-	/**
89
-	 * Is $tag one of our known tags?
90
-	 *
91
-	 * @param string $tag
92
-	 *
93
-	 * @return bool
94
-	 */
95
-	public static function isTag($tag) {
96
-		return in_array($tag, self::$ALL_TAGS);
97
-	}
88
+    /**
89
+     * Is $tag one of our known tags?
90
+     *
91
+     * @param string $tag
92
+     *
93
+     * @return bool
94
+     */
95
+    public static function isTag($tag) {
96
+        return in_array($tag, self::$ALL_TAGS);
97
+    }
98 98
 
99
-	/**
100
-	 * Translate a tag, for an (optional) record
101
-	 *
102
-	 * @param string               $tag
103
-	 * @param GedcomRecord|null $record
104
-	 *
105
-	 * @return string
106
-	 */
107
-	public static function getLabel($tag, GedcomRecord $record = null) {
108
-		if ($record instanceof Individual) {
109
-			$sex = $record->getSex();
110
-		} else {
111
-			$sex = 'U';
112
-		}
99
+    /**
100
+     * Translate a tag, for an (optional) record
101
+     *
102
+     * @param string               $tag
103
+     * @param GedcomRecord|null $record
104
+     *
105
+     * @return string
106
+     */
107
+    public static function getLabel($tag, GedcomRecord $record = null) {
108
+        if ($record instanceof Individual) {
109
+            $sex = $record->getSex();
110
+        } else {
111
+            $sex = 'U';
112
+        }
113 113
 
114
-		switch ($tag) {
115
-		case 'ABBR':
116
-			return
117
-				/* I18N: gedcom tag ABBR */
118
-				I18N::translate('Abbreviation');
119
-		case 'ADDR':
120
-			return
121
-				/* I18N: gedcom tag ADDR */
122
-				I18N::translate('Address');
123
-		case 'ADR1':
124
-			return I18N::translate('Address line 1');
125
-		case 'ADR2':
126
-			return I18N::translate('Address line 2');
127
-		case 'ADOP':
128
-			return
129
-				/* I18N: gedcom tag ADOP */
130
-				I18N::translate('Adoption');
131
-		case 'ADOP:DATE':
132
-			return I18N::translate('Date of adoption');
133
-		case 'ADOP:PLAC':
134
-			return I18N::translate('Place of adoption');
135
-		case 'AFN':
136
-			return
137
-				/* I18N: gedcom tag AFN */
138
-				I18N::translate('Ancestral file number');
139
-		case 'AGE':
140
-			return
141
-				/* I18N: gedcom tag AGE */
142
-				I18N::translate('Age');
143
-		case 'AGNC':
144
-			return
145
-				/* I18N: gedcom tag AGNC */
146
-				I18N::translate('Agency');
147
-		case 'ALIA':
148
-			return
149
-				/* I18N: gedcom tag ALIA */
150
-				I18N::translate('Alias');
151
-		case 'ANCE':
152
-			return
153
-				/* I18N: gedcom tag ANCE */
154
-				I18N::translate('Generations of ancestors');
155
-		case 'ANCI':
156
-			return
157
-				/* I18N: gedcom tag ANCI */
158
-				I18N::translate('Ancestors interest');
159
-		case 'ANUL':
160
-			return
161
-				/* I18N: gedcom tag ANUL */
162
-				I18N::translate('Annulment');
163
-		case 'ASSO':
164
-			return
165
-				/* I18N: gedcom tag ASSO */
166
-				I18N::translate('Associate'); /* see also _ASSO */
167
-		case 'AUTH':
168
-			return
169
-				/* I18N: gedcom tag AUTH */
170
-				I18N::translate('Author');
171
-		case 'BAPL':
172
-			return
173
-				/* I18N: gedcom tag BAPL. LDS = Church of Latter Day Saints. */
174
-				I18N::translate('LDS baptism');
175
-		case 'BAPL:DATE':
176
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS baptism');
177
-		case 'BAPL:PLAC':
178
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS baptism');
179
-		case 'BAPM':
180
-			return
181
-				/* I18N: gedcom tag BAPM */
182
-				I18N::translate('Baptism');
183
-		case 'BAPM:DATE':
184
-			return I18N::translate('Date of baptism');
185
-		case 'BAPM:PLAC':
186
-			return I18N::translate('Place of baptism');
187
-		case 'BARM':
188
-			return
189
-				/* I18N: gedcom tag BARM */
190
-				I18N::translate('Bar mitzvah');
191
-		case 'BARM:DATE':
192
-			return I18N::translate('Date of bar mitzvah');
193
-		case 'BARM:PLAC':
194
-			return I18N::translate('Place of bar mitzvah');
195
-		case 'BASM':
196
-			return
197
-				/* I18N: gedcom tag BASM */
198
-				I18N::translate('Bat mitzvah');
199
-		case 'BASM:DATE':
200
-			return I18N::translate('Date of bat mitzvah');
201
-		case 'BASM:PLAC':
202
-			return I18N::translate('Place of bat mitzvah');
203
-		case 'BIRT':
204
-			return
205
-				/* I18N: gedcom tag BIRT */
206
-				I18N::translate('Birth');
207
-		case 'BIRT:DATE':
208
-			return I18N::translate('Date of birth');
209
-		case 'BIRT:PLAC':
210
-			return I18N::translate('Place of birth');
211
-		case 'BLES':
212
-			return
213
-				/* I18N: gedcom tag BLES */
214
-				I18N::translate('Blessing');
215
-		case 'BLES:DATE':
216
-			return I18N::translate('Date of blessing');
217
-		case 'BLES:PLAC':
218
-			return I18N::translate('Place of blessing');
219
-		case 'BLOB':
220
-			return
221
-				/* I18N: gedcom tag BLOB */
222
-				I18N::translate('Binary data object');
223
-		case 'BURI':
224
-			return
225
-				/* I18N: gedcom tag BURI */
226
-				I18N::translate('Burial');
227
-		case 'BURI:DATE':
228
-			return I18N::translate('Date of burial');
229
-		case 'BURI:PLAC':
230
-			return I18N::translate('Place of burial');
231
-		case 'CALN':
232
-			return
233
-				/* I18N: gedcom tag CALN */
234
-				I18N::translate('Call number');
235
-		case 'CAST':
236
-			return
237
-				/* I18N: gedcom tag CAST */
238
-				I18N::translate('Caste');
239
-		case 'CAUS':
240
-			return
241
-				/* I18N: gedcom tag CAUS */
242
-				I18N::translate('Cause');
243
-		case 'CEME':
244
-			return
245
-				/* I18N: gedcom tag CEME */
246
-				I18N::translate('Cemetery');
247
-		case 'CENS':
248
-			return
249
-				/* I18N: gedcom tag CENS */
250
-				I18N::translate('Census');
251
-		case 'CENS:DATE':
252
-			return I18N::translate('Census date');
253
-		case 'CENS:PLAC':
254
-			return I18N::translate('Census place');
255
-		case 'CHAN':
256
-			return
257
-				/* I18N: gedcom tag CHAN */
258
-				I18N::translate('Last change');
259
-		case 'CHAN:DATE':
260
-			return
261
-				/* I18N: gedcom tag CHAN:DATE */
262
-				I18N::translate('Date of last change');
263
-		case 'CHAN:_WT_USER':
264
-			return
265
-				/* I18N: gedcom tag CHAN:_WT_USER */
266
-				I18N::translate('Author of last change');
267
-		case 'CHAR':
268
-			return
269
-				/* I18N: gedcom tag CHAR */
270
-				I18N::translate('Character set');
271
-		case 'CHIL':
272
-			return
273
-				/* I18N: gedcom tag CHIL */
274
-				I18N::translate('Child');
275
-		case 'CHR':
276
-			return
277
-				/* I18N: gedcom tag CHR */
278
-				I18N::translate('Christening');
279
-		case 'CHR:DATE':
280
-			return I18N::translate('Date of christening');
281
-		case 'CHR:PLAC':
282
-			return I18N::translate('Place of christening');
283
-		case 'CHRA':
284
-			return
285
-				/* I18N: gedcom tag CHRA */
286
-				I18N::translate('Adult christening');
287
-		case 'CITN':
288
-			return
289
-				/* I18N: gedcom tag CITN */
290
-				I18N::translate('Citizenship');
291
-		case 'CITY':
292
-			return
293
-				/* I18N: gedcom tag CITY */
294
-				I18N::translate('City');
295
-		case 'COMM':
296
-			return
297
-				/* I18N: gedcom tag COMM */
298
-				I18N::translate('Comment');
299
-		case 'CONC':
300
-			return
301
-				/* I18N: gedcom tag CONC */
302
-				I18N::translate('Concatenation');
303
-		case 'CONT':
304
-			return
305
-				/* I18N: gedcom tag CONT */
306
-				I18N::translate('Continued');
307
-		case 'CONF':
308
-			return
309
-				/* I18N: gedcom tag CONF */
310
-				I18N::translate('Confirmation');
311
-		case 'CONF:DATE':
312
-			return I18N::translate('Date of confirmation');
313
-		case 'CONF:PLAC':
314
-			return I18N::translate('Place of confirmation');
315
-		case 'CONL':
316
-			return
317
-				/* I18N: gedcom tag CONL. LDS = Church of Latter Day Saints. */
318
-				I18N::translate('LDS confirmation');
319
-		case 'COPR':
320
-			return
321
-				/* I18N: gedcom tag COPR */
322
-				I18N::translate('Copyright');
323
-		case 'CORP':
324
-			return
325
-				/* I18N: gedcom tag CORP */
326
-				I18N::translate('Corporation');
327
-		case 'CREM':
328
-			return
329
-				/* I18N: gedcom tag CREM */
330
-				I18N::translate('Cremation');
331
-		case 'CREM:DATE':
332
-			return I18N::translate('Date of cremation');
333
-		case 'CREM:PLAC':
334
-			return I18N::translate('Place of cremation');
335
-		case 'CTRY':
336
-			return
337
-				/* I18N: gedcom tag CTRY */
338
-				I18N::translate('Country');
339
-		case 'DATA':
340
-			return
341
-				/* I18N: gedcom tag DATA */
342
-				I18N::translate('Data');
343
-		case 'DATA:DATE':
344
-			return I18N::translate('Date of entry in original source');
345
-		case 'DATE':
346
-			return
347
-				/* I18N: gedcom tag DATE */
348
-				I18N::translate('Date');
349
-		case 'DEAT':
350
-			return
351
-				/* I18N: gedcom tag DEAT */
352
-				I18N::translate('Death');
353
-		case 'DEAT:CAUS':
354
-			return I18N::translate('Cause of death');
355
-		case 'DEAT:DATE':
356
-			return I18N::translate('Date of death');
357
-		case 'DEAT:PLAC':
358
-			return I18N::translate('Place of death');
359
-		case 'DESC':
360
-			return
361
-				/* I18N: gedcom tag DESC */
362
-				I18N::translate('Descendants');
363
-		case 'DESI':
364
-			return
365
-				/* I18N: gedcom tag DESI */
366
-				I18N::translate('Descendants interest');
367
-		case 'DEST':
368
-			return
369
-				/* I18N: gedcom tag DEST */
370
-				I18N::translate('Destination');
371
-		case 'DIV':
372
-			return
373
-				/* I18N: gedcom tag DIV */
374
-				I18N::translate('Divorce');
375
-		case 'DIVF':
376
-			return
377
-				/* I18N: gedcom tag DIVF */
378
-				I18N::translate('Divorce filed');
379
-		case 'DSCR':
380
-			return
381
-				/* I18N: gedcom tag DSCR */
382
-				I18N::translate('Description');
383
-		case 'EDUC':
384
-			return
385
-				/* I18N: gedcom tag EDUC */
386
-				I18N::translate('Education');
387
-		case 'EDUC:AGNC':
388
-			return I18N::translate('School or college');
389
-		case 'EMAI':
390
-			return
391
-				/* I18N: gedcom tag EMAI */
392
-				I18N::translate('Email address');
393
-		case 'EMAIL':
394
-			return
395
-				/* I18N: gedcom tag EMAIL */
396
-				I18N::translate('Email address');
397
-		case 'EMAL':
398
-			return
399
-				/* I18N: gedcom tag EMAL */
400
-				I18N::translate('Email address');
401
-		case 'EMIG':
402
-			return
403
-				/* I18N: gedcom tag EMIG */
404
-				I18N::translate('Emigration');
405
-		case 'EMIG:DATE':
406
-			return I18N::translate('Date of emigration');
407
-		case 'EMIG:PLAC':
408
-			return I18N::translate('Place of emigration');
409
-		case 'ENDL':
410
-			return
411
-				/* I18N: gedcom tag ENDL. LDS = Church of Latter Day Saints. */
412
-				I18N::translate('LDS endowment');
413
-		case 'ENDL:DATE':
414
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS endowment');
415
-		case 'ENDL:PLAC':
416
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS endowment');
417
-		case 'ENGA':
418
-			return
419
-				/* I18N: gedcom tag ENGA */
420
-				I18N::translate('Engagement');
421
-		case 'ENGA:DATE':
422
-			return I18N::translate('Date of engagement');
423
-		case 'ENGA:PLAC':
424
-			return I18N::translate('Place of engagement');
425
-		case 'EVEN':
426
-			return
427
-				/* I18N: gedcom tag EVEN */
428
-				I18N::translate('Event');
429
-		case 'EVEN:DATE':
430
-			return I18N::translate('Date of event');
431
-		case 'EVEN:PLAC':
432
-			return I18N::translate('Place of event');
433
-		case 'EVEN:TYPE':
434
-			return I18N::translate('Type of event');
435
-		case 'FACT':
436
-			return
437
-				/* I18N: gedcom tag FACT */
438
-				I18N::translate('Fact');
439
-		case 'FACT:TYPE':
440
-			return I18N::translate('Type of fact');
441
-		case 'FAM':
442
-			return
443
-				/* I18N: gedcom tag FAM */
444
-				I18N::translate('Family');
445
-		case 'FAMC':
446
-			return
447
-				/* I18N: gedcom tag FAMC */
448
-				I18N::translate('Family as a child');
449
-		case 'FAMF':
450
-			return
451
-				/* I18N: gedcom tag FAMF */
452
-				I18N::translate('Family file');
453
-		case 'FAMS':
454
-			return
455
-				/* I18N: gedcom tag FAMS */
456
-				I18N::translate('Family as a spouse');
457
-		case 'FAMS:CENS:DATE':
458
-			return I18N::translate('Spouse census date');
459
-		case 'FAMS:CENS:PLAC':
460
-			return I18N::translate('Spouse census place');
461
-		case 'FAMS:DIV:DATE':
462
-			return I18N::translate('Date of divorce');
463
-		case 'FAMS:MARR:DATE':
464
-			return I18N::translate('Date of marriage');
465
-		case 'FAMS:MARR:PLAC':
466
-			return I18N::translate('Place of marriage');
467
-		case 'FAMS:NOTE':
468
-			return I18N::translate('Spouse note');
469
-		case 'FAMS:SLGS:DATE':
470
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS spouse sealing');
471
-		case 'FAMS:SLGS:PLAC':
472
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS spouse sealing');
473
-		case 'FAX':
474
-			return
475
-				/* I18N: gedcom tag FAX */
476
-				I18N::translate('Fax');
477
-		case 'FCOM':
478
-			return
479
-				/* I18N: gedcom tag FCOM */
480
-				I18N::translate('First communion');
481
-		case 'FCOM:DATE':
482
-			return I18N::translate('Date of first communion');
483
-		case 'FCOM:PLAC':
484
-			return I18N::translate('Place of first communion');
485
-		case 'FILE':
486
-			return
487
-				/* I18N: gedcom tag FILE */
488
-				I18N::translate('Filename');
489
-		case 'FONE':
490
-			return
491
-				/* I18N: gedcom tag FONE */
492
-				I18N::translate('Phonetic');
493
-		case 'FORM':
494
-			return
495
-				/* I18N: gedcom tag FORM */
496
-				I18N::translate('Format');
497
-		case 'GEDC':
498
-			return
499
-				/* I18N: gedcom tag GEDC */
500
-				I18N::translate('GEDCOM file');
501
-		case 'GIVN':
502
-			return
503
-				/* I18N: gedcom tag GIVN */
504
-				I18N::translate('Given names');
505
-		case 'GRAD':
506
-			return
507
-				/* I18N: gedcom tag GRAD */
508
-				I18N::translate('Graduation');
509
-		case 'HEAD':
510
-			return
511
-				/* I18N: gedcom tag HEAD */
512
-				I18N::translate('Header');
513
-		case 'HUSB':
514
-			return
515
-				/* I18N: gedcom tag HUSB */
516
-				I18N::translate('Husband');
517
-		case 'IDNO':
518
-			return
519
-				/* I18N: gedcom tag IDNO */
520
-				I18N::translate('Identification number');
521
-		case 'IMMI':
522
-			return
523
-				/* I18N: gedcom tag IMMI */
524
-				I18N::translate('Immigration');
525
-		case 'IMMI:DATE':
526
-			return I18N::translate('Date of immigration');
527
-		case 'IMMI:PLAC':
528
-			return I18N::translate('Place of immigration');
529
-		case 'INDI':
530
-			return
531
-				/* I18N: gedcom tag INDI */
532
-				I18N::translate('Individual');
533
-		case 'INFL':
534
-			return
535
-				/* I18N: gedcom tag INFL */
536
-				I18N::translate('Infant');
537
-		case 'LANG':
538
-			return
539
-				/* I18N: gedcom tag LANG */
540
-				I18N::translate('Language');
541
-		case 'LATI':
542
-			return
543
-				/* I18N: gedcom tag LATI */
544
-				I18N::translate('Latitude');
545
-		case 'LEGA':
546
-			return
547
-				/* I18N: gedcom tag LEGA */
548
-				I18N::translate('Legatee');
549
-		case 'LONG':
550
-			return
551
-				/* I18N: gedcom tag LONG */
552
-				I18N::translate('Longitude');
553
-		case 'MAP':
554
-			return
555
-				/* I18N: gedcom tag MAP */
556
-				I18N::translate('Map');
557
-		case 'MARB':
558
-			return
559
-				/* I18N: gedcom tag MARB */
560
-				I18N::translate('Marriage banns');
561
-		case 'MARB:DATE':
562
-			return I18N::translate('Date of marriage banns');
563
-		case 'MARB:PLAC':
564
-			return I18N::translate('Place of marriage banns');
565
-		case 'MARC':
566
-			return
567
-				/* I18N: gedcom tag MARC */
568
-				I18N::translate('Marriage contract');
569
-		case 'MARL':
570
-			return
571
-				/* I18N: gedcom tag MARL */
572
-				I18N::translate('Marriage license');
573
-		case 'MARR':
574
-			return
575
-				/* I18N: gedcom tag MARR */
576
-				I18N::translate('Marriage');
577
-		case 'MARR:DATE':
578
-			return I18N::translate('Date of marriage');
579
-		case 'MARR:PLAC':
580
-			return I18N::translate('Place of marriage');
581
-		case 'MARR_CIVIL':
582
-			return I18N::translate('Civil marriage');
583
-		case 'MARR_PARTNERS':
584
-			return I18N::translate('Registered partnership');
585
-		case 'MARR_RELIGIOUS':
586
-			return I18N::translate('Religious marriage');
587
-		case 'MARR_UNKNOWN':
588
-			return I18N::translate('Marriage type unknown');
589
-		case 'MARS':
590
-			return
591
-				/* I18N: gedcom tag MARS */
592
-				I18N::translate('Marriage settlement');
593
-		case 'MEDI':
594
-			return
595
-				/* I18N: gedcom tag MEDI */
596
-				I18N::translate('Media type');
597
-		case 'NAME':
598
-			if ($record instanceof Repository) {
599
-				return
600
-					/* I18N: gedcom tag REPO:NAME */
601
-					I18N::translateContext('Repository', 'Name');
602
-			} else {
603
-				return
604
-					/* I18N: gedcom tag NAME */
605
-					I18N::translate('Name');
606
-			}
607
-		case 'NAME:FONE':
608
-			return I18N::translate('Phonetic name');
609
-		case 'NAME:_HEB':
610
-			return I18N::translate('Name in Hebrew');
611
-		case 'NATI':
612
-			return
613
-				/* I18N: gedcom tag NATI */
614
-				I18N::translate('Nationality');
615
-		case 'NATU':
616
-			return
617
-				/* I18N: gedcom tag NATU */
618
-				I18N::translate('Naturalization');
619
-		case 'NATU:DATE':
620
-			return I18N::translate('Date of naturalization');
621
-		case 'NATU:PLAC':
622
-			return I18N::translate('Place of naturalization');
623
-		case 'NCHI':
624
-			return
625
-				/* I18N: gedcom tag NCHI */
626
-				I18N::translate('Number of children');
627
-		case 'NICK':
628
-			return
629
-				/* I18N: gedcom tag NICK */
630
-				I18N::translate('Nickname');
631
-		case 'NMR':
632
-			return
633
-				/* I18N: gedcom tag NMR */
634
-				I18N::translate('Number of marriages');
635
-		case 'NOTE':
636
-			return
637
-				/* I18N: gedcom tag NOTE */
638
-				I18N::translate('Note');
639
-		case 'NPFX':
640
-			return
641
-				/* I18N: gedcom tag NPFX */
642
-				I18N::translate('Name prefix');
643
-		case 'NSFX':
644
-			return
645
-				/* I18N: gedcom tag NSFX */
646
-				I18N::translate('Name suffix');
647
-		case 'OBJE':
648
-			return
649
-				/* I18N: gedcom tag OBJE */
650
-				I18N::translate('Media object');
651
-		case 'OCCU':
652
-			return
653
-				/* I18N: gedcom tag OCCU */
654
-				I18N::translate('Occupation');
655
-		case 'OCCU:AGNC':
656
-			return I18N::translate('Employer');
657
-		case 'ORDI':
658
-			return
659
-				/* I18N: gedcom tag ORDI */
660
-				I18N::translate('Ordinance');
661
-		case 'ORDN':
662
-			return
663
-				/* I18N: gedcom tag ORDN */
664
-				I18N::translate('Ordination');
665
-		case 'ORDN:AGNC':
666
-			return I18N::translate('Religious institution');
667
-		case 'ORDN:DATE':
668
-			return I18N::translate('Date of ordination');
669
-		case 'ORDN:PLAC':
670
-			return I18N::translate('Place of ordination');
671
-		case 'PAGE':
672
-			return
673
-				/* I18N: gedcom tag PAGE */
674
-				I18N::translate('Citation details');
675
-		case 'PEDI':
676
-			return
677
-				/* I18N: gedcom tag PEDI */
678
-				I18N::translate('Relationship to parents');
679
-		case 'PHON':
680
-			return
681
-				/* I18N: gedcom tag PHON */
682
-				I18N::translate('Phone');
683
-		case 'PLAC':
684
-			return
685
-				/* I18N: gedcom tag PLAC */
686
-				I18N::translate('Place');
687
-		case 'PLAC:FONE':
688
-			return I18N::translate('Phonetic place');
689
-		case 'PLAC:ROMN':
690
-			return I18N::translate('Romanized place');
691
-		case 'PLAC:_HEB':
692
-			return I18N::translate('Place in Hebrew');
693
-		case 'POST':
694
-			return
695
-				/* I18N: gedcom tag POST */
696
-				I18N::translate('Postal code');
697
-		case 'PROB':
698
-			return
699
-				/* I18N: gedcom tag PROB */
700
-				I18N::translate('Probate');
701
-		case 'PROP':
702
-			return
703
-				/* I18N: gedcom tag PROP */
704
-				I18N::translate('Property');
705
-		case 'PUBL':
706
-			return
707
-				/* I18N: gedcom tag PUBL */
708
-				I18N::translate('Publication');
709
-		case 'QUAY':
710
-			return
711
-				/* I18N: gedcom tag QUAY */
712
-				I18N::translate('Quality of data');
713
-		case 'REFN':
714
-			return
715
-				/* I18N: gedcom tag REFN */
716
-				I18N::translate('Reference number');
717
-		case 'RELA':
718
-			return
719
-				/* I18N: gedcom tag RELA */
720
-				I18N::translate('Relationship');
721
-		case 'RELI':
722
-			return
723
-				/* I18N: gedcom tag RELI */
724
-				I18N::translate('Religion');
725
-		case 'REPO':
726
-			return
727
-				/* I18N: gedcom tag REPO */
728
-				I18N::translate('Repository');
729
-		case 'RESI':
730
-			return
731
-				/* I18N: gedcom tag RESI */
732
-				I18N::translate('Residence');
733
-		case 'RESI:DATE':
734
-			return I18N::translate('Date of residence');
735
-		case 'RESI:PLAC':
736
-			return I18N::translate('Place of residence');
737
-		case 'RESN':
738
-			return
739
-				/* I18N: gedcom tag RESN */
740
-				I18N::translate('Restriction');
741
-		case 'RETI':
742
-			return
743
-				/* I18N: gedcom tag RETI */
744
-				I18N::translate('Retirement');
745
-		case 'RETI:AGNC':
746
-			return I18N::translate('Employer');
747
-		case 'RFN':
748
-			return
749
-				/* I18N: gedcom tag RFN */
750
-				I18N::translate('Record file number');
751
-		case 'RIN':
752
-			return
753
-				/* I18N: gedcom tag RIN */
754
-				I18N::translate('Record ID number');
755
-		case 'ROLE':
756
-			return
757
-				/* I18N: gedcom tag ROLE */
758
-				I18N::translate('Role');
759
-		case 'ROMN':
760
-			return
761
-				/* I18N: gedcom tag ROMN */
762
-				I18N::translate('Romanized');
763
-		case 'SERV':
764
-			return
765
-				/* I18N: gedcom tag SERV */
766
-				I18N::translate('Remote server');
767
-		case 'SEX':
768
-			return
769
-				/* I18N: gedcom tag SEX */
770
-				I18N::translate('Gender');
771
-		case 'SHARED_NOTE':
772
-			return I18N::translate('Shared note');
773
-		case 'SLGC':
774
-			return
775
-				/* I18N: gedcom tag SLGC. LDS = Church of Latter Day Saints. */
776
-				I18N::translate('LDS child sealing');
777
-		case 'SLGC:DATE':
778
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS child sealing');
779
-		case 'SLGC:PLAC':
780
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS child sealing');
781
-		case 'SLGS':
782
-			return
783
-				/* I18N: gedcom tag SLGS. LDS = Church of Latter Day Saints. */
784
-				I18N::translate('LDS spouse sealing');
785
-		case 'SOUR':
786
-			return
787
-				/* I18N: gedcom tag SOUR */
788
-				I18N::translate('Source');
789
-		case 'SPFX':
790
-			return
791
-				/* I18N: gedcom tag SPFX */
792
-				I18N::translate('Surname prefix');
793
-		case 'SSN':
794
-			return
795
-				/* I18N: gedcom tag SSN */
796
-				I18N::translate('Social security number');
797
-		case 'STAE':
798
-			return
799
-				/* I18N: gedcom tag STAE */
800
-				I18N::translate('State');
801
-		case 'STAT':
802
-			return
803
-				/* I18N: gedcom tag STAT */
804
-				I18N::translate('Status');
805
-		case 'STAT:DATE':
806
-			return I18N::translate('Status change date');
807
-		case 'SUBM':
808
-			return
809
-				/* I18N: gedcom tag SUBM */
810
-				I18N::translate('Submitter');
811
-		case 'SUBN':
812
-			return
813
-				/* I18N: gedcom tag SUBN */
814
-				I18N::translate('Submission');
815
-		case 'SURN':
816
-			return
817
-				/* I18N: gedcom tag SURN */
818
-				I18N::translate('Surname');
819
-		case 'TEMP':
820
-			return
821
-				/* I18N: gedcom tag TEMP */
822
-				I18N::translate('Temple');
823
-		case 'TEXT':
824
-			return
825
-				/* I18N: gedcom tag TEXT */
826
-				I18N::translate('Text');
827
-		case 'TIME':
828
-			return
829
-				/* I18N: gedcom tag TIME */
830
-				I18N::translate('Time');
831
-		case 'TITL':
832
-			return
833
-				/* I18N: gedcom tag TITL */
834
-				I18N::translate('Title');
835
-		case 'TITL:FONE':
836
-			return I18N::translate('Phonetic title');
837
-		case 'TITL:ROMN':
838
-			return I18N::translate('Romanized title');
839
-		case 'TITL:_HEB':
840
-			return I18N::translate('Title in Hebrew');
841
-		case 'TRLR':
842
-			return
843
-				/* I18N: gedcom tag TRLR */
844
-				I18N::translate('Trailer');
845
-		case 'TYPE':
846
-			return
847
-				/* I18N: gedcom tag TYPE */
848
-				I18N::translate('Type');
849
-		case 'URL':
850
-			return
851
-				/* I18N: gedcom tag URL (A web address / URL) */
852
-				I18N::translate('URL');
853
-		case 'VERS':
854
-			return
855
-				/* I18N: gedcom tag VERS */
856
-				I18N::translate('Version');
857
-		case 'WIFE':
858
-			return
859
-				/* I18N: gedcom tag WIFE */
860
-				I18N::translate('Wife');
861
-		case 'WILL':
862
-			return
863
-				/* I18N: gedcom tag WILL */
864
-				I18N::translate('Will');
865
-		case 'WWW':
866
-			return
867
-				/* I18N: gedcom tag WWW (A web address / URL) */
868
-				I18N::translate('URL');
869
-		case '_ADOP_CHIL':
870
-			switch ($sex) {
871
-			case 'M':
872
-				return I18N::translate('Adoption of a son');
873
-			case 'F':
874
-				return I18N::translate('Adoption of a daughter');
875
-			default:
876
-				return I18N::translate('Adoption of a child');
877
-			}
878
-		case '_ADOP_GCHI':
879
-			switch ($sex) {
880
-			case 'M':
881
-				return I18N::translate('Adoption of a grandson');
882
-			case 'F':
883
-				return I18N::translate('Adoption of a granddaughter');
884
-			default:
885
-				return I18N::translate('Adoption of a grandchild');
886
-			}
887
-		case '_ADOP_GCH1':
888
-			switch ($sex) {
889
-			case 'M':
890
-				return I18N::translateContext('daughter’s son', 'Adoption of a grandson');
891
-			case 'F':
892
-				return I18N::translateContext('daughter’s daughter', 'Adoption of a granddaughter');
893
-			default:
894
-				return I18N::translate('Adoption of a grandchild');
895
-			}
896
-		case '_ADOP_GCH2':
897
-			switch ($sex) {
898
-			case 'M':
899
-				return I18N::translateContext('son’s son', 'Adoption of a grandson');
900
-			case 'F':
901
-				return I18N::translateContext('son’s daughter', 'Adoption of a granddaughter');
902
-			default:
903
-				return I18N::translate('Adoption of a grandchild');
904
-			}
905
-		case '_ADOP_HSIB':
906
-			switch ($sex) {
907
-			case 'M':
908
-				return I18N::translate('Adoption of a half-brother');
909
-			case 'F':
910
-				return I18N::translate('Adoption of a half-sister');
911
-			default:
912
-				return I18N::translate('Adoption of a half-sibling');
913
-			}
914
-		case '_ADOP_SIBL':
915
-			switch ($sex) {
916
-			case 'M':
917
-				return I18N::translate('Adoption of a brother');
918
-			case 'F':
919
-				return I18N::translate('Adoption of a sister');
920
-			default:
921
-				return I18N::translate('Adoption of a sibling');
922
-			}
923
-		case '_ADPF':
924
-			switch ($sex) {
925
-			case 'M':
926
-				return
927
-					/* I18N: gedcom tag _ADPF */
928
-					I18N::translateContext('MALE', 'Adopted by father');
929
-			case 'F':
930
-				return
931
-					/* I18N: gedcom tag _ADPF */
932
-					I18N::translateContext('FEMALE', 'Adopted by father');
933
-			default:
934
-				return
935
-					/* I18N: gedcom tag _ADPF */
936
-					I18N::translate('Adopted by father');
937
-			}
938
-		case '_ADPM':
939
-			switch ($sex) {
940
-			case 'M':
941
-				return
942
-					/* I18N: gedcom tag _ADPM */
943
-					I18N::translateContext('MALE', 'Adopted by mother');
944
-			case 'F':
945
-				return
946
-					/* I18N: gedcom tag _ADPM */
947
-					I18N::translateContext('FEMALE', 'Adopted by mother');
948
-			default:
949
-				return
950
-					/* I18N: gedcom tag _ADPM */
951
-					I18N::translate('Adopted by mother');
952
-			}
953
-		case '_AKA':
954
-		case '_AKAN':
955
-			switch ($sex) {
956
-			case 'M':
957
-				return
958
-					/* I18N: gedcom tag _AKA */
959
-					I18N::translateContext('MALE', 'Also known as');
960
-			case 'F':
961
-				return
962
-					/* I18N: gedcom tag _AKA */
963
-					I18N::translateContext('FEMALE', 'Also known as');
964
-			default:
965
-				return
966
-					/* I18N: gedcom tag _AKA */
967
-					I18N::translate('Also known as');
968
-			}
969
-		case '_ASSO':
970
-			return
971
-				/* I18N: gedcom tag _ASSO */
972
-				I18N::translate('Associate'); /* see also ASSO */
973
-		case '_BAPM_CHIL':
974
-			switch ($sex) {
975
-			case 'M':
976
-				return I18N::translate('Baptism of a son');
977
-			case 'F':
978
-				return I18N::translate('Baptism of a daughter');
979
-			default:
980
-				return I18N::translate('Baptism of a child');
981
-			}
982
-		case '_BAPM_GCHI':
983
-			switch ($sex) {
984
-			case 'M':
985
-				return I18N::translate('Baptism of a grandson');
986
-			case 'F':
987
-				return I18N::translate('Baptism of a granddaughter');
988
-			default:
989
-				return I18N::translate('Baptism of a grandchild');
990
-			}
991
-		case '_BAPM_GCH1':
992
-			switch ($sex) {
993
-			case 'M':
994
-				return I18N::translateContext('daughter’s son', 'Baptism of a grandson');
995
-			case 'F':
996
-				return I18N::translateContext('daughter’s daughter', 'Baptism of a granddaughter');
997
-			default:
998
-				return I18N::translate('Baptism of a grandchild');
999
-			}
1000
-		case '_BAPM_GCH2':
1001
-			switch ($sex) {
1002
-			case 'M':
1003
-				return I18N::translateContext('son’s son', 'Baptism of a grandson');
1004
-			case 'F':
1005
-				return I18N::translateContext('son’s daughter', 'Baptism of a granddaughter');
1006
-			default:
1007
-				return I18N::translate('Baptism of a grandchild');
1008
-			}
1009
-		case '_BAPM_HSIB':
1010
-			switch ($sex) {
1011
-			case 'M':
1012
-				return I18N::translate('Baptism of a half-brother');
1013
-			case 'F':
1014
-				return I18N::translate('Baptism of a half-sister');
1015
-			default:
1016
-				return I18N::translate('Baptism of a half-sibling');
1017
-			}
1018
-		case '_BAPM_SIBL':
1019
-			switch ($sex) {
1020
-			case 'M':
1021
-				return I18N::translate('Baptism of a brother');
1022
-			case 'F':
1023
-				return I18N::translate('Baptism of a sister');
1024
-			default:
1025
-				return I18N::translate('Baptism of a sibling');
1026
-			}
1027
-		case '_BIBL':
1028
-			return
1029
-				/* I18N: gedcom tag _BIBL */
1030
-				I18N::translate('Bibliography');
1031
-		case '_BIRT_CHIL':
1032
-			switch ($sex) {
1033
-			case 'M':
1034
-				return I18N::translate('Birth of a son');
1035
-			case 'F':
1036
-				return I18N::translate('Birth of a daughter');
1037
-			default:
1038
-				return I18N::translate('Birth of a child');
1039
-			}
1040
-		case '_BIRT_GCHI':
1041
-			switch ($sex) {
1042
-			case 'M':
1043
-				return I18N::translate('Birth of a grandson');
1044
-			case 'F':
1045
-				return I18N::translate('Birth of a granddaughter');
1046
-			default:
1047
-				return I18N::translate('Birth of a grandchild');
1048
-			}
1049
-		case '_BIRT_GCH1':
1050
-			switch ($sex) {
1051
-			case 'M':
1052
-				return I18N::translateContext('daughter’s son', 'Birth of a grandson');
1053
-			case 'F':
1054
-				return I18N::translateContext('daughter’s daughter', 'Birth of a granddaughter');
1055
-			default:
1056
-				return I18N::translate('Birth of a grandchild');
1057
-			}
1058
-		case '_BIRT_GCH2':
1059
-			switch ($sex) {
1060
-			case 'M':
1061
-				return I18N::translateContext('son’s son', 'Birth of a grandson');
1062
-			case 'F':
1063
-				return I18N::translateContext('son’s daughter', 'Birth of a granddaughter');
1064
-			default:
1065
-				return I18N::translate('Birth of a grandchild');
1066
-			}
1067
-		case '_BIRT_HSIB':
1068
-			switch ($sex) {
1069
-			case 'M':
1070
-				return I18N::translate('Birth of a half-brother');
1071
-			case 'F':
1072
-				return I18N::translate('Birth of a half-sister');
1073
-			default:
1074
-				return I18N::translate('Birth of a half-sibling');
1075
-			}
1076
-		case '_BIRT_SIBL':
1077
-			switch ($sex) {
1078
-			case 'M':
1079
-				return I18N::translate('Birth of a brother');
1080
-			case 'F':
1081
-				return I18N::translate('Birth of a sister');
1082
-			default:
1083
-				return I18N::translate('Birth of a sibling');
1084
-			}
1085
-		case '_BRTM':
1086
-			return
1087
-				/* I18N: gedcom tag _BRTM */
1088
-				I18N::translate('Brit milah');
1089
-		case '_BRTM:DATE':
1090
-			return I18N::translate('Date of brit milah');
1091
-		case '_BRTM:PLAC':
1092
-			return I18N::translate('Place of brit milah');
1093
-		case '_BURI_CHIL':
1094
-			switch ($sex) {
1095
-			case 'M':
1096
-				return I18N::translate('Burial of a son');
1097
-			case 'F':
1098
-				return I18N::translate('Burial of a daughter');
1099
-			default:
1100
-				return I18N::translate('Burial of a child');
1101
-			}
1102
-		case '_BURI_GCHI':
1103
-			switch ($sex) {
1104
-			case 'M':
1105
-				return I18N::translate('Burial of a grandson');
1106
-			case 'F':
1107
-				return I18N::translate('Burial of a granddaughter');
1108
-			default:
1109
-				return I18N::translate('Burial of a grandchild');
1110
-			}
1111
-		case '_BURI_GCH1':
1112
-			switch ($sex) {
1113
-			case 'M':
1114
-				return I18N::translateContext('daughter’s son', 'Burial of a grandson');
1115
-			case 'F':
1116
-				return I18N::translateContext('daughter’s daughter', 'Burial of a granddaughter');
1117
-			default:
1118
-				return I18N::translate('Burial of a grandchild');
1119
-			}
1120
-		case '_BURI_GCH2':
1121
-			switch ($sex) {
1122
-			case 'M':
1123
-				return I18N::translateContext('son’s son', 'Burial of a grandson');
1124
-			case 'F':
1125
-				return I18N::translateContext('son’s daughter', 'Burial of a granddaughter');
1126
-			default:
1127
-				return I18N::translate('Burial of a grandchild');
1128
-			}
1129
-		case '_BURI_GPAR':
1130
-			switch ($sex) {
1131
-			case 'M':
1132
-				return I18N::translate('Burial of a grandfather');
1133
-			case 'F':
1134
-				return I18N::translate('Burial of a grandmother');
1135
-			default:
1136
-				return I18N::translate('Burial of a grandparent');
1137
-			}
1138
-		case '_BURI_GPA1':
1139
-			switch ($sex) {
1140
-			case 'M':
1141
-				return I18N::translate('Burial of a paternal grandfather');
1142
-			case 'F':
1143
-				return I18N::translate('Burial of a paternal grandmother');
1144
-			default:
1145
-				return I18N::translate('Burial of a paternal grandparent');
1146
-			}
1147
-		case '_BURI_GPA2':
1148
-			switch ($sex) {
1149
-			case 'M':
1150
-				return I18N::translate('Burial of a maternal grandfather');
1151
-			case 'F':
1152
-				return I18N::translate('Burial of a maternal grandmother');
1153
-			default:
1154
-				return I18N::translate('Burial of a maternal grandparent');
1155
-			}
1156
-		case '_BURI_HSIB':
1157
-			switch ($sex) {
1158
-			case 'M':
1159
-				return I18N::translate('Burial of a half-brother');
1160
-			case 'F':
1161
-				return I18N::translate('Burial of a half-sister');
1162
-			default:
1163
-				return I18N::translate('Burial of a half-sibling');
1164
-			}
1165
-		case '_BURI_PARE':
1166
-			switch ($sex) {
1167
-			case 'M':
1168
-				return I18N::translate('Burial of a father');
1169
-			case 'F':
1170
-				return I18N::translate('Burial of a mother');
1171
-			default:
1172
-				return I18N::translate('Burial of a parent');
1173
-			}
1174
-		case '_BURI_SIBL':
1175
-			switch ($sex) {
1176
-			case 'M':
1177
-				return I18N::translate('Burial of a brother');
1178
-			case 'F':
1179
-				return I18N::translate('Burial of a sister');
1180
-			default:
1181
-				return I18N::translate('Burial of a sibling');
1182
-			}
1183
-		case '_BURI_SPOU':
1184
-			switch ($sex) {
1185
-			case 'M':
1186
-				return I18N::translate('Burial of a husband');
1187
-			case 'F':
1188
-				return I18N::translate('Burial of a wife');
1189
-			default:
1190
-				return I18N::translate('Burial of a spouse');
1191
-			}
1192
-		case '_CHR_CHIL':
1193
-			switch ($sex) {
1194
-			case 'M':
1195
-				return I18N::translate('Christening of a son');
1196
-			case 'F':
1197
-				return I18N::translate('Christening of a daughter');
1198
-			default:
1199
-				return I18N::translate('Christening of a child');
1200
-			}
1201
-		case '_CHR_GCHI':
1202
-			switch ($sex) {
1203
-			case 'M':
1204
-				return I18N::translate('Christening of a grandson');
1205
-			case 'F':
1206
-				return I18N::translate('Christening of a granddaughter');
1207
-			default:
1208
-				return I18N::translate('Christening of a grandchild');
1209
-			}
1210
-		case '_CHR_GCH1':
1211
-			switch ($sex) {
1212
-			case 'M':
1213
-				return I18N::translateContext('daughter’s son', 'Christening of a grandson');
1214
-			case 'F':
1215
-				return I18N::translateContext('daughter’s daughter', 'Christening of a granddaughter');
1216
-			default:
1217
-				return I18N::translate('Christening of a grandchild');
1218
-			}
1219
-		case '_CHR_GCH2':
1220
-			switch ($sex) {
1221
-			case 'M':
1222
-				return I18N::translateContext('son’s son', 'Christening of a grandson');
1223
-			case 'F':
1224
-				return I18N::translateContext('son’s daughter', 'Christening of a granddaughter');
1225
-			default:
1226
-				return I18N::translate('Christening of a grandchild');
1227
-			}
1228
-		case '_CHR_HSIB':
1229
-			switch ($sex) {
1230
-			case 'M':
1231
-				return I18N::translate('Christening of a half-brother');
1232
-			case 'F':
1233
-				return I18N::translate('Christening of a half-sister');
1234
-			default:
1235
-				return I18N::translate('Christening of a half-sibling');
1236
-			}
1237
-		case '_CHR_SIBL':
1238
-			switch ($sex) {
1239
-			case 'M':
1240
-				return I18N::translate('Christening of a brother');
1241
-			case 'F':
1242
-				return I18N::translate('Christening of a sister');
1243
-			default:
1244
-				return I18N::translate('Christening of a sibling');
1245
-			}
1246
-		case '_COML':
1247
-			return
1248
-				/* I18N: gedcom tag _COML */
1249
-				I18N::translate('Common law marriage');
1250
-		case '_CREM_CHIL':
1251
-			switch ($sex) {
1252
-			case 'M':
1253
-				return I18N::translate('Cremation of a son');
1254
-			case 'F':
1255
-				return I18N::translate('Cremation of a daughter');
1256
-			default:
1257
-				return I18N::translate('Cremation of a child');
1258
-			}
1259
-		case '_CREM_GCHI':
1260
-			switch ($sex) {
1261
-			case 'M':
1262
-				return I18N::translate('Cremation of a grandson');
1263
-			case 'F':
1264
-				return I18N::translate('Cremation of a granddaughter');
1265
-			default:
1266
-				return I18N::translate('Cremation of a grandchild');
1267
-			}
1268
-		case '_CREM_GCH1':
1269
-			switch ($sex) {
1270
-			case 'M':
1271
-				return I18N::translateContext('daughter’s son', 'Cremation of a grandson');
1272
-			case 'F':
1273
-				return I18N::translateContext('daughter’s daughter', 'Cremation of a granddaughter');
1274
-			default:
1275
-				return I18N::translate('Cremation of a grandchild');
1276
-			}
1277
-		case '_CREM_GCH2':
1278
-			switch ($sex) {
1279
-			case 'M':
1280
-				return I18N::translateContext('son’s son', 'Cremation of a grandson');
1281
-			case 'F':
1282
-				return I18N::translateContext('son’s daughter', 'Cremation of a granddaughter');
1283
-			default:
1284
-				return I18N::translate('Cremation of a grandchild');
1285
-			}
1286
-		case '_CREM_GPAR':
1287
-			switch ($sex) {
1288
-			case 'M':
1289
-				return I18N::translate('Cremation of a grandfather');
1290
-			case 'F':
1291
-				return I18N::translate('Cremation of a grandmother');
1292
-			default:
1293
-				return I18N::translate('Cremation of a grand-parent');
1294
-			}
1295
-		case '_CREM_GPA1':
1296
-			switch ($sex) {
1297
-			case 'M':
1298
-				return I18N::translate('Cremation of a paternal grandfather');
1299
-			case 'F':
1300
-				return I18N::translate('Cremation of a paternal grandmother');
1301
-			default:
1302
-				return I18N::translate('Cremation of a grand-parent');
1303
-			}
1304
-		case '_CREM_GPA2':
1305
-			switch ($sex) {
1306
-			case 'M':
1307
-				return I18N::translate('Cremation of a maternal grandfather');
1308
-			case 'F':
1309
-				return I18N::translate('Cremation of a maternal grandmother');
1310
-			default:
1311
-				return I18N::translate('Cremation of a grand-parent');
1312
-			}
1313
-		case '_CREM_HSIB':
1314
-			switch ($sex) {
1315
-			case 'M':
1316
-				return I18N::translate('Cremation of a half-brother');
1317
-			case 'F':
1318
-				return I18N::translate('Cremation of a half-sister');
1319
-			default:
1320
-				return I18N::translate('Cremation of a half-sibling');
1321
-			}
1322
-		case '_CREM_PARE':
1323
-			switch ($sex) {
1324
-			case 'M':
1325
-				return I18N::translate('Cremation of a father');
1326
-			case 'F':
1327
-				return I18N::translate('Cremation of a mother');
1328
-			default:
1329
-				return I18N::translate('Cremation of a parent');
1330
-			}
1331
-		case '_CREM_SIBL':
1332
-			switch ($sex) {
1333
-			case 'M':
1334
-				return I18N::translate('Cremation of a brother');
1335
-			case 'F':
1336
-				return I18N::translate('Cremation of a sister');
1337
-			default:
1338
-				return I18N::translate('Cremation of a sibling');
1339
-			}
1340
-		case '_CREM_SPOU':
1341
-			switch ($sex) {
1342
-			case 'M':
1343
-				return I18N::translate('Cremation of a husband');
1344
-			case 'F':
1345
-				return I18N::translate('Cremation of a wife');
1346
-			default:
1347
-				return I18N::translate('Cremation of a spouse');
1348
-			}
1349
-		case '_DBID':
1350
-			return
1351
-				/* I18N: gedcom tag _DBID */
1352
-				I18N::translate('Linked database ID');
1353
-		case '_DEAT_CHIL':
1354
-			switch ($sex) {
1355
-			case 'M':
1356
-				return I18N::translate('Death of a son');
1357
-			case 'F':
1358
-				return I18N::translate('Death of a daughter');
1359
-			default:
1360
-				return I18N::translate('Death of a child');
1361
-			}
1362
-		case '_DEAT_GCHI':
1363
-			switch ($sex) {
1364
-			case 'M':
1365
-				return I18N::translate('Death of a grandson');
1366
-			case 'F':
1367
-				return I18N::translate('Death of a granddaughter');
1368
-			default:
1369
-				return I18N::translate('Death of a grandchild');
1370
-			}
1371
-		case '_DEAT_GCH1':
1372
-			switch ($sex) {
1373
-			case 'M':
1374
-				return I18N::translateContext('daughter’s son', 'Death of a grandson');
1375
-			case 'F':
1376
-				return I18N::translateContext('daughter’s daughter', 'Death of a granddaughter');
1377
-			default:
1378
-				return I18N::translate('Death of a grandchild');
1379
-			}
1380
-		case '_DEAT_GCH2':
1381
-			switch ($sex) {
1382
-			case 'M':
1383
-				return I18N::translateContext('son’s son', 'Death of a grandson');
1384
-			case 'F':
1385
-				return I18N::translateContext('son’s daughter', 'Death of a granddaughter');
1386
-			default:
1387
-				return I18N::translate('Death of a grandchild');
1388
-			}
1389
-		case '_DEAT_GPAR':
1390
-			switch ($sex) {
1391
-			case 'M':
1392
-				return I18N::translate('Death of a grandfather');
1393
-			case 'F':
1394
-				return I18N::translate('Death of a grandmother');
1395
-			default:
1396
-				return I18N::translate('Death of a grand-parent');
1397
-			}
1398
-		case '_DEAT_GPA1':
1399
-			switch ($sex) {
1400
-			case 'M':
1401
-				return I18N::translate('Death of a paternal grandfather');
1402
-			case 'F':
1403
-				return I18N::translate('Death of a paternal grandmother');
1404
-			default:
1405
-				return I18N::translate('Death of a grand-parent');
1406
-			}
1407
-		case '_DEAT_GPA2':
1408
-			switch ($sex) {
1409
-			case 'M':
1410
-				return I18N::translate('Death of a maternal grandfather');
1411
-			case 'F':
1412
-				return I18N::translate('Death of a maternal grandmother');
1413
-			default:
1414
-				return I18N::translate('Death of a grand-parent');
1415
-			}
1416
-		case '_DEAT_HSIB':
1417
-			switch ($sex) {
1418
-			case 'M':
1419
-				return I18N::translate('Death of a half-brother');
1420
-			case 'F':
1421
-				return I18N::translate('Death of a half-sister');
1422
-			default:
1423
-				return I18N::translate('Death of a half-sibling');
1424
-			}
1425
-		case '_DEAT_PARE':
1426
-			switch ($sex) {
1427
-			case 'M':
1428
-				return I18N::translate('Death of a father');
1429
-			case 'F':
1430
-				return I18N::translate('Death of a mother');
1431
-			default:
1432
-				return I18N::translate('Death of a parent');
1433
-			}
1434
-		case '_DEAT_SIBL':
1435
-			switch ($sex) {
1436
-			case 'M':
1437
-				return I18N::translate('Death of a brother');
1438
-			case 'F':
1439
-				return I18N::translate('Death of a sister');
1440
-			default:
1441
-				return I18N::translate('Death of a sibling');
1442
-			}
1443
-		case '_DEAT_SPOU':
1444
-			switch ($sex) {
1445
-			case 'M':
1446
-				return I18N::translate('Death of a husband');
1447
-			case 'F':
1448
-				return I18N::translate('Death of a wife');
1449
-			default:
1450
-				return I18N::translate('Death of a spouse');
1451
-			}
1452
-		case '_DEG':
1453
-			return
1454
-				/* I18N: gedcom tag _DEG */
1455
-				I18N::translate('Degree');
1456
-		case '_DETS':
1457
-			return
1458
-				/* I18N: gedcom tag _DETS */
1459
-				I18N::translate('Death of one spouse');
1460
-		case '_DNA':
1461
-			return
1462
-				/* I18N: gedcom tag _DNA (from FTM 2010) */
1463
-				I18N::translate('DNA markers');
1464
-		case '_EMAIL':
1465
-			return
1466
-				/* I18N: gedcom tag _EMAIL */
1467
-				I18N::translate('Email address');
1468
-		case '_EYEC':
1469
-			return
1470
-				/* I18N: gedcom tag _EYEC */
1471
-				I18N::translate('Eye color');
1472
-		case '_FA1':
1473
-			return I18N::translate('Fact 1');
1474
-		case '_FA2':
1475
-			return I18N::translate('Fact 2');
1476
-		case '_FA3':
1477
-			return I18N::translate('Fact 3');
1478
-		case '_FA4':
1479
-			return I18N::translate('Fact 4');
1480
-		case '_FA5':
1481
-			return I18N::translate('Fact 5');
1482
-		case '_FA6':
1483
-			return I18N::translate('Fact 6');
1484
-		case '_FA7':
1485
-			return I18N::translate('Fact 7');
1486
-		case '_FA8':
1487
-			return I18N::translate('Fact 8');
1488
-		case '_FA9':
1489
-			return I18N::translate('Fact 9');
1490
-		case '_FA10':
1491
-			return I18N::translate('Fact 10');
1492
-		case '_FA11':
1493
-			return I18N::translate('Fact 11');
1494
-		case '_FA12':
1495
-			return I18N::translate('Fact 12');
1496
-		case '_FA13':
1497
-			return I18N::translate('Fact 13');
1498
-		case '_FNRL':
1499
-			return
1500
-				/* I18N: gedcom tag _FNRL */
1501
-				I18N::translate('Funeral');
1502
-		case '_FREL':
1503
-			return
1504
-				/* I18N: gedcom tag _FREL */
1505
-				I18N::translate('Relationship to father');
1506
-		case '_GEDF':
1507
-			return
1508
-				/* I18N: gedcom tag _GEDF */
1509
-				I18N::translate('GEDCOM file');
1510
-		case '_GODP':
1511
-			return
1512
-				/* I18N: gedcom tag _GODP */
1513
-				I18N::translate('Godparent');
1514
-		case '_HAIR':
1515
-			return
1516
-				/* I18N: gedcom tag _HAIR */
1517
-				I18N::translate('Hair color');
1518
-		case '_HEB':
1519
-			return
1520
-				/* I18N: gedcom tag _HEB */
1521
-				I18N::translate('Hebrew');
1522
-		case '_HEIG':
1523
-			return
1524
-				/* I18N: gedcom tag _HEIG */
1525
-				I18N::translate('Height');
1526
-		case '_HNM':
1527
-			return
1528
-				/* I18N: gedcom tag _HNM */
1529
-				I18N::translate('Hebrew name');
1530
-		case '_HOL':
1531
-			return
1532
-				/* I18N: gedcom tag _HOL */
1533
-				I18N::translate('Holocaust');
1534
-		case '_INTE':
1535
-			switch ($sex) {
1536
-			case 'M':
1537
-				return
1538
-					/* I18N: gedcom tag _INTE */
1539
-					I18N::translateContext('MALE', 'Interred');
1540
-			case 'F':
1541
-				return
1542
-					/* I18N: gedcom tag _INTE */
1543
-					I18N::translateContext('FEMALE', 'Interred');
1544
-			default:
1545
-				return
1546
-					/* I18N: gedcom tag _INTE */
1547
-					I18N::translate('Interred');
1548
-			}
1549
-		case '_LOC':
1550
-			return
1551
-				/* I18N: gedcom tag _LOC */
1552
-				I18N::translate('Location');
1553
-		case '_MARI':
1554
-			return
1555
-				/* I18N: gedcom tag _MARI */
1556
-				I18N::translate('Marriage intention');
1557
-		case '_MARNM':
1558
-			return
1559
-				/* I18N: gedcom tag _MARNM */
1560
-				I18N::translate('Married name');
1561
-		case '_PRIM':
1562
-			return
1563
-				/* I18N: gedcom tag _PRIM */
1564
-				I18N::translate('Highlighted image');
1565
-		case '_MARNM_SURN':
1566
-			return I18N::translate('Married surname');
1567
-		case '_MARR_CHIL':
1568
-			switch ($sex) {
1569
-			case 'M':
1570
-				return I18N::translate('Marriage of a son');
1571
-			case 'F':
1572
-				return I18N::translate('Marriage of a daughter');
1573
-			default:
1574
-				return I18N::translate('Marriage of a child');
1575
-			}
1576
-		case '_MARR_FAMC':
1577
-			return
1578
-				/* I18N: ...to each other */
1579
-				I18N::translate('Marriage of parents');
1580
-		case '_MARR_GCHI':
1581
-			switch ($sex) {
1582
-			case 'M':
1583
-				return I18N::translate('Marriage of a grandson');
1584
-			case 'F':
1585
-				return I18N::translate('Marriage of a granddaughter');
1586
-			default:
1587
-				return I18N::translate('Marriage of a grandchild');
1588
-			}
1589
-		case '_MARR_GCH1':
1590
-			switch ($sex) {
1591
-			case 'M':
1592
-				return I18N::translateContext('daughter’s son', 'Marriage of a grandson');
1593
-			case 'F':
1594
-				return I18N::translateContext('daughter’s daughter', 'Marriage of a granddaughter');
1595
-			default:
1596
-				return I18N::translate('Marriage of a grandchild');
1597
-			}
1598
-		case '_MARR_GCH2':
1599
-			switch ($sex) {
1600
-			case 'M':
1601
-				return I18N::translateContext('son’s son', 'Marriage of a grandson');
1602
-			case 'F':
1603
-				return I18N::translateContext('son’s daughter', 'Marriage of a granddaughter');
1604
-			default:
1605
-				return I18N::translate('Marriage of a grandchild');
1606
-			}
1607
-		case '_MARR_HSIB':
1608
-			switch ($sex) {
1609
-			case 'M':
1610
-				return I18N::translate('Marriage of a half-brother');
1611
-			case 'F':
1612
-				return I18N::translate('Marriage of a half-sister');
1613
-			default:
1614
-				return I18N::translate('Marriage of a half-sibling');
1615
-			}
1616
-		case '_MARR_PARE':
1617
-			switch ($sex) {
1618
-			case 'M':
1619
-				return
1620
-					/* I18N: ...to another spouse */
1621
-					I18N::translate('Marriage of a father');
1622
-			case 'F':
1623
-				return
1624
-					/* I18N: ...to another spouse */
1625
-					I18N::translate('Marriage of a mother');
1626
-			default:
1627
-				return
1628
-					/* I18N: ...to another spouse */
1629
-					I18N::translate('Marriage of a parent');
1630
-			}
1631
-		case '_MARR_SIBL':
1632
-			switch ($sex) {
1633
-			case 'M':
1634
-				return I18N::translate('Marriage of a brother');
1635
-			case 'F':
1636
-				return I18N::translate('Marriage of a sister');
1637
-			default:
1638
-				return I18N::translate('Marriage of a sibling');
1639
-			}
1640
-		case '_MBON':
1641
-			return
1642
-				/* I18N: gedcom tag _MBON */
1643
-				I18N::translate('Marriage bond');
1644
-		case '_MDCL':
1645
-			return
1646
-				/* I18N: gedcom tag _MDCL */
1647
-				I18N::translate('Medical');
1648
-		case '_MEDC':
1649
-			return
1650
-				/* I18N: gedcom tag _MEDC */
1651
-				I18N::translate('Medical condition');
1652
-		case '_MEND':
1653
-			return
1654
-				/* I18N: gedcom tag _MEND */
1655
-				I18N::translate('Marriage ending status');
1656
-		case '_MILI':
1657
-			return
1658
-				/* I18N: gedcom tag _MILI */
1659
-				I18N::translate('Military');
1660
-		case '_MILT':
1661
-			return
1662
-				/* I18N: gedcom tag _MILT */
1663
-				I18N::translate('Military service');
1664
-		case '_MREL':
1665
-			return
1666
-				/* I18N: gedcom tag _MREL */
1667
-				I18N::translate('Relationship to mother');
1668
-		case '_MSTAT':
1669
-			return
1670
-				/* I18N: gedcom tag _MSTAT */
1671
-				I18N::translate('Marriage beginning status');
1672
-		case '_NAME':
1673
-			return
1674
-				/* I18N: gedcom tag _NAME */
1675
-				I18N::translate('Mailing name');
1676
-		case '_NAMS':
1677
-			return
1678
-				/* I18N: gedcom tag _NAMS */
1679
-				I18N::translate('Namesake');
1680
-		case '_NLIV':
1681
-			return
1682
-				/* I18N: gedcom tag _NLIV */
1683
-				I18N::translate('Not living');
1684
-		case '_NMAR':
1685
-			switch ($sex) {
1686
-			case 'M':
1687
-				return
1688
-					/* I18N: gedcom tag _NMAR */
1689
-					I18N::translateContext('MALE', 'Never married');
1690
-			case 'F':
1691
-				return
1692
-					/* I18N: gedcom tag _NMAR */
1693
-					I18N::translateContext('FEMALE', 'Never married');
1694
-			default:
1695
-				return
1696
-					/* I18N: gedcom tag _NMAR */
1697
-					I18N::translate('Never married');
1698
-			}
1699
-		case '_NMR':
1700
-			switch ($sex) {
1701
-			case 'M':
1702
-				return
1703
-					/* I18N: gedcom tag _NMR */
1704
-					I18N::translateContext('MALE', 'Not married');
1705
-			case 'F':
1706
-				return
1707
-					/* I18N: gedcom tag _NMR */
1708
-					I18N::translateContext('FEMALE', 'Not married');
1709
-			default:
1710
-				return
1711
-					/* I18N: gedcom tag _NMR */
1712
-					I18N::translate('Not married');
1713
-			}
1714
-		case '_WT_USER':
1715
-			return I18N::translate('by');
1716
-		case '_PRMN':
1717
-			return
1718
-				/* I18N: gedcom tag _PRMN */
1719
-				I18N::translate('Permanent number');
1720
-		case '_SCBK':
1721
-			return
1722
-				/* I18N: gedcom tag _SCBK */
1723
-				I18N::translate('Scrapbook');
1724
-		case '_SEPR':
1725
-			return
1726
-				/* I18N: gedcom tag _SEPR */
1727
-				I18N::translate('Separated');
1728
-		case '_SSHOW':
1729
-			return
1730
-				/* I18N: gedcom tag _SSHOW */
1731
-				I18N::translate('Slide show');
1732
-		case '_STAT':
1733
-			return
1734
-				/* I18N: gedcom tag _STAT */
1735
-				I18N::translate('Marriage status');
1736
-		case '_SUBQ':
1737
-			return
1738
-				/* I18N: gedcom tag _SUBQ */
1739
-				I18N::translate('Short version');
1740
-		case '_TODO':
1741
-			return
1742
-				/* I18N: gedcom tag _TODO */
1743
-				I18N::translate('Research task');
1744
-		case '_TYPE':
1745
-			return
1746
-				/* I18N: gedcom tag _TYPE */
1747
-				I18N::translate('Media type');
1748
-		case '_UID':
1749
-			return
1750
-				/* I18N: gedcom tag _UID */
1751
-				I18N::translate('Unique identifier');
1752
-		case '_URL':
1753
-			return
1754
-				/* I18N: gedcom tag _URL */
1755
-				I18N::translate('URL');
1756
-		case '_WEIG':
1757
-			return
1758
-				/* I18N: gedcom tag _WEIG */
1759
-				I18N::translate('Weight');
1760
-		case '_WITN':
1761
-			return
1762
-				/* I18N: gedcom tag _WITN */
1763
-				I18N::translate('Witness');
1764
-		case '_WT_OBJE_SORT':
1765
-			return
1766
-				/* I18N: gedcom tag _WT_OBJE_SORT */
1767
-				I18N::translate('Re-order media');
1768
-		case '_YART':
1769
-			return /* I18N: gedcom tag _YART - A yahrzeit is a special anniversary of death in the Hebrew faith/calendar. */ I18N::translate('Yahrzeit');
1770
-			// Brit milah applies only to males, no need for male/female translations
1771
-		case '__BRTM_CHIL':
1772
-			return I18N::translate('Brit milah of a son');
1773
-		case '__BRTM_GCHI':
1774
-			return I18N::translate('Brit milah of a grandson');
1775
-		case '__BRTM_GCH1':
1776
-			return I18N::translateContext('daughter’s son', 'Brit milah of a grandson');
1777
-		case '__BRTM_GCH2':
1778
-			return I18N::translateContext('son’s son', 'Brit milah of a grandson');
1779
-		case '__BRTM_HSIB':
1780
-			return I18N::translate('Brit milah of a half-brother');
1781
-		case '__BRTM_SIBL':
1782
-			return I18N::translate('Brit milah of a brother');
1783
-			// These "pseudo" tags are generated internally to present information about a media object
1784
-		case '__FILE_SIZE__':
1785
-			return I18N::translate('File size');
1786
-		case '__IMAGE_SIZE__':
1787
-			return I18N::translate('Image dimensions');
1788
-		default:
1789
-			// If no specialisation exists (e.g. DEAT:CAUS), then look for the general (CAUS)
1790
-			if (strpos($tag, ':')) {
1791
-				list(, $tag) = explode(':', $tag, 2);
114
+        switch ($tag) {
115
+        case 'ABBR':
116
+            return
117
+                /* I18N: gedcom tag ABBR */
118
+                I18N::translate('Abbreviation');
119
+        case 'ADDR':
120
+            return
121
+                /* I18N: gedcom tag ADDR */
122
+                I18N::translate('Address');
123
+        case 'ADR1':
124
+            return I18N::translate('Address line 1');
125
+        case 'ADR2':
126
+            return I18N::translate('Address line 2');
127
+        case 'ADOP':
128
+            return
129
+                /* I18N: gedcom tag ADOP */
130
+                I18N::translate('Adoption');
131
+        case 'ADOP:DATE':
132
+            return I18N::translate('Date of adoption');
133
+        case 'ADOP:PLAC':
134
+            return I18N::translate('Place of adoption');
135
+        case 'AFN':
136
+            return
137
+                /* I18N: gedcom tag AFN */
138
+                I18N::translate('Ancestral file number');
139
+        case 'AGE':
140
+            return
141
+                /* I18N: gedcom tag AGE */
142
+                I18N::translate('Age');
143
+        case 'AGNC':
144
+            return
145
+                /* I18N: gedcom tag AGNC */
146
+                I18N::translate('Agency');
147
+        case 'ALIA':
148
+            return
149
+                /* I18N: gedcom tag ALIA */
150
+                I18N::translate('Alias');
151
+        case 'ANCE':
152
+            return
153
+                /* I18N: gedcom tag ANCE */
154
+                I18N::translate('Generations of ancestors');
155
+        case 'ANCI':
156
+            return
157
+                /* I18N: gedcom tag ANCI */
158
+                I18N::translate('Ancestors interest');
159
+        case 'ANUL':
160
+            return
161
+                /* I18N: gedcom tag ANUL */
162
+                I18N::translate('Annulment');
163
+        case 'ASSO':
164
+            return
165
+                /* I18N: gedcom tag ASSO */
166
+                I18N::translate('Associate'); /* see also _ASSO */
167
+        case 'AUTH':
168
+            return
169
+                /* I18N: gedcom tag AUTH */
170
+                I18N::translate('Author');
171
+        case 'BAPL':
172
+            return
173
+                /* I18N: gedcom tag BAPL. LDS = Church of Latter Day Saints. */
174
+                I18N::translate('LDS baptism');
175
+        case 'BAPL:DATE':
176
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS baptism');
177
+        case 'BAPL:PLAC':
178
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS baptism');
179
+        case 'BAPM':
180
+            return
181
+                /* I18N: gedcom tag BAPM */
182
+                I18N::translate('Baptism');
183
+        case 'BAPM:DATE':
184
+            return I18N::translate('Date of baptism');
185
+        case 'BAPM:PLAC':
186
+            return I18N::translate('Place of baptism');
187
+        case 'BARM':
188
+            return
189
+                /* I18N: gedcom tag BARM */
190
+                I18N::translate('Bar mitzvah');
191
+        case 'BARM:DATE':
192
+            return I18N::translate('Date of bar mitzvah');
193
+        case 'BARM:PLAC':
194
+            return I18N::translate('Place of bar mitzvah');
195
+        case 'BASM':
196
+            return
197
+                /* I18N: gedcom tag BASM */
198
+                I18N::translate('Bat mitzvah');
199
+        case 'BASM:DATE':
200
+            return I18N::translate('Date of bat mitzvah');
201
+        case 'BASM:PLAC':
202
+            return I18N::translate('Place of bat mitzvah');
203
+        case 'BIRT':
204
+            return
205
+                /* I18N: gedcom tag BIRT */
206
+                I18N::translate('Birth');
207
+        case 'BIRT:DATE':
208
+            return I18N::translate('Date of birth');
209
+        case 'BIRT:PLAC':
210
+            return I18N::translate('Place of birth');
211
+        case 'BLES':
212
+            return
213
+                /* I18N: gedcom tag BLES */
214
+                I18N::translate('Blessing');
215
+        case 'BLES:DATE':
216
+            return I18N::translate('Date of blessing');
217
+        case 'BLES:PLAC':
218
+            return I18N::translate('Place of blessing');
219
+        case 'BLOB':
220
+            return
221
+                /* I18N: gedcom tag BLOB */
222
+                I18N::translate('Binary data object');
223
+        case 'BURI':
224
+            return
225
+                /* I18N: gedcom tag BURI */
226
+                I18N::translate('Burial');
227
+        case 'BURI:DATE':
228
+            return I18N::translate('Date of burial');
229
+        case 'BURI:PLAC':
230
+            return I18N::translate('Place of burial');
231
+        case 'CALN':
232
+            return
233
+                /* I18N: gedcom tag CALN */
234
+                I18N::translate('Call number');
235
+        case 'CAST':
236
+            return
237
+                /* I18N: gedcom tag CAST */
238
+                I18N::translate('Caste');
239
+        case 'CAUS':
240
+            return
241
+                /* I18N: gedcom tag CAUS */
242
+                I18N::translate('Cause');
243
+        case 'CEME':
244
+            return
245
+                /* I18N: gedcom tag CEME */
246
+                I18N::translate('Cemetery');
247
+        case 'CENS':
248
+            return
249
+                /* I18N: gedcom tag CENS */
250
+                I18N::translate('Census');
251
+        case 'CENS:DATE':
252
+            return I18N::translate('Census date');
253
+        case 'CENS:PLAC':
254
+            return I18N::translate('Census place');
255
+        case 'CHAN':
256
+            return
257
+                /* I18N: gedcom tag CHAN */
258
+                I18N::translate('Last change');
259
+        case 'CHAN:DATE':
260
+            return
261
+                /* I18N: gedcom tag CHAN:DATE */
262
+                I18N::translate('Date of last change');
263
+        case 'CHAN:_WT_USER':
264
+            return
265
+                /* I18N: gedcom tag CHAN:_WT_USER */
266
+                I18N::translate('Author of last change');
267
+        case 'CHAR':
268
+            return
269
+                /* I18N: gedcom tag CHAR */
270
+                I18N::translate('Character set');
271
+        case 'CHIL':
272
+            return
273
+                /* I18N: gedcom tag CHIL */
274
+                I18N::translate('Child');
275
+        case 'CHR':
276
+            return
277
+                /* I18N: gedcom tag CHR */
278
+                I18N::translate('Christening');
279
+        case 'CHR:DATE':
280
+            return I18N::translate('Date of christening');
281
+        case 'CHR:PLAC':
282
+            return I18N::translate('Place of christening');
283
+        case 'CHRA':
284
+            return
285
+                /* I18N: gedcom tag CHRA */
286
+                I18N::translate('Adult christening');
287
+        case 'CITN':
288
+            return
289
+                /* I18N: gedcom tag CITN */
290
+                I18N::translate('Citizenship');
291
+        case 'CITY':
292
+            return
293
+                /* I18N: gedcom tag CITY */
294
+                I18N::translate('City');
295
+        case 'COMM':
296
+            return
297
+                /* I18N: gedcom tag COMM */
298
+                I18N::translate('Comment');
299
+        case 'CONC':
300
+            return
301
+                /* I18N: gedcom tag CONC */
302
+                I18N::translate('Concatenation');
303
+        case 'CONT':
304
+            return
305
+                /* I18N: gedcom tag CONT */
306
+                I18N::translate('Continued');
307
+        case 'CONF':
308
+            return
309
+                /* I18N: gedcom tag CONF */
310
+                I18N::translate('Confirmation');
311
+        case 'CONF:DATE':
312
+            return I18N::translate('Date of confirmation');
313
+        case 'CONF:PLAC':
314
+            return I18N::translate('Place of confirmation');
315
+        case 'CONL':
316
+            return
317
+                /* I18N: gedcom tag CONL. LDS = Church of Latter Day Saints. */
318
+                I18N::translate('LDS confirmation');
319
+        case 'COPR':
320
+            return
321
+                /* I18N: gedcom tag COPR */
322
+                I18N::translate('Copyright');
323
+        case 'CORP':
324
+            return
325
+                /* I18N: gedcom tag CORP */
326
+                I18N::translate('Corporation');
327
+        case 'CREM':
328
+            return
329
+                /* I18N: gedcom tag CREM */
330
+                I18N::translate('Cremation');
331
+        case 'CREM:DATE':
332
+            return I18N::translate('Date of cremation');
333
+        case 'CREM:PLAC':
334
+            return I18N::translate('Place of cremation');
335
+        case 'CTRY':
336
+            return
337
+                /* I18N: gedcom tag CTRY */
338
+                I18N::translate('Country');
339
+        case 'DATA':
340
+            return
341
+                /* I18N: gedcom tag DATA */
342
+                I18N::translate('Data');
343
+        case 'DATA:DATE':
344
+            return I18N::translate('Date of entry in original source');
345
+        case 'DATE':
346
+            return
347
+                /* I18N: gedcom tag DATE */
348
+                I18N::translate('Date');
349
+        case 'DEAT':
350
+            return
351
+                /* I18N: gedcom tag DEAT */
352
+                I18N::translate('Death');
353
+        case 'DEAT:CAUS':
354
+            return I18N::translate('Cause of death');
355
+        case 'DEAT:DATE':
356
+            return I18N::translate('Date of death');
357
+        case 'DEAT:PLAC':
358
+            return I18N::translate('Place of death');
359
+        case 'DESC':
360
+            return
361
+                /* I18N: gedcom tag DESC */
362
+                I18N::translate('Descendants');
363
+        case 'DESI':
364
+            return
365
+                /* I18N: gedcom tag DESI */
366
+                I18N::translate('Descendants interest');
367
+        case 'DEST':
368
+            return
369
+                /* I18N: gedcom tag DEST */
370
+                I18N::translate('Destination');
371
+        case 'DIV':
372
+            return
373
+                /* I18N: gedcom tag DIV */
374
+                I18N::translate('Divorce');
375
+        case 'DIVF':
376
+            return
377
+                /* I18N: gedcom tag DIVF */
378
+                I18N::translate('Divorce filed');
379
+        case 'DSCR':
380
+            return
381
+                /* I18N: gedcom tag DSCR */
382
+                I18N::translate('Description');
383
+        case 'EDUC':
384
+            return
385
+                /* I18N: gedcom tag EDUC */
386
+                I18N::translate('Education');
387
+        case 'EDUC:AGNC':
388
+            return I18N::translate('School or college');
389
+        case 'EMAI':
390
+            return
391
+                /* I18N: gedcom tag EMAI */
392
+                I18N::translate('Email address');
393
+        case 'EMAIL':
394
+            return
395
+                /* I18N: gedcom tag EMAIL */
396
+                I18N::translate('Email address');
397
+        case 'EMAL':
398
+            return
399
+                /* I18N: gedcom tag EMAL */
400
+                I18N::translate('Email address');
401
+        case 'EMIG':
402
+            return
403
+                /* I18N: gedcom tag EMIG */
404
+                I18N::translate('Emigration');
405
+        case 'EMIG:DATE':
406
+            return I18N::translate('Date of emigration');
407
+        case 'EMIG:PLAC':
408
+            return I18N::translate('Place of emigration');
409
+        case 'ENDL':
410
+            return
411
+                /* I18N: gedcom tag ENDL. LDS = Church of Latter Day Saints. */
412
+                I18N::translate('LDS endowment');
413
+        case 'ENDL:DATE':
414
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS endowment');
415
+        case 'ENDL:PLAC':
416
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS endowment');
417
+        case 'ENGA':
418
+            return
419
+                /* I18N: gedcom tag ENGA */
420
+                I18N::translate('Engagement');
421
+        case 'ENGA:DATE':
422
+            return I18N::translate('Date of engagement');
423
+        case 'ENGA:PLAC':
424
+            return I18N::translate('Place of engagement');
425
+        case 'EVEN':
426
+            return
427
+                /* I18N: gedcom tag EVEN */
428
+                I18N::translate('Event');
429
+        case 'EVEN:DATE':
430
+            return I18N::translate('Date of event');
431
+        case 'EVEN:PLAC':
432
+            return I18N::translate('Place of event');
433
+        case 'EVEN:TYPE':
434
+            return I18N::translate('Type of event');
435
+        case 'FACT':
436
+            return
437
+                /* I18N: gedcom tag FACT */
438
+                I18N::translate('Fact');
439
+        case 'FACT:TYPE':
440
+            return I18N::translate('Type of fact');
441
+        case 'FAM':
442
+            return
443
+                /* I18N: gedcom tag FAM */
444
+                I18N::translate('Family');
445
+        case 'FAMC':
446
+            return
447
+                /* I18N: gedcom tag FAMC */
448
+                I18N::translate('Family as a child');
449
+        case 'FAMF':
450
+            return
451
+                /* I18N: gedcom tag FAMF */
452
+                I18N::translate('Family file');
453
+        case 'FAMS':
454
+            return
455
+                /* I18N: gedcom tag FAMS */
456
+                I18N::translate('Family as a spouse');
457
+        case 'FAMS:CENS:DATE':
458
+            return I18N::translate('Spouse census date');
459
+        case 'FAMS:CENS:PLAC':
460
+            return I18N::translate('Spouse census place');
461
+        case 'FAMS:DIV:DATE':
462
+            return I18N::translate('Date of divorce');
463
+        case 'FAMS:MARR:DATE':
464
+            return I18N::translate('Date of marriage');
465
+        case 'FAMS:MARR:PLAC':
466
+            return I18N::translate('Place of marriage');
467
+        case 'FAMS:NOTE':
468
+            return I18N::translate('Spouse note');
469
+        case 'FAMS:SLGS:DATE':
470
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS spouse sealing');
471
+        case 'FAMS:SLGS:PLAC':
472
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS spouse sealing');
473
+        case 'FAX':
474
+            return
475
+                /* I18N: gedcom tag FAX */
476
+                I18N::translate('Fax');
477
+        case 'FCOM':
478
+            return
479
+                /* I18N: gedcom tag FCOM */
480
+                I18N::translate('First communion');
481
+        case 'FCOM:DATE':
482
+            return I18N::translate('Date of first communion');
483
+        case 'FCOM:PLAC':
484
+            return I18N::translate('Place of first communion');
485
+        case 'FILE':
486
+            return
487
+                /* I18N: gedcom tag FILE */
488
+                I18N::translate('Filename');
489
+        case 'FONE':
490
+            return
491
+                /* I18N: gedcom tag FONE */
492
+                I18N::translate('Phonetic');
493
+        case 'FORM':
494
+            return
495
+                /* I18N: gedcom tag FORM */
496
+                I18N::translate('Format');
497
+        case 'GEDC':
498
+            return
499
+                /* I18N: gedcom tag GEDC */
500
+                I18N::translate('GEDCOM file');
501
+        case 'GIVN':
502
+            return
503
+                /* I18N: gedcom tag GIVN */
504
+                I18N::translate('Given names');
505
+        case 'GRAD':
506
+            return
507
+                /* I18N: gedcom tag GRAD */
508
+                I18N::translate('Graduation');
509
+        case 'HEAD':
510
+            return
511
+                /* I18N: gedcom tag HEAD */
512
+                I18N::translate('Header');
513
+        case 'HUSB':
514
+            return
515
+                /* I18N: gedcom tag HUSB */
516
+                I18N::translate('Husband');
517
+        case 'IDNO':
518
+            return
519
+                /* I18N: gedcom tag IDNO */
520
+                I18N::translate('Identification number');
521
+        case 'IMMI':
522
+            return
523
+                /* I18N: gedcom tag IMMI */
524
+                I18N::translate('Immigration');
525
+        case 'IMMI:DATE':
526
+            return I18N::translate('Date of immigration');
527
+        case 'IMMI:PLAC':
528
+            return I18N::translate('Place of immigration');
529
+        case 'INDI':
530
+            return
531
+                /* I18N: gedcom tag INDI */
532
+                I18N::translate('Individual');
533
+        case 'INFL':
534
+            return
535
+                /* I18N: gedcom tag INFL */
536
+                I18N::translate('Infant');
537
+        case 'LANG':
538
+            return
539
+                /* I18N: gedcom tag LANG */
540
+                I18N::translate('Language');
541
+        case 'LATI':
542
+            return
543
+                /* I18N: gedcom tag LATI */
544
+                I18N::translate('Latitude');
545
+        case 'LEGA':
546
+            return
547
+                /* I18N: gedcom tag LEGA */
548
+                I18N::translate('Legatee');
549
+        case 'LONG':
550
+            return
551
+                /* I18N: gedcom tag LONG */
552
+                I18N::translate('Longitude');
553
+        case 'MAP':
554
+            return
555
+                /* I18N: gedcom tag MAP */
556
+                I18N::translate('Map');
557
+        case 'MARB':
558
+            return
559
+                /* I18N: gedcom tag MARB */
560
+                I18N::translate('Marriage banns');
561
+        case 'MARB:DATE':
562
+            return I18N::translate('Date of marriage banns');
563
+        case 'MARB:PLAC':
564
+            return I18N::translate('Place of marriage banns');
565
+        case 'MARC':
566
+            return
567
+                /* I18N: gedcom tag MARC */
568
+                I18N::translate('Marriage contract');
569
+        case 'MARL':
570
+            return
571
+                /* I18N: gedcom tag MARL */
572
+                I18N::translate('Marriage license');
573
+        case 'MARR':
574
+            return
575
+                /* I18N: gedcom tag MARR */
576
+                I18N::translate('Marriage');
577
+        case 'MARR:DATE':
578
+            return I18N::translate('Date of marriage');
579
+        case 'MARR:PLAC':
580
+            return I18N::translate('Place of marriage');
581
+        case 'MARR_CIVIL':
582
+            return I18N::translate('Civil marriage');
583
+        case 'MARR_PARTNERS':
584
+            return I18N::translate('Registered partnership');
585
+        case 'MARR_RELIGIOUS':
586
+            return I18N::translate('Religious marriage');
587
+        case 'MARR_UNKNOWN':
588
+            return I18N::translate('Marriage type unknown');
589
+        case 'MARS':
590
+            return
591
+                /* I18N: gedcom tag MARS */
592
+                I18N::translate('Marriage settlement');
593
+        case 'MEDI':
594
+            return
595
+                /* I18N: gedcom tag MEDI */
596
+                I18N::translate('Media type');
597
+        case 'NAME':
598
+            if ($record instanceof Repository) {
599
+                return
600
+                    /* I18N: gedcom tag REPO:NAME */
601
+                    I18N::translateContext('Repository', 'Name');
602
+            } else {
603
+                return
604
+                    /* I18N: gedcom tag NAME */
605
+                    I18N::translate('Name');
606
+            }
607
+        case 'NAME:FONE':
608
+            return I18N::translate('Phonetic name');
609
+        case 'NAME:_HEB':
610
+            return I18N::translate('Name in Hebrew');
611
+        case 'NATI':
612
+            return
613
+                /* I18N: gedcom tag NATI */
614
+                I18N::translate('Nationality');
615
+        case 'NATU':
616
+            return
617
+                /* I18N: gedcom tag NATU */
618
+                I18N::translate('Naturalization');
619
+        case 'NATU:DATE':
620
+            return I18N::translate('Date of naturalization');
621
+        case 'NATU:PLAC':
622
+            return I18N::translate('Place of naturalization');
623
+        case 'NCHI':
624
+            return
625
+                /* I18N: gedcom tag NCHI */
626
+                I18N::translate('Number of children');
627
+        case 'NICK':
628
+            return
629
+                /* I18N: gedcom tag NICK */
630
+                I18N::translate('Nickname');
631
+        case 'NMR':
632
+            return
633
+                /* I18N: gedcom tag NMR */
634
+                I18N::translate('Number of marriages');
635
+        case 'NOTE':
636
+            return
637
+                /* I18N: gedcom tag NOTE */
638
+                I18N::translate('Note');
639
+        case 'NPFX':
640
+            return
641
+                /* I18N: gedcom tag NPFX */
642
+                I18N::translate('Name prefix');
643
+        case 'NSFX':
644
+            return
645
+                /* I18N: gedcom tag NSFX */
646
+                I18N::translate('Name suffix');
647
+        case 'OBJE':
648
+            return
649
+                /* I18N: gedcom tag OBJE */
650
+                I18N::translate('Media object');
651
+        case 'OCCU':
652
+            return
653
+                /* I18N: gedcom tag OCCU */
654
+                I18N::translate('Occupation');
655
+        case 'OCCU:AGNC':
656
+            return I18N::translate('Employer');
657
+        case 'ORDI':
658
+            return
659
+                /* I18N: gedcom tag ORDI */
660
+                I18N::translate('Ordinance');
661
+        case 'ORDN':
662
+            return
663
+                /* I18N: gedcom tag ORDN */
664
+                I18N::translate('Ordination');
665
+        case 'ORDN:AGNC':
666
+            return I18N::translate('Religious institution');
667
+        case 'ORDN:DATE':
668
+            return I18N::translate('Date of ordination');
669
+        case 'ORDN:PLAC':
670
+            return I18N::translate('Place of ordination');
671
+        case 'PAGE':
672
+            return
673
+                /* I18N: gedcom tag PAGE */
674
+                I18N::translate('Citation details');
675
+        case 'PEDI':
676
+            return
677
+                /* I18N: gedcom tag PEDI */
678
+                I18N::translate('Relationship to parents');
679
+        case 'PHON':
680
+            return
681
+                /* I18N: gedcom tag PHON */
682
+                I18N::translate('Phone');
683
+        case 'PLAC':
684
+            return
685
+                /* I18N: gedcom tag PLAC */
686
+                I18N::translate('Place');
687
+        case 'PLAC:FONE':
688
+            return I18N::translate('Phonetic place');
689
+        case 'PLAC:ROMN':
690
+            return I18N::translate('Romanized place');
691
+        case 'PLAC:_HEB':
692
+            return I18N::translate('Place in Hebrew');
693
+        case 'POST':
694
+            return
695
+                /* I18N: gedcom tag POST */
696
+                I18N::translate('Postal code');
697
+        case 'PROB':
698
+            return
699
+                /* I18N: gedcom tag PROB */
700
+                I18N::translate('Probate');
701
+        case 'PROP':
702
+            return
703
+                /* I18N: gedcom tag PROP */
704
+                I18N::translate('Property');
705
+        case 'PUBL':
706
+            return
707
+                /* I18N: gedcom tag PUBL */
708
+                I18N::translate('Publication');
709
+        case 'QUAY':
710
+            return
711
+                /* I18N: gedcom tag QUAY */
712
+                I18N::translate('Quality of data');
713
+        case 'REFN':
714
+            return
715
+                /* I18N: gedcom tag REFN */
716
+                I18N::translate('Reference number');
717
+        case 'RELA':
718
+            return
719
+                /* I18N: gedcom tag RELA */
720
+                I18N::translate('Relationship');
721
+        case 'RELI':
722
+            return
723
+                /* I18N: gedcom tag RELI */
724
+                I18N::translate('Religion');
725
+        case 'REPO':
726
+            return
727
+                /* I18N: gedcom tag REPO */
728
+                I18N::translate('Repository');
729
+        case 'RESI':
730
+            return
731
+                /* I18N: gedcom tag RESI */
732
+                I18N::translate('Residence');
733
+        case 'RESI:DATE':
734
+            return I18N::translate('Date of residence');
735
+        case 'RESI:PLAC':
736
+            return I18N::translate('Place of residence');
737
+        case 'RESN':
738
+            return
739
+                /* I18N: gedcom tag RESN */
740
+                I18N::translate('Restriction');
741
+        case 'RETI':
742
+            return
743
+                /* I18N: gedcom tag RETI */
744
+                I18N::translate('Retirement');
745
+        case 'RETI:AGNC':
746
+            return I18N::translate('Employer');
747
+        case 'RFN':
748
+            return
749
+                /* I18N: gedcom tag RFN */
750
+                I18N::translate('Record file number');
751
+        case 'RIN':
752
+            return
753
+                /* I18N: gedcom tag RIN */
754
+                I18N::translate('Record ID number');
755
+        case 'ROLE':
756
+            return
757
+                /* I18N: gedcom tag ROLE */
758
+                I18N::translate('Role');
759
+        case 'ROMN':
760
+            return
761
+                /* I18N: gedcom tag ROMN */
762
+                I18N::translate('Romanized');
763
+        case 'SERV':
764
+            return
765
+                /* I18N: gedcom tag SERV */
766
+                I18N::translate('Remote server');
767
+        case 'SEX':
768
+            return
769
+                /* I18N: gedcom tag SEX */
770
+                I18N::translate('Gender');
771
+        case 'SHARED_NOTE':
772
+            return I18N::translate('Shared note');
773
+        case 'SLGC':
774
+            return
775
+                /* I18N: gedcom tag SLGC. LDS = Church of Latter Day Saints. */
776
+                I18N::translate('LDS child sealing');
777
+        case 'SLGC:DATE':
778
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS child sealing');
779
+        case 'SLGC:PLAC':
780
+            return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS child sealing');
781
+        case 'SLGS':
782
+            return
783
+                /* I18N: gedcom tag SLGS. LDS = Church of Latter Day Saints. */
784
+                I18N::translate('LDS spouse sealing');
785
+        case 'SOUR':
786
+            return
787
+                /* I18N: gedcom tag SOUR */
788
+                I18N::translate('Source');
789
+        case 'SPFX':
790
+            return
791
+                /* I18N: gedcom tag SPFX */
792
+                I18N::translate('Surname prefix');
793
+        case 'SSN':
794
+            return
795
+                /* I18N: gedcom tag SSN */
796
+                I18N::translate('Social security number');
797
+        case 'STAE':
798
+            return
799
+                /* I18N: gedcom tag STAE */
800
+                I18N::translate('State');
801
+        case 'STAT':
802
+            return
803
+                /* I18N: gedcom tag STAT */
804
+                I18N::translate('Status');
805
+        case 'STAT:DATE':
806
+            return I18N::translate('Status change date');
807
+        case 'SUBM':
808
+            return
809
+                /* I18N: gedcom tag SUBM */
810
+                I18N::translate('Submitter');
811
+        case 'SUBN':
812
+            return
813
+                /* I18N: gedcom tag SUBN */
814
+                I18N::translate('Submission');
815
+        case 'SURN':
816
+            return
817
+                /* I18N: gedcom tag SURN */
818
+                I18N::translate('Surname');
819
+        case 'TEMP':
820
+            return
821
+                /* I18N: gedcom tag TEMP */
822
+                I18N::translate('Temple');
823
+        case 'TEXT':
824
+            return
825
+                /* I18N: gedcom tag TEXT */
826
+                I18N::translate('Text');
827
+        case 'TIME':
828
+            return
829
+                /* I18N: gedcom tag TIME */
830
+                I18N::translate('Time');
831
+        case 'TITL':
832
+            return
833
+                /* I18N: gedcom tag TITL */
834
+                I18N::translate('Title');
835
+        case 'TITL:FONE':
836
+            return I18N::translate('Phonetic title');
837
+        case 'TITL:ROMN':
838
+            return I18N::translate('Romanized title');
839
+        case 'TITL:_HEB':
840
+            return I18N::translate('Title in Hebrew');
841
+        case 'TRLR':
842
+            return
843
+                /* I18N: gedcom tag TRLR */
844
+                I18N::translate('Trailer');
845
+        case 'TYPE':
846
+            return
847
+                /* I18N: gedcom tag TYPE */
848
+                I18N::translate('Type');
849
+        case 'URL':
850
+            return
851
+                /* I18N: gedcom tag URL (A web address / URL) */
852
+                I18N::translate('URL');
853
+        case 'VERS':
854
+            return
855
+                /* I18N: gedcom tag VERS */
856
+                I18N::translate('Version');
857
+        case 'WIFE':
858
+            return
859
+                /* I18N: gedcom tag WIFE */
860
+                I18N::translate('Wife');
861
+        case 'WILL':
862
+            return
863
+                /* I18N: gedcom tag WILL */
864
+                I18N::translate('Will');
865
+        case 'WWW':
866
+            return
867
+                /* I18N: gedcom tag WWW (A web address / URL) */
868
+                I18N::translate('URL');
869
+        case '_ADOP_CHIL':
870
+            switch ($sex) {
871
+            case 'M':
872
+                return I18N::translate('Adoption of a son');
873
+            case 'F':
874
+                return I18N::translate('Adoption of a daughter');
875
+            default:
876
+                return I18N::translate('Adoption of a child');
877
+            }
878
+        case '_ADOP_GCHI':
879
+            switch ($sex) {
880
+            case 'M':
881
+                return I18N::translate('Adoption of a grandson');
882
+            case 'F':
883
+                return I18N::translate('Adoption of a granddaughter');
884
+            default:
885
+                return I18N::translate('Adoption of a grandchild');
886
+            }
887
+        case '_ADOP_GCH1':
888
+            switch ($sex) {
889
+            case 'M':
890
+                return I18N::translateContext('daughter’s son', 'Adoption of a grandson');
891
+            case 'F':
892
+                return I18N::translateContext('daughter’s daughter', 'Adoption of a granddaughter');
893
+            default:
894
+                return I18N::translate('Adoption of a grandchild');
895
+            }
896
+        case '_ADOP_GCH2':
897
+            switch ($sex) {
898
+            case 'M':
899
+                return I18N::translateContext('son’s son', 'Adoption of a grandson');
900
+            case 'F':
901
+                return I18N::translateContext('son’s daughter', 'Adoption of a granddaughter');
902
+            default:
903
+                return I18N::translate('Adoption of a grandchild');
904
+            }
905
+        case '_ADOP_HSIB':
906
+            switch ($sex) {
907
+            case 'M':
908
+                return I18N::translate('Adoption of a half-brother');
909
+            case 'F':
910
+                return I18N::translate('Adoption of a half-sister');
911
+            default:
912
+                return I18N::translate('Adoption of a half-sibling');
913
+            }
914
+        case '_ADOP_SIBL':
915
+            switch ($sex) {
916
+            case 'M':
917
+                return I18N::translate('Adoption of a brother');
918
+            case 'F':
919
+                return I18N::translate('Adoption of a sister');
920
+            default:
921
+                return I18N::translate('Adoption of a sibling');
922
+            }
923
+        case '_ADPF':
924
+            switch ($sex) {
925
+            case 'M':
926
+                return
927
+                    /* I18N: gedcom tag _ADPF */
928
+                    I18N::translateContext('MALE', 'Adopted by father');
929
+            case 'F':
930
+                return
931
+                    /* I18N: gedcom tag _ADPF */
932
+                    I18N::translateContext('FEMALE', 'Adopted by father');
933
+            default:
934
+                return
935
+                    /* I18N: gedcom tag _ADPF */
936
+                    I18N::translate('Adopted by father');
937
+            }
938
+        case '_ADPM':
939
+            switch ($sex) {
940
+            case 'M':
941
+                return
942
+                    /* I18N: gedcom tag _ADPM */
943
+                    I18N::translateContext('MALE', 'Adopted by mother');
944
+            case 'F':
945
+                return
946
+                    /* I18N: gedcom tag _ADPM */
947
+                    I18N::translateContext('FEMALE', 'Adopted by mother');
948
+            default:
949
+                return
950
+                    /* I18N: gedcom tag _ADPM */
951
+                    I18N::translate('Adopted by mother');
952
+            }
953
+        case '_AKA':
954
+        case '_AKAN':
955
+            switch ($sex) {
956
+            case 'M':
957
+                return
958
+                    /* I18N: gedcom tag _AKA */
959
+                    I18N::translateContext('MALE', 'Also known as');
960
+            case 'F':
961
+                return
962
+                    /* I18N: gedcom tag _AKA */
963
+                    I18N::translateContext('FEMALE', 'Also known as');
964
+            default:
965
+                return
966
+                    /* I18N: gedcom tag _AKA */
967
+                    I18N::translate('Also known as');
968
+            }
969
+        case '_ASSO':
970
+            return
971
+                /* I18N: gedcom tag _ASSO */
972
+                I18N::translate('Associate'); /* see also ASSO */
973
+        case '_BAPM_CHIL':
974
+            switch ($sex) {
975
+            case 'M':
976
+                return I18N::translate('Baptism of a son');
977
+            case 'F':
978
+                return I18N::translate('Baptism of a daughter');
979
+            default:
980
+                return I18N::translate('Baptism of a child');
981
+            }
982
+        case '_BAPM_GCHI':
983
+            switch ($sex) {
984
+            case 'M':
985
+                return I18N::translate('Baptism of a grandson');
986
+            case 'F':
987
+                return I18N::translate('Baptism of a granddaughter');
988
+            default:
989
+                return I18N::translate('Baptism of a grandchild');
990
+            }
991
+        case '_BAPM_GCH1':
992
+            switch ($sex) {
993
+            case 'M':
994
+                return I18N::translateContext('daughter’s son', 'Baptism of a grandson');
995
+            case 'F':
996
+                return I18N::translateContext('daughter’s daughter', 'Baptism of a granddaughter');
997
+            default:
998
+                return I18N::translate('Baptism of a grandchild');
999
+            }
1000
+        case '_BAPM_GCH2':
1001
+            switch ($sex) {
1002
+            case 'M':
1003
+                return I18N::translateContext('son’s son', 'Baptism of a grandson');
1004
+            case 'F':
1005
+                return I18N::translateContext('son’s daughter', 'Baptism of a granddaughter');
1006
+            default:
1007
+                return I18N::translate('Baptism of a grandchild');
1008
+            }
1009
+        case '_BAPM_HSIB':
1010
+            switch ($sex) {
1011
+            case 'M':
1012
+                return I18N::translate('Baptism of a half-brother');
1013
+            case 'F':
1014
+                return I18N::translate('Baptism of a half-sister');
1015
+            default:
1016
+                return I18N::translate('Baptism of a half-sibling');
1017
+            }
1018
+        case '_BAPM_SIBL':
1019
+            switch ($sex) {
1020
+            case 'M':
1021
+                return I18N::translate('Baptism of a brother');
1022
+            case 'F':
1023
+                return I18N::translate('Baptism of a sister');
1024
+            default:
1025
+                return I18N::translate('Baptism of a sibling');
1026
+            }
1027
+        case '_BIBL':
1028
+            return
1029
+                /* I18N: gedcom tag _BIBL */
1030
+                I18N::translate('Bibliography');
1031
+        case '_BIRT_CHIL':
1032
+            switch ($sex) {
1033
+            case 'M':
1034
+                return I18N::translate('Birth of a son');
1035
+            case 'F':
1036
+                return I18N::translate('Birth of a daughter');
1037
+            default:
1038
+                return I18N::translate('Birth of a child');
1039
+            }
1040
+        case '_BIRT_GCHI':
1041
+            switch ($sex) {
1042
+            case 'M':
1043
+                return I18N::translate('Birth of a grandson');
1044
+            case 'F':
1045
+                return I18N::translate('Birth of a granddaughter');
1046
+            default:
1047
+                return I18N::translate('Birth of a grandchild');
1048
+            }
1049
+        case '_BIRT_GCH1':
1050
+            switch ($sex) {
1051
+            case 'M':
1052
+                return I18N::translateContext('daughter’s son', 'Birth of a grandson');
1053
+            case 'F':
1054
+                return I18N::translateContext('daughter’s daughter', 'Birth of a granddaughter');
1055
+            default:
1056
+                return I18N::translate('Birth of a grandchild');
1057
+            }
1058
+        case '_BIRT_GCH2':
1059
+            switch ($sex) {
1060
+            case 'M':
1061
+                return I18N::translateContext('son’s son', 'Birth of a grandson');
1062
+            case 'F':
1063
+                return I18N::translateContext('son’s daughter', 'Birth of a granddaughter');
1064
+            default:
1065
+                return I18N::translate('Birth of a grandchild');
1066
+            }
1067
+        case '_BIRT_HSIB':
1068
+            switch ($sex) {
1069
+            case 'M':
1070
+                return I18N::translate('Birth of a half-brother');
1071
+            case 'F':
1072
+                return I18N::translate('Birth of a half-sister');
1073
+            default:
1074
+                return I18N::translate('Birth of a half-sibling');
1075
+            }
1076
+        case '_BIRT_SIBL':
1077
+            switch ($sex) {
1078
+            case 'M':
1079
+                return I18N::translate('Birth of a brother');
1080
+            case 'F':
1081
+                return I18N::translate('Birth of a sister');
1082
+            default:
1083
+                return I18N::translate('Birth of a sibling');
1084
+            }
1085
+        case '_BRTM':
1086
+            return
1087
+                /* I18N: gedcom tag _BRTM */
1088
+                I18N::translate('Brit milah');
1089
+        case '_BRTM:DATE':
1090
+            return I18N::translate('Date of brit milah');
1091
+        case '_BRTM:PLAC':
1092
+            return I18N::translate('Place of brit milah');
1093
+        case '_BURI_CHIL':
1094
+            switch ($sex) {
1095
+            case 'M':
1096
+                return I18N::translate('Burial of a son');
1097
+            case 'F':
1098
+                return I18N::translate('Burial of a daughter');
1099
+            default:
1100
+                return I18N::translate('Burial of a child');
1101
+            }
1102
+        case '_BURI_GCHI':
1103
+            switch ($sex) {
1104
+            case 'M':
1105
+                return I18N::translate('Burial of a grandson');
1106
+            case 'F':
1107
+                return I18N::translate('Burial of a granddaughter');
1108
+            default:
1109
+                return I18N::translate('Burial of a grandchild');
1110
+            }
1111
+        case '_BURI_GCH1':
1112
+            switch ($sex) {
1113
+            case 'M':
1114
+                return I18N::translateContext('daughter’s son', 'Burial of a grandson');
1115
+            case 'F':
1116
+                return I18N::translateContext('daughter’s daughter', 'Burial of a granddaughter');
1117
+            default:
1118
+                return I18N::translate('Burial of a grandchild');
1119
+            }
1120
+        case '_BURI_GCH2':
1121
+            switch ($sex) {
1122
+            case 'M':
1123
+                return I18N::translateContext('son’s son', 'Burial of a grandson');
1124
+            case 'F':
1125
+                return I18N::translateContext('son’s daughter', 'Burial of a granddaughter');
1126
+            default:
1127
+                return I18N::translate('Burial of a grandchild');
1128
+            }
1129
+        case '_BURI_GPAR':
1130
+            switch ($sex) {
1131
+            case 'M':
1132
+                return I18N::translate('Burial of a grandfather');
1133
+            case 'F':
1134
+                return I18N::translate('Burial of a grandmother');
1135
+            default:
1136
+                return I18N::translate('Burial of a grandparent');
1137
+            }
1138
+        case '_BURI_GPA1':
1139
+            switch ($sex) {
1140
+            case 'M':
1141
+                return I18N::translate('Burial of a paternal grandfather');
1142
+            case 'F':
1143
+                return I18N::translate('Burial of a paternal grandmother');
1144
+            default:
1145
+                return I18N::translate('Burial of a paternal grandparent');
1146
+            }
1147
+        case '_BURI_GPA2':
1148
+            switch ($sex) {
1149
+            case 'M':
1150
+                return I18N::translate('Burial of a maternal grandfather');
1151
+            case 'F':
1152
+                return I18N::translate('Burial of a maternal grandmother');
1153
+            default:
1154
+                return I18N::translate('Burial of a maternal grandparent');
1155
+            }
1156
+        case '_BURI_HSIB':
1157
+            switch ($sex) {
1158
+            case 'M':
1159
+                return I18N::translate('Burial of a half-brother');
1160
+            case 'F':
1161
+                return I18N::translate('Burial of a half-sister');
1162
+            default:
1163
+                return I18N::translate('Burial of a half-sibling');
1164
+            }
1165
+        case '_BURI_PARE':
1166
+            switch ($sex) {
1167
+            case 'M':
1168
+                return I18N::translate('Burial of a father');
1169
+            case 'F':
1170
+                return I18N::translate('Burial of a mother');
1171
+            default:
1172
+                return I18N::translate('Burial of a parent');
1173
+            }
1174
+        case '_BURI_SIBL':
1175
+            switch ($sex) {
1176
+            case 'M':
1177
+                return I18N::translate('Burial of a brother');
1178
+            case 'F':
1179
+                return I18N::translate('Burial of a sister');
1180
+            default:
1181
+                return I18N::translate('Burial of a sibling');
1182
+            }
1183
+        case '_BURI_SPOU':
1184
+            switch ($sex) {
1185
+            case 'M':
1186
+                return I18N::translate('Burial of a husband');
1187
+            case 'F':
1188
+                return I18N::translate('Burial of a wife');
1189
+            default:
1190
+                return I18N::translate('Burial of a spouse');
1191
+            }
1192
+        case '_CHR_CHIL':
1193
+            switch ($sex) {
1194
+            case 'M':
1195
+                return I18N::translate('Christening of a son');
1196
+            case 'F':
1197
+                return I18N::translate('Christening of a daughter');
1198
+            default:
1199
+                return I18N::translate('Christening of a child');
1200
+            }
1201
+        case '_CHR_GCHI':
1202
+            switch ($sex) {
1203
+            case 'M':
1204
+                return I18N::translate('Christening of a grandson');
1205
+            case 'F':
1206
+                return I18N::translate('Christening of a granddaughter');
1207
+            default:
1208
+                return I18N::translate('Christening of a grandchild');
1209
+            }
1210
+        case '_CHR_GCH1':
1211
+            switch ($sex) {
1212
+            case 'M':
1213
+                return I18N::translateContext('daughter’s son', 'Christening of a grandson');
1214
+            case 'F':
1215
+                return I18N::translateContext('daughter’s daughter', 'Christening of a granddaughter');
1216
+            default:
1217
+                return I18N::translate('Christening of a grandchild');
1218
+            }
1219
+        case '_CHR_GCH2':
1220
+            switch ($sex) {
1221
+            case 'M':
1222
+                return I18N::translateContext('son’s son', 'Christening of a grandson');
1223
+            case 'F':
1224
+                return I18N::translateContext('son’s daughter', 'Christening of a granddaughter');
1225
+            default:
1226
+                return I18N::translate('Christening of a grandchild');
1227
+            }
1228
+        case '_CHR_HSIB':
1229
+            switch ($sex) {
1230
+            case 'M':
1231
+                return I18N::translate('Christening of a half-brother');
1232
+            case 'F':
1233
+                return I18N::translate('Christening of a half-sister');
1234
+            default:
1235
+                return I18N::translate('Christening of a half-sibling');
1236
+            }
1237
+        case '_CHR_SIBL':
1238
+            switch ($sex) {
1239
+            case 'M':
1240
+                return I18N::translate('Christening of a brother');
1241
+            case 'F':
1242
+                return I18N::translate('Christening of a sister');
1243
+            default:
1244
+                return I18N::translate('Christening of a sibling');
1245
+            }
1246
+        case '_COML':
1247
+            return
1248
+                /* I18N: gedcom tag _COML */
1249
+                I18N::translate('Common law marriage');
1250
+        case '_CREM_CHIL':
1251
+            switch ($sex) {
1252
+            case 'M':
1253
+                return I18N::translate('Cremation of a son');
1254
+            case 'F':
1255
+                return I18N::translate('Cremation of a daughter');
1256
+            default:
1257
+                return I18N::translate('Cremation of a child');
1258
+            }
1259
+        case '_CREM_GCHI':
1260
+            switch ($sex) {
1261
+            case 'M':
1262
+                return I18N::translate('Cremation of a grandson');
1263
+            case 'F':
1264
+                return I18N::translate('Cremation of a granddaughter');
1265
+            default:
1266
+                return I18N::translate('Cremation of a grandchild');
1267
+            }
1268
+        case '_CREM_GCH1':
1269
+            switch ($sex) {
1270
+            case 'M':
1271
+                return I18N::translateContext('daughter’s son', 'Cremation of a grandson');
1272
+            case 'F':
1273
+                return I18N::translateContext('daughter’s daughter', 'Cremation of a granddaughter');
1274
+            default:
1275
+                return I18N::translate('Cremation of a grandchild');
1276
+            }
1277
+        case '_CREM_GCH2':
1278
+            switch ($sex) {
1279
+            case 'M':
1280
+                return I18N::translateContext('son’s son', 'Cremation of a grandson');
1281
+            case 'F':
1282
+                return I18N::translateContext('son’s daughter', 'Cremation of a granddaughter');
1283
+            default:
1284
+                return I18N::translate('Cremation of a grandchild');
1285
+            }
1286
+        case '_CREM_GPAR':
1287
+            switch ($sex) {
1288
+            case 'M':
1289
+                return I18N::translate('Cremation of a grandfather');
1290
+            case 'F':
1291
+                return I18N::translate('Cremation of a grandmother');
1292
+            default:
1293
+                return I18N::translate('Cremation of a grand-parent');
1294
+            }
1295
+        case '_CREM_GPA1':
1296
+            switch ($sex) {
1297
+            case 'M':
1298
+                return I18N::translate('Cremation of a paternal grandfather');
1299
+            case 'F':
1300
+                return I18N::translate('Cremation of a paternal grandmother');
1301
+            default:
1302
+                return I18N::translate('Cremation of a grand-parent');
1303
+            }
1304
+        case '_CREM_GPA2':
1305
+            switch ($sex) {
1306
+            case 'M':
1307
+                return I18N::translate('Cremation of a maternal grandfather');
1308
+            case 'F':
1309
+                return I18N::translate('Cremation of a maternal grandmother');
1310
+            default:
1311
+                return I18N::translate('Cremation of a grand-parent');
1312
+            }
1313
+        case '_CREM_HSIB':
1314
+            switch ($sex) {
1315
+            case 'M':
1316
+                return I18N::translate('Cremation of a half-brother');
1317
+            case 'F':
1318
+                return I18N::translate('Cremation of a half-sister');
1319
+            default:
1320
+                return I18N::translate('Cremation of a half-sibling');
1321
+            }
1322
+        case '_CREM_PARE':
1323
+            switch ($sex) {
1324
+            case 'M':
1325
+                return I18N::translate('Cremation of a father');
1326
+            case 'F':
1327
+                return I18N::translate('Cremation of a mother');
1328
+            default:
1329
+                return I18N::translate('Cremation of a parent');
1330
+            }
1331
+        case '_CREM_SIBL':
1332
+            switch ($sex) {
1333
+            case 'M':
1334
+                return I18N::translate('Cremation of a brother');
1335
+            case 'F':
1336
+                return I18N::translate('Cremation of a sister');
1337
+            default:
1338
+                return I18N::translate('Cremation of a sibling');
1339
+            }
1340
+        case '_CREM_SPOU':
1341
+            switch ($sex) {
1342
+            case 'M':
1343
+                return I18N::translate('Cremation of a husband');
1344
+            case 'F':
1345
+                return I18N::translate('Cremation of a wife');
1346
+            default:
1347
+                return I18N::translate('Cremation of a spouse');
1348
+            }
1349
+        case '_DBID':
1350
+            return
1351
+                /* I18N: gedcom tag _DBID */
1352
+                I18N::translate('Linked database ID');
1353
+        case '_DEAT_CHIL':
1354
+            switch ($sex) {
1355
+            case 'M':
1356
+                return I18N::translate('Death of a son');
1357
+            case 'F':
1358
+                return I18N::translate('Death of a daughter');
1359
+            default:
1360
+                return I18N::translate('Death of a child');
1361
+            }
1362
+        case '_DEAT_GCHI':
1363
+            switch ($sex) {
1364
+            case 'M':
1365
+                return I18N::translate('Death of a grandson');
1366
+            case 'F':
1367
+                return I18N::translate('Death of a granddaughter');
1368
+            default:
1369
+                return I18N::translate('Death of a grandchild');
1370
+            }
1371
+        case '_DEAT_GCH1':
1372
+            switch ($sex) {
1373
+            case 'M':
1374
+                return I18N::translateContext('daughter’s son', 'Death of a grandson');
1375
+            case 'F':
1376
+                return I18N::translateContext('daughter’s daughter', 'Death of a granddaughter');
1377
+            default:
1378
+                return I18N::translate('Death of a grandchild');
1379
+            }
1380
+        case '_DEAT_GCH2':
1381
+            switch ($sex) {
1382
+            case 'M':
1383
+                return I18N::translateContext('son’s son', 'Death of a grandson');
1384
+            case 'F':
1385
+                return I18N::translateContext('son’s daughter', 'Death of a granddaughter');
1386
+            default:
1387
+                return I18N::translate('Death of a grandchild');
1388
+            }
1389
+        case '_DEAT_GPAR':
1390
+            switch ($sex) {
1391
+            case 'M':
1392
+                return I18N::translate('Death of a grandfather');
1393
+            case 'F':
1394
+                return I18N::translate('Death of a grandmother');
1395
+            default:
1396
+                return I18N::translate('Death of a grand-parent');
1397
+            }
1398
+        case '_DEAT_GPA1':
1399
+            switch ($sex) {
1400
+            case 'M':
1401
+                return I18N::translate('Death of a paternal grandfather');
1402
+            case 'F':
1403
+                return I18N::translate('Death of a paternal grandmother');
1404
+            default:
1405
+                return I18N::translate('Death of a grand-parent');
1406
+            }
1407
+        case '_DEAT_GPA2':
1408
+            switch ($sex) {
1409
+            case 'M':
1410
+                return I18N::translate('Death of a maternal grandfather');
1411
+            case 'F':
1412
+                return I18N::translate('Death of a maternal grandmother');
1413
+            default:
1414
+                return I18N::translate('Death of a grand-parent');
1415
+            }
1416
+        case '_DEAT_HSIB':
1417
+            switch ($sex) {
1418
+            case 'M':
1419
+                return I18N::translate('Death of a half-brother');
1420
+            case 'F':
1421
+                return I18N::translate('Death of a half-sister');
1422
+            default:
1423
+                return I18N::translate('Death of a half-sibling');
1424
+            }
1425
+        case '_DEAT_PARE':
1426
+            switch ($sex) {
1427
+            case 'M':
1428
+                return I18N::translate('Death of a father');
1429
+            case 'F':
1430
+                return I18N::translate('Death of a mother');
1431
+            default:
1432
+                return I18N::translate('Death of a parent');
1433
+            }
1434
+        case '_DEAT_SIBL':
1435
+            switch ($sex) {
1436
+            case 'M':
1437
+                return I18N::translate('Death of a brother');
1438
+            case 'F':
1439
+                return I18N::translate('Death of a sister');
1440
+            default:
1441
+                return I18N::translate('Death of a sibling');
1442
+            }
1443
+        case '_DEAT_SPOU':
1444
+            switch ($sex) {
1445
+            case 'M':
1446
+                return I18N::translate('Death of a husband');
1447
+            case 'F':
1448
+                return I18N::translate('Death of a wife');
1449
+            default:
1450
+                return I18N::translate('Death of a spouse');
1451
+            }
1452
+        case '_DEG':
1453
+            return
1454
+                /* I18N: gedcom tag _DEG */
1455
+                I18N::translate('Degree');
1456
+        case '_DETS':
1457
+            return
1458
+                /* I18N: gedcom tag _DETS */
1459
+                I18N::translate('Death of one spouse');
1460
+        case '_DNA':
1461
+            return
1462
+                /* I18N: gedcom tag _DNA (from FTM 2010) */
1463
+                I18N::translate('DNA markers');
1464
+        case '_EMAIL':
1465
+            return
1466
+                /* I18N: gedcom tag _EMAIL */
1467
+                I18N::translate('Email address');
1468
+        case '_EYEC':
1469
+            return
1470
+                /* I18N: gedcom tag _EYEC */
1471
+                I18N::translate('Eye color');
1472
+        case '_FA1':
1473
+            return I18N::translate('Fact 1');
1474
+        case '_FA2':
1475
+            return I18N::translate('Fact 2');
1476
+        case '_FA3':
1477
+            return I18N::translate('Fact 3');
1478
+        case '_FA4':
1479
+            return I18N::translate('Fact 4');
1480
+        case '_FA5':
1481
+            return I18N::translate('Fact 5');
1482
+        case '_FA6':
1483
+            return I18N::translate('Fact 6');
1484
+        case '_FA7':
1485
+            return I18N::translate('Fact 7');
1486
+        case '_FA8':
1487
+            return I18N::translate('Fact 8');
1488
+        case '_FA9':
1489
+            return I18N::translate('Fact 9');
1490
+        case '_FA10':
1491
+            return I18N::translate('Fact 10');
1492
+        case '_FA11':
1493
+            return I18N::translate('Fact 11');
1494
+        case '_FA12':
1495
+            return I18N::translate('Fact 12');
1496
+        case '_FA13':
1497
+            return I18N::translate('Fact 13');
1498
+        case '_FNRL':
1499
+            return
1500
+                /* I18N: gedcom tag _FNRL */
1501
+                I18N::translate('Funeral');
1502
+        case '_FREL':
1503
+            return
1504
+                /* I18N: gedcom tag _FREL */
1505
+                I18N::translate('Relationship to father');
1506
+        case '_GEDF':
1507
+            return
1508
+                /* I18N: gedcom tag _GEDF */
1509
+                I18N::translate('GEDCOM file');
1510
+        case '_GODP':
1511
+            return
1512
+                /* I18N: gedcom tag _GODP */
1513
+                I18N::translate('Godparent');
1514
+        case '_HAIR':
1515
+            return
1516
+                /* I18N: gedcom tag _HAIR */
1517
+                I18N::translate('Hair color');
1518
+        case '_HEB':
1519
+            return
1520
+                /* I18N: gedcom tag _HEB */
1521
+                I18N::translate('Hebrew');
1522
+        case '_HEIG':
1523
+            return
1524
+                /* I18N: gedcom tag _HEIG */
1525
+                I18N::translate('Height');
1526
+        case '_HNM':
1527
+            return
1528
+                /* I18N: gedcom tag _HNM */
1529
+                I18N::translate('Hebrew name');
1530
+        case '_HOL':
1531
+            return
1532
+                /* I18N: gedcom tag _HOL */
1533
+                I18N::translate('Holocaust');
1534
+        case '_INTE':
1535
+            switch ($sex) {
1536
+            case 'M':
1537
+                return
1538
+                    /* I18N: gedcom tag _INTE */
1539
+                    I18N::translateContext('MALE', 'Interred');
1540
+            case 'F':
1541
+                return
1542
+                    /* I18N: gedcom tag _INTE */
1543
+                    I18N::translateContext('FEMALE', 'Interred');
1544
+            default:
1545
+                return
1546
+                    /* I18N: gedcom tag _INTE */
1547
+                    I18N::translate('Interred');
1548
+            }
1549
+        case '_LOC':
1550
+            return
1551
+                /* I18N: gedcom tag _LOC */
1552
+                I18N::translate('Location');
1553
+        case '_MARI':
1554
+            return
1555
+                /* I18N: gedcom tag _MARI */
1556
+                I18N::translate('Marriage intention');
1557
+        case '_MARNM':
1558
+            return
1559
+                /* I18N: gedcom tag _MARNM */
1560
+                I18N::translate('Married name');
1561
+        case '_PRIM':
1562
+            return
1563
+                /* I18N: gedcom tag _PRIM */
1564
+                I18N::translate('Highlighted image');
1565
+        case '_MARNM_SURN':
1566
+            return I18N::translate('Married surname');
1567
+        case '_MARR_CHIL':
1568
+            switch ($sex) {
1569
+            case 'M':
1570
+                return I18N::translate('Marriage of a son');
1571
+            case 'F':
1572
+                return I18N::translate('Marriage of a daughter');
1573
+            default:
1574
+                return I18N::translate('Marriage of a child');
1575
+            }
1576
+        case '_MARR_FAMC':
1577
+            return
1578
+                /* I18N: ...to each other */
1579
+                I18N::translate('Marriage of parents');
1580
+        case '_MARR_GCHI':
1581
+            switch ($sex) {
1582
+            case 'M':
1583
+                return I18N::translate('Marriage of a grandson');
1584
+            case 'F':
1585
+                return I18N::translate('Marriage of a granddaughter');
1586
+            default:
1587
+                return I18N::translate('Marriage of a grandchild');
1588
+            }
1589
+        case '_MARR_GCH1':
1590
+            switch ($sex) {
1591
+            case 'M':
1592
+                return I18N::translateContext('daughter’s son', 'Marriage of a grandson');
1593
+            case 'F':
1594
+                return I18N::translateContext('daughter’s daughter', 'Marriage of a granddaughter');
1595
+            default:
1596
+                return I18N::translate('Marriage of a grandchild');
1597
+            }
1598
+        case '_MARR_GCH2':
1599
+            switch ($sex) {
1600
+            case 'M':
1601
+                return I18N::translateContext('son’s son', 'Marriage of a grandson');
1602
+            case 'F':
1603
+                return I18N::translateContext('son’s daughter', 'Marriage of a granddaughter');
1604
+            default:
1605
+                return I18N::translate('Marriage of a grandchild');
1606
+            }
1607
+        case '_MARR_HSIB':
1608
+            switch ($sex) {
1609
+            case 'M':
1610
+                return I18N::translate('Marriage of a half-brother');
1611
+            case 'F':
1612
+                return I18N::translate('Marriage of a half-sister');
1613
+            default:
1614
+                return I18N::translate('Marriage of a half-sibling');
1615
+            }
1616
+        case '_MARR_PARE':
1617
+            switch ($sex) {
1618
+            case 'M':
1619
+                return
1620
+                    /* I18N: ...to another spouse */
1621
+                    I18N::translate('Marriage of a father');
1622
+            case 'F':
1623
+                return
1624
+                    /* I18N: ...to another spouse */
1625
+                    I18N::translate('Marriage of a mother');
1626
+            default:
1627
+                return
1628
+                    /* I18N: ...to another spouse */
1629
+                    I18N::translate('Marriage of a parent');
1630
+            }
1631
+        case '_MARR_SIBL':
1632
+            switch ($sex) {
1633
+            case 'M':
1634
+                return I18N::translate('Marriage of a brother');
1635
+            case 'F':
1636
+                return I18N::translate('Marriage of a sister');
1637
+            default:
1638
+                return I18N::translate('Marriage of a sibling');
1639
+            }
1640
+        case '_MBON':
1641
+            return
1642
+                /* I18N: gedcom tag _MBON */
1643
+                I18N::translate('Marriage bond');
1644
+        case '_MDCL':
1645
+            return
1646
+                /* I18N: gedcom tag _MDCL */
1647
+                I18N::translate('Medical');
1648
+        case '_MEDC':
1649
+            return
1650
+                /* I18N: gedcom tag _MEDC */
1651
+                I18N::translate('Medical condition');
1652
+        case '_MEND':
1653
+            return
1654
+                /* I18N: gedcom tag _MEND */
1655
+                I18N::translate('Marriage ending status');
1656
+        case '_MILI':
1657
+            return
1658
+                /* I18N: gedcom tag _MILI */
1659
+                I18N::translate('Military');
1660
+        case '_MILT':
1661
+            return
1662
+                /* I18N: gedcom tag _MILT */
1663
+                I18N::translate('Military service');
1664
+        case '_MREL':
1665
+            return
1666
+                /* I18N: gedcom tag _MREL */
1667
+                I18N::translate('Relationship to mother');
1668
+        case '_MSTAT':
1669
+            return
1670
+                /* I18N: gedcom tag _MSTAT */
1671
+                I18N::translate('Marriage beginning status');
1672
+        case '_NAME':
1673
+            return
1674
+                /* I18N: gedcom tag _NAME */
1675
+                I18N::translate('Mailing name');
1676
+        case '_NAMS':
1677
+            return
1678
+                /* I18N: gedcom tag _NAMS */
1679
+                I18N::translate('Namesake');
1680
+        case '_NLIV':
1681
+            return
1682
+                /* I18N: gedcom tag _NLIV */
1683
+                I18N::translate('Not living');
1684
+        case '_NMAR':
1685
+            switch ($sex) {
1686
+            case 'M':
1687
+                return
1688
+                    /* I18N: gedcom tag _NMAR */
1689
+                    I18N::translateContext('MALE', 'Never married');
1690
+            case 'F':
1691
+                return
1692
+                    /* I18N: gedcom tag _NMAR */
1693
+                    I18N::translateContext('FEMALE', 'Never married');
1694
+            default:
1695
+                return
1696
+                    /* I18N: gedcom tag _NMAR */
1697
+                    I18N::translate('Never married');
1698
+            }
1699
+        case '_NMR':
1700
+            switch ($sex) {
1701
+            case 'M':
1702
+                return
1703
+                    /* I18N: gedcom tag _NMR */
1704
+                    I18N::translateContext('MALE', 'Not married');
1705
+            case 'F':
1706
+                return
1707
+                    /* I18N: gedcom tag _NMR */
1708
+                    I18N::translateContext('FEMALE', 'Not married');
1709
+            default:
1710
+                return
1711
+                    /* I18N: gedcom tag _NMR */
1712
+                    I18N::translate('Not married');
1713
+            }
1714
+        case '_WT_USER':
1715
+            return I18N::translate('by');
1716
+        case '_PRMN':
1717
+            return
1718
+                /* I18N: gedcom tag _PRMN */
1719
+                I18N::translate('Permanent number');
1720
+        case '_SCBK':
1721
+            return
1722
+                /* I18N: gedcom tag _SCBK */
1723
+                I18N::translate('Scrapbook');
1724
+        case '_SEPR':
1725
+            return
1726
+                /* I18N: gedcom tag _SEPR */
1727
+                I18N::translate('Separated');
1728
+        case '_SSHOW':
1729
+            return
1730
+                /* I18N: gedcom tag _SSHOW */
1731
+                I18N::translate('Slide show');
1732
+        case '_STAT':
1733
+            return
1734
+                /* I18N: gedcom tag _STAT */
1735
+                I18N::translate('Marriage status');
1736
+        case '_SUBQ':
1737
+            return
1738
+                /* I18N: gedcom tag _SUBQ */
1739
+                I18N::translate('Short version');
1740
+        case '_TODO':
1741
+            return
1742
+                /* I18N: gedcom tag _TODO */
1743
+                I18N::translate('Research task');
1744
+        case '_TYPE':
1745
+            return
1746
+                /* I18N: gedcom tag _TYPE */
1747
+                I18N::translate('Media type');
1748
+        case '_UID':
1749
+            return
1750
+                /* I18N: gedcom tag _UID */
1751
+                I18N::translate('Unique identifier');
1752
+        case '_URL':
1753
+            return
1754
+                /* I18N: gedcom tag _URL */
1755
+                I18N::translate('URL');
1756
+        case '_WEIG':
1757
+            return
1758
+                /* I18N: gedcom tag _WEIG */
1759
+                I18N::translate('Weight');
1760
+        case '_WITN':
1761
+            return
1762
+                /* I18N: gedcom tag _WITN */
1763
+                I18N::translate('Witness');
1764
+        case '_WT_OBJE_SORT':
1765
+            return
1766
+                /* I18N: gedcom tag _WT_OBJE_SORT */
1767
+                I18N::translate('Re-order media');
1768
+        case '_YART':
1769
+            return /* I18N: gedcom tag _YART - A yahrzeit is a special anniversary of death in the Hebrew faith/calendar. */ I18N::translate('Yahrzeit');
1770
+            // Brit milah applies only to males, no need for male/female translations
1771
+        case '__BRTM_CHIL':
1772
+            return I18N::translate('Brit milah of a son');
1773
+        case '__BRTM_GCHI':
1774
+            return I18N::translate('Brit milah of a grandson');
1775
+        case '__BRTM_GCH1':
1776
+            return I18N::translateContext('daughter’s son', 'Brit milah of a grandson');
1777
+        case '__BRTM_GCH2':
1778
+            return I18N::translateContext('son’s son', 'Brit milah of a grandson');
1779
+        case '__BRTM_HSIB':
1780
+            return I18N::translate('Brit milah of a half-brother');
1781
+        case '__BRTM_SIBL':
1782
+            return I18N::translate('Brit milah of a brother');
1783
+            // These "pseudo" tags are generated internally to present information about a media object
1784
+        case '__FILE_SIZE__':
1785
+            return I18N::translate('File size');
1786
+        case '__IMAGE_SIZE__':
1787
+            return I18N::translate('Image dimensions');
1788
+        default:
1789
+            // If no specialisation exists (e.g. DEAT:CAUS), then look for the general (CAUS)
1790
+            if (strpos($tag, ':')) {
1791
+                list(, $tag) = explode(':', $tag, 2);
1792 1792
 
1793
-				return self::getLabel($tag, $record);
1794
-			}
1793
+                return self::getLabel($tag, $record);
1794
+            }
1795 1795
 
1796
-			// Still no translation? Highlight this as an error
1797
-			return '<span class="error" title="' . I18N::translate('Unrecognized GEDCOM code') . '">' . Filter::escapeHtml($tag) . '</span>';
1798
-		}
1799
-	}
1796
+            // Still no translation? Highlight this as an error
1797
+            return '<span class="error" title="' . I18N::translate('Unrecognized GEDCOM code') . '">' . Filter::escapeHtml($tag) . '</span>';
1798
+        }
1799
+    }
1800 1800
 
1801
-	/**
1802
-	 * Translate a label/value pair, such as “Occupation: Farmer”
1803
-	 *
1804
-	 * @param string            $tag
1805
-	 * @param string            $value
1806
-	 * @param GedcomRecord|null $record
1807
-	 * @param string|null       $element
1808
-	 *
1809
-	 * @return string
1810
-	 */
1811
-	public static function getLabelValue($tag, $value, GedcomRecord $record = null, $element = 'div') {
1812
-		return
1813
-			'<' . $element . ' class="fact_' . $tag . '">' .
1814
-			/* I18N: a label/value pair, such as “Occupation: Farmer”. Some languages may need to change the punctuation. */
1815
-			I18N::translate('<span class="label">%1$s:</span> <span class="field" dir="auto">%2$s</span>', self::getLabel($tag, $record), $value) .
1816
-			'</' . $element . '>';
1817
-	}
1801
+    /**
1802
+     * Translate a label/value pair, such as “Occupation: Farmer”
1803
+     *
1804
+     * @param string            $tag
1805
+     * @param string            $value
1806
+     * @param GedcomRecord|null $record
1807
+     * @param string|null       $element
1808
+     *
1809
+     * @return string
1810
+     */
1811
+    public static function getLabelValue($tag, $value, GedcomRecord $record = null, $element = 'div') {
1812
+        return
1813
+            '<' . $element . ' class="fact_' . $tag . '">' .
1814
+            /* I18N: a label/value pair, such as “Occupation: Farmer”. Some languages may need to change the punctuation. */
1815
+            I18N::translate('<span class="label">%1$s:</span> <span class="field" dir="auto">%2$s</span>', self::getLabel($tag, $record), $value) .
1816
+            '</' . $element . '>';
1817
+    }
1818 1818
 
1819
-	/**
1820
-	 * Get a list of facts, for use in the "fact picker" edit control
1821
-	 *
1822
-	 * @return string[]
1823
-	 */
1824
-	public static function getPicklistFacts($fact_type) {
1825
-		switch ($fact_type) {
1826
-		case 'INDI':
1827
-			$tags = array(
1828
-				// Facts, attributes for individuals (no links to FAMs)
1829
-				'RESN', 'NAME', 'SEX', 'BIRT', 'CHR', 'DEAT', 'BURI', 'CREM',
1830
-				'ADOP', 'BAPM', 'BARM', 'BASM', 'BLES', 'CHRA', 'CONF', 'FCOM', 'ORDN',
1831
-				'NATU', 'EMIG', 'IMMI', 'CENS', 'PROB', 'WILL', 'GRAD', 'RETI', 'EVEN',
1832
-				'CAST', 'DSCR', 'EDUC', 'IDNO', 'NATI', 'NCHI', 'NMR',
1833
-				'OCCU', 'PROP', 'RELI', 'RESI', 'SSN', 'TITL', 'FACT',
1834
-				'BAPL', 'CONL', 'ENDL', 'SLGC',
1835
-				'SUBM', 'ASSO', 'ALIA', 'ANCI', 'DESI', 'RFN', 'AFN',
1836
-				'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1837
-				// non standard tags
1838
-				'_BRTM', '_DEG', '_DNA', '_EYEC', '_FNRL', '_HAIR', '_HEIG', '_HNM',
1839
-				'_HOL', '_INTE', '_MDCL', '_MEDC', '_MILI', '_MILT', '_NAME', '_NAMS',
1840
-				'_NLIV', '_NMAR', '_PRMN', '_TODO', '_UID', '_WEIG', '_YART',
1841
-			);
1842
-			break;
1843
-		case 'FAM':
1844
-			$tags = array(
1845
-				// Facts for families, left out HUSB, WIFE & CHIL links
1846
-				'RESN', 'ANUL', 'CENS', 'DIV', 'DIVF', 'ENGA', 'MARB', 'MARC',
1847
-				'MARR', 'MARL', 'MARS', 'RESI', 'EVEN', 'NCHI', 'SUBM', 'SLGS',
1848
-				'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1849
-				// non standard tags
1850
-				'_NMR', 'MARR_CIVIL', 'MARR_RELIGIOUS', 'MARR_PARTNERS', 'MARR_UNKNOWN',
1851
-				'_COML', '_MBON', '_MARI', '_SEPR', '_TODO',
1852
-			);
1853
-		break;
1854
-		case 'SOUR':
1855
-			$tags = array(
1856
-				// Facts for sources
1857
-				'DATA', 'AUTH', 'TITL', 'ABBR', 'PUBL', 'TEXT', 'REPO', 'REFN', 'RIN',
1858
-				'CHAN', 'NOTE', 'SHARED_NOTE', 'OBJE',
1859
-				'RESN',
1860
-			);
1861
-			break;
1862
-		case 'REPO':
1863
-			$tags = array(
1864
-				// Facts for repositories
1865
-				'NAME', 'ADDR', 'PHON', 'EMAIL', 'FAX', 'WWW',
1866
-				'NOTE', 'SHARED_NOTE', 'REFN', 'RIN', 'CHAN',
1867
-				'RESN',
1868
-			);
1869
-			break;
1870
-		case 'PLAC':
1871
-			$tags = array(
1872
-				// Facts for places
1873
-				'FONE', 'ROMN',
1874
-				// non standard tags
1875
-				'_HEB',
1876
-			);
1877
-			break;
1878
-		case 'NAME':
1879
-			$tags = array(
1880
-				// Facts subordinate to NAME
1881
-				'NICK', 'FONE', 'ROMN',
1882
-				// non standard tags
1883
-				'_HEB', '_AKA',
1884
-			);
1885
-			break;
1886
-		default:
1887
-			$tags = array();
1888
-			break;
1889
-		}
1819
+    /**
1820
+     * Get a list of facts, for use in the "fact picker" edit control
1821
+     *
1822
+     * @return string[]
1823
+     */
1824
+    public static function getPicklistFacts($fact_type) {
1825
+        switch ($fact_type) {
1826
+        case 'INDI':
1827
+            $tags = array(
1828
+                // Facts, attributes for individuals (no links to FAMs)
1829
+                'RESN', 'NAME', 'SEX', 'BIRT', 'CHR', 'DEAT', 'BURI', 'CREM',
1830
+                'ADOP', 'BAPM', 'BARM', 'BASM', 'BLES', 'CHRA', 'CONF', 'FCOM', 'ORDN',
1831
+                'NATU', 'EMIG', 'IMMI', 'CENS', 'PROB', 'WILL', 'GRAD', 'RETI', 'EVEN',
1832
+                'CAST', 'DSCR', 'EDUC', 'IDNO', 'NATI', 'NCHI', 'NMR',
1833
+                'OCCU', 'PROP', 'RELI', 'RESI', 'SSN', 'TITL', 'FACT',
1834
+                'BAPL', 'CONL', 'ENDL', 'SLGC',
1835
+                'SUBM', 'ASSO', 'ALIA', 'ANCI', 'DESI', 'RFN', 'AFN',
1836
+                'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1837
+                // non standard tags
1838
+                '_BRTM', '_DEG', '_DNA', '_EYEC', '_FNRL', '_HAIR', '_HEIG', '_HNM',
1839
+                '_HOL', '_INTE', '_MDCL', '_MEDC', '_MILI', '_MILT', '_NAME', '_NAMS',
1840
+                '_NLIV', '_NMAR', '_PRMN', '_TODO', '_UID', '_WEIG', '_YART',
1841
+            );
1842
+            break;
1843
+        case 'FAM':
1844
+            $tags = array(
1845
+                // Facts for families, left out HUSB, WIFE & CHIL links
1846
+                'RESN', 'ANUL', 'CENS', 'DIV', 'DIVF', 'ENGA', 'MARB', 'MARC',
1847
+                'MARR', 'MARL', 'MARS', 'RESI', 'EVEN', 'NCHI', 'SUBM', 'SLGS',
1848
+                'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1849
+                // non standard tags
1850
+                '_NMR', 'MARR_CIVIL', 'MARR_RELIGIOUS', 'MARR_PARTNERS', 'MARR_UNKNOWN',
1851
+                '_COML', '_MBON', '_MARI', '_SEPR', '_TODO',
1852
+            );
1853
+        break;
1854
+        case 'SOUR':
1855
+            $tags = array(
1856
+                // Facts for sources
1857
+                'DATA', 'AUTH', 'TITL', 'ABBR', 'PUBL', 'TEXT', 'REPO', 'REFN', 'RIN',
1858
+                'CHAN', 'NOTE', 'SHARED_NOTE', 'OBJE',
1859
+                'RESN',
1860
+            );
1861
+            break;
1862
+        case 'REPO':
1863
+            $tags = array(
1864
+                // Facts for repositories
1865
+                'NAME', 'ADDR', 'PHON', 'EMAIL', 'FAX', 'WWW',
1866
+                'NOTE', 'SHARED_NOTE', 'REFN', 'RIN', 'CHAN',
1867
+                'RESN',
1868
+            );
1869
+            break;
1870
+        case 'PLAC':
1871
+            $tags = array(
1872
+                // Facts for places
1873
+                'FONE', 'ROMN',
1874
+                // non standard tags
1875
+                '_HEB',
1876
+            );
1877
+            break;
1878
+        case 'NAME':
1879
+            $tags = array(
1880
+                // Facts subordinate to NAME
1881
+                'NICK', 'FONE', 'ROMN',
1882
+                // non standard tags
1883
+                '_HEB', '_AKA',
1884
+            );
1885
+            break;
1886
+        default:
1887
+            $tags = array();
1888
+            break;
1889
+        }
1890 1890
 
1891
-		$facts = array();
1892
-		foreach ($tags as $tag) {
1893
-			$facts[$tag] = self::getLabel($tag, null);
1894
-		}
1895
-		uasort($facts, '\Fisharebest\Webtrees\I18N::strcasecmp');
1891
+        $facts = array();
1892
+        foreach ($tags as $tag) {
1893
+            $facts[$tag] = self::getLabel($tag, null);
1894
+        }
1895
+        uasort($facts, '\Fisharebest\Webtrees\I18N::strcasecmp');
1896 1896
 
1897
-		return $facts;
1898
-	}
1897
+        return $facts;
1898
+    }
1899 1899
 
1900
-	/**
1901
-	 * Translate the value for 1 FILE/2 FORM/3 TYPE
1902
-	 *
1903
-	 * @param string $type
1904
-	 *
1905
-	 * @return string
1906
-	 */
1907
-	public static function getFileFormTypeValue($type) {
1908
-		switch (strtolower($type)) {
1909
-		case 'audio':
1910
-			return /* I18N: Type of media object */ I18N::translate('Audio');
1911
-		case 'book':
1912
-			return /* I18N: Type of media object */ I18N::translate('Book');
1913
-		case 'card':
1914
-			return /* I18N: Type of media object */ I18N::translate('Card');
1915
-		case 'certificate':
1916
-			return /* I18N: Type of media object */ I18N::translate('Certificate');
1917
-		case 'coat':
1918
-			return /* I18N: Type of media object */ I18N::translate('Coat of arms');
1919
-		case 'document':
1920
-			return /* I18N: Type of media object */ I18N::translate('Document');
1921
-		case 'electronic':
1922
-			return /* I18N: Type of media object */ I18N::translate('Electronic');
1923
-		case 'fiche':
1924
-			return /* I18N: Type of media object */ I18N::translate('Microfiche');
1925
-		case 'film':
1926
-			return /* I18N: Type of media object */ I18N::translate('Microfilm');
1927
-		case 'magazine':
1928
-			return /* I18N: Type of media object */ I18N::translate('Magazine');
1929
-		case 'manuscript':
1930
-			return /* I18N: Type of media object */ I18N::translate('Manuscript');
1931
-		case 'map':
1932
-			return /* I18N: Type of media object */ I18N::translate('Map');
1933
-		case 'newspaper':
1934
-			return /* I18N: Type of media object */ I18N::translate('Newspaper');
1935
-		case 'photo':
1936
-			return /* I18N: Type of media object */ I18N::translate('Photo');
1937
-		case 'tombstone':
1938
-			return /* I18N: Type of media object */ I18N::translate('Tombstone');
1939
-		case 'video':
1940
-			return /* I18N: Type of media object */ I18N::translate('Video');
1941
-		case 'painting':
1942
-			return /* I18N: Type of media object */ I18N::translate('Painting');
1943
-		default:
1944
-			return /* I18N: Type of media object */ I18N::translate('Other');
1945
-		}
1946
-	}
1900
+    /**
1901
+     * Translate the value for 1 FILE/2 FORM/3 TYPE
1902
+     *
1903
+     * @param string $type
1904
+     *
1905
+     * @return string
1906
+     */
1907
+    public static function getFileFormTypeValue($type) {
1908
+        switch (strtolower($type)) {
1909
+        case 'audio':
1910
+            return /* I18N: Type of media object */ I18N::translate('Audio');
1911
+        case 'book':
1912
+            return /* I18N: Type of media object */ I18N::translate('Book');
1913
+        case 'card':
1914
+            return /* I18N: Type of media object */ I18N::translate('Card');
1915
+        case 'certificate':
1916
+            return /* I18N: Type of media object */ I18N::translate('Certificate');
1917
+        case 'coat':
1918
+            return /* I18N: Type of media object */ I18N::translate('Coat of arms');
1919
+        case 'document':
1920
+            return /* I18N: Type of media object */ I18N::translate('Document');
1921
+        case 'electronic':
1922
+            return /* I18N: Type of media object */ I18N::translate('Electronic');
1923
+        case 'fiche':
1924
+            return /* I18N: Type of media object */ I18N::translate('Microfiche');
1925
+        case 'film':
1926
+            return /* I18N: Type of media object */ I18N::translate('Microfilm');
1927
+        case 'magazine':
1928
+            return /* I18N: Type of media object */ I18N::translate('Magazine');
1929
+        case 'manuscript':
1930
+            return /* I18N: Type of media object */ I18N::translate('Manuscript');
1931
+        case 'map':
1932
+            return /* I18N: Type of media object */ I18N::translate('Map');
1933
+        case 'newspaper':
1934
+            return /* I18N: Type of media object */ I18N::translate('Newspaper');
1935
+        case 'photo':
1936
+            return /* I18N: Type of media object */ I18N::translate('Photo');
1937
+        case 'tombstone':
1938
+            return /* I18N: Type of media object */ I18N::translate('Tombstone');
1939
+        case 'video':
1940
+            return /* I18N: Type of media object */ I18N::translate('Video');
1941
+        case 'painting':
1942
+            return /* I18N: Type of media object */ I18N::translate('Painting');
1943
+        default:
1944
+            return /* I18N: Type of media object */ I18N::translate('Other');
1945
+        }
1946
+    }
1947 1947
 
1948
-	/**
1949
-	 * A list of all possible values for 1 FILE/2 FORM/3 TYPE
1950
-	 *
1951
-	 * @return string[]
1952
-	 */
1953
-	public static function getFileFormTypes() {
1954
-		$values = array();
1955
-		foreach (self::$OBJE_FILE_FORM_TYPE as $type) {
1956
-			$values[$type] = self::getFileFormTypeValue($type);
1957
-		}
1958
-		uasort($values, '\Fisharebest\Webtrees\I18N::strcasecmp');
1948
+    /**
1949
+     * A list of all possible values for 1 FILE/2 FORM/3 TYPE
1950
+     *
1951
+     * @return string[]
1952
+     */
1953
+    public static function getFileFormTypes() {
1954
+        $values = array();
1955
+        foreach (self::$OBJE_FILE_FORM_TYPE as $type) {
1956
+            $values[$type] = self::getFileFormTypeValue($type);
1957
+        }
1958
+        uasort($values, '\Fisharebest\Webtrees\I18N::strcasecmp');
1959 1959
 
1960
-		return $values;
1961
-	}
1960
+        return $values;
1961
+    }
1962 1962
 
1963
-	/**
1964
-	 * Generate a value for a new _UID field.
1965
-	 * Instead of RFC4122-compatible UUIDs, generate ones that
1966
-	 * are compatible with PAF, Legacy, RootsMagic, etc.
1967
-	 * In these, the string is upper-cased, dashes are removed,
1968
-	 * and a two-byte checksum is added.
1969
-	 *
1970
-	 * @return string
1971
-	 */
1972
-	public static function createUid() {
1973
-		$uid = str_replace('-', '', Uuid::uuid4());
1963
+    /**
1964
+     * Generate a value for a new _UID field.
1965
+     * Instead of RFC4122-compatible UUIDs, generate ones that
1966
+     * are compatible with PAF, Legacy, RootsMagic, etc.
1967
+     * In these, the string is upper-cased, dashes are removed,
1968
+     * and a two-byte checksum is added.
1969
+     *
1970
+     * @return string
1971
+     */
1972
+    public static function createUid() {
1973
+        $uid = str_replace('-', '', Uuid::uuid4());
1974 1974
 
1975
-		$checksum_a = 0; // a sum of the bytes
1976
-		$checksum_b = 0; // a sum of the incremental values of $checksum_a
1975
+        $checksum_a = 0; // a sum of the bytes
1976
+        $checksum_b = 0; // a sum of the incremental values of $checksum_a
1977 1977
 
1978
-		// Compute checksums
1979
-		for ($i = 0; $i < 32; $i += 2) {
1980
-			$checksum_a += hexdec(substr($uid, $i, 2));
1981
-			$checksum_b += $checksum_a & 0xff;
1982
-		}
1978
+        // Compute checksums
1979
+        for ($i = 0; $i < 32; $i += 2) {
1980
+            $checksum_a += hexdec(substr($uid, $i, 2));
1981
+            $checksum_b += $checksum_a & 0xff;
1982
+        }
1983 1983
 
1984
-		return strtoupper($uid . substr(dechex($checksum_a), -2) . substr(dechex($checksum_b), -2));
1985
-	}
1984
+        return strtoupper($uid . substr(dechex($checksum_a), -2) . substr(dechex($checksum_b), -2));
1985
+    }
1986 1986
 }
Please login to merge, or discard this patch.
Switch Indentation   +1780 added lines, -1780 removed lines patch added patch discarded remove patch
@@ -112,1689 +112,1689 @@  discard block
 block discarded – undo
112 112
 		}
113 113
 
114 114
 		switch ($tag) {
115
-		case 'ABBR':
116
-			return
117
-				/* I18N: gedcom tag ABBR */
118
-				I18N::translate('Abbreviation');
119
-		case 'ADDR':
120
-			return
121
-				/* I18N: gedcom tag ADDR */
122
-				I18N::translate('Address');
123
-		case 'ADR1':
124
-			return I18N::translate('Address line 1');
125
-		case 'ADR2':
126
-			return I18N::translate('Address line 2');
127
-		case 'ADOP':
128
-			return
129
-				/* I18N: gedcom tag ADOP */
130
-				I18N::translate('Adoption');
131
-		case 'ADOP:DATE':
132
-			return I18N::translate('Date of adoption');
133
-		case 'ADOP:PLAC':
134
-			return I18N::translate('Place of adoption');
135
-		case 'AFN':
136
-			return
137
-				/* I18N: gedcom tag AFN */
138
-				I18N::translate('Ancestral file number');
139
-		case 'AGE':
140
-			return
141
-				/* I18N: gedcom tag AGE */
142
-				I18N::translate('Age');
143
-		case 'AGNC':
144
-			return
145
-				/* I18N: gedcom tag AGNC */
146
-				I18N::translate('Agency');
147
-		case 'ALIA':
148
-			return
149
-				/* I18N: gedcom tag ALIA */
150
-				I18N::translate('Alias');
151
-		case 'ANCE':
152
-			return
153
-				/* I18N: gedcom tag ANCE */
154
-				I18N::translate('Generations of ancestors');
155
-		case 'ANCI':
156
-			return
157
-				/* I18N: gedcom tag ANCI */
158
-				I18N::translate('Ancestors interest');
159
-		case 'ANUL':
160
-			return
161
-				/* I18N: gedcom tag ANUL */
162
-				I18N::translate('Annulment');
163
-		case 'ASSO':
164
-			return
165
-				/* I18N: gedcom tag ASSO */
166
-				I18N::translate('Associate'); /* see also _ASSO */
167
-		case 'AUTH':
168
-			return
169
-				/* I18N: gedcom tag AUTH */
170
-				I18N::translate('Author');
171
-		case 'BAPL':
172
-			return
173
-				/* I18N: gedcom tag BAPL. LDS = Church of Latter Day Saints. */
174
-				I18N::translate('LDS baptism');
175
-		case 'BAPL:DATE':
176
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS baptism');
177
-		case 'BAPL:PLAC':
178
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS baptism');
179
-		case 'BAPM':
180
-			return
181
-				/* I18N: gedcom tag BAPM */
182
-				I18N::translate('Baptism');
183
-		case 'BAPM:DATE':
184
-			return I18N::translate('Date of baptism');
185
-		case 'BAPM:PLAC':
186
-			return I18N::translate('Place of baptism');
187
-		case 'BARM':
188
-			return
189
-				/* I18N: gedcom tag BARM */
190
-				I18N::translate('Bar mitzvah');
191
-		case 'BARM:DATE':
192
-			return I18N::translate('Date of bar mitzvah');
193
-		case 'BARM:PLAC':
194
-			return I18N::translate('Place of bar mitzvah');
195
-		case 'BASM':
196
-			return
197
-				/* I18N: gedcom tag BASM */
198
-				I18N::translate('Bat mitzvah');
199
-		case 'BASM:DATE':
200
-			return I18N::translate('Date of bat mitzvah');
201
-		case 'BASM:PLAC':
202
-			return I18N::translate('Place of bat mitzvah');
203
-		case 'BIRT':
204
-			return
205
-				/* I18N: gedcom tag BIRT */
206
-				I18N::translate('Birth');
207
-		case 'BIRT:DATE':
208
-			return I18N::translate('Date of birth');
209
-		case 'BIRT:PLAC':
210
-			return I18N::translate('Place of birth');
211
-		case 'BLES':
212
-			return
213
-				/* I18N: gedcom tag BLES */
214
-				I18N::translate('Blessing');
215
-		case 'BLES:DATE':
216
-			return I18N::translate('Date of blessing');
217
-		case 'BLES:PLAC':
218
-			return I18N::translate('Place of blessing');
219
-		case 'BLOB':
220
-			return
221
-				/* I18N: gedcom tag BLOB */
222
-				I18N::translate('Binary data object');
223
-		case 'BURI':
224
-			return
225
-				/* I18N: gedcom tag BURI */
226
-				I18N::translate('Burial');
227
-		case 'BURI:DATE':
228
-			return I18N::translate('Date of burial');
229
-		case 'BURI:PLAC':
230
-			return I18N::translate('Place of burial');
231
-		case 'CALN':
232
-			return
233
-				/* I18N: gedcom tag CALN */
234
-				I18N::translate('Call number');
235
-		case 'CAST':
236
-			return
237
-				/* I18N: gedcom tag CAST */
238
-				I18N::translate('Caste');
239
-		case 'CAUS':
240
-			return
241
-				/* I18N: gedcom tag CAUS */
242
-				I18N::translate('Cause');
243
-		case 'CEME':
244
-			return
245
-				/* I18N: gedcom tag CEME */
246
-				I18N::translate('Cemetery');
247
-		case 'CENS':
248
-			return
249
-				/* I18N: gedcom tag CENS */
250
-				I18N::translate('Census');
251
-		case 'CENS:DATE':
252
-			return I18N::translate('Census date');
253
-		case 'CENS:PLAC':
254
-			return I18N::translate('Census place');
255
-		case 'CHAN':
256
-			return
257
-				/* I18N: gedcom tag CHAN */
258
-				I18N::translate('Last change');
259
-		case 'CHAN:DATE':
260
-			return
261
-				/* I18N: gedcom tag CHAN:DATE */
262
-				I18N::translate('Date of last change');
263
-		case 'CHAN:_WT_USER':
264
-			return
265
-				/* I18N: gedcom tag CHAN:_WT_USER */
266
-				I18N::translate('Author of last change');
267
-		case 'CHAR':
268
-			return
269
-				/* I18N: gedcom tag CHAR */
270
-				I18N::translate('Character set');
271
-		case 'CHIL':
272
-			return
273
-				/* I18N: gedcom tag CHIL */
274
-				I18N::translate('Child');
275
-		case 'CHR':
276
-			return
277
-				/* I18N: gedcom tag CHR */
278
-				I18N::translate('Christening');
279
-		case 'CHR:DATE':
280
-			return I18N::translate('Date of christening');
281
-		case 'CHR:PLAC':
282
-			return I18N::translate('Place of christening');
283
-		case 'CHRA':
284
-			return
285
-				/* I18N: gedcom tag CHRA */
286
-				I18N::translate('Adult christening');
287
-		case 'CITN':
288
-			return
289
-				/* I18N: gedcom tag CITN */
290
-				I18N::translate('Citizenship');
291
-		case 'CITY':
292
-			return
293
-				/* I18N: gedcom tag CITY */
294
-				I18N::translate('City');
295
-		case 'COMM':
296
-			return
297
-				/* I18N: gedcom tag COMM */
298
-				I18N::translate('Comment');
299
-		case 'CONC':
300
-			return
301
-				/* I18N: gedcom tag CONC */
302
-				I18N::translate('Concatenation');
303
-		case 'CONT':
304
-			return
305
-				/* I18N: gedcom tag CONT */
306
-				I18N::translate('Continued');
307
-		case 'CONF':
308
-			return
309
-				/* I18N: gedcom tag CONF */
310
-				I18N::translate('Confirmation');
311
-		case 'CONF:DATE':
312
-			return I18N::translate('Date of confirmation');
313
-		case 'CONF:PLAC':
314
-			return I18N::translate('Place of confirmation');
315
-		case 'CONL':
316
-			return
317
-				/* I18N: gedcom tag CONL. LDS = Church of Latter Day Saints. */
318
-				I18N::translate('LDS confirmation');
319
-		case 'COPR':
320
-			return
321
-				/* I18N: gedcom tag COPR */
322
-				I18N::translate('Copyright');
323
-		case 'CORP':
324
-			return
325
-				/* I18N: gedcom tag CORP */
326
-				I18N::translate('Corporation');
327
-		case 'CREM':
328
-			return
329
-				/* I18N: gedcom tag CREM */
330
-				I18N::translate('Cremation');
331
-		case 'CREM:DATE':
332
-			return I18N::translate('Date of cremation');
333
-		case 'CREM:PLAC':
334
-			return I18N::translate('Place of cremation');
335
-		case 'CTRY':
336
-			return
337
-				/* I18N: gedcom tag CTRY */
338
-				I18N::translate('Country');
339
-		case 'DATA':
340
-			return
341
-				/* I18N: gedcom tag DATA */
342
-				I18N::translate('Data');
343
-		case 'DATA:DATE':
344
-			return I18N::translate('Date of entry in original source');
345
-		case 'DATE':
346
-			return
347
-				/* I18N: gedcom tag DATE */
348
-				I18N::translate('Date');
349
-		case 'DEAT':
350
-			return
351
-				/* I18N: gedcom tag DEAT */
352
-				I18N::translate('Death');
353
-		case 'DEAT:CAUS':
354
-			return I18N::translate('Cause of death');
355
-		case 'DEAT:DATE':
356
-			return I18N::translate('Date of death');
357
-		case 'DEAT:PLAC':
358
-			return I18N::translate('Place of death');
359
-		case 'DESC':
360
-			return
361
-				/* I18N: gedcom tag DESC */
362
-				I18N::translate('Descendants');
363
-		case 'DESI':
364
-			return
365
-				/* I18N: gedcom tag DESI */
366
-				I18N::translate('Descendants interest');
367
-		case 'DEST':
368
-			return
369
-				/* I18N: gedcom tag DEST */
370
-				I18N::translate('Destination');
371
-		case 'DIV':
372
-			return
373
-				/* I18N: gedcom tag DIV */
374
-				I18N::translate('Divorce');
375
-		case 'DIVF':
376
-			return
377
-				/* I18N: gedcom tag DIVF */
378
-				I18N::translate('Divorce filed');
379
-		case 'DSCR':
380
-			return
381
-				/* I18N: gedcom tag DSCR */
382
-				I18N::translate('Description');
383
-		case 'EDUC':
384
-			return
385
-				/* I18N: gedcom tag EDUC */
386
-				I18N::translate('Education');
387
-		case 'EDUC:AGNC':
388
-			return I18N::translate('School or college');
389
-		case 'EMAI':
390
-			return
391
-				/* I18N: gedcom tag EMAI */
392
-				I18N::translate('Email address');
393
-		case 'EMAIL':
394
-			return
395
-				/* I18N: gedcom tag EMAIL */
396
-				I18N::translate('Email address');
397
-		case 'EMAL':
398
-			return
399
-				/* I18N: gedcom tag EMAL */
400
-				I18N::translate('Email address');
401
-		case 'EMIG':
402
-			return
403
-				/* I18N: gedcom tag EMIG */
404
-				I18N::translate('Emigration');
405
-		case 'EMIG:DATE':
406
-			return I18N::translate('Date of emigration');
407
-		case 'EMIG:PLAC':
408
-			return I18N::translate('Place of emigration');
409
-		case 'ENDL':
410
-			return
411
-				/* I18N: gedcom tag ENDL. LDS = Church of Latter Day Saints. */
412
-				I18N::translate('LDS endowment');
413
-		case 'ENDL:DATE':
414
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS endowment');
415
-		case 'ENDL:PLAC':
416
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS endowment');
417
-		case 'ENGA':
418
-			return
419
-				/* I18N: gedcom tag ENGA */
420
-				I18N::translate('Engagement');
421
-		case 'ENGA:DATE':
422
-			return I18N::translate('Date of engagement');
423
-		case 'ENGA:PLAC':
424
-			return I18N::translate('Place of engagement');
425
-		case 'EVEN':
426
-			return
427
-				/* I18N: gedcom tag EVEN */
428
-				I18N::translate('Event');
429
-		case 'EVEN:DATE':
430
-			return I18N::translate('Date of event');
431
-		case 'EVEN:PLAC':
432
-			return I18N::translate('Place of event');
433
-		case 'EVEN:TYPE':
434
-			return I18N::translate('Type of event');
435
-		case 'FACT':
436
-			return
437
-				/* I18N: gedcom tag FACT */
438
-				I18N::translate('Fact');
439
-		case 'FACT:TYPE':
440
-			return I18N::translate('Type of fact');
441
-		case 'FAM':
442
-			return
443
-				/* I18N: gedcom tag FAM */
444
-				I18N::translate('Family');
445
-		case 'FAMC':
446
-			return
447
-				/* I18N: gedcom tag FAMC */
448
-				I18N::translate('Family as a child');
449
-		case 'FAMF':
450
-			return
451
-				/* I18N: gedcom tag FAMF */
452
-				I18N::translate('Family file');
453
-		case 'FAMS':
454
-			return
455
-				/* I18N: gedcom tag FAMS */
456
-				I18N::translate('Family as a spouse');
457
-		case 'FAMS:CENS:DATE':
458
-			return I18N::translate('Spouse census date');
459
-		case 'FAMS:CENS:PLAC':
460
-			return I18N::translate('Spouse census place');
461
-		case 'FAMS:DIV:DATE':
462
-			return I18N::translate('Date of divorce');
463
-		case 'FAMS:MARR:DATE':
464
-			return I18N::translate('Date of marriage');
465
-		case 'FAMS:MARR:PLAC':
466
-			return I18N::translate('Place of marriage');
467
-		case 'FAMS:NOTE':
468
-			return I18N::translate('Spouse note');
469
-		case 'FAMS:SLGS:DATE':
470
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS spouse sealing');
471
-		case 'FAMS:SLGS:PLAC':
472
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS spouse sealing');
473
-		case 'FAX':
474
-			return
475
-				/* I18N: gedcom tag FAX */
476
-				I18N::translate('Fax');
477
-		case 'FCOM':
478
-			return
479
-				/* I18N: gedcom tag FCOM */
480
-				I18N::translate('First communion');
481
-		case 'FCOM:DATE':
482
-			return I18N::translate('Date of first communion');
483
-		case 'FCOM:PLAC':
484
-			return I18N::translate('Place of first communion');
485
-		case 'FILE':
486
-			return
487
-				/* I18N: gedcom tag FILE */
488
-				I18N::translate('Filename');
489
-		case 'FONE':
490
-			return
491
-				/* I18N: gedcom tag FONE */
492
-				I18N::translate('Phonetic');
493
-		case 'FORM':
494
-			return
495
-				/* I18N: gedcom tag FORM */
496
-				I18N::translate('Format');
497
-		case 'GEDC':
498
-			return
499
-				/* I18N: gedcom tag GEDC */
500
-				I18N::translate('GEDCOM file');
501
-		case 'GIVN':
502
-			return
503
-				/* I18N: gedcom tag GIVN */
504
-				I18N::translate('Given names');
505
-		case 'GRAD':
506
-			return
507
-				/* I18N: gedcom tag GRAD */
508
-				I18N::translate('Graduation');
509
-		case 'HEAD':
510
-			return
511
-				/* I18N: gedcom tag HEAD */
512
-				I18N::translate('Header');
513
-		case 'HUSB':
514
-			return
515
-				/* I18N: gedcom tag HUSB */
516
-				I18N::translate('Husband');
517
-		case 'IDNO':
518
-			return
519
-				/* I18N: gedcom tag IDNO */
520
-				I18N::translate('Identification number');
521
-		case 'IMMI':
522
-			return
523
-				/* I18N: gedcom tag IMMI */
524
-				I18N::translate('Immigration');
525
-		case 'IMMI:DATE':
526
-			return I18N::translate('Date of immigration');
527
-		case 'IMMI:PLAC':
528
-			return I18N::translate('Place of immigration');
529
-		case 'INDI':
530
-			return
531
-				/* I18N: gedcom tag INDI */
532
-				I18N::translate('Individual');
533
-		case 'INFL':
534
-			return
535
-				/* I18N: gedcom tag INFL */
536
-				I18N::translate('Infant');
537
-		case 'LANG':
538
-			return
539
-				/* I18N: gedcom tag LANG */
540
-				I18N::translate('Language');
541
-		case 'LATI':
542
-			return
543
-				/* I18N: gedcom tag LATI */
544
-				I18N::translate('Latitude');
545
-		case 'LEGA':
546
-			return
547
-				/* I18N: gedcom tag LEGA */
548
-				I18N::translate('Legatee');
549
-		case 'LONG':
550
-			return
551
-				/* I18N: gedcom tag LONG */
552
-				I18N::translate('Longitude');
553
-		case 'MAP':
554
-			return
555
-				/* I18N: gedcom tag MAP */
556
-				I18N::translate('Map');
557
-		case 'MARB':
558
-			return
559
-				/* I18N: gedcom tag MARB */
560
-				I18N::translate('Marriage banns');
561
-		case 'MARB:DATE':
562
-			return I18N::translate('Date of marriage banns');
563
-		case 'MARB:PLAC':
564
-			return I18N::translate('Place of marriage banns');
565
-		case 'MARC':
566
-			return
567
-				/* I18N: gedcom tag MARC */
568
-				I18N::translate('Marriage contract');
569
-		case 'MARL':
570
-			return
571
-				/* I18N: gedcom tag MARL */
572
-				I18N::translate('Marriage license');
573
-		case 'MARR':
574
-			return
575
-				/* I18N: gedcom tag MARR */
576
-				I18N::translate('Marriage');
577
-		case 'MARR:DATE':
578
-			return I18N::translate('Date of marriage');
579
-		case 'MARR:PLAC':
580
-			return I18N::translate('Place of marriage');
581
-		case 'MARR_CIVIL':
582
-			return I18N::translate('Civil marriage');
583
-		case 'MARR_PARTNERS':
584
-			return I18N::translate('Registered partnership');
585
-		case 'MARR_RELIGIOUS':
586
-			return I18N::translate('Religious marriage');
587
-		case 'MARR_UNKNOWN':
588
-			return I18N::translate('Marriage type unknown');
589
-		case 'MARS':
590
-			return
591
-				/* I18N: gedcom tag MARS */
592
-				I18N::translate('Marriage settlement');
593
-		case 'MEDI':
594
-			return
595
-				/* I18N: gedcom tag MEDI */
596
-				I18N::translate('Media type');
597
-		case 'NAME':
598
-			if ($record instanceof Repository) {
599
-				return
600
-					/* I18N: gedcom tag REPO:NAME */
601
-					I18N::translateContext('Repository', 'Name');
602
-			} else {
603
-				return
604
-					/* I18N: gedcom tag NAME */
605
-					I18N::translate('Name');
606
-			}
607
-		case 'NAME:FONE':
608
-			return I18N::translate('Phonetic name');
609
-		case 'NAME:_HEB':
610
-			return I18N::translate('Name in Hebrew');
611
-		case 'NATI':
612
-			return
613
-				/* I18N: gedcom tag NATI */
614
-				I18N::translate('Nationality');
615
-		case 'NATU':
616
-			return
617
-				/* I18N: gedcom tag NATU */
618
-				I18N::translate('Naturalization');
619
-		case 'NATU:DATE':
620
-			return I18N::translate('Date of naturalization');
621
-		case 'NATU:PLAC':
622
-			return I18N::translate('Place of naturalization');
623
-		case 'NCHI':
624
-			return
625
-				/* I18N: gedcom tag NCHI */
626
-				I18N::translate('Number of children');
627
-		case 'NICK':
628
-			return
629
-				/* I18N: gedcom tag NICK */
630
-				I18N::translate('Nickname');
631
-		case 'NMR':
632
-			return
633
-				/* I18N: gedcom tag NMR */
634
-				I18N::translate('Number of marriages');
635
-		case 'NOTE':
636
-			return
637
-				/* I18N: gedcom tag NOTE */
638
-				I18N::translate('Note');
639
-		case 'NPFX':
640
-			return
641
-				/* I18N: gedcom tag NPFX */
642
-				I18N::translate('Name prefix');
643
-		case 'NSFX':
644
-			return
645
-				/* I18N: gedcom tag NSFX */
646
-				I18N::translate('Name suffix');
647
-		case 'OBJE':
648
-			return
649
-				/* I18N: gedcom tag OBJE */
650
-				I18N::translate('Media object');
651
-		case 'OCCU':
652
-			return
653
-				/* I18N: gedcom tag OCCU */
654
-				I18N::translate('Occupation');
655
-		case 'OCCU:AGNC':
656
-			return I18N::translate('Employer');
657
-		case 'ORDI':
658
-			return
659
-				/* I18N: gedcom tag ORDI */
660
-				I18N::translate('Ordinance');
661
-		case 'ORDN':
662
-			return
663
-				/* I18N: gedcom tag ORDN */
664
-				I18N::translate('Ordination');
665
-		case 'ORDN:AGNC':
666
-			return I18N::translate('Religious institution');
667
-		case 'ORDN:DATE':
668
-			return I18N::translate('Date of ordination');
669
-		case 'ORDN:PLAC':
670
-			return I18N::translate('Place of ordination');
671
-		case 'PAGE':
672
-			return
673
-				/* I18N: gedcom tag PAGE */
674
-				I18N::translate('Citation details');
675
-		case 'PEDI':
676
-			return
677
-				/* I18N: gedcom tag PEDI */
678
-				I18N::translate('Relationship to parents');
679
-		case 'PHON':
680
-			return
681
-				/* I18N: gedcom tag PHON */
682
-				I18N::translate('Phone');
683
-		case 'PLAC':
684
-			return
685
-				/* I18N: gedcom tag PLAC */
686
-				I18N::translate('Place');
687
-		case 'PLAC:FONE':
688
-			return I18N::translate('Phonetic place');
689
-		case 'PLAC:ROMN':
690
-			return I18N::translate('Romanized place');
691
-		case 'PLAC:_HEB':
692
-			return I18N::translate('Place in Hebrew');
693
-		case 'POST':
694
-			return
695
-				/* I18N: gedcom tag POST */
696
-				I18N::translate('Postal code');
697
-		case 'PROB':
698
-			return
699
-				/* I18N: gedcom tag PROB */
700
-				I18N::translate('Probate');
701
-		case 'PROP':
702
-			return
703
-				/* I18N: gedcom tag PROP */
704
-				I18N::translate('Property');
705
-		case 'PUBL':
706
-			return
707
-				/* I18N: gedcom tag PUBL */
708
-				I18N::translate('Publication');
709
-		case 'QUAY':
710
-			return
711
-				/* I18N: gedcom tag QUAY */
712
-				I18N::translate('Quality of data');
713
-		case 'REFN':
714
-			return
715
-				/* I18N: gedcom tag REFN */
716
-				I18N::translate('Reference number');
717
-		case 'RELA':
718
-			return
719
-				/* I18N: gedcom tag RELA */
720
-				I18N::translate('Relationship');
721
-		case 'RELI':
722
-			return
723
-				/* I18N: gedcom tag RELI */
724
-				I18N::translate('Religion');
725
-		case 'REPO':
726
-			return
727
-				/* I18N: gedcom tag REPO */
728
-				I18N::translate('Repository');
729
-		case 'RESI':
730
-			return
731
-				/* I18N: gedcom tag RESI */
732
-				I18N::translate('Residence');
733
-		case 'RESI:DATE':
734
-			return I18N::translate('Date of residence');
735
-		case 'RESI:PLAC':
736
-			return I18N::translate('Place of residence');
737
-		case 'RESN':
738
-			return
739
-				/* I18N: gedcom tag RESN */
740
-				I18N::translate('Restriction');
741
-		case 'RETI':
742
-			return
743
-				/* I18N: gedcom tag RETI */
744
-				I18N::translate('Retirement');
745
-		case 'RETI:AGNC':
746
-			return I18N::translate('Employer');
747
-		case 'RFN':
748
-			return
749
-				/* I18N: gedcom tag RFN */
750
-				I18N::translate('Record file number');
751
-		case 'RIN':
752
-			return
753
-				/* I18N: gedcom tag RIN */
754
-				I18N::translate('Record ID number');
755
-		case 'ROLE':
756
-			return
757
-				/* I18N: gedcom tag ROLE */
758
-				I18N::translate('Role');
759
-		case 'ROMN':
760
-			return
761
-				/* I18N: gedcom tag ROMN */
762
-				I18N::translate('Romanized');
763
-		case 'SERV':
764
-			return
765
-				/* I18N: gedcom tag SERV */
766
-				I18N::translate('Remote server');
767
-		case 'SEX':
768
-			return
769
-				/* I18N: gedcom tag SEX */
770
-				I18N::translate('Gender');
771
-		case 'SHARED_NOTE':
772
-			return I18N::translate('Shared note');
773
-		case 'SLGC':
774
-			return
775
-				/* I18N: gedcom tag SLGC. LDS = Church of Latter Day Saints. */
776
-				I18N::translate('LDS child sealing');
777
-		case 'SLGC:DATE':
778
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS child sealing');
779
-		case 'SLGC:PLAC':
780
-			return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS child sealing');
781
-		case 'SLGS':
782
-			return
783
-				/* I18N: gedcom tag SLGS. LDS = Church of Latter Day Saints. */
784
-				I18N::translate('LDS spouse sealing');
785
-		case 'SOUR':
786
-			return
787
-				/* I18N: gedcom tag SOUR */
788
-				I18N::translate('Source');
789
-		case 'SPFX':
790
-			return
791
-				/* I18N: gedcom tag SPFX */
792
-				I18N::translate('Surname prefix');
793
-		case 'SSN':
794
-			return
795
-				/* I18N: gedcom tag SSN */
796
-				I18N::translate('Social security number');
797
-		case 'STAE':
798
-			return
799
-				/* I18N: gedcom tag STAE */
800
-				I18N::translate('State');
801
-		case 'STAT':
802
-			return
803
-				/* I18N: gedcom tag STAT */
804
-				I18N::translate('Status');
805
-		case 'STAT:DATE':
806
-			return I18N::translate('Status change date');
807
-		case 'SUBM':
808
-			return
809
-				/* I18N: gedcom tag SUBM */
810
-				I18N::translate('Submitter');
811
-		case 'SUBN':
812
-			return
813
-				/* I18N: gedcom tag SUBN */
814
-				I18N::translate('Submission');
815
-		case 'SURN':
816
-			return
817
-				/* I18N: gedcom tag SURN */
818
-				I18N::translate('Surname');
819
-		case 'TEMP':
820
-			return
821
-				/* I18N: gedcom tag TEMP */
822
-				I18N::translate('Temple');
823
-		case 'TEXT':
824
-			return
825
-				/* I18N: gedcom tag TEXT */
826
-				I18N::translate('Text');
827
-		case 'TIME':
828
-			return
829
-				/* I18N: gedcom tag TIME */
830
-				I18N::translate('Time');
831
-		case 'TITL':
832
-			return
833
-				/* I18N: gedcom tag TITL */
834
-				I18N::translate('Title');
835
-		case 'TITL:FONE':
836
-			return I18N::translate('Phonetic title');
837
-		case 'TITL:ROMN':
838
-			return I18N::translate('Romanized title');
839
-		case 'TITL:_HEB':
840
-			return I18N::translate('Title in Hebrew');
841
-		case 'TRLR':
842
-			return
843
-				/* I18N: gedcom tag TRLR */
844
-				I18N::translate('Trailer');
845
-		case 'TYPE':
846
-			return
847
-				/* I18N: gedcom tag TYPE */
848
-				I18N::translate('Type');
849
-		case 'URL':
850
-			return
851
-				/* I18N: gedcom tag URL (A web address / URL) */
852
-				I18N::translate('URL');
853
-		case 'VERS':
854
-			return
855
-				/* I18N: gedcom tag VERS */
856
-				I18N::translate('Version');
857
-		case 'WIFE':
858
-			return
859
-				/* I18N: gedcom tag WIFE */
860
-				I18N::translate('Wife');
861
-		case 'WILL':
862
-			return
863
-				/* I18N: gedcom tag WILL */
864
-				I18N::translate('Will');
865
-		case 'WWW':
866
-			return
867
-				/* I18N: gedcom tag WWW (A web address / URL) */
868
-				I18N::translate('URL');
869
-		case '_ADOP_CHIL':
870
-			switch ($sex) {
871
-			case 'M':
872
-				return I18N::translate('Adoption of a son');
873
-			case 'F':
874
-				return I18N::translate('Adoption of a daughter');
875
-			default:
876
-				return I18N::translate('Adoption of a child');
877
-			}
878
-		case '_ADOP_GCHI':
879
-			switch ($sex) {
880
-			case 'M':
881
-				return I18N::translate('Adoption of a grandson');
882
-			case 'F':
883
-				return I18N::translate('Adoption of a granddaughter');
884
-			default:
885
-				return I18N::translate('Adoption of a grandchild');
886
-			}
887
-		case '_ADOP_GCH1':
888
-			switch ($sex) {
889
-			case 'M':
890
-				return I18N::translateContext('daughter’s son', 'Adoption of a grandson');
891
-			case 'F':
892
-				return I18N::translateContext('daughter’s daughter', 'Adoption of a granddaughter');
893
-			default:
894
-				return I18N::translate('Adoption of a grandchild');
895
-			}
896
-		case '_ADOP_GCH2':
897
-			switch ($sex) {
898
-			case 'M':
899
-				return I18N::translateContext('son’s son', 'Adoption of a grandson');
900
-			case 'F':
901
-				return I18N::translateContext('son’s daughter', 'Adoption of a granddaughter');
902
-			default:
903
-				return I18N::translate('Adoption of a grandchild');
904
-			}
905
-		case '_ADOP_HSIB':
906
-			switch ($sex) {
907
-			case 'M':
908
-				return I18N::translate('Adoption of a half-brother');
909
-			case 'F':
910
-				return I18N::translate('Adoption of a half-sister');
911
-			default:
912
-				return I18N::translate('Adoption of a half-sibling');
913
-			}
914
-		case '_ADOP_SIBL':
915
-			switch ($sex) {
916
-			case 'M':
917
-				return I18N::translate('Adoption of a brother');
918
-			case 'F':
919
-				return I18N::translate('Adoption of a sister');
920
-			default:
921
-				return I18N::translate('Adoption of a sibling');
922
-			}
923
-		case '_ADPF':
924
-			switch ($sex) {
925
-			case 'M':
926
-				return
927
-					/* I18N: gedcom tag _ADPF */
928
-					I18N::translateContext('MALE', 'Adopted by father');
929
-			case 'F':
930
-				return
931
-					/* I18N: gedcom tag _ADPF */
932
-					I18N::translateContext('FEMALE', 'Adopted by father');
933
-			default:
934
-				return
935
-					/* I18N: gedcom tag _ADPF */
936
-					I18N::translate('Adopted by father');
937
-			}
938
-		case '_ADPM':
939
-			switch ($sex) {
940
-			case 'M':
941
-				return
942
-					/* I18N: gedcom tag _ADPM */
943
-					I18N::translateContext('MALE', 'Adopted by mother');
944
-			case 'F':
945
-				return
946
-					/* I18N: gedcom tag _ADPM */
947
-					I18N::translateContext('FEMALE', 'Adopted by mother');
948
-			default:
949
-				return
950
-					/* I18N: gedcom tag _ADPM */
951
-					I18N::translate('Adopted by mother');
952
-			}
953
-		case '_AKA':
954
-		case '_AKAN':
955
-			switch ($sex) {
956
-			case 'M':
957
-				return
958
-					/* I18N: gedcom tag _AKA */
959
-					I18N::translateContext('MALE', 'Also known as');
960
-			case 'F':
961
-				return
962
-					/* I18N: gedcom tag _AKA */
963
-					I18N::translateContext('FEMALE', 'Also known as');
964
-			default:
965
-				return
966
-					/* I18N: gedcom tag _AKA */
967
-					I18N::translate('Also known as');
968
-			}
969
-		case '_ASSO':
970
-			return
971
-				/* I18N: gedcom tag _ASSO */
972
-				I18N::translate('Associate'); /* see also ASSO */
973
-		case '_BAPM_CHIL':
974
-			switch ($sex) {
975
-			case 'M':
976
-				return I18N::translate('Baptism of a son');
977
-			case 'F':
978
-				return I18N::translate('Baptism of a daughter');
979
-			default:
980
-				return I18N::translate('Baptism of a child');
981
-			}
982
-		case '_BAPM_GCHI':
983
-			switch ($sex) {
984
-			case 'M':
985
-				return I18N::translate('Baptism of a grandson');
986
-			case 'F':
987
-				return I18N::translate('Baptism of a granddaughter');
988
-			default:
989
-				return I18N::translate('Baptism of a grandchild');
990
-			}
991
-		case '_BAPM_GCH1':
992
-			switch ($sex) {
993
-			case 'M':
994
-				return I18N::translateContext('daughter’s son', 'Baptism of a grandson');
995
-			case 'F':
996
-				return I18N::translateContext('daughter’s daughter', 'Baptism of a granddaughter');
997
-			default:
998
-				return I18N::translate('Baptism of a grandchild');
999
-			}
1000
-		case '_BAPM_GCH2':
1001
-			switch ($sex) {
1002
-			case 'M':
1003
-				return I18N::translateContext('son’s son', 'Baptism of a grandson');
1004
-			case 'F':
1005
-				return I18N::translateContext('son’s daughter', 'Baptism of a granddaughter');
1006
-			default:
1007
-				return I18N::translate('Baptism of a grandchild');
1008
-			}
1009
-		case '_BAPM_HSIB':
1010
-			switch ($sex) {
1011
-			case 'M':
1012
-				return I18N::translate('Baptism of a half-brother');
1013
-			case 'F':
1014
-				return I18N::translate('Baptism of a half-sister');
1015
-			default:
1016
-				return I18N::translate('Baptism of a half-sibling');
1017
-			}
1018
-		case '_BAPM_SIBL':
1019
-			switch ($sex) {
1020
-			case 'M':
1021
-				return I18N::translate('Baptism of a brother');
1022
-			case 'F':
1023
-				return I18N::translate('Baptism of a sister');
1024
-			default:
1025
-				return I18N::translate('Baptism of a sibling');
1026
-			}
1027
-		case '_BIBL':
1028
-			return
1029
-				/* I18N: gedcom tag _BIBL */
1030
-				I18N::translate('Bibliography');
1031
-		case '_BIRT_CHIL':
1032
-			switch ($sex) {
1033
-			case 'M':
1034
-				return I18N::translate('Birth of a son');
1035
-			case 'F':
1036
-				return I18N::translate('Birth of a daughter');
1037
-			default:
1038
-				return I18N::translate('Birth of a child');
1039
-			}
1040
-		case '_BIRT_GCHI':
1041
-			switch ($sex) {
1042
-			case 'M':
1043
-				return I18N::translate('Birth of a grandson');
1044
-			case 'F':
1045
-				return I18N::translate('Birth of a granddaughter');
1046
-			default:
1047
-				return I18N::translate('Birth of a grandchild');
1048
-			}
1049
-		case '_BIRT_GCH1':
1050
-			switch ($sex) {
1051
-			case 'M':
1052
-				return I18N::translateContext('daughter’s son', 'Birth of a grandson');
1053
-			case 'F':
1054
-				return I18N::translateContext('daughter’s daughter', 'Birth of a granddaughter');
1055
-			default:
1056
-				return I18N::translate('Birth of a grandchild');
1057
-			}
1058
-		case '_BIRT_GCH2':
1059
-			switch ($sex) {
1060
-			case 'M':
1061
-				return I18N::translateContext('son’s son', 'Birth of a grandson');
1062
-			case 'F':
1063
-				return I18N::translateContext('son’s daughter', 'Birth of a granddaughter');
1064
-			default:
1065
-				return I18N::translate('Birth of a grandchild');
1066
-			}
1067
-		case '_BIRT_HSIB':
1068
-			switch ($sex) {
1069
-			case 'M':
1070
-				return I18N::translate('Birth of a half-brother');
1071
-			case 'F':
1072
-				return I18N::translate('Birth of a half-sister');
1073
-			default:
1074
-				return I18N::translate('Birth of a half-sibling');
1075
-			}
1076
-		case '_BIRT_SIBL':
1077
-			switch ($sex) {
1078
-			case 'M':
1079
-				return I18N::translate('Birth of a brother');
1080
-			case 'F':
1081
-				return I18N::translate('Birth of a sister');
1082
-			default:
1083
-				return I18N::translate('Birth of a sibling');
1084
-			}
1085
-		case '_BRTM':
1086
-			return
1087
-				/* I18N: gedcom tag _BRTM */
1088
-				I18N::translate('Brit milah');
1089
-		case '_BRTM:DATE':
1090
-			return I18N::translate('Date of brit milah');
1091
-		case '_BRTM:PLAC':
1092
-			return I18N::translate('Place of brit milah');
1093
-		case '_BURI_CHIL':
1094
-			switch ($sex) {
1095
-			case 'M':
1096
-				return I18N::translate('Burial of a son');
1097
-			case 'F':
1098
-				return I18N::translate('Burial of a daughter');
1099
-			default:
1100
-				return I18N::translate('Burial of a child');
1101
-			}
1102
-		case '_BURI_GCHI':
1103
-			switch ($sex) {
1104
-			case 'M':
1105
-				return I18N::translate('Burial of a grandson');
1106
-			case 'F':
1107
-				return I18N::translate('Burial of a granddaughter');
1108
-			default:
1109
-				return I18N::translate('Burial of a grandchild');
1110
-			}
1111
-		case '_BURI_GCH1':
1112
-			switch ($sex) {
1113
-			case 'M':
1114
-				return I18N::translateContext('daughter’s son', 'Burial of a grandson');
1115
-			case 'F':
1116
-				return I18N::translateContext('daughter’s daughter', 'Burial of a granddaughter');
1117
-			default:
1118
-				return I18N::translate('Burial of a grandchild');
1119
-			}
1120
-		case '_BURI_GCH2':
1121
-			switch ($sex) {
1122
-			case 'M':
1123
-				return I18N::translateContext('son’s son', 'Burial of a grandson');
1124
-			case 'F':
1125
-				return I18N::translateContext('son’s daughter', 'Burial of a granddaughter');
1126
-			default:
1127
-				return I18N::translate('Burial of a grandchild');
1128
-			}
1129
-		case '_BURI_GPAR':
1130
-			switch ($sex) {
1131
-			case 'M':
1132
-				return I18N::translate('Burial of a grandfather');
1133
-			case 'F':
1134
-				return I18N::translate('Burial of a grandmother');
1135
-			default:
1136
-				return I18N::translate('Burial of a grandparent');
1137
-			}
1138
-		case '_BURI_GPA1':
1139
-			switch ($sex) {
1140
-			case 'M':
1141
-				return I18N::translate('Burial of a paternal grandfather');
1142
-			case 'F':
1143
-				return I18N::translate('Burial of a paternal grandmother');
1144
-			default:
1145
-				return I18N::translate('Burial of a paternal grandparent');
1146
-			}
1147
-		case '_BURI_GPA2':
1148
-			switch ($sex) {
1149
-			case 'M':
1150
-				return I18N::translate('Burial of a maternal grandfather');
1151
-			case 'F':
1152
-				return I18N::translate('Burial of a maternal grandmother');
1153
-			default:
1154
-				return I18N::translate('Burial of a maternal grandparent');
1155
-			}
1156
-		case '_BURI_HSIB':
1157
-			switch ($sex) {
1158
-			case 'M':
1159
-				return I18N::translate('Burial of a half-brother');
1160
-			case 'F':
1161
-				return I18N::translate('Burial of a half-sister');
1162
-			default:
1163
-				return I18N::translate('Burial of a half-sibling');
1164
-			}
1165
-		case '_BURI_PARE':
1166
-			switch ($sex) {
1167
-			case 'M':
1168
-				return I18N::translate('Burial of a father');
1169
-			case 'F':
1170
-				return I18N::translate('Burial of a mother');
1171
-			default:
1172
-				return I18N::translate('Burial of a parent');
1173
-			}
1174
-		case '_BURI_SIBL':
1175
-			switch ($sex) {
1176
-			case 'M':
1177
-				return I18N::translate('Burial of a brother');
1178
-			case 'F':
1179
-				return I18N::translate('Burial of a sister');
1180
-			default:
1181
-				return I18N::translate('Burial of a sibling');
1182
-			}
1183
-		case '_BURI_SPOU':
1184
-			switch ($sex) {
1185
-			case 'M':
1186
-				return I18N::translate('Burial of a husband');
1187
-			case 'F':
1188
-				return I18N::translate('Burial of a wife');
1189
-			default:
1190
-				return I18N::translate('Burial of a spouse');
1191
-			}
1192
-		case '_CHR_CHIL':
1193
-			switch ($sex) {
1194
-			case 'M':
1195
-				return I18N::translate('Christening of a son');
1196
-			case 'F':
1197
-				return I18N::translate('Christening of a daughter');
1198
-			default:
1199
-				return I18N::translate('Christening of a child');
1200
-			}
1201
-		case '_CHR_GCHI':
1202
-			switch ($sex) {
1203
-			case 'M':
1204
-				return I18N::translate('Christening of a grandson');
1205
-			case 'F':
1206
-				return I18N::translate('Christening of a granddaughter');
1207
-			default:
1208
-				return I18N::translate('Christening of a grandchild');
1209
-			}
1210
-		case '_CHR_GCH1':
1211
-			switch ($sex) {
1212
-			case 'M':
1213
-				return I18N::translateContext('daughter’s son', 'Christening of a grandson');
1214
-			case 'F':
1215
-				return I18N::translateContext('daughter’s daughter', 'Christening of a granddaughter');
1216
-			default:
1217
-				return I18N::translate('Christening of a grandchild');
1218
-			}
1219
-		case '_CHR_GCH2':
1220
-			switch ($sex) {
1221
-			case 'M':
1222
-				return I18N::translateContext('son’s son', 'Christening of a grandson');
1223
-			case 'F':
1224
-				return I18N::translateContext('son’s daughter', 'Christening of a granddaughter');
1225
-			default:
1226
-				return I18N::translate('Christening of a grandchild');
1227
-			}
1228
-		case '_CHR_HSIB':
1229
-			switch ($sex) {
1230
-			case 'M':
1231
-				return I18N::translate('Christening of a half-brother');
1232
-			case 'F':
1233
-				return I18N::translate('Christening of a half-sister');
1234
-			default:
1235
-				return I18N::translate('Christening of a half-sibling');
1236
-			}
1237
-		case '_CHR_SIBL':
1238
-			switch ($sex) {
1239
-			case 'M':
1240
-				return I18N::translate('Christening of a brother');
1241
-			case 'F':
1242
-				return I18N::translate('Christening of a sister');
1243
-			default:
1244
-				return I18N::translate('Christening of a sibling');
1245
-			}
1246
-		case '_COML':
1247
-			return
1248
-				/* I18N: gedcom tag _COML */
1249
-				I18N::translate('Common law marriage');
1250
-		case '_CREM_CHIL':
1251
-			switch ($sex) {
1252
-			case 'M':
1253
-				return I18N::translate('Cremation of a son');
1254
-			case 'F':
1255
-				return I18N::translate('Cremation of a daughter');
1256
-			default:
1257
-				return I18N::translate('Cremation of a child');
1258
-			}
1259
-		case '_CREM_GCHI':
1260
-			switch ($sex) {
1261
-			case 'M':
1262
-				return I18N::translate('Cremation of a grandson');
1263
-			case 'F':
1264
-				return I18N::translate('Cremation of a granddaughter');
1265
-			default:
1266
-				return I18N::translate('Cremation of a grandchild');
1267
-			}
1268
-		case '_CREM_GCH1':
1269
-			switch ($sex) {
1270
-			case 'M':
1271
-				return I18N::translateContext('daughter’s son', 'Cremation of a grandson');
1272
-			case 'F':
1273
-				return I18N::translateContext('daughter’s daughter', 'Cremation of a granddaughter');
1274
-			default:
1275
-				return I18N::translate('Cremation of a grandchild');
1276
-			}
1277
-		case '_CREM_GCH2':
1278
-			switch ($sex) {
1279
-			case 'M':
1280
-				return I18N::translateContext('son’s son', 'Cremation of a grandson');
1281
-			case 'F':
1282
-				return I18N::translateContext('son’s daughter', 'Cremation of a granddaughter');
1283
-			default:
1284
-				return I18N::translate('Cremation of a grandchild');
1285
-			}
1286
-		case '_CREM_GPAR':
1287
-			switch ($sex) {
1288
-			case 'M':
1289
-				return I18N::translate('Cremation of a grandfather');
1290
-			case 'F':
1291
-				return I18N::translate('Cremation of a grandmother');
1292
-			default:
1293
-				return I18N::translate('Cremation of a grand-parent');
1294
-			}
1295
-		case '_CREM_GPA1':
1296
-			switch ($sex) {
1297
-			case 'M':
1298
-				return I18N::translate('Cremation of a paternal grandfather');
1299
-			case 'F':
1300
-				return I18N::translate('Cremation of a paternal grandmother');
1301
-			default:
1302
-				return I18N::translate('Cremation of a grand-parent');
1303
-			}
1304
-		case '_CREM_GPA2':
1305
-			switch ($sex) {
1306
-			case 'M':
1307
-				return I18N::translate('Cremation of a maternal grandfather');
1308
-			case 'F':
1309
-				return I18N::translate('Cremation of a maternal grandmother');
1310
-			default:
1311
-				return I18N::translate('Cremation of a grand-parent');
1312
-			}
1313
-		case '_CREM_HSIB':
1314
-			switch ($sex) {
1315
-			case 'M':
1316
-				return I18N::translate('Cremation of a half-brother');
1317
-			case 'F':
1318
-				return I18N::translate('Cremation of a half-sister');
1319
-			default:
1320
-				return I18N::translate('Cremation of a half-sibling');
1321
-			}
1322
-		case '_CREM_PARE':
1323
-			switch ($sex) {
1324
-			case 'M':
1325
-				return I18N::translate('Cremation of a father');
1326
-			case 'F':
1327
-				return I18N::translate('Cremation of a mother');
1328
-			default:
1329
-				return I18N::translate('Cremation of a parent');
1330
-			}
1331
-		case '_CREM_SIBL':
1332
-			switch ($sex) {
1333
-			case 'M':
1334
-				return I18N::translate('Cremation of a brother');
1335
-			case 'F':
1336
-				return I18N::translate('Cremation of a sister');
1337
-			default:
1338
-				return I18N::translate('Cremation of a sibling');
1339
-			}
1340
-		case '_CREM_SPOU':
1341
-			switch ($sex) {
1342
-			case 'M':
1343
-				return I18N::translate('Cremation of a husband');
1344
-			case 'F':
1345
-				return I18N::translate('Cremation of a wife');
1346
-			default:
1347
-				return I18N::translate('Cremation of a spouse');
1348
-			}
1349
-		case '_DBID':
1350
-			return
1351
-				/* I18N: gedcom tag _DBID */
1352
-				I18N::translate('Linked database ID');
1353
-		case '_DEAT_CHIL':
1354
-			switch ($sex) {
1355
-			case 'M':
1356
-				return I18N::translate('Death of a son');
1357
-			case 'F':
1358
-				return I18N::translate('Death of a daughter');
1359
-			default:
1360
-				return I18N::translate('Death of a child');
1361
-			}
1362
-		case '_DEAT_GCHI':
1363
-			switch ($sex) {
1364
-			case 'M':
1365
-				return I18N::translate('Death of a grandson');
1366
-			case 'F':
1367
-				return I18N::translate('Death of a granddaughter');
1368
-			default:
1369
-				return I18N::translate('Death of a grandchild');
1370
-			}
1371
-		case '_DEAT_GCH1':
1372
-			switch ($sex) {
1373
-			case 'M':
1374
-				return I18N::translateContext('daughter’s son', 'Death of a grandson');
1375
-			case 'F':
1376
-				return I18N::translateContext('daughter’s daughter', 'Death of a granddaughter');
1377
-			default:
1378
-				return I18N::translate('Death of a grandchild');
1379
-			}
1380
-		case '_DEAT_GCH2':
1381
-			switch ($sex) {
1382
-			case 'M':
1383
-				return I18N::translateContext('son’s son', 'Death of a grandson');
1384
-			case 'F':
1385
-				return I18N::translateContext('son’s daughter', 'Death of a granddaughter');
1386
-			default:
1387
-				return I18N::translate('Death of a grandchild');
1388
-			}
1389
-		case '_DEAT_GPAR':
1390
-			switch ($sex) {
1391
-			case 'M':
1392
-				return I18N::translate('Death of a grandfather');
1393
-			case 'F':
1394
-				return I18N::translate('Death of a grandmother');
1395
-			default:
1396
-				return I18N::translate('Death of a grand-parent');
1397
-			}
1398
-		case '_DEAT_GPA1':
1399
-			switch ($sex) {
1400
-			case 'M':
1401
-				return I18N::translate('Death of a paternal grandfather');
1402
-			case 'F':
1403
-				return I18N::translate('Death of a paternal grandmother');
1404
-			default:
1405
-				return I18N::translate('Death of a grand-parent');
1406
-			}
1407
-		case '_DEAT_GPA2':
1408
-			switch ($sex) {
1409
-			case 'M':
1410
-				return I18N::translate('Death of a maternal grandfather');
1411
-			case 'F':
1412
-				return I18N::translate('Death of a maternal grandmother');
1413
-			default:
1414
-				return I18N::translate('Death of a grand-parent');
1415
-			}
1416
-		case '_DEAT_HSIB':
1417
-			switch ($sex) {
1418
-			case 'M':
1419
-				return I18N::translate('Death of a half-brother');
1420
-			case 'F':
1421
-				return I18N::translate('Death of a half-sister');
1422
-			default:
1423
-				return I18N::translate('Death of a half-sibling');
1424
-			}
1425
-		case '_DEAT_PARE':
1426
-			switch ($sex) {
1427
-			case 'M':
1428
-				return I18N::translate('Death of a father');
1429
-			case 'F':
1430
-				return I18N::translate('Death of a mother');
1431
-			default:
1432
-				return I18N::translate('Death of a parent');
1433
-			}
1434
-		case '_DEAT_SIBL':
1435
-			switch ($sex) {
1436
-			case 'M':
1437
-				return I18N::translate('Death of a brother');
1438
-			case 'F':
1439
-				return I18N::translate('Death of a sister');
1440
-			default:
1441
-				return I18N::translate('Death of a sibling');
1442
-			}
1443
-		case '_DEAT_SPOU':
1444
-			switch ($sex) {
1445
-			case 'M':
1446
-				return I18N::translate('Death of a husband');
1447
-			case 'F':
1448
-				return I18N::translate('Death of a wife');
1449
-			default:
1450
-				return I18N::translate('Death of a spouse');
1451
-			}
1452
-		case '_DEG':
1453
-			return
1454
-				/* I18N: gedcom tag _DEG */
1455
-				I18N::translate('Degree');
1456
-		case '_DETS':
1457
-			return
1458
-				/* I18N: gedcom tag _DETS */
1459
-				I18N::translate('Death of one spouse');
1460
-		case '_DNA':
1461
-			return
1462
-				/* I18N: gedcom tag _DNA (from FTM 2010) */
1463
-				I18N::translate('DNA markers');
1464
-		case '_EMAIL':
1465
-			return
1466
-				/* I18N: gedcom tag _EMAIL */
1467
-				I18N::translate('Email address');
1468
-		case '_EYEC':
1469
-			return
1470
-				/* I18N: gedcom tag _EYEC */
1471
-				I18N::translate('Eye color');
1472
-		case '_FA1':
1473
-			return I18N::translate('Fact 1');
1474
-		case '_FA2':
1475
-			return I18N::translate('Fact 2');
1476
-		case '_FA3':
1477
-			return I18N::translate('Fact 3');
1478
-		case '_FA4':
1479
-			return I18N::translate('Fact 4');
1480
-		case '_FA5':
1481
-			return I18N::translate('Fact 5');
1482
-		case '_FA6':
1483
-			return I18N::translate('Fact 6');
1484
-		case '_FA7':
1485
-			return I18N::translate('Fact 7');
1486
-		case '_FA8':
1487
-			return I18N::translate('Fact 8');
1488
-		case '_FA9':
1489
-			return I18N::translate('Fact 9');
1490
-		case '_FA10':
1491
-			return I18N::translate('Fact 10');
1492
-		case '_FA11':
1493
-			return I18N::translate('Fact 11');
1494
-		case '_FA12':
1495
-			return I18N::translate('Fact 12');
1496
-		case '_FA13':
1497
-			return I18N::translate('Fact 13');
1498
-		case '_FNRL':
1499
-			return
1500
-				/* I18N: gedcom tag _FNRL */
1501
-				I18N::translate('Funeral');
1502
-		case '_FREL':
1503
-			return
1504
-				/* I18N: gedcom tag _FREL */
1505
-				I18N::translate('Relationship to father');
1506
-		case '_GEDF':
1507
-			return
1508
-				/* I18N: gedcom tag _GEDF */
1509
-				I18N::translate('GEDCOM file');
1510
-		case '_GODP':
1511
-			return
1512
-				/* I18N: gedcom tag _GODP */
1513
-				I18N::translate('Godparent');
1514
-		case '_HAIR':
1515
-			return
1516
-				/* I18N: gedcom tag _HAIR */
1517
-				I18N::translate('Hair color');
1518
-		case '_HEB':
1519
-			return
1520
-				/* I18N: gedcom tag _HEB */
1521
-				I18N::translate('Hebrew');
1522
-		case '_HEIG':
1523
-			return
1524
-				/* I18N: gedcom tag _HEIG */
1525
-				I18N::translate('Height');
1526
-		case '_HNM':
1527
-			return
1528
-				/* I18N: gedcom tag _HNM */
1529
-				I18N::translate('Hebrew name');
1530
-		case '_HOL':
1531
-			return
1532
-				/* I18N: gedcom tag _HOL */
1533
-				I18N::translate('Holocaust');
1534
-		case '_INTE':
1535
-			switch ($sex) {
1536
-			case 'M':
1537
-				return
1538
-					/* I18N: gedcom tag _INTE */
1539
-					I18N::translateContext('MALE', 'Interred');
1540
-			case 'F':
1541
-				return
1542
-					/* I18N: gedcom tag _INTE */
1543
-					I18N::translateContext('FEMALE', 'Interred');
1544
-			default:
1545
-				return
1546
-					/* I18N: gedcom tag _INTE */
1547
-					I18N::translate('Interred');
1548
-			}
1549
-		case '_LOC':
1550
-			return
1551
-				/* I18N: gedcom tag _LOC */
1552
-				I18N::translate('Location');
1553
-		case '_MARI':
1554
-			return
1555
-				/* I18N: gedcom tag _MARI */
1556
-				I18N::translate('Marriage intention');
1557
-		case '_MARNM':
1558
-			return
1559
-				/* I18N: gedcom tag _MARNM */
1560
-				I18N::translate('Married name');
1561
-		case '_PRIM':
1562
-			return
1563
-				/* I18N: gedcom tag _PRIM */
1564
-				I18N::translate('Highlighted image');
1565
-		case '_MARNM_SURN':
1566
-			return I18N::translate('Married surname');
1567
-		case '_MARR_CHIL':
1568
-			switch ($sex) {
1569
-			case 'M':
1570
-				return I18N::translate('Marriage of a son');
1571
-			case 'F':
1572
-				return I18N::translate('Marriage of a daughter');
1573
-			default:
1574
-				return I18N::translate('Marriage of a child');
1575
-			}
1576
-		case '_MARR_FAMC':
1577
-			return
1578
-				/* I18N: ...to each other */
1579
-				I18N::translate('Marriage of parents');
1580
-		case '_MARR_GCHI':
1581
-			switch ($sex) {
1582
-			case 'M':
1583
-				return I18N::translate('Marriage of a grandson');
1584
-			case 'F':
1585
-				return I18N::translate('Marriage of a granddaughter');
1586
-			default:
1587
-				return I18N::translate('Marriage of a grandchild');
1588
-			}
1589
-		case '_MARR_GCH1':
1590
-			switch ($sex) {
1591
-			case 'M':
1592
-				return I18N::translateContext('daughter’s son', 'Marriage of a grandson');
1593
-			case 'F':
1594
-				return I18N::translateContext('daughter’s daughter', 'Marriage of a granddaughter');
1595
-			default:
1596
-				return I18N::translate('Marriage of a grandchild');
1597
-			}
1598
-		case '_MARR_GCH2':
1599
-			switch ($sex) {
1600
-			case 'M':
1601
-				return I18N::translateContext('son’s son', 'Marriage of a grandson');
1602
-			case 'F':
1603
-				return I18N::translateContext('son’s daughter', 'Marriage of a granddaughter');
1604
-			default:
1605
-				return I18N::translate('Marriage of a grandchild');
1606
-			}
1607
-		case '_MARR_HSIB':
1608
-			switch ($sex) {
1609
-			case 'M':
1610
-				return I18N::translate('Marriage of a half-brother');
1611
-			case 'F':
1612
-				return I18N::translate('Marriage of a half-sister');
1613
-			default:
1614
-				return I18N::translate('Marriage of a half-sibling');
1615
-			}
1616
-		case '_MARR_PARE':
1617
-			switch ($sex) {
1618
-			case 'M':
1619
-				return
1620
-					/* I18N: ...to another spouse */
1621
-					I18N::translate('Marriage of a father');
1622
-			case 'F':
1623
-				return
1624
-					/* I18N: ...to another spouse */
1625
-					I18N::translate('Marriage of a mother');
1626
-			default:
1627
-				return
1628
-					/* I18N: ...to another spouse */
1629
-					I18N::translate('Marriage of a parent');
1630
-			}
1631
-		case '_MARR_SIBL':
1632
-			switch ($sex) {
1633
-			case 'M':
1634
-				return I18N::translate('Marriage of a brother');
1635
-			case 'F':
1636
-				return I18N::translate('Marriage of a sister');
1637
-			default:
1638
-				return I18N::translate('Marriage of a sibling');
1639
-			}
1640
-		case '_MBON':
1641
-			return
1642
-				/* I18N: gedcom tag _MBON */
1643
-				I18N::translate('Marriage bond');
1644
-		case '_MDCL':
1645
-			return
1646
-				/* I18N: gedcom tag _MDCL */
1647
-				I18N::translate('Medical');
1648
-		case '_MEDC':
1649
-			return
1650
-				/* I18N: gedcom tag _MEDC */
1651
-				I18N::translate('Medical condition');
1652
-		case '_MEND':
1653
-			return
1654
-				/* I18N: gedcom tag _MEND */
1655
-				I18N::translate('Marriage ending status');
1656
-		case '_MILI':
1657
-			return
1658
-				/* I18N: gedcom tag _MILI */
1659
-				I18N::translate('Military');
1660
-		case '_MILT':
1661
-			return
1662
-				/* I18N: gedcom tag _MILT */
1663
-				I18N::translate('Military service');
1664
-		case '_MREL':
1665
-			return
1666
-				/* I18N: gedcom tag _MREL */
1667
-				I18N::translate('Relationship to mother');
1668
-		case '_MSTAT':
1669
-			return
1670
-				/* I18N: gedcom tag _MSTAT */
1671
-				I18N::translate('Marriage beginning status');
1672
-		case '_NAME':
1673
-			return
1674
-				/* I18N: gedcom tag _NAME */
1675
-				I18N::translate('Mailing name');
1676
-		case '_NAMS':
1677
-			return
1678
-				/* I18N: gedcom tag _NAMS */
1679
-				I18N::translate('Namesake');
1680
-		case '_NLIV':
1681
-			return
1682
-				/* I18N: gedcom tag _NLIV */
1683
-				I18N::translate('Not living');
1684
-		case '_NMAR':
1685
-			switch ($sex) {
1686
-			case 'M':
1687
-				return
1688
-					/* I18N: gedcom tag _NMAR */
1689
-					I18N::translateContext('MALE', 'Never married');
1690
-			case 'F':
1691
-				return
1692
-					/* I18N: gedcom tag _NMAR */
1693
-					I18N::translateContext('FEMALE', 'Never married');
1694
-			default:
1695
-				return
1696
-					/* I18N: gedcom tag _NMAR */
1697
-					I18N::translate('Never married');
1698
-			}
1699
-		case '_NMR':
1700
-			switch ($sex) {
1701
-			case 'M':
1702
-				return
1703
-					/* I18N: gedcom tag _NMR */
1704
-					I18N::translateContext('MALE', 'Not married');
1705
-			case 'F':
1706
-				return
1707
-					/* I18N: gedcom tag _NMR */
1708
-					I18N::translateContext('FEMALE', 'Not married');
1709
-			default:
1710
-				return
1711
-					/* I18N: gedcom tag _NMR */
1712
-					I18N::translate('Not married');
1713
-			}
1714
-		case '_WT_USER':
1715
-			return I18N::translate('by');
1716
-		case '_PRMN':
1717
-			return
1718
-				/* I18N: gedcom tag _PRMN */
1719
-				I18N::translate('Permanent number');
1720
-		case '_SCBK':
1721
-			return
1722
-				/* I18N: gedcom tag _SCBK */
1723
-				I18N::translate('Scrapbook');
1724
-		case '_SEPR':
1725
-			return
1726
-				/* I18N: gedcom tag _SEPR */
1727
-				I18N::translate('Separated');
1728
-		case '_SSHOW':
1729
-			return
1730
-				/* I18N: gedcom tag _SSHOW */
1731
-				I18N::translate('Slide show');
1732
-		case '_STAT':
1733
-			return
1734
-				/* I18N: gedcom tag _STAT */
1735
-				I18N::translate('Marriage status');
1736
-		case '_SUBQ':
1737
-			return
1738
-				/* I18N: gedcom tag _SUBQ */
1739
-				I18N::translate('Short version');
1740
-		case '_TODO':
1741
-			return
1742
-				/* I18N: gedcom tag _TODO */
1743
-				I18N::translate('Research task');
1744
-		case '_TYPE':
1745
-			return
1746
-				/* I18N: gedcom tag _TYPE */
1747
-				I18N::translate('Media type');
1748
-		case '_UID':
1749
-			return
1750
-				/* I18N: gedcom tag _UID */
1751
-				I18N::translate('Unique identifier');
1752
-		case '_URL':
1753
-			return
1754
-				/* I18N: gedcom tag _URL */
1755
-				I18N::translate('URL');
1756
-		case '_WEIG':
1757
-			return
1758
-				/* I18N: gedcom tag _WEIG */
1759
-				I18N::translate('Weight');
1760
-		case '_WITN':
1761
-			return
1762
-				/* I18N: gedcom tag _WITN */
1763
-				I18N::translate('Witness');
1764
-		case '_WT_OBJE_SORT':
1765
-			return
1766
-				/* I18N: gedcom tag _WT_OBJE_SORT */
1767
-				I18N::translate('Re-order media');
1768
-		case '_YART':
1769
-			return /* I18N: gedcom tag _YART - A yahrzeit is a special anniversary of death in the Hebrew faith/calendar. */ I18N::translate('Yahrzeit');
1770
-			// Brit milah applies only to males, no need for male/female translations
1771
-		case '__BRTM_CHIL':
1772
-			return I18N::translate('Brit milah of a son');
1773
-		case '__BRTM_GCHI':
1774
-			return I18N::translate('Brit milah of a grandson');
1775
-		case '__BRTM_GCH1':
1776
-			return I18N::translateContext('daughter’s son', 'Brit milah of a grandson');
1777
-		case '__BRTM_GCH2':
1778
-			return I18N::translateContext('son’s son', 'Brit milah of a grandson');
1779
-		case '__BRTM_HSIB':
1780
-			return I18N::translate('Brit milah of a half-brother');
1781
-		case '__BRTM_SIBL':
1782
-			return I18N::translate('Brit milah of a brother');
1783
-			// These "pseudo" tags are generated internally to present information about a media object
1784
-		case '__FILE_SIZE__':
1785
-			return I18N::translate('File size');
1786
-		case '__IMAGE_SIZE__':
1787
-			return I18N::translate('Image dimensions');
1788
-		default:
1789
-			// If no specialisation exists (e.g. DEAT:CAUS), then look for the general (CAUS)
1790
-			if (strpos($tag, ':')) {
1791
-				list(, $tag) = explode(':', $tag, 2);
115
+		    case 'ABBR':
116
+			    return
117
+				    /* I18N: gedcom tag ABBR */
118
+				    I18N::translate('Abbreviation');
119
+		    case 'ADDR':
120
+			    return
121
+				    /* I18N: gedcom tag ADDR */
122
+				    I18N::translate('Address');
123
+		    case 'ADR1':
124
+			    return I18N::translate('Address line 1');
125
+		    case 'ADR2':
126
+			    return I18N::translate('Address line 2');
127
+		    case 'ADOP':
128
+			    return
129
+				    /* I18N: gedcom tag ADOP */
130
+				    I18N::translate('Adoption');
131
+		    case 'ADOP:DATE':
132
+			    return I18N::translate('Date of adoption');
133
+		    case 'ADOP:PLAC':
134
+			    return I18N::translate('Place of adoption');
135
+		    case 'AFN':
136
+			    return
137
+				    /* I18N: gedcom tag AFN */
138
+				    I18N::translate('Ancestral file number');
139
+		    case 'AGE':
140
+			    return
141
+				    /* I18N: gedcom tag AGE */
142
+				    I18N::translate('Age');
143
+		    case 'AGNC':
144
+			    return
145
+				    /* I18N: gedcom tag AGNC */
146
+				    I18N::translate('Agency');
147
+		    case 'ALIA':
148
+			    return
149
+				    /* I18N: gedcom tag ALIA */
150
+				    I18N::translate('Alias');
151
+		    case 'ANCE':
152
+			    return
153
+				    /* I18N: gedcom tag ANCE */
154
+				    I18N::translate('Generations of ancestors');
155
+		    case 'ANCI':
156
+			    return
157
+				    /* I18N: gedcom tag ANCI */
158
+				    I18N::translate('Ancestors interest');
159
+		    case 'ANUL':
160
+			    return
161
+				    /* I18N: gedcom tag ANUL */
162
+				    I18N::translate('Annulment');
163
+		    case 'ASSO':
164
+			    return
165
+				    /* I18N: gedcom tag ASSO */
166
+				    I18N::translate('Associate'); /* see also _ASSO */
167
+		    case 'AUTH':
168
+			    return
169
+				    /* I18N: gedcom tag AUTH */
170
+				    I18N::translate('Author');
171
+		    case 'BAPL':
172
+			    return
173
+				    /* I18N: gedcom tag BAPL. LDS = Church of Latter Day Saints. */
174
+				    I18N::translate('LDS baptism');
175
+		    case 'BAPL:DATE':
176
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS baptism');
177
+		    case 'BAPL:PLAC':
178
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS baptism');
179
+		    case 'BAPM':
180
+			    return
181
+				    /* I18N: gedcom tag BAPM */
182
+				    I18N::translate('Baptism');
183
+		    case 'BAPM:DATE':
184
+			    return I18N::translate('Date of baptism');
185
+		    case 'BAPM:PLAC':
186
+			    return I18N::translate('Place of baptism');
187
+		    case 'BARM':
188
+			    return
189
+				    /* I18N: gedcom tag BARM */
190
+				    I18N::translate('Bar mitzvah');
191
+		    case 'BARM:DATE':
192
+			    return I18N::translate('Date of bar mitzvah');
193
+		    case 'BARM:PLAC':
194
+			    return I18N::translate('Place of bar mitzvah');
195
+		    case 'BASM':
196
+			    return
197
+				    /* I18N: gedcom tag BASM */
198
+				    I18N::translate('Bat mitzvah');
199
+		    case 'BASM:DATE':
200
+			    return I18N::translate('Date of bat mitzvah');
201
+		    case 'BASM:PLAC':
202
+			    return I18N::translate('Place of bat mitzvah');
203
+		    case 'BIRT':
204
+			    return
205
+				    /* I18N: gedcom tag BIRT */
206
+				    I18N::translate('Birth');
207
+		    case 'BIRT:DATE':
208
+			    return I18N::translate('Date of birth');
209
+		    case 'BIRT:PLAC':
210
+			    return I18N::translate('Place of birth');
211
+		    case 'BLES':
212
+			    return
213
+				    /* I18N: gedcom tag BLES */
214
+				    I18N::translate('Blessing');
215
+		    case 'BLES:DATE':
216
+			    return I18N::translate('Date of blessing');
217
+		    case 'BLES:PLAC':
218
+			    return I18N::translate('Place of blessing');
219
+		    case 'BLOB':
220
+			    return
221
+				    /* I18N: gedcom tag BLOB */
222
+				    I18N::translate('Binary data object');
223
+		    case 'BURI':
224
+			    return
225
+				    /* I18N: gedcom tag BURI */
226
+				    I18N::translate('Burial');
227
+		    case 'BURI:DATE':
228
+			    return I18N::translate('Date of burial');
229
+		    case 'BURI:PLAC':
230
+			    return I18N::translate('Place of burial');
231
+		    case 'CALN':
232
+			    return
233
+				    /* I18N: gedcom tag CALN */
234
+				    I18N::translate('Call number');
235
+		    case 'CAST':
236
+			    return
237
+				    /* I18N: gedcom tag CAST */
238
+				    I18N::translate('Caste');
239
+		    case 'CAUS':
240
+			    return
241
+				    /* I18N: gedcom tag CAUS */
242
+				    I18N::translate('Cause');
243
+		    case 'CEME':
244
+			    return
245
+				    /* I18N: gedcom tag CEME */
246
+				    I18N::translate('Cemetery');
247
+		    case 'CENS':
248
+			    return
249
+				    /* I18N: gedcom tag CENS */
250
+				    I18N::translate('Census');
251
+		    case 'CENS:DATE':
252
+			    return I18N::translate('Census date');
253
+		    case 'CENS:PLAC':
254
+			    return I18N::translate('Census place');
255
+		    case 'CHAN':
256
+			    return
257
+				    /* I18N: gedcom tag CHAN */
258
+				    I18N::translate('Last change');
259
+		    case 'CHAN:DATE':
260
+			    return
261
+				    /* I18N: gedcom tag CHAN:DATE */
262
+				    I18N::translate('Date of last change');
263
+		    case 'CHAN:_WT_USER':
264
+			    return
265
+				    /* I18N: gedcom tag CHAN:_WT_USER */
266
+				    I18N::translate('Author of last change');
267
+		    case 'CHAR':
268
+			    return
269
+				    /* I18N: gedcom tag CHAR */
270
+				    I18N::translate('Character set');
271
+		    case 'CHIL':
272
+			    return
273
+				    /* I18N: gedcom tag CHIL */
274
+				    I18N::translate('Child');
275
+		    case 'CHR':
276
+			    return
277
+				    /* I18N: gedcom tag CHR */
278
+				    I18N::translate('Christening');
279
+		    case 'CHR:DATE':
280
+			    return I18N::translate('Date of christening');
281
+		    case 'CHR:PLAC':
282
+			    return I18N::translate('Place of christening');
283
+		    case 'CHRA':
284
+			    return
285
+				    /* I18N: gedcom tag CHRA */
286
+				    I18N::translate('Adult christening');
287
+		    case 'CITN':
288
+			    return
289
+				    /* I18N: gedcom tag CITN */
290
+				    I18N::translate('Citizenship');
291
+		    case 'CITY':
292
+			    return
293
+				    /* I18N: gedcom tag CITY */
294
+				    I18N::translate('City');
295
+		    case 'COMM':
296
+			    return
297
+				    /* I18N: gedcom tag COMM */
298
+				    I18N::translate('Comment');
299
+		    case 'CONC':
300
+			    return
301
+				    /* I18N: gedcom tag CONC */
302
+				    I18N::translate('Concatenation');
303
+		    case 'CONT':
304
+			    return
305
+				    /* I18N: gedcom tag CONT */
306
+				    I18N::translate('Continued');
307
+		    case 'CONF':
308
+			    return
309
+				    /* I18N: gedcom tag CONF */
310
+				    I18N::translate('Confirmation');
311
+		    case 'CONF:DATE':
312
+			    return I18N::translate('Date of confirmation');
313
+		    case 'CONF:PLAC':
314
+			    return I18N::translate('Place of confirmation');
315
+		    case 'CONL':
316
+			    return
317
+				    /* I18N: gedcom tag CONL. LDS = Church of Latter Day Saints. */
318
+				    I18N::translate('LDS confirmation');
319
+		    case 'COPR':
320
+			    return
321
+				    /* I18N: gedcom tag COPR */
322
+				    I18N::translate('Copyright');
323
+		    case 'CORP':
324
+			    return
325
+				    /* I18N: gedcom tag CORP */
326
+				    I18N::translate('Corporation');
327
+		    case 'CREM':
328
+			    return
329
+				    /* I18N: gedcom tag CREM */
330
+				    I18N::translate('Cremation');
331
+		    case 'CREM:DATE':
332
+			    return I18N::translate('Date of cremation');
333
+		    case 'CREM:PLAC':
334
+			    return I18N::translate('Place of cremation');
335
+		    case 'CTRY':
336
+			    return
337
+				    /* I18N: gedcom tag CTRY */
338
+				    I18N::translate('Country');
339
+		    case 'DATA':
340
+			    return
341
+				    /* I18N: gedcom tag DATA */
342
+				    I18N::translate('Data');
343
+		    case 'DATA:DATE':
344
+			    return I18N::translate('Date of entry in original source');
345
+		    case 'DATE':
346
+			    return
347
+				    /* I18N: gedcom tag DATE */
348
+				    I18N::translate('Date');
349
+		    case 'DEAT':
350
+			    return
351
+				    /* I18N: gedcom tag DEAT */
352
+				    I18N::translate('Death');
353
+		    case 'DEAT:CAUS':
354
+			    return I18N::translate('Cause of death');
355
+		    case 'DEAT:DATE':
356
+			    return I18N::translate('Date of death');
357
+		    case 'DEAT:PLAC':
358
+			    return I18N::translate('Place of death');
359
+		    case 'DESC':
360
+			    return
361
+				    /* I18N: gedcom tag DESC */
362
+				    I18N::translate('Descendants');
363
+		    case 'DESI':
364
+			    return
365
+				    /* I18N: gedcom tag DESI */
366
+				    I18N::translate('Descendants interest');
367
+		    case 'DEST':
368
+			    return
369
+				    /* I18N: gedcom tag DEST */
370
+				    I18N::translate('Destination');
371
+		    case 'DIV':
372
+			    return
373
+				    /* I18N: gedcom tag DIV */
374
+				    I18N::translate('Divorce');
375
+		    case 'DIVF':
376
+			    return
377
+				    /* I18N: gedcom tag DIVF */
378
+				    I18N::translate('Divorce filed');
379
+		    case 'DSCR':
380
+			    return
381
+				    /* I18N: gedcom tag DSCR */
382
+				    I18N::translate('Description');
383
+		    case 'EDUC':
384
+			    return
385
+				    /* I18N: gedcom tag EDUC */
386
+				    I18N::translate('Education');
387
+		    case 'EDUC:AGNC':
388
+			    return I18N::translate('School or college');
389
+		    case 'EMAI':
390
+			    return
391
+				    /* I18N: gedcom tag EMAI */
392
+				    I18N::translate('Email address');
393
+		    case 'EMAIL':
394
+			    return
395
+				    /* I18N: gedcom tag EMAIL */
396
+				    I18N::translate('Email address');
397
+		    case 'EMAL':
398
+			    return
399
+				    /* I18N: gedcom tag EMAL */
400
+				    I18N::translate('Email address');
401
+		    case 'EMIG':
402
+			    return
403
+				    /* I18N: gedcom tag EMIG */
404
+				    I18N::translate('Emigration');
405
+		    case 'EMIG:DATE':
406
+			    return I18N::translate('Date of emigration');
407
+		    case 'EMIG:PLAC':
408
+			    return I18N::translate('Place of emigration');
409
+		    case 'ENDL':
410
+			    return
411
+				    /* I18N: gedcom tag ENDL. LDS = Church of Latter Day Saints. */
412
+				    I18N::translate('LDS endowment');
413
+		    case 'ENDL:DATE':
414
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS endowment');
415
+		    case 'ENDL:PLAC':
416
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS endowment');
417
+		    case 'ENGA':
418
+			    return
419
+				    /* I18N: gedcom tag ENGA */
420
+				    I18N::translate('Engagement');
421
+		    case 'ENGA:DATE':
422
+			    return I18N::translate('Date of engagement');
423
+		    case 'ENGA:PLAC':
424
+			    return I18N::translate('Place of engagement');
425
+		    case 'EVEN':
426
+			    return
427
+				    /* I18N: gedcom tag EVEN */
428
+				    I18N::translate('Event');
429
+		    case 'EVEN:DATE':
430
+			    return I18N::translate('Date of event');
431
+		    case 'EVEN:PLAC':
432
+			    return I18N::translate('Place of event');
433
+		    case 'EVEN:TYPE':
434
+			    return I18N::translate('Type of event');
435
+		    case 'FACT':
436
+			    return
437
+				    /* I18N: gedcom tag FACT */
438
+				    I18N::translate('Fact');
439
+		    case 'FACT:TYPE':
440
+			    return I18N::translate('Type of fact');
441
+		    case 'FAM':
442
+			    return
443
+				    /* I18N: gedcom tag FAM */
444
+				    I18N::translate('Family');
445
+		    case 'FAMC':
446
+			    return
447
+				    /* I18N: gedcom tag FAMC */
448
+				    I18N::translate('Family as a child');
449
+		    case 'FAMF':
450
+			    return
451
+				    /* I18N: gedcom tag FAMF */
452
+				    I18N::translate('Family file');
453
+		    case 'FAMS':
454
+			    return
455
+				    /* I18N: gedcom tag FAMS */
456
+				    I18N::translate('Family as a spouse');
457
+		    case 'FAMS:CENS:DATE':
458
+			    return I18N::translate('Spouse census date');
459
+		    case 'FAMS:CENS:PLAC':
460
+			    return I18N::translate('Spouse census place');
461
+		    case 'FAMS:DIV:DATE':
462
+			    return I18N::translate('Date of divorce');
463
+		    case 'FAMS:MARR:DATE':
464
+			    return I18N::translate('Date of marriage');
465
+		    case 'FAMS:MARR:PLAC':
466
+			    return I18N::translate('Place of marriage');
467
+		    case 'FAMS:NOTE':
468
+			    return I18N::translate('Spouse note');
469
+		    case 'FAMS:SLGS:DATE':
470
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS spouse sealing');
471
+		    case 'FAMS:SLGS:PLAC':
472
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS spouse sealing');
473
+		    case 'FAX':
474
+			    return
475
+				    /* I18N: gedcom tag FAX */
476
+				    I18N::translate('Fax');
477
+		    case 'FCOM':
478
+			    return
479
+				    /* I18N: gedcom tag FCOM */
480
+				    I18N::translate('First communion');
481
+		    case 'FCOM:DATE':
482
+			    return I18N::translate('Date of first communion');
483
+		    case 'FCOM:PLAC':
484
+			    return I18N::translate('Place of first communion');
485
+		    case 'FILE':
486
+			    return
487
+				    /* I18N: gedcom tag FILE */
488
+				    I18N::translate('Filename');
489
+		    case 'FONE':
490
+			    return
491
+				    /* I18N: gedcom tag FONE */
492
+				    I18N::translate('Phonetic');
493
+		    case 'FORM':
494
+			    return
495
+				    /* I18N: gedcom tag FORM */
496
+				    I18N::translate('Format');
497
+		    case 'GEDC':
498
+			    return
499
+				    /* I18N: gedcom tag GEDC */
500
+				    I18N::translate('GEDCOM file');
501
+		    case 'GIVN':
502
+			    return
503
+				    /* I18N: gedcom tag GIVN */
504
+				    I18N::translate('Given names');
505
+		    case 'GRAD':
506
+			    return
507
+				    /* I18N: gedcom tag GRAD */
508
+				    I18N::translate('Graduation');
509
+		    case 'HEAD':
510
+			    return
511
+				    /* I18N: gedcom tag HEAD */
512
+				    I18N::translate('Header');
513
+		    case 'HUSB':
514
+			    return
515
+				    /* I18N: gedcom tag HUSB */
516
+				    I18N::translate('Husband');
517
+		    case 'IDNO':
518
+			    return
519
+				    /* I18N: gedcom tag IDNO */
520
+				    I18N::translate('Identification number');
521
+		    case 'IMMI':
522
+			    return
523
+				    /* I18N: gedcom tag IMMI */
524
+				    I18N::translate('Immigration');
525
+		    case 'IMMI:DATE':
526
+			    return I18N::translate('Date of immigration');
527
+		    case 'IMMI:PLAC':
528
+			    return I18N::translate('Place of immigration');
529
+		    case 'INDI':
530
+			    return
531
+				    /* I18N: gedcom tag INDI */
532
+				    I18N::translate('Individual');
533
+		    case 'INFL':
534
+			    return
535
+				    /* I18N: gedcom tag INFL */
536
+				    I18N::translate('Infant');
537
+		    case 'LANG':
538
+			    return
539
+				    /* I18N: gedcom tag LANG */
540
+				    I18N::translate('Language');
541
+		    case 'LATI':
542
+			    return
543
+				    /* I18N: gedcom tag LATI */
544
+				    I18N::translate('Latitude');
545
+		    case 'LEGA':
546
+			    return
547
+				    /* I18N: gedcom tag LEGA */
548
+				    I18N::translate('Legatee');
549
+		    case 'LONG':
550
+			    return
551
+				    /* I18N: gedcom tag LONG */
552
+				    I18N::translate('Longitude');
553
+		    case 'MAP':
554
+			    return
555
+				    /* I18N: gedcom tag MAP */
556
+				    I18N::translate('Map');
557
+		    case 'MARB':
558
+			    return
559
+				    /* I18N: gedcom tag MARB */
560
+				    I18N::translate('Marriage banns');
561
+		    case 'MARB:DATE':
562
+			    return I18N::translate('Date of marriage banns');
563
+		    case 'MARB:PLAC':
564
+			    return I18N::translate('Place of marriage banns');
565
+		    case 'MARC':
566
+			    return
567
+				    /* I18N: gedcom tag MARC */
568
+				    I18N::translate('Marriage contract');
569
+		    case 'MARL':
570
+			    return
571
+				    /* I18N: gedcom tag MARL */
572
+				    I18N::translate('Marriage license');
573
+		    case 'MARR':
574
+			    return
575
+				    /* I18N: gedcom tag MARR */
576
+				    I18N::translate('Marriage');
577
+		    case 'MARR:DATE':
578
+			    return I18N::translate('Date of marriage');
579
+		    case 'MARR:PLAC':
580
+			    return I18N::translate('Place of marriage');
581
+		    case 'MARR_CIVIL':
582
+			    return I18N::translate('Civil marriage');
583
+		    case 'MARR_PARTNERS':
584
+			    return I18N::translate('Registered partnership');
585
+		    case 'MARR_RELIGIOUS':
586
+			    return I18N::translate('Religious marriage');
587
+		    case 'MARR_UNKNOWN':
588
+			    return I18N::translate('Marriage type unknown');
589
+		    case 'MARS':
590
+			    return
591
+				    /* I18N: gedcom tag MARS */
592
+				    I18N::translate('Marriage settlement');
593
+		    case 'MEDI':
594
+			    return
595
+				    /* I18N: gedcom tag MEDI */
596
+				    I18N::translate('Media type');
597
+		    case 'NAME':
598
+			    if ($record instanceof Repository) {
599
+				    return
600
+					    /* I18N: gedcom tag REPO:NAME */
601
+					    I18N::translateContext('Repository', 'Name');
602
+			    } else {
603
+				    return
604
+					    /* I18N: gedcom tag NAME */
605
+					    I18N::translate('Name');
606
+			    }
607
+		    case 'NAME:FONE':
608
+			    return I18N::translate('Phonetic name');
609
+		    case 'NAME:_HEB':
610
+			    return I18N::translate('Name in Hebrew');
611
+		    case 'NATI':
612
+			    return
613
+				    /* I18N: gedcom tag NATI */
614
+				    I18N::translate('Nationality');
615
+		    case 'NATU':
616
+			    return
617
+				    /* I18N: gedcom tag NATU */
618
+				    I18N::translate('Naturalization');
619
+		    case 'NATU:DATE':
620
+			    return I18N::translate('Date of naturalization');
621
+		    case 'NATU:PLAC':
622
+			    return I18N::translate('Place of naturalization');
623
+		    case 'NCHI':
624
+			    return
625
+				    /* I18N: gedcom tag NCHI */
626
+				    I18N::translate('Number of children');
627
+		    case 'NICK':
628
+			    return
629
+				    /* I18N: gedcom tag NICK */
630
+				    I18N::translate('Nickname');
631
+		    case 'NMR':
632
+			    return
633
+				    /* I18N: gedcom tag NMR */
634
+				    I18N::translate('Number of marriages');
635
+		    case 'NOTE':
636
+			    return
637
+				    /* I18N: gedcom tag NOTE */
638
+				    I18N::translate('Note');
639
+		    case 'NPFX':
640
+			    return
641
+				    /* I18N: gedcom tag NPFX */
642
+				    I18N::translate('Name prefix');
643
+		    case 'NSFX':
644
+			    return
645
+				    /* I18N: gedcom tag NSFX */
646
+				    I18N::translate('Name suffix');
647
+		    case 'OBJE':
648
+			    return
649
+				    /* I18N: gedcom tag OBJE */
650
+				    I18N::translate('Media object');
651
+		    case 'OCCU':
652
+			    return
653
+				    /* I18N: gedcom tag OCCU */
654
+				    I18N::translate('Occupation');
655
+		    case 'OCCU:AGNC':
656
+			    return I18N::translate('Employer');
657
+		    case 'ORDI':
658
+			    return
659
+				    /* I18N: gedcom tag ORDI */
660
+				    I18N::translate('Ordinance');
661
+		    case 'ORDN':
662
+			    return
663
+				    /* I18N: gedcom tag ORDN */
664
+				    I18N::translate('Ordination');
665
+		    case 'ORDN:AGNC':
666
+			    return I18N::translate('Religious institution');
667
+		    case 'ORDN:DATE':
668
+			    return I18N::translate('Date of ordination');
669
+		    case 'ORDN:PLAC':
670
+			    return I18N::translate('Place of ordination');
671
+		    case 'PAGE':
672
+			    return
673
+				    /* I18N: gedcom tag PAGE */
674
+				    I18N::translate('Citation details');
675
+		    case 'PEDI':
676
+			    return
677
+				    /* I18N: gedcom tag PEDI */
678
+				    I18N::translate('Relationship to parents');
679
+		    case 'PHON':
680
+			    return
681
+				    /* I18N: gedcom tag PHON */
682
+				    I18N::translate('Phone');
683
+		    case 'PLAC':
684
+			    return
685
+				    /* I18N: gedcom tag PLAC */
686
+				    I18N::translate('Place');
687
+		    case 'PLAC:FONE':
688
+			    return I18N::translate('Phonetic place');
689
+		    case 'PLAC:ROMN':
690
+			    return I18N::translate('Romanized place');
691
+		    case 'PLAC:_HEB':
692
+			    return I18N::translate('Place in Hebrew');
693
+		    case 'POST':
694
+			    return
695
+				    /* I18N: gedcom tag POST */
696
+				    I18N::translate('Postal code');
697
+		    case 'PROB':
698
+			    return
699
+				    /* I18N: gedcom tag PROB */
700
+				    I18N::translate('Probate');
701
+		    case 'PROP':
702
+			    return
703
+				    /* I18N: gedcom tag PROP */
704
+				    I18N::translate('Property');
705
+		    case 'PUBL':
706
+			    return
707
+				    /* I18N: gedcom tag PUBL */
708
+				    I18N::translate('Publication');
709
+		    case 'QUAY':
710
+			    return
711
+				    /* I18N: gedcom tag QUAY */
712
+				    I18N::translate('Quality of data');
713
+		    case 'REFN':
714
+			    return
715
+				    /* I18N: gedcom tag REFN */
716
+				    I18N::translate('Reference number');
717
+		    case 'RELA':
718
+			    return
719
+				    /* I18N: gedcom tag RELA */
720
+				    I18N::translate('Relationship');
721
+		    case 'RELI':
722
+			    return
723
+				    /* I18N: gedcom tag RELI */
724
+				    I18N::translate('Religion');
725
+		    case 'REPO':
726
+			    return
727
+				    /* I18N: gedcom tag REPO */
728
+				    I18N::translate('Repository');
729
+		    case 'RESI':
730
+			    return
731
+				    /* I18N: gedcom tag RESI */
732
+				    I18N::translate('Residence');
733
+		    case 'RESI:DATE':
734
+			    return I18N::translate('Date of residence');
735
+		    case 'RESI:PLAC':
736
+			    return I18N::translate('Place of residence');
737
+		    case 'RESN':
738
+			    return
739
+				    /* I18N: gedcom tag RESN */
740
+				    I18N::translate('Restriction');
741
+		    case 'RETI':
742
+			    return
743
+				    /* I18N: gedcom tag RETI */
744
+				    I18N::translate('Retirement');
745
+		    case 'RETI:AGNC':
746
+			    return I18N::translate('Employer');
747
+		    case 'RFN':
748
+			    return
749
+				    /* I18N: gedcom tag RFN */
750
+				    I18N::translate('Record file number');
751
+		    case 'RIN':
752
+			    return
753
+				    /* I18N: gedcom tag RIN */
754
+				    I18N::translate('Record ID number');
755
+		    case 'ROLE':
756
+			    return
757
+				    /* I18N: gedcom tag ROLE */
758
+				    I18N::translate('Role');
759
+		    case 'ROMN':
760
+			    return
761
+				    /* I18N: gedcom tag ROMN */
762
+				    I18N::translate('Romanized');
763
+		    case 'SERV':
764
+			    return
765
+				    /* I18N: gedcom tag SERV */
766
+				    I18N::translate('Remote server');
767
+		    case 'SEX':
768
+			    return
769
+				    /* I18N: gedcom tag SEX */
770
+				    I18N::translate('Gender');
771
+		    case 'SHARED_NOTE':
772
+			    return I18N::translate('Shared note');
773
+		    case 'SLGC':
774
+			    return
775
+				    /* I18N: gedcom tag SLGC. LDS = Church of Latter Day Saints. */
776
+				    I18N::translate('LDS child sealing');
777
+		    case 'SLGC:DATE':
778
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Date of LDS child sealing');
779
+		    case 'SLGC:PLAC':
780
+			    return /* I18N: LDS = Church of Latter Day Saints. */ I18N::translate('Place of LDS child sealing');
781
+		    case 'SLGS':
782
+			    return
783
+				    /* I18N: gedcom tag SLGS. LDS = Church of Latter Day Saints. */
784
+				    I18N::translate('LDS spouse sealing');
785
+		    case 'SOUR':
786
+			    return
787
+				    /* I18N: gedcom tag SOUR */
788
+				    I18N::translate('Source');
789
+		    case 'SPFX':
790
+			    return
791
+				    /* I18N: gedcom tag SPFX */
792
+				    I18N::translate('Surname prefix');
793
+		    case 'SSN':
794
+			    return
795
+				    /* I18N: gedcom tag SSN */
796
+				    I18N::translate('Social security number');
797
+		    case 'STAE':
798
+			    return
799
+				    /* I18N: gedcom tag STAE */
800
+				    I18N::translate('State');
801
+		    case 'STAT':
802
+			    return
803
+				    /* I18N: gedcom tag STAT */
804
+				    I18N::translate('Status');
805
+		    case 'STAT:DATE':
806
+			    return I18N::translate('Status change date');
807
+		    case 'SUBM':
808
+			    return
809
+				    /* I18N: gedcom tag SUBM */
810
+				    I18N::translate('Submitter');
811
+		    case 'SUBN':
812
+			    return
813
+				    /* I18N: gedcom tag SUBN */
814
+				    I18N::translate('Submission');
815
+		    case 'SURN':
816
+			    return
817
+				    /* I18N: gedcom tag SURN */
818
+				    I18N::translate('Surname');
819
+		    case 'TEMP':
820
+			    return
821
+				    /* I18N: gedcom tag TEMP */
822
+				    I18N::translate('Temple');
823
+		    case 'TEXT':
824
+			    return
825
+				    /* I18N: gedcom tag TEXT */
826
+				    I18N::translate('Text');
827
+		    case 'TIME':
828
+			    return
829
+				    /* I18N: gedcom tag TIME */
830
+				    I18N::translate('Time');
831
+		    case 'TITL':
832
+			    return
833
+				    /* I18N: gedcom tag TITL */
834
+				    I18N::translate('Title');
835
+		    case 'TITL:FONE':
836
+			    return I18N::translate('Phonetic title');
837
+		    case 'TITL:ROMN':
838
+			    return I18N::translate('Romanized title');
839
+		    case 'TITL:_HEB':
840
+			    return I18N::translate('Title in Hebrew');
841
+		    case 'TRLR':
842
+			    return
843
+				    /* I18N: gedcom tag TRLR */
844
+				    I18N::translate('Trailer');
845
+		    case 'TYPE':
846
+			    return
847
+				    /* I18N: gedcom tag TYPE */
848
+				    I18N::translate('Type');
849
+		    case 'URL':
850
+			    return
851
+				    /* I18N: gedcom tag URL (A web address / URL) */
852
+				    I18N::translate('URL');
853
+		    case 'VERS':
854
+			    return
855
+				    /* I18N: gedcom tag VERS */
856
+				    I18N::translate('Version');
857
+		    case 'WIFE':
858
+			    return
859
+				    /* I18N: gedcom tag WIFE */
860
+				    I18N::translate('Wife');
861
+		    case 'WILL':
862
+			    return
863
+				    /* I18N: gedcom tag WILL */
864
+				    I18N::translate('Will');
865
+		    case 'WWW':
866
+			    return
867
+				    /* I18N: gedcom tag WWW (A web address / URL) */
868
+				    I18N::translate('URL');
869
+		    case '_ADOP_CHIL':
870
+			    switch ($sex) {
871
+			        case 'M':
872
+				        return I18N::translate('Adoption of a son');
873
+			        case 'F':
874
+				        return I18N::translate('Adoption of a daughter');
875
+			        default:
876
+				        return I18N::translate('Adoption of a child');
877
+			    }
878
+		    case '_ADOP_GCHI':
879
+			    switch ($sex) {
880
+			        case 'M':
881
+				        return I18N::translate('Adoption of a grandson');
882
+			        case 'F':
883
+				        return I18N::translate('Adoption of a granddaughter');
884
+			        default:
885
+				        return I18N::translate('Adoption of a grandchild');
886
+			    }
887
+		    case '_ADOP_GCH1':
888
+			    switch ($sex) {
889
+			        case 'M':
890
+				        return I18N::translateContext('daughter’s son', 'Adoption of a grandson');
891
+			        case 'F':
892
+				        return I18N::translateContext('daughter’s daughter', 'Adoption of a granddaughter');
893
+			        default:
894
+				        return I18N::translate('Adoption of a grandchild');
895
+			    }
896
+		    case '_ADOP_GCH2':
897
+			    switch ($sex) {
898
+			        case 'M':
899
+				        return I18N::translateContext('son’s son', 'Adoption of a grandson');
900
+			        case 'F':
901
+				        return I18N::translateContext('son’s daughter', 'Adoption of a granddaughter');
902
+			        default:
903
+				        return I18N::translate('Adoption of a grandchild');
904
+			    }
905
+		    case '_ADOP_HSIB':
906
+			    switch ($sex) {
907
+			        case 'M':
908
+				        return I18N::translate('Adoption of a half-brother');
909
+			        case 'F':
910
+				        return I18N::translate('Adoption of a half-sister');
911
+			        default:
912
+				        return I18N::translate('Adoption of a half-sibling');
913
+			    }
914
+		    case '_ADOP_SIBL':
915
+			    switch ($sex) {
916
+			        case 'M':
917
+				        return I18N::translate('Adoption of a brother');
918
+			        case 'F':
919
+				        return I18N::translate('Adoption of a sister');
920
+			        default:
921
+				        return I18N::translate('Adoption of a sibling');
922
+			    }
923
+		    case '_ADPF':
924
+			    switch ($sex) {
925
+			        case 'M':
926
+				        return
927
+					        /* I18N: gedcom tag _ADPF */
928
+					        I18N::translateContext('MALE', 'Adopted by father');
929
+			        case 'F':
930
+				        return
931
+					        /* I18N: gedcom tag _ADPF */
932
+					        I18N::translateContext('FEMALE', 'Adopted by father');
933
+			        default:
934
+				        return
935
+					        /* I18N: gedcom tag _ADPF */
936
+					        I18N::translate('Adopted by father');
937
+			    }
938
+		    case '_ADPM':
939
+			    switch ($sex) {
940
+			        case 'M':
941
+				        return
942
+					        /* I18N: gedcom tag _ADPM */
943
+					        I18N::translateContext('MALE', 'Adopted by mother');
944
+			        case 'F':
945
+				        return
946
+					        /* I18N: gedcom tag _ADPM */
947
+					        I18N::translateContext('FEMALE', 'Adopted by mother');
948
+			        default:
949
+				        return
950
+					        /* I18N: gedcom tag _ADPM */
951
+					        I18N::translate('Adopted by mother');
952
+			    }
953
+		    case '_AKA':
954
+		    case '_AKAN':
955
+			    switch ($sex) {
956
+			        case 'M':
957
+				        return
958
+					        /* I18N: gedcom tag _AKA */
959
+					        I18N::translateContext('MALE', 'Also known as');
960
+			        case 'F':
961
+				        return
962
+					        /* I18N: gedcom tag _AKA */
963
+					        I18N::translateContext('FEMALE', 'Also known as');
964
+			        default:
965
+				        return
966
+					        /* I18N: gedcom tag _AKA */
967
+					        I18N::translate('Also known as');
968
+			    }
969
+		    case '_ASSO':
970
+			    return
971
+				    /* I18N: gedcom tag _ASSO */
972
+				    I18N::translate('Associate'); /* see also ASSO */
973
+		    case '_BAPM_CHIL':
974
+			    switch ($sex) {
975
+			        case 'M':
976
+				        return I18N::translate('Baptism of a son');
977
+			        case 'F':
978
+				        return I18N::translate('Baptism of a daughter');
979
+			        default:
980
+				        return I18N::translate('Baptism of a child');
981
+			    }
982
+		    case '_BAPM_GCHI':
983
+			    switch ($sex) {
984
+			        case 'M':
985
+				        return I18N::translate('Baptism of a grandson');
986
+			        case 'F':
987
+				        return I18N::translate('Baptism of a granddaughter');
988
+			        default:
989
+				        return I18N::translate('Baptism of a grandchild');
990
+			    }
991
+		    case '_BAPM_GCH1':
992
+			    switch ($sex) {
993
+			        case 'M':
994
+				        return I18N::translateContext('daughter’s son', 'Baptism of a grandson');
995
+			        case 'F':
996
+				        return I18N::translateContext('daughter’s daughter', 'Baptism of a granddaughter');
997
+			        default:
998
+				        return I18N::translate('Baptism of a grandchild');
999
+			    }
1000
+		    case '_BAPM_GCH2':
1001
+			    switch ($sex) {
1002
+			        case 'M':
1003
+				        return I18N::translateContext('son’s son', 'Baptism of a grandson');
1004
+			        case 'F':
1005
+				        return I18N::translateContext('son’s daughter', 'Baptism of a granddaughter');
1006
+			        default:
1007
+				        return I18N::translate('Baptism of a grandchild');
1008
+			    }
1009
+		    case '_BAPM_HSIB':
1010
+			    switch ($sex) {
1011
+			        case 'M':
1012
+				        return I18N::translate('Baptism of a half-brother');
1013
+			        case 'F':
1014
+				        return I18N::translate('Baptism of a half-sister');
1015
+			        default:
1016
+				        return I18N::translate('Baptism of a half-sibling');
1017
+			    }
1018
+		    case '_BAPM_SIBL':
1019
+			    switch ($sex) {
1020
+			        case 'M':
1021
+				        return I18N::translate('Baptism of a brother');
1022
+			        case 'F':
1023
+				        return I18N::translate('Baptism of a sister');
1024
+			        default:
1025
+				        return I18N::translate('Baptism of a sibling');
1026
+			    }
1027
+		    case '_BIBL':
1028
+			    return
1029
+				    /* I18N: gedcom tag _BIBL */
1030
+				    I18N::translate('Bibliography');
1031
+		    case '_BIRT_CHIL':
1032
+			    switch ($sex) {
1033
+			        case 'M':
1034
+				        return I18N::translate('Birth of a son');
1035
+			        case 'F':
1036
+				        return I18N::translate('Birth of a daughter');
1037
+			        default:
1038
+				        return I18N::translate('Birth of a child');
1039
+			    }
1040
+		    case '_BIRT_GCHI':
1041
+			    switch ($sex) {
1042
+			        case 'M':
1043
+				        return I18N::translate('Birth of a grandson');
1044
+			        case 'F':
1045
+				        return I18N::translate('Birth of a granddaughter');
1046
+			        default:
1047
+				        return I18N::translate('Birth of a grandchild');
1048
+			    }
1049
+		    case '_BIRT_GCH1':
1050
+			    switch ($sex) {
1051
+			        case 'M':
1052
+				        return I18N::translateContext('daughter’s son', 'Birth of a grandson');
1053
+			        case 'F':
1054
+				        return I18N::translateContext('daughter’s daughter', 'Birth of a granddaughter');
1055
+			        default:
1056
+				        return I18N::translate('Birth of a grandchild');
1057
+			    }
1058
+		    case '_BIRT_GCH2':
1059
+			    switch ($sex) {
1060
+			        case 'M':
1061
+				        return I18N::translateContext('son’s son', 'Birth of a grandson');
1062
+			        case 'F':
1063
+				        return I18N::translateContext('son’s daughter', 'Birth of a granddaughter');
1064
+			        default:
1065
+				        return I18N::translate('Birth of a grandchild');
1066
+			    }
1067
+		    case '_BIRT_HSIB':
1068
+			    switch ($sex) {
1069
+			        case 'M':
1070
+				        return I18N::translate('Birth of a half-brother');
1071
+			        case 'F':
1072
+				        return I18N::translate('Birth of a half-sister');
1073
+			        default:
1074
+				        return I18N::translate('Birth of a half-sibling');
1075
+			    }
1076
+		    case '_BIRT_SIBL':
1077
+			    switch ($sex) {
1078
+			        case 'M':
1079
+				        return I18N::translate('Birth of a brother');
1080
+			        case 'F':
1081
+				        return I18N::translate('Birth of a sister');
1082
+			        default:
1083
+				        return I18N::translate('Birth of a sibling');
1084
+			    }
1085
+		    case '_BRTM':
1086
+			    return
1087
+				    /* I18N: gedcom tag _BRTM */
1088
+				    I18N::translate('Brit milah');
1089
+		    case '_BRTM:DATE':
1090
+			    return I18N::translate('Date of brit milah');
1091
+		    case '_BRTM:PLAC':
1092
+			    return I18N::translate('Place of brit milah');
1093
+		    case '_BURI_CHIL':
1094
+			    switch ($sex) {
1095
+			        case 'M':
1096
+				        return I18N::translate('Burial of a son');
1097
+			        case 'F':
1098
+				        return I18N::translate('Burial of a daughter');
1099
+			        default:
1100
+				        return I18N::translate('Burial of a child');
1101
+			    }
1102
+		    case '_BURI_GCHI':
1103
+			    switch ($sex) {
1104
+			        case 'M':
1105
+				        return I18N::translate('Burial of a grandson');
1106
+			        case 'F':
1107
+				        return I18N::translate('Burial of a granddaughter');
1108
+			        default:
1109
+				        return I18N::translate('Burial of a grandchild');
1110
+			    }
1111
+		    case '_BURI_GCH1':
1112
+			    switch ($sex) {
1113
+			        case 'M':
1114
+				        return I18N::translateContext('daughter’s son', 'Burial of a grandson');
1115
+			        case 'F':
1116
+				        return I18N::translateContext('daughter’s daughter', 'Burial of a granddaughter');
1117
+			        default:
1118
+				        return I18N::translate('Burial of a grandchild');
1119
+			    }
1120
+		    case '_BURI_GCH2':
1121
+			    switch ($sex) {
1122
+			        case 'M':
1123
+				        return I18N::translateContext('son’s son', 'Burial of a grandson');
1124
+			        case 'F':
1125
+				        return I18N::translateContext('son’s daughter', 'Burial of a granddaughter');
1126
+			        default:
1127
+				        return I18N::translate('Burial of a grandchild');
1128
+			    }
1129
+		    case '_BURI_GPAR':
1130
+			    switch ($sex) {
1131
+			        case 'M':
1132
+				        return I18N::translate('Burial of a grandfather');
1133
+			        case 'F':
1134
+				        return I18N::translate('Burial of a grandmother');
1135
+			        default:
1136
+				        return I18N::translate('Burial of a grandparent');
1137
+			    }
1138
+		    case '_BURI_GPA1':
1139
+			    switch ($sex) {
1140
+			        case 'M':
1141
+				        return I18N::translate('Burial of a paternal grandfather');
1142
+			        case 'F':
1143
+				        return I18N::translate('Burial of a paternal grandmother');
1144
+			        default:
1145
+				        return I18N::translate('Burial of a paternal grandparent');
1146
+			    }
1147
+		    case '_BURI_GPA2':
1148
+			    switch ($sex) {
1149
+			        case 'M':
1150
+				        return I18N::translate('Burial of a maternal grandfather');
1151
+			        case 'F':
1152
+				        return I18N::translate('Burial of a maternal grandmother');
1153
+			        default:
1154
+				        return I18N::translate('Burial of a maternal grandparent');
1155
+			    }
1156
+		    case '_BURI_HSIB':
1157
+			    switch ($sex) {
1158
+			        case 'M':
1159
+				        return I18N::translate('Burial of a half-brother');
1160
+			        case 'F':
1161
+				        return I18N::translate('Burial of a half-sister');
1162
+			        default:
1163
+				        return I18N::translate('Burial of a half-sibling');
1164
+			    }
1165
+		    case '_BURI_PARE':
1166
+			    switch ($sex) {
1167
+			        case 'M':
1168
+				        return I18N::translate('Burial of a father');
1169
+			        case 'F':
1170
+				        return I18N::translate('Burial of a mother');
1171
+			        default:
1172
+				        return I18N::translate('Burial of a parent');
1173
+			    }
1174
+		    case '_BURI_SIBL':
1175
+			    switch ($sex) {
1176
+			        case 'M':
1177
+				        return I18N::translate('Burial of a brother');
1178
+			        case 'F':
1179
+				        return I18N::translate('Burial of a sister');
1180
+			        default:
1181
+				        return I18N::translate('Burial of a sibling');
1182
+			    }
1183
+		    case '_BURI_SPOU':
1184
+			    switch ($sex) {
1185
+			        case 'M':
1186
+				        return I18N::translate('Burial of a husband');
1187
+			        case 'F':
1188
+				        return I18N::translate('Burial of a wife');
1189
+			        default:
1190
+				        return I18N::translate('Burial of a spouse');
1191
+			    }
1192
+		    case '_CHR_CHIL':
1193
+			    switch ($sex) {
1194
+			        case 'M':
1195
+				        return I18N::translate('Christening of a son');
1196
+			        case 'F':
1197
+				        return I18N::translate('Christening of a daughter');
1198
+			        default:
1199
+				        return I18N::translate('Christening of a child');
1200
+			    }
1201
+		    case '_CHR_GCHI':
1202
+			    switch ($sex) {
1203
+			        case 'M':
1204
+				        return I18N::translate('Christening of a grandson');
1205
+			        case 'F':
1206
+				        return I18N::translate('Christening of a granddaughter');
1207
+			        default:
1208
+				        return I18N::translate('Christening of a grandchild');
1209
+			    }
1210
+		    case '_CHR_GCH1':
1211
+			    switch ($sex) {
1212
+			        case 'M':
1213
+				        return I18N::translateContext('daughter’s son', 'Christening of a grandson');
1214
+			        case 'F':
1215
+				        return I18N::translateContext('daughter’s daughter', 'Christening of a granddaughter');
1216
+			        default:
1217
+				        return I18N::translate('Christening of a grandchild');
1218
+			    }
1219
+		    case '_CHR_GCH2':
1220
+			    switch ($sex) {
1221
+			        case 'M':
1222
+				        return I18N::translateContext('son’s son', 'Christening of a grandson');
1223
+			        case 'F':
1224
+				        return I18N::translateContext('son’s daughter', 'Christening of a granddaughter');
1225
+			        default:
1226
+				        return I18N::translate('Christening of a grandchild');
1227
+			    }
1228
+		    case '_CHR_HSIB':
1229
+			    switch ($sex) {
1230
+			        case 'M':
1231
+				        return I18N::translate('Christening of a half-brother');
1232
+			        case 'F':
1233
+				        return I18N::translate('Christening of a half-sister');
1234
+			        default:
1235
+				        return I18N::translate('Christening of a half-sibling');
1236
+			    }
1237
+		    case '_CHR_SIBL':
1238
+			    switch ($sex) {
1239
+			        case 'M':
1240
+				        return I18N::translate('Christening of a brother');
1241
+			        case 'F':
1242
+				        return I18N::translate('Christening of a sister');
1243
+			        default:
1244
+				        return I18N::translate('Christening of a sibling');
1245
+			    }
1246
+		    case '_COML':
1247
+			    return
1248
+				    /* I18N: gedcom tag _COML */
1249
+				    I18N::translate('Common law marriage');
1250
+		    case '_CREM_CHIL':
1251
+			    switch ($sex) {
1252
+			        case 'M':
1253
+				        return I18N::translate('Cremation of a son');
1254
+			        case 'F':
1255
+				        return I18N::translate('Cremation of a daughter');
1256
+			        default:
1257
+				        return I18N::translate('Cremation of a child');
1258
+			    }
1259
+		    case '_CREM_GCHI':
1260
+			    switch ($sex) {
1261
+			        case 'M':
1262
+				        return I18N::translate('Cremation of a grandson');
1263
+			        case 'F':
1264
+				        return I18N::translate('Cremation of a granddaughter');
1265
+			        default:
1266
+				        return I18N::translate('Cremation of a grandchild');
1267
+			    }
1268
+		    case '_CREM_GCH1':
1269
+			    switch ($sex) {
1270
+			        case 'M':
1271
+				        return I18N::translateContext('daughter’s son', 'Cremation of a grandson');
1272
+			        case 'F':
1273
+				        return I18N::translateContext('daughter’s daughter', 'Cremation of a granddaughter');
1274
+			        default:
1275
+				        return I18N::translate('Cremation of a grandchild');
1276
+			    }
1277
+		    case '_CREM_GCH2':
1278
+			    switch ($sex) {
1279
+			        case 'M':
1280
+				        return I18N::translateContext('son’s son', 'Cremation of a grandson');
1281
+			        case 'F':
1282
+				        return I18N::translateContext('son’s daughter', 'Cremation of a granddaughter');
1283
+			        default:
1284
+				        return I18N::translate('Cremation of a grandchild');
1285
+			    }
1286
+		    case '_CREM_GPAR':
1287
+			    switch ($sex) {
1288
+			        case 'M':
1289
+				        return I18N::translate('Cremation of a grandfather');
1290
+			        case 'F':
1291
+				        return I18N::translate('Cremation of a grandmother');
1292
+			        default:
1293
+				        return I18N::translate('Cremation of a grand-parent');
1294
+			    }
1295
+		    case '_CREM_GPA1':
1296
+			    switch ($sex) {
1297
+			        case 'M':
1298
+				        return I18N::translate('Cremation of a paternal grandfather');
1299
+			        case 'F':
1300
+				        return I18N::translate('Cremation of a paternal grandmother');
1301
+			        default:
1302
+				        return I18N::translate('Cremation of a grand-parent');
1303
+			    }
1304
+		    case '_CREM_GPA2':
1305
+			    switch ($sex) {
1306
+			        case 'M':
1307
+				        return I18N::translate('Cremation of a maternal grandfather');
1308
+			        case 'F':
1309
+				        return I18N::translate('Cremation of a maternal grandmother');
1310
+			        default:
1311
+				        return I18N::translate('Cremation of a grand-parent');
1312
+			    }
1313
+		    case '_CREM_HSIB':
1314
+			    switch ($sex) {
1315
+			        case 'M':
1316
+				        return I18N::translate('Cremation of a half-brother');
1317
+			        case 'F':
1318
+				        return I18N::translate('Cremation of a half-sister');
1319
+			        default:
1320
+				        return I18N::translate('Cremation of a half-sibling');
1321
+			    }
1322
+		    case '_CREM_PARE':
1323
+			    switch ($sex) {
1324
+			        case 'M':
1325
+				        return I18N::translate('Cremation of a father');
1326
+			        case 'F':
1327
+				        return I18N::translate('Cremation of a mother');
1328
+			        default:
1329
+				        return I18N::translate('Cremation of a parent');
1330
+			    }
1331
+		    case '_CREM_SIBL':
1332
+			    switch ($sex) {
1333
+			        case 'M':
1334
+				        return I18N::translate('Cremation of a brother');
1335
+			        case 'F':
1336
+				        return I18N::translate('Cremation of a sister');
1337
+			        default:
1338
+				        return I18N::translate('Cremation of a sibling');
1339
+			    }
1340
+		    case '_CREM_SPOU':
1341
+			    switch ($sex) {
1342
+			        case 'M':
1343
+				        return I18N::translate('Cremation of a husband');
1344
+			        case 'F':
1345
+				        return I18N::translate('Cremation of a wife');
1346
+			        default:
1347
+				        return I18N::translate('Cremation of a spouse');
1348
+			    }
1349
+		    case '_DBID':
1350
+			    return
1351
+				    /* I18N: gedcom tag _DBID */
1352
+				    I18N::translate('Linked database ID');
1353
+		    case '_DEAT_CHIL':
1354
+			    switch ($sex) {
1355
+			        case 'M':
1356
+				        return I18N::translate('Death of a son');
1357
+			        case 'F':
1358
+				        return I18N::translate('Death of a daughter');
1359
+			        default:
1360
+				        return I18N::translate('Death of a child');
1361
+			    }
1362
+		    case '_DEAT_GCHI':
1363
+			    switch ($sex) {
1364
+			        case 'M':
1365
+				        return I18N::translate('Death of a grandson');
1366
+			        case 'F':
1367
+				        return I18N::translate('Death of a granddaughter');
1368
+			        default:
1369
+				        return I18N::translate('Death of a grandchild');
1370
+			    }
1371
+		    case '_DEAT_GCH1':
1372
+			    switch ($sex) {
1373
+			        case 'M':
1374
+				        return I18N::translateContext('daughter’s son', 'Death of a grandson');
1375
+			        case 'F':
1376
+				        return I18N::translateContext('daughter’s daughter', 'Death of a granddaughter');
1377
+			        default:
1378
+				        return I18N::translate('Death of a grandchild');
1379
+			    }
1380
+		    case '_DEAT_GCH2':
1381
+			    switch ($sex) {
1382
+			        case 'M':
1383
+				        return I18N::translateContext('son’s son', 'Death of a grandson');
1384
+			        case 'F':
1385
+				        return I18N::translateContext('son’s daughter', 'Death of a granddaughter');
1386
+			        default:
1387
+				        return I18N::translate('Death of a grandchild');
1388
+			    }
1389
+		    case '_DEAT_GPAR':
1390
+			    switch ($sex) {
1391
+			        case 'M':
1392
+				        return I18N::translate('Death of a grandfather');
1393
+			        case 'F':
1394
+				        return I18N::translate('Death of a grandmother');
1395
+			        default:
1396
+				        return I18N::translate('Death of a grand-parent');
1397
+			    }
1398
+		    case '_DEAT_GPA1':
1399
+			    switch ($sex) {
1400
+			        case 'M':
1401
+				        return I18N::translate('Death of a paternal grandfather');
1402
+			        case 'F':
1403
+				        return I18N::translate('Death of a paternal grandmother');
1404
+			        default:
1405
+				        return I18N::translate('Death of a grand-parent');
1406
+			    }
1407
+		    case '_DEAT_GPA2':
1408
+			    switch ($sex) {
1409
+			        case 'M':
1410
+				        return I18N::translate('Death of a maternal grandfather');
1411
+			        case 'F':
1412
+				        return I18N::translate('Death of a maternal grandmother');
1413
+			        default:
1414
+				        return I18N::translate('Death of a grand-parent');
1415
+			    }
1416
+		    case '_DEAT_HSIB':
1417
+			    switch ($sex) {
1418
+			        case 'M':
1419
+				        return I18N::translate('Death of a half-brother');
1420
+			        case 'F':
1421
+				        return I18N::translate('Death of a half-sister');
1422
+			        default:
1423
+				        return I18N::translate('Death of a half-sibling');
1424
+			    }
1425
+		    case '_DEAT_PARE':
1426
+			    switch ($sex) {
1427
+			        case 'M':
1428
+				        return I18N::translate('Death of a father');
1429
+			        case 'F':
1430
+				        return I18N::translate('Death of a mother');
1431
+			        default:
1432
+				        return I18N::translate('Death of a parent');
1433
+			    }
1434
+		    case '_DEAT_SIBL':
1435
+			    switch ($sex) {
1436
+			        case 'M':
1437
+				        return I18N::translate('Death of a brother');
1438
+			        case 'F':
1439
+				        return I18N::translate('Death of a sister');
1440
+			        default:
1441
+				        return I18N::translate('Death of a sibling');
1442
+			    }
1443
+		    case '_DEAT_SPOU':
1444
+			    switch ($sex) {
1445
+			        case 'M':
1446
+				        return I18N::translate('Death of a husband');
1447
+			        case 'F':
1448
+				        return I18N::translate('Death of a wife');
1449
+			        default:
1450
+				        return I18N::translate('Death of a spouse');
1451
+			    }
1452
+		    case '_DEG':
1453
+			    return
1454
+				    /* I18N: gedcom tag _DEG */
1455
+				    I18N::translate('Degree');
1456
+		    case '_DETS':
1457
+			    return
1458
+				    /* I18N: gedcom tag _DETS */
1459
+				    I18N::translate('Death of one spouse');
1460
+		    case '_DNA':
1461
+			    return
1462
+				    /* I18N: gedcom tag _DNA (from FTM 2010) */
1463
+				    I18N::translate('DNA markers');
1464
+		    case '_EMAIL':
1465
+			    return
1466
+				    /* I18N: gedcom tag _EMAIL */
1467
+				    I18N::translate('Email address');
1468
+		    case '_EYEC':
1469
+			    return
1470
+				    /* I18N: gedcom tag _EYEC */
1471
+				    I18N::translate('Eye color');
1472
+		    case '_FA1':
1473
+			    return I18N::translate('Fact 1');
1474
+		    case '_FA2':
1475
+			    return I18N::translate('Fact 2');
1476
+		    case '_FA3':
1477
+			    return I18N::translate('Fact 3');
1478
+		    case '_FA4':
1479
+			    return I18N::translate('Fact 4');
1480
+		    case '_FA5':
1481
+			    return I18N::translate('Fact 5');
1482
+		    case '_FA6':
1483
+			    return I18N::translate('Fact 6');
1484
+		    case '_FA7':
1485
+			    return I18N::translate('Fact 7');
1486
+		    case '_FA8':
1487
+			    return I18N::translate('Fact 8');
1488
+		    case '_FA9':
1489
+			    return I18N::translate('Fact 9');
1490
+		    case '_FA10':
1491
+			    return I18N::translate('Fact 10');
1492
+		    case '_FA11':
1493
+			    return I18N::translate('Fact 11');
1494
+		    case '_FA12':
1495
+			    return I18N::translate('Fact 12');
1496
+		    case '_FA13':
1497
+			    return I18N::translate('Fact 13');
1498
+		    case '_FNRL':
1499
+			    return
1500
+				    /* I18N: gedcom tag _FNRL */
1501
+				    I18N::translate('Funeral');
1502
+		    case '_FREL':
1503
+			    return
1504
+				    /* I18N: gedcom tag _FREL */
1505
+				    I18N::translate('Relationship to father');
1506
+		    case '_GEDF':
1507
+			    return
1508
+				    /* I18N: gedcom tag _GEDF */
1509
+				    I18N::translate('GEDCOM file');
1510
+		    case '_GODP':
1511
+			    return
1512
+				    /* I18N: gedcom tag _GODP */
1513
+				    I18N::translate('Godparent');
1514
+		    case '_HAIR':
1515
+			    return
1516
+				    /* I18N: gedcom tag _HAIR */
1517
+				    I18N::translate('Hair color');
1518
+		    case '_HEB':
1519
+			    return
1520
+				    /* I18N: gedcom tag _HEB */
1521
+				    I18N::translate('Hebrew');
1522
+		    case '_HEIG':
1523
+			    return
1524
+				    /* I18N: gedcom tag _HEIG */
1525
+				    I18N::translate('Height');
1526
+		    case '_HNM':
1527
+			    return
1528
+				    /* I18N: gedcom tag _HNM */
1529
+				    I18N::translate('Hebrew name');
1530
+		    case '_HOL':
1531
+			    return
1532
+				    /* I18N: gedcom tag _HOL */
1533
+				    I18N::translate('Holocaust');
1534
+		    case '_INTE':
1535
+			    switch ($sex) {
1536
+			        case 'M':
1537
+				        return
1538
+					        /* I18N: gedcom tag _INTE */
1539
+					        I18N::translateContext('MALE', 'Interred');
1540
+			        case 'F':
1541
+				        return
1542
+					        /* I18N: gedcom tag _INTE */
1543
+					        I18N::translateContext('FEMALE', 'Interred');
1544
+			        default:
1545
+				        return
1546
+					        /* I18N: gedcom tag _INTE */
1547
+					        I18N::translate('Interred');
1548
+			    }
1549
+		    case '_LOC':
1550
+			    return
1551
+				    /* I18N: gedcom tag _LOC */
1552
+				    I18N::translate('Location');
1553
+		    case '_MARI':
1554
+			    return
1555
+				    /* I18N: gedcom tag _MARI */
1556
+				    I18N::translate('Marriage intention');
1557
+		    case '_MARNM':
1558
+			    return
1559
+				    /* I18N: gedcom tag _MARNM */
1560
+				    I18N::translate('Married name');
1561
+		    case '_PRIM':
1562
+			    return
1563
+				    /* I18N: gedcom tag _PRIM */
1564
+				    I18N::translate('Highlighted image');
1565
+		    case '_MARNM_SURN':
1566
+			    return I18N::translate('Married surname');
1567
+		    case '_MARR_CHIL':
1568
+			    switch ($sex) {
1569
+			        case 'M':
1570
+				        return I18N::translate('Marriage of a son');
1571
+			        case 'F':
1572
+				        return I18N::translate('Marriage of a daughter');
1573
+			        default:
1574
+				        return I18N::translate('Marriage of a child');
1575
+			    }
1576
+		    case '_MARR_FAMC':
1577
+			    return
1578
+				    /* I18N: ...to each other */
1579
+				    I18N::translate('Marriage of parents');
1580
+		    case '_MARR_GCHI':
1581
+			    switch ($sex) {
1582
+			        case 'M':
1583
+				        return I18N::translate('Marriage of a grandson');
1584
+			        case 'F':
1585
+				        return I18N::translate('Marriage of a granddaughter');
1586
+			        default:
1587
+				        return I18N::translate('Marriage of a grandchild');
1588
+			    }
1589
+		    case '_MARR_GCH1':
1590
+			    switch ($sex) {
1591
+			        case 'M':
1592
+				        return I18N::translateContext('daughter’s son', 'Marriage of a grandson');
1593
+			        case 'F':
1594
+				        return I18N::translateContext('daughter’s daughter', 'Marriage of a granddaughter');
1595
+			        default:
1596
+				        return I18N::translate('Marriage of a grandchild');
1597
+			    }
1598
+		    case '_MARR_GCH2':
1599
+			    switch ($sex) {
1600
+			        case 'M':
1601
+				        return I18N::translateContext('son’s son', 'Marriage of a grandson');
1602
+			        case 'F':
1603
+				        return I18N::translateContext('son’s daughter', 'Marriage of a granddaughter');
1604
+			        default:
1605
+				        return I18N::translate('Marriage of a grandchild');
1606
+			    }
1607
+		    case '_MARR_HSIB':
1608
+			    switch ($sex) {
1609
+			        case 'M':
1610
+				        return I18N::translate('Marriage of a half-brother');
1611
+			        case 'F':
1612
+				        return I18N::translate('Marriage of a half-sister');
1613
+			        default:
1614
+				        return I18N::translate('Marriage of a half-sibling');
1615
+			    }
1616
+		    case '_MARR_PARE':
1617
+			    switch ($sex) {
1618
+			        case 'M':
1619
+				        return
1620
+					        /* I18N: ...to another spouse */
1621
+					        I18N::translate('Marriage of a father');
1622
+			        case 'F':
1623
+				        return
1624
+					        /* I18N: ...to another spouse */
1625
+					        I18N::translate('Marriage of a mother');
1626
+			        default:
1627
+				        return
1628
+					        /* I18N: ...to another spouse */
1629
+					        I18N::translate('Marriage of a parent');
1630
+			    }
1631
+		    case '_MARR_SIBL':
1632
+			    switch ($sex) {
1633
+			        case 'M':
1634
+				        return I18N::translate('Marriage of a brother');
1635
+			        case 'F':
1636
+				        return I18N::translate('Marriage of a sister');
1637
+			        default:
1638
+				        return I18N::translate('Marriage of a sibling');
1639
+			    }
1640
+		    case '_MBON':
1641
+			    return
1642
+				    /* I18N: gedcom tag _MBON */
1643
+				    I18N::translate('Marriage bond');
1644
+		    case '_MDCL':
1645
+			    return
1646
+				    /* I18N: gedcom tag _MDCL */
1647
+				    I18N::translate('Medical');
1648
+		    case '_MEDC':
1649
+			    return
1650
+				    /* I18N: gedcom tag _MEDC */
1651
+				    I18N::translate('Medical condition');
1652
+		    case '_MEND':
1653
+			    return
1654
+				    /* I18N: gedcom tag _MEND */
1655
+				    I18N::translate('Marriage ending status');
1656
+		    case '_MILI':
1657
+			    return
1658
+				    /* I18N: gedcom tag _MILI */
1659
+				    I18N::translate('Military');
1660
+		    case '_MILT':
1661
+			    return
1662
+				    /* I18N: gedcom tag _MILT */
1663
+				    I18N::translate('Military service');
1664
+		    case '_MREL':
1665
+			    return
1666
+				    /* I18N: gedcom tag _MREL */
1667
+				    I18N::translate('Relationship to mother');
1668
+		    case '_MSTAT':
1669
+			    return
1670
+				    /* I18N: gedcom tag _MSTAT */
1671
+				    I18N::translate('Marriage beginning status');
1672
+		    case '_NAME':
1673
+			    return
1674
+				    /* I18N: gedcom tag _NAME */
1675
+				    I18N::translate('Mailing name');
1676
+		    case '_NAMS':
1677
+			    return
1678
+				    /* I18N: gedcom tag _NAMS */
1679
+				    I18N::translate('Namesake');
1680
+		    case '_NLIV':
1681
+			    return
1682
+				    /* I18N: gedcom tag _NLIV */
1683
+				    I18N::translate('Not living');
1684
+		    case '_NMAR':
1685
+			    switch ($sex) {
1686
+			        case 'M':
1687
+				        return
1688
+					        /* I18N: gedcom tag _NMAR */
1689
+					        I18N::translateContext('MALE', 'Never married');
1690
+			        case 'F':
1691
+				        return
1692
+					        /* I18N: gedcom tag _NMAR */
1693
+					        I18N::translateContext('FEMALE', 'Never married');
1694
+			        default:
1695
+				        return
1696
+					        /* I18N: gedcom tag _NMAR */
1697
+					        I18N::translate('Never married');
1698
+			    }
1699
+		    case '_NMR':
1700
+			    switch ($sex) {
1701
+			        case 'M':
1702
+				        return
1703
+					        /* I18N: gedcom tag _NMR */
1704
+					        I18N::translateContext('MALE', 'Not married');
1705
+			        case 'F':
1706
+				        return
1707
+					        /* I18N: gedcom tag _NMR */
1708
+					        I18N::translateContext('FEMALE', 'Not married');
1709
+			        default:
1710
+				        return
1711
+					        /* I18N: gedcom tag _NMR */
1712
+					        I18N::translate('Not married');
1713
+			    }
1714
+		    case '_WT_USER':
1715
+			    return I18N::translate('by');
1716
+		    case '_PRMN':
1717
+			    return
1718
+				    /* I18N: gedcom tag _PRMN */
1719
+				    I18N::translate('Permanent number');
1720
+		    case '_SCBK':
1721
+			    return
1722
+				    /* I18N: gedcom tag _SCBK */
1723
+				    I18N::translate('Scrapbook');
1724
+		    case '_SEPR':
1725
+			    return
1726
+				    /* I18N: gedcom tag _SEPR */
1727
+				    I18N::translate('Separated');
1728
+		    case '_SSHOW':
1729
+			    return
1730
+				    /* I18N: gedcom tag _SSHOW */
1731
+				    I18N::translate('Slide show');
1732
+		    case '_STAT':
1733
+			    return
1734
+				    /* I18N: gedcom tag _STAT */
1735
+				    I18N::translate('Marriage status');
1736
+		    case '_SUBQ':
1737
+			    return
1738
+				    /* I18N: gedcom tag _SUBQ */
1739
+				    I18N::translate('Short version');
1740
+		    case '_TODO':
1741
+			    return
1742
+				    /* I18N: gedcom tag _TODO */
1743
+				    I18N::translate('Research task');
1744
+		    case '_TYPE':
1745
+			    return
1746
+				    /* I18N: gedcom tag _TYPE */
1747
+				    I18N::translate('Media type');
1748
+		    case '_UID':
1749
+			    return
1750
+				    /* I18N: gedcom tag _UID */
1751
+				    I18N::translate('Unique identifier');
1752
+		    case '_URL':
1753
+			    return
1754
+				    /* I18N: gedcom tag _URL */
1755
+				    I18N::translate('URL');
1756
+		    case '_WEIG':
1757
+			    return
1758
+				    /* I18N: gedcom tag _WEIG */
1759
+				    I18N::translate('Weight');
1760
+		    case '_WITN':
1761
+			    return
1762
+				    /* I18N: gedcom tag _WITN */
1763
+				    I18N::translate('Witness');
1764
+		    case '_WT_OBJE_SORT':
1765
+			    return
1766
+				    /* I18N: gedcom tag _WT_OBJE_SORT */
1767
+				    I18N::translate('Re-order media');
1768
+		    case '_YART':
1769
+			    return /* I18N: gedcom tag _YART - A yahrzeit is a special anniversary of death in the Hebrew faith/calendar. */ I18N::translate('Yahrzeit');
1770
+			    // Brit milah applies only to males, no need for male/female translations
1771
+		    case '__BRTM_CHIL':
1772
+			    return I18N::translate('Brit milah of a son');
1773
+		    case '__BRTM_GCHI':
1774
+			    return I18N::translate('Brit milah of a grandson');
1775
+		    case '__BRTM_GCH1':
1776
+			    return I18N::translateContext('daughter’s son', 'Brit milah of a grandson');
1777
+		    case '__BRTM_GCH2':
1778
+			    return I18N::translateContext('son’s son', 'Brit milah of a grandson');
1779
+		    case '__BRTM_HSIB':
1780
+			    return I18N::translate('Brit milah of a half-brother');
1781
+		    case '__BRTM_SIBL':
1782
+			    return I18N::translate('Brit milah of a brother');
1783
+			    // These "pseudo" tags are generated internally to present information about a media object
1784
+		    case '__FILE_SIZE__':
1785
+			    return I18N::translate('File size');
1786
+		    case '__IMAGE_SIZE__':
1787
+			    return I18N::translate('Image dimensions');
1788
+		    default:
1789
+			    // If no specialisation exists (e.g. DEAT:CAUS), then look for the general (CAUS)
1790
+			    if (strpos($tag, ':')) {
1791
+				    list(, $tag) = explode(':', $tag, 2);
1792 1792
 
1793
-				return self::getLabel($tag, $record);
1794
-			}
1793
+				    return self::getLabel($tag, $record);
1794
+			    }
1795 1795
 
1796
-			// Still no translation? Highlight this as an error
1797
-			return '<span class="error" title="' . I18N::translate('Unrecognized GEDCOM code') . '">' . Filter::escapeHtml($tag) . '</span>';
1796
+			    // Still no translation? Highlight this as an error
1797
+			    return '<span class="error" title="' . I18N::translate('Unrecognized GEDCOM code') . '">' . Filter::escapeHtml($tag) . '</span>';
1798 1798
 		}
1799 1799
 	}
1800 1800
 
@@ -1823,69 +1823,69 @@  discard block
 block discarded – undo
1823 1823
 	 */
1824 1824
 	public static function getPicklistFacts($fact_type) {
1825 1825
 		switch ($fact_type) {
1826
-		case 'INDI':
1827
-			$tags = array(
1828
-				// Facts, attributes for individuals (no links to FAMs)
1829
-				'RESN', 'NAME', 'SEX', 'BIRT', 'CHR', 'DEAT', 'BURI', 'CREM',
1830
-				'ADOP', 'BAPM', 'BARM', 'BASM', 'BLES', 'CHRA', 'CONF', 'FCOM', 'ORDN',
1831
-				'NATU', 'EMIG', 'IMMI', 'CENS', 'PROB', 'WILL', 'GRAD', 'RETI', 'EVEN',
1832
-				'CAST', 'DSCR', 'EDUC', 'IDNO', 'NATI', 'NCHI', 'NMR',
1833
-				'OCCU', 'PROP', 'RELI', 'RESI', 'SSN', 'TITL', 'FACT',
1834
-				'BAPL', 'CONL', 'ENDL', 'SLGC',
1835
-				'SUBM', 'ASSO', 'ALIA', 'ANCI', 'DESI', 'RFN', 'AFN',
1836
-				'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1837
-				// non standard tags
1838
-				'_BRTM', '_DEG', '_DNA', '_EYEC', '_FNRL', '_HAIR', '_HEIG', '_HNM',
1839
-				'_HOL', '_INTE', '_MDCL', '_MEDC', '_MILI', '_MILT', '_NAME', '_NAMS',
1840
-				'_NLIV', '_NMAR', '_PRMN', '_TODO', '_UID', '_WEIG', '_YART',
1841
-			);
1842
-			break;
1843
-		case 'FAM':
1844
-			$tags = array(
1845
-				// Facts for families, left out HUSB, WIFE & CHIL links
1846
-				'RESN', 'ANUL', 'CENS', 'DIV', 'DIVF', 'ENGA', 'MARB', 'MARC',
1847
-				'MARR', 'MARL', 'MARS', 'RESI', 'EVEN', 'NCHI', 'SUBM', 'SLGS',
1848
-				'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1849
-				// non standard tags
1850
-				'_NMR', 'MARR_CIVIL', 'MARR_RELIGIOUS', 'MARR_PARTNERS', 'MARR_UNKNOWN',
1851
-				'_COML', '_MBON', '_MARI', '_SEPR', '_TODO',
1852
-			);
1853
-		break;
1854
-		case 'SOUR':
1855
-			$tags = array(
1856
-				// Facts for sources
1857
-				'DATA', 'AUTH', 'TITL', 'ABBR', 'PUBL', 'TEXT', 'REPO', 'REFN', 'RIN',
1858
-				'CHAN', 'NOTE', 'SHARED_NOTE', 'OBJE',
1859
-				'RESN',
1860
-			);
1861
-			break;
1862
-		case 'REPO':
1863
-			$tags = array(
1864
-				// Facts for repositories
1865
-				'NAME', 'ADDR', 'PHON', 'EMAIL', 'FAX', 'WWW',
1866
-				'NOTE', 'SHARED_NOTE', 'REFN', 'RIN', 'CHAN',
1867
-				'RESN',
1868
-			);
1869
-			break;
1870
-		case 'PLAC':
1871
-			$tags = array(
1872
-				// Facts for places
1873
-				'FONE', 'ROMN',
1874
-				// non standard tags
1875
-				'_HEB',
1876
-			);
1877
-			break;
1878
-		case 'NAME':
1879
-			$tags = array(
1880
-				// Facts subordinate to NAME
1881
-				'NICK', 'FONE', 'ROMN',
1882
-				// non standard tags
1883
-				'_HEB', '_AKA',
1884
-			);
1885
-			break;
1886
-		default:
1887
-			$tags = array();
1888
-			break;
1826
+		    case 'INDI':
1827
+			    $tags = array(
1828
+				    // Facts, attributes for individuals (no links to FAMs)
1829
+				    'RESN', 'NAME', 'SEX', 'BIRT', 'CHR', 'DEAT', 'BURI', 'CREM',
1830
+				    'ADOP', 'BAPM', 'BARM', 'BASM', 'BLES', 'CHRA', 'CONF', 'FCOM', 'ORDN',
1831
+				    'NATU', 'EMIG', 'IMMI', 'CENS', 'PROB', 'WILL', 'GRAD', 'RETI', 'EVEN',
1832
+				    'CAST', 'DSCR', 'EDUC', 'IDNO', 'NATI', 'NCHI', 'NMR',
1833
+				    'OCCU', 'PROP', 'RELI', 'RESI', 'SSN', 'TITL', 'FACT',
1834
+				    'BAPL', 'CONL', 'ENDL', 'SLGC',
1835
+				    'SUBM', 'ASSO', 'ALIA', 'ANCI', 'DESI', 'RFN', 'AFN',
1836
+				    'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1837
+				    // non standard tags
1838
+				    '_BRTM', '_DEG', '_DNA', '_EYEC', '_FNRL', '_HAIR', '_HEIG', '_HNM',
1839
+				    '_HOL', '_INTE', '_MDCL', '_MEDC', '_MILI', '_MILT', '_NAME', '_NAMS',
1840
+				    '_NLIV', '_NMAR', '_PRMN', '_TODO', '_UID', '_WEIG', '_YART',
1841
+			    );
1842
+			    break;
1843
+		    case 'FAM':
1844
+			    $tags = array(
1845
+				    // Facts for families, left out HUSB, WIFE & CHIL links
1846
+				    'RESN', 'ANUL', 'CENS', 'DIV', 'DIVF', 'ENGA', 'MARB', 'MARC',
1847
+				    'MARR', 'MARL', 'MARS', 'RESI', 'EVEN', 'NCHI', 'SUBM', 'SLGS',
1848
+				    'REFN', 'RIN', 'CHAN', 'NOTE', 'SHARED_NOTE', 'SOUR', 'OBJE',
1849
+				    // non standard tags
1850
+				    '_NMR', 'MARR_CIVIL', 'MARR_RELIGIOUS', 'MARR_PARTNERS', 'MARR_UNKNOWN',
1851
+				    '_COML', '_MBON', '_MARI', '_SEPR', '_TODO',
1852
+			    );
1853
+		    break;
1854
+		    case 'SOUR':
1855
+			    $tags = array(
1856
+				    // Facts for sources
1857
+				    'DATA', 'AUTH', 'TITL', 'ABBR', 'PUBL', 'TEXT', 'REPO', 'REFN', 'RIN',
1858
+				    'CHAN', 'NOTE', 'SHARED_NOTE', 'OBJE',
1859
+				    'RESN',
1860
+			    );
1861
+			    break;
1862
+		    case 'REPO':
1863
+			    $tags = array(
1864
+				    // Facts for repositories
1865
+				    'NAME', 'ADDR', 'PHON', 'EMAIL', 'FAX', 'WWW',
1866
+				    'NOTE', 'SHARED_NOTE', 'REFN', 'RIN', 'CHAN',
1867
+				    'RESN',
1868
+			    );
1869
+			    break;
1870
+		    case 'PLAC':
1871
+			    $tags = array(
1872
+				    // Facts for places
1873
+				    'FONE', 'ROMN',
1874
+				    // non standard tags
1875
+				    '_HEB',
1876
+			    );
1877
+			    break;
1878
+		    case 'NAME':
1879
+			    $tags = array(
1880
+				    // Facts subordinate to NAME
1881
+				    'NICK', 'FONE', 'ROMN',
1882
+				    // non standard tags
1883
+				    '_HEB', '_AKA',
1884
+			    );
1885
+			    break;
1886
+		    default:
1887
+			    $tags = array();
1888
+			    break;
1889 1889
 		}
1890 1890
 
1891 1891
 		$facts = array();
@@ -1906,42 +1906,42 @@  discard block
 block discarded – undo
1906 1906
 	 */
1907 1907
 	public static function getFileFormTypeValue($type) {
1908 1908
 		switch (strtolower($type)) {
1909
-		case 'audio':
1910
-			return /* I18N: Type of media object */ I18N::translate('Audio');
1911
-		case 'book':
1912
-			return /* I18N: Type of media object */ I18N::translate('Book');
1913
-		case 'card':
1914
-			return /* I18N: Type of media object */ I18N::translate('Card');
1915
-		case 'certificate':
1916
-			return /* I18N: Type of media object */ I18N::translate('Certificate');
1917
-		case 'coat':
1918
-			return /* I18N: Type of media object */ I18N::translate('Coat of arms');
1919
-		case 'document':
1920
-			return /* I18N: Type of media object */ I18N::translate('Document');
1921
-		case 'electronic':
1922
-			return /* I18N: Type of media object */ I18N::translate('Electronic');
1923
-		case 'fiche':
1924
-			return /* I18N: Type of media object */ I18N::translate('Microfiche');
1925
-		case 'film':
1926
-			return /* I18N: Type of media object */ I18N::translate('Microfilm');
1927
-		case 'magazine':
1928
-			return /* I18N: Type of media object */ I18N::translate('Magazine');
1929
-		case 'manuscript':
1930
-			return /* I18N: Type of media object */ I18N::translate('Manuscript');
1931
-		case 'map':
1932
-			return /* I18N: Type of media object */ I18N::translate('Map');
1933
-		case 'newspaper':
1934
-			return /* I18N: Type of media object */ I18N::translate('Newspaper');
1935
-		case 'photo':
1936
-			return /* I18N: Type of media object */ I18N::translate('Photo');
1937
-		case 'tombstone':
1938
-			return /* I18N: Type of media object */ I18N::translate('Tombstone');
1939
-		case 'video':
1940
-			return /* I18N: Type of media object */ I18N::translate('Video');
1941
-		case 'painting':
1942
-			return /* I18N: Type of media object */ I18N::translate('Painting');
1943
-		default:
1944
-			return /* I18N: Type of media object */ I18N::translate('Other');
1909
+		    case 'audio':
1910
+			    return /* I18N: Type of media object */ I18N::translate('Audio');
1911
+		    case 'book':
1912
+			    return /* I18N: Type of media object */ I18N::translate('Book');
1913
+		    case 'card':
1914
+			    return /* I18N: Type of media object */ I18N::translate('Card');
1915
+		    case 'certificate':
1916
+			    return /* I18N: Type of media object */ I18N::translate('Certificate');
1917
+		    case 'coat':
1918
+			    return /* I18N: Type of media object */ I18N::translate('Coat of arms');
1919
+		    case 'document':
1920
+			    return /* I18N: Type of media object */ I18N::translate('Document');
1921
+		    case 'electronic':
1922
+			    return /* I18N: Type of media object */ I18N::translate('Electronic');
1923
+		    case 'fiche':
1924
+			    return /* I18N: Type of media object */ I18N::translate('Microfiche');
1925
+		    case 'film':
1926
+			    return /* I18N: Type of media object */ I18N::translate('Microfilm');
1927
+		    case 'magazine':
1928
+			    return /* I18N: Type of media object */ I18N::translate('Magazine');
1929
+		    case 'manuscript':
1930
+			    return /* I18N: Type of media object */ I18N::translate('Manuscript');
1931
+		    case 'map':
1932
+			    return /* I18N: Type of media object */ I18N::translate('Map');
1933
+		    case 'newspaper':
1934
+			    return /* I18N: Type of media object */ I18N::translate('Newspaper');
1935
+		    case 'photo':
1936
+			    return /* I18N: Type of media object */ I18N::translate('Photo');
1937
+		    case 'tombstone':
1938
+			    return /* I18N: Type of media object */ I18N::translate('Tombstone');
1939
+		    case 'video':
1940
+			    return /* I18N: Type of media object */ I18N::translate('Video');
1941
+		    case 'painting':
1942
+			    return /* I18N: Type of media object */ I18N::translate('Painting');
1943
+		    default:
1944
+			    return /* I18N: Type of media object */ I18N::translate('Other');
1945 1945
 		}
1946 1946
 	}
1947 1947
 
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
 /**
21 21
  * Static GEDCOM data for tags
22 22
  */
23
-class GedcomTag {
23
+class GedcomTag
24
+{
24 25
 	/** @var string[] All tags that webtrees knows how to translate - including special/internal tags */
25 26
 	private static $ALL_TAGS = array(
26 27
 		'ABBR', 'ADDR', 'ADR1', 'ADR2', 'ADOP', 'ADOP:DATE', 'ADOP:PLAC',
@@ -92,7 +93,8 @@  discard block
 block discarded – undo
92 93
 	 *
93 94
 	 * @return bool
94 95
 	 */
95
-	public static function isTag($tag) {
96
+	public static function isTag($tag)
97
+	{
96 98
 		return in_array($tag, self::$ALL_TAGS);
97 99
 	}
98 100
 
@@ -104,7 +106,8 @@  discard block
 block discarded – undo
104 106
 	 *
105 107
 	 * @return string
106 108
 	 */
107
-	public static function getLabel($tag, GedcomRecord $record = null) {
109
+	public static function getLabel($tag, GedcomRecord $record = null)
110
+	{
108 111
 		if ($record instanceof Individual) {
109 112
 			$sex = $record->getSex();
110 113
 		} else {
@@ -1808,7 +1811,8 @@  discard block
 block discarded – undo
1808 1811
 	 *
1809 1812
 	 * @return string
1810 1813
 	 */
1811
-	public static function getLabelValue($tag, $value, GedcomRecord $record = null, $element = 'div') {
1814
+	public static function getLabelValue($tag, $value, GedcomRecord $record = null, $element = 'div')
1815
+	{
1812 1816
 		return
1813 1817
 			'<' . $element . ' class="fact_' . $tag . '">' .
1814 1818
 			/* I18N: a label/value pair, such as “Occupation: Farmer”. Some languages may need to change the punctuation. */
@@ -1821,7 +1825,8 @@  discard block
 block discarded – undo
1821 1825
 	 *
1822 1826
 	 * @return string[]
1823 1827
 	 */
1824
-	public static function getPicklistFacts($fact_type) {
1828
+	public static function getPicklistFacts($fact_type)
1829
+	{
1825 1830
 		switch ($fact_type) {
1826 1831
 		case 'INDI':
1827 1832
 			$tags = array(
@@ -1904,7 +1909,8 @@  discard block
 block discarded – undo
1904 1909
 	 *
1905 1910
 	 * @return string
1906 1911
 	 */
1907
-	public static function getFileFormTypeValue($type) {
1912
+	public static function getFileFormTypeValue($type)
1913
+	{
1908 1914
 		switch (strtolower($type)) {
1909 1915
 		case 'audio':
1910 1916
 			return /* I18N: Type of media object */ I18N::translate('Audio');
@@ -1950,7 +1956,8 @@  discard block
 block discarded – undo
1950 1956
 	 *
1951 1957
 	 * @return string[]
1952 1958
 	 */
1953
-	public static function getFileFormTypes() {
1959
+	public static function getFileFormTypes()
1960
+	{
1954 1961
 		$values = array();
1955 1962
 		foreach (self::$OBJE_FILE_FORM_TYPE as $type) {
1956 1963
 			$values[$type] = self::getFileFormTypeValue($type);
@@ -1969,7 +1976,8 @@  discard block
 block discarded – undo
1969 1976
 	 *
1970 1977
 	 * @return string
1971 1978
 	 */
1972
-	public static function createUid() {
1979
+	public static function createUid()
1980
+	{
1973 1981
 		$uid = str_replace('-', '', Uuid::uuid4());
1974 1982
 
1975 1983
 		$checksum_a = 0; // a sum of the bytes
Please login to merge, or discard this patch.
app/FlashMessages.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -19,34 +19,34 @@
 block discarded – undo
19 19
  * Generate messages in one request and display them in the next.
20 20
  */
21 21
 class FlashMessages {
22
-	// Session storage key
23
-	const FLASH_KEY = 'flash_messages';
22
+    // Session storage key
23
+    const FLASH_KEY = 'flash_messages';
24 24
 
25
-	/**
26
-	 * Add a message to the session storage.
27
-	 *
28
-	 * @param string $text
29
-	 * @param string $status "success", "info", "warning" or "danger"
30
-	 */
31
-	public static function addMessage($text, $status = 'info') {
32
-		$message         = new \stdClass;
33
-		$message->text   = $text;
34
-		$message->status = $status;
25
+    /**
26
+     * Add a message to the session storage.
27
+     *
28
+     * @param string $text
29
+     * @param string $status "success", "info", "warning" or "danger"
30
+     */
31
+    public static function addMessage($text, $status = 'info') {
32
+        $message         = new \stdClass;
33
+        $message->text   = $text;
34
+        $message->status = $status;
35 35
 
36
-		$messages   = Session::get(self::FLASH_KEY, array());
37
-		$messages[] = $message;
38
-		Session::put(self::FLASH_KEY, $messages);
39
-	}
36
+        $messages   = Session::get(self::FLASH_KEY, array());
37
+        $messages[] = $message;
38
+        Session::put(self::FLASH_KEY, $messages);
39
+    }
40 40
 
41
-	/**
42
-	 * Get the current messages, and remove them from session storage.
43
-	 *
44
-	 * @return string[]
45
-	 */
46
-	public static function getMessages() {
47
-		$messages = Session::get(self::FLASH_KEY, array());
48
-		Session::forget(self::FLASH_KEY);
41
+    /**
42
+     * Get the current messages, and remove them from session storage.
43
+     *
44
+     * @return string[]
45
+     */
46
+    public static function getMessages() {
47
+        $messages = Session::get(self::FLASH_KEY, array());
48
+        Session::forget(self::FLASH_KEY);
49 49
 
50
-		return $messages;
51
-	}
50
+        return $messages;
51
+    }
52 52
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Generate messages in one request and display them in the next.
20 20
  */
21
-class FlashMessages {
21
+class FlashMessages
22
+{
22 23
 	// Session storage key
23 24
 	const FLASH_KEY = 'flash_messages';
24 25
 
@@ -28,7 +29,8 @@  discard block
 block discarded – undo
28 29
 	 * @param string $text
29 30
 	 * @param string $status "success", "info", "warning" or "danger"
30 31
 	 */
31
-	public static function addMessage($text, $status = 'info') {
32
+	public static function addMessage($text, $status = 'info')
33
+	{
32 34
 		$message         = new \stdClass;
33 35
 		$message->text   = $text;
34 36
 		$message->status = $status;
@@ -43,7 +45,8 @@  discard block
 block discarded – undo
43 45
 	 *
44 46
 	 * @return string[]
45 47
 	 */
46
-	public static function getMessages() {
48
+	public static function getMessages()
49
+	{
47 50
 		$messages = Session::get(self::FLASH_KEY, array());
48 51
 		Session::forget(self::FLASH_KEY);
49 52
 
Please login to merge, or discard this patch.
app/User.php 2 patches
Indentation   +538 added lines, -538 removed lines patch added patch discarded remove patch
@@ -19,542 +19,542 @@
 block discarded – undo
19 19
  * Provide an interface to the wt_user table.
20 20
  */
21 21
 class User {
22
-	/** @var  string The primary key of this user. */
23
-	private $user_id;
24
-
25
-	/** @var  string The login name of this user. */
26
-	private $user_name;
27
-
28
-	/** @var  string The real (display) name of this user. */
29
-	private $real_name;
30
-
31
-	/** @var  string The email address of this user. */
32
-	private $email;
33
-
34
-	/** @var array Cached copy of the wt_user_setting table. */
35
-	private $preferences;
36
-
37
-	/** @var  User[] Only fetch users from the database once. */
38
-	private static $cache = array();
39
-
40
-	/**
41
-	 * Find the user with a specified user_id.
42
-	 *
43
-	 * @param int|null $user_id
44
-	 *
45
-	 * @return User|null
46
-	 */
47
-	public static function find($user_id) {
48
-		if (!array_key_exists($user_id, self::$cache)) {
49
-			$row = Database::prepare(
50
-				"SELECT user_id, user_name, real_name, email FROM `##user` WHERE user_id = ?"
51
-			)->execute(array($user_id))->fetchOneRow();
52
-			if ($row) {
53
-				self::$cache[$user_id] = new self($row);
54
-			} else {
55
-				self::$cache[$user_id] = null;
56
-			}
57
-		}
58
-
59
-		return self::$cache[$user_id];
60
-	}
61
-
62
-	/**
63
-	 * Find the user with a specified user_name.
64
-	 *
65
-	 * @param string $user_name
66
-	 *
67
-	 * @return User|null
68
-	 */
69
-	public static function findByUserName($user_name) {
70
-		$user_id = Database::prepare(
71
-			"SELECT user_id FROM `##user` WHERE user_name = :user_name"
72
-		)->execute(array(
73
-			'user_name' => $user_name,
74
-		))->fetchOne();
75
-
76
-		return self::find($user_id);
77
-	}
78
-
79
-	/**
80
-	 * Find the user with a specified email address.
81
-	 *
82
-	 * @param string $email
83
-	 *
84
-	 * @return User|null
85
-	 */
86
-	public static function findByEmail($email) {
87
-		$user_id = Database::prepare(
88
-			"SELECT user_id FROM `##user` WHERE email = :email"
89
-		)->execute(array(
90
-			'email' => $email,
91
-		))->fetchOne();
92
-
93
-		return self::find($user_id);
94
-	}
95
-
96
-	/**
97
-	 * Find the user with a specified user_name or email address.
98
-	 *
99
-	 * @param string $identifier
100
-	 *
101
-	 * @return User|null
102
-	 */
103
-	public static function findByIdentifier($identifier) {
104
-		$user_id = Database::prepare(
105
-			"SELECT user_id FROM `##user` WHERE ? IN (user_name, email)"
106
-		)->execute(array($identifier))->fetchOne();
107
-
108
-		return self::find($user_id);
109
-	}
110
-
111
-	/**
112
-	 * Find the user with a specified genealogy record.
113
-	 *
114
-	 * @param Individual $individual
115
-	 *
116
-	 * @return User|null
117
-	 */
118
-	public static function findByGenealogyRecord(Individual $individual) {
119
-		$user_id = Database::prepare(
120
-			"SELECT user_id" .
121
-			" FROM `##user_gedcom_setting`" .
122
-			" WHERE gedcom_id = :tree_id AND setting_name = 'gedcomid' AND setting_value = :xref"
123
-		)->execute(array(
124
-			'tree_id' => $individual->getTree()->getTreeId(),
125
-			'xref'    => $individual->getXref(),
126
-		))->fetchOne();
127
-
128
-		return self::find($user_id);
129
-	}
130
-
131
-	/**
132
-	 * Find the latest user to register.
133
-	 *
134
-	 * @return User|null
135
-	 */
136
-	public static function findLatestToRegister() {
137
-		$user_id = Database::prepare(
138
-			"SELECT u.user_id" .
139
-			" FROM `##user` u" .
140
-			" LEFT JOIN `##user_setting` us ON (u.user_id=us.user_id AND us.setting_name='reg_timestamp') " .
141
-			" ORDER BY us.setting_value DESC LIMIT 1"
142
-		)->execute()->fetchOne();
143
-
144
-		return self::find($user_id);
145
-	}
146
-
147
-	/**
148
-	 * Create a new user.
149
-	 *
150
-	 * The calling code needs to check for duplicates identifiers before calling
151
-	 * this function.
152
-	 *
153
-	 * @param string $user_name
154
-	 * @param string $real_name
155
-	 * @param string $email
156
-	 * @param string $password
157
-	 *
158
-	 * @return User
159
-	 */
160
-	public static function create($user_name, $real_name, $email, $password) {
161
-		Database::prepare(
162
-			"INSERT INTO `##user` (user_name, real_name, email, password) VALUES (:user_name, :real_name, :email, :password)"
163
-		)->execute(array(
164
-			'user_name' => $user_name,
165
-			'real_name' => $real_name,
166
-			'email'     => $email,
167
-			'password'  => self::passwordHash($password),
168
-		));
169
-
170
-		// Set default blocks for this user
171
-		$user = self::findByIdentifier($user_name);
172
-		Database::prepare(
173
-			"INSERT INTO `##block` (`user_id`, `location`, `block_order`, `module_name`)" .
174
-			" SELECT :user_id , `location`, `block_order`, `module_name` FROM `##block` WHERE `user_id` = -1"
175
-		)->execute(array('user_id' => $user->getUserId()));
176
-
177
-		return $user;
178
-	}
179
-
180
-	/**
181
-	 * Get a count of all users.
182
-	 *
183
-	 * @return int
184
-	 */
185
-	public static function count() {
186
-		return (int) Database::prepare(
187
-			"SELECT COUNT(*)" .
188
-			" FROM `##user`" .
189
-			" WHERE user_id > 0"
190
-		)->fetchOne();
191
-	}
192
-
193
-	/**
194
-	 * Get a list of all users.
195
-	 *
196
-	 * @return User[]
197
-	 */
198
-	public static function all() {
199
-		$users = array();
200
-
201
-		$rows = Database::prepare(
202
-			"SELECT user_id, user_name, real_name, email" .
203
-			" FROM `##user`" .
204
-			" WHERE user_id > 0" .
205
-			" ORDER BY user_name"
206
-		)->fetchAll();
207
-
208
-		foreach ($rows as $row) {
209
-			$users[] = new self($row);
210
-		}
211
-
212
-		return $users;
213
-	}
214
-
215
-	/**
216
-	 * Get a list of all administrators.
217
-	 *
218
-	 * @return User[]
219
-	 */
220
-	public static function allAdmins() {
221
-		$rows = Database::prepare(
222
-			"SELECT user_id, user_name, real_name, email" .
223
-			" FROM `##user`" .
224
-			" JOIN `##user_setting` USING (user_id)" .
225
-			" WHERE user_id > 0" .
226
-			"   AND setting_name = 'canadmin'" .
227
-			"   AND setting_value = '1'"
228
-		)->fetchAll();
229
-
230
-		$users = array();
231
-		foreach ($rows as $row) {
232
-			$users[] = new self($row);
233
-		}
234
-
235
-		return $users;
236
-	}
237
-
238
-	/**
239
-	 * Get a list of all verified uses.
240
-	 *
241
-	 * @return User[]
242
-	 */
243
-	public static function allVerified() {
244
-		$rows = Database::prepare(
245
-			"SELECT user_id, user_name, real_name, email" .
246
-			" FROM `##user`" .
247
-			" JOIN `##user_setting` USING (user_id)" .
248
-			" WHERE user_id > 0" .
249
-			"   AND setting_name = 'verified'" .
250
-			"   AND setting_value = '1'"
251
-		)->fetchAll();
252
-
253
-		$users = array();
254
-		foreach ($rows as $row) {
255
-			$users[] = new self($row);
256
-		}
257
-
258
-		return $users;
259
-	}
260
-
261
-	/**
262
-	 * Get a list of all users who are currently logged in.
263
-	 *
264
-	 * @return User[]
265
-	 */
266
-	public static function allLoggedIn() {
267
-		$rows = Database::prepare(
268
-			"SELECT DISTINCT user_id, user_name, real_name, email" .
269
-			" FROM `##user`" .
270
-			" JOIN `##session` USING (user_id)"
271
-		)->fetchAll();
272
-
273
-		$users = array();
274
-		foreach ($rows as $row) {
275
-			$users[] = new self($row);
276
-		}
277
-
278
-		return $users;
279
-	}
280
-
281
-	/**
282
-	 * Create a new user object from a row in the database.
283
-	 *
284
-	 * @param \stdclass $user A row from the wt_user table
285
-	 */
286
-	public function __construct(\stdClass $user) {
287
-		$this->user_id   = $user->user_id;
288
-		$this->user_name = $user->user_name;
289
-		$this->real_name = $user->real_name;
290
-		$this->email     = $user->email;
291
-	}
292
-
293
-	/**
294
-	 * Delete a user
295
-	 */
296
-	public function delete() {
297
-		// Don't delete the logs.
298
-		Database::prepare("UPDATE `##log` SET user_id=NULL WHERE user_id =?")->execute(array($this->user_id));
299
-		// Take over the user’s pending changes. (What else could we do with them?)
300
-		Database::prepare("DELETE FROM `##change` WHERE user_id=? AND status='rejected'")->execute(array($this->user_id));
301
-		Database::prepare("UPDATE `##change` SET user_id=? WHERE user_id=?")->execute(array(Auth::id(), $this->user_id));
302
-		Database::prepare("DELETE `##block_setting` FROM `##block_setting` JOIN `##block` USING (block_id) WHERE user_id=?")->execute(array($this->user_id));
303
-		Database::prepare("DELETE FROM `##block` WHERE user_id=?")->execute(array($this->user_id));
304
-		Database::prepare("DELETE FROM `##user_gedcom_setting` WHERE user_id=?")->execute(array($this->user_id));
305
-		Database::prepare("DELETE FROM `##gedcom_setting` WHERE setting_value=? AND setting_name IN ('CONTACT_USER_ID', 'WEBMASTER_USER_ID')")->execute(array((string) $this->user_id));
306
-		Database::prepare("DELETE FROM `##user_setting` WHERE user_id=?")->execute(array($this->user_id));
307
-		Database::prepare("DELETE FROM `##message` WHERE user_id=?")->execute(array($this->user_id));
308
-		Database::prepare("DELETE FROM `##user` WHERE user_id=?")->execute(array($this->user_id));
309
-	}
310
-
311
-	/** Validate a supplied password
312
-	 * @param string $password
313
-	 *
314
-	 * @return bool
315
-	 */
316
-	public function checkPassword($password) {
317
-		$password_hash = Database::prepare(
318
-			"SELECT password FROM `##user` WHERE user_id = ?"
319
-		)->execute(array($this->user_id))->fetchOne();
320
-
321
-		if ($this->passwordVerify($password, $password_hash)) {
322
-			if ($this->passwordNeedsRehash($password_hash)) {
323
-				$this->setPassword($password);
324
-			}
325
-
326
-			return true;
327
-		} else {
328
-			return false;
329
-		}
330
-	}
331
-
332
-	/**
333
-	 * Get the numeric ID for this user.
334
-	 *
335
-	 * @return string
336
-	 */
337
-	public function getUserId() {
338
-		return $this->user_id;
339
-	}
340
-
341
-	/**
342
-	 * Get the login name for this user.
343
-	 *
344
-	 * @return string
345
-	 */
346
-	public function getUserName() {
347
-		return $this->user_name;
348
-	}
349
-
350
-	/**
351
-	 * Set the login name for this user.
352
-	 *
353
-	 * @param string $user_name
354
-	 *
355
-	 * @return $this
356
-	 */
357
-	public function setUserName($user_name) {
358
-		if ($this->user_name !== $user_name) {
359
-			$this->user_name = $user_name;
360
-			Database::prepare(
361
-				"UPDATE `##user` SET user_name = ? WHERE user_id = ?"
362
-			)->execute(array($user_name, $this->user_id));
363
-		}
364
-
365
-		return $this;
366
-	}
367
-
368
-	/**
369
-	 * Get the real name of this user.
370
-	 *
371
-	 * @return string
372
-	 */
373
-	public function getRealName() {
374
-		return $this->real_name;
375
-	}
376
-
377
-	/**
378
-	 * Get the real name of this user, for display on screen.
379
-	 *
380
-	 * @return string
381
-	 */
382
-	public function getRealNameHtml() {
383
-		return '<span dir="auto">' . Filter::escapeHtml($this->real_name) . '</span>';
384
-	}
385
-
386
-	/**
387
-	 * Set the real name of this user.
388
-	 *
389
-	 * @param string $real_name
390
-	 *
391
-	 * @return User
392
-	 */
393
-	public function setRealName($real_name) {
394
-		if ($this->real_name !== $real_name) {
395
-			$this->real_name = $real_name;
396
-			Database::prepare(
397
-				"UPDATE `##user` SET real_name = ? WHERE user_id = ?"
398
-			)->execute(array($real_name, $this->user_id));
399
-		}
400
-
401
-		return $this;
402
-	}
403
-
404
-	/**
405
-	 * Get the email address of this user.
406
-	 *
407
-	 * @return string
408
-	 */
409
-	public function getEmail() {
410
-		return $this->email;
411
-	}
412
-
413
-	/**
414
-	 * Set the email address of this user.
415
-	 *
416
-	 * @param string $email
417
-	 *
418
-	 * @return User
419
-	 */
420
-	public function setEmail($email) {
421
-		if ($this->email !== $email) {
422
-			$this->email = $email;
423
-			Database::prepare(
424
-				"UPDATE `##user` SET email = ? WHERE user_id = ?"
425
-			)->execute(array($email, $this->user_id));
426
-		}
427
-
428
-		return $this;
429
-	}
430
-
431
-	/**
432
-	 * Set the password of this user.
433
-	 *
434
-	 * @param string $password
435
-	 *
436
-	 * @return User
437
-	 */
438
-	public function setPassword($password) {
439
-		Database::prepare(
440
-			"UPDATE `##user` SET password = ? WHERE user_id = ?"
441
-		)->execute(array($this->passwordHash($password), $this->user_id));
442
-
443
-		return $this;
444
-	}
445
-
446
-	/**
447
-	 * Fetch a user option/setting from the wt_user_setting table.
448
-	 *
449
-	 * Since we'll fetch several settings for each user, and since there aren’t
450
-	 * that many of them, fetch them all in one database query
451
-	 *
452
-	 * @param string      $setting_name
453
-	 * @param string|null $default
454
-	 *
455
-	 * @return string|null
456
-	 */
457
-	public function getPreference($setting_name, $default = null) {
458
-		if ($this->preferences === null) {
459
-			if ($this->user_id) {
460
-				$this->preferences = Database::prepare(
461
-					"SELECT setting_name, setting_value FROM `##user_setting` WHERE user_id = ?"
462
-				)->execute(array($this->user_id))->fetchAssoc();
463
-			} else {
464
-				// Not logged in? We have no preferences.
465
-				$this->preferences = array();
466
-			}
467
-		}
468
-
469
-		if (array_key_exists($setting_name, $this->preferences)) {
470
-			return $this->preferences[$setting_name];
471
-		} else {
472
-			return $default;
473
-		}
474
-	}
475
-
476
-	/**
477
-	 * Update a setting for the user.
478
-	 *
479
-	 * @param string $setting_name
480
-	 * @param string $setting_value
481
-	 *
482
-	 * @return User
483
-	 */
484
-	public function setPreference($setting_name, $setting_value) {
485
-		if ($this->user_id && $this->getPreference($setting_name) !== $setting_value) {
486
-			Database::prepare("REPLACE INTO `##user_setting` (user_id, setting_name, setting_value) VALUES (?, ?, LEFT(?, 255))")
487
-				->execute(array($this->user_id, $setting_name, $setting_value));
488
-			$this->preferences[$setting_name] = $setting_value;
489
-		}
490
-
491
-		return $this;
492
-	}
493
-
494
-	/**
495
-	 * Delete a setting for the user.
496
-	 *
497
-	 * @param string $setting_name
498
-	 *
499
-	 * @return User
500
-	 */
501
-	public function deletePreference($setting_name) {
502
-		if ($this->user_id && $this->getPreference($setting_name) !== null) {
503
-			Database::prepare("DELETE FROM `##user_setting` WHERE user_id = ? AND setting_name = ?")
504
-				->execute(array($this->user_id, $setting_name));
505
-			unset($this->preferences[$setting_name]);
506
-		}
507
-
508
-		return $this;
509
-	}
510
-
511
-	/**
512
-	 * The ircmaxell/password_compat implementation of the password_hash() function
513
-	 * relies on an encryption library which is not secure in PHP < 5.3.7
514
-	 *
515
-	 * @return bool
516
-	 */
517
-	private static function isPhpCryptBroken() {
518
-		return PHP_VERSION_ID < 50307 && password_hash('foo', PASSWORD_DEFAULT) === false;
519
-	}
520
-
521
-	/**
522
-	 * @param string $password
523
-	 *
524
-	 * @return string
525
-	 */
526
-	private static function passwordHash($password) {
527
-		if (self::isPhpCryptBroken()) {
528
-			return crypt($password);
529
-		} else {
530
-			return password_hash($password, PASSWORD_DEFAULT);
531
-		}
532
-	}
533
-
534
-	/**
535
-	 * @param string $hash
536
-	 *
537
-	 * @return bool
538
-	 */
539
-	private static function passwordNeedsRehash($hash) {
540
-		if (self::isPhpCryptBroken()) {
541
-			return false;
542
-		} else {
543
-			return password_needs_rehash($hash, PASSWORD_DEFAULT);
544
-		}
545
-	}
546
-
547
-	/**
548
-	 * @param string $password
549
-	 * @param string $hash
550
-	 *
551
-	 * @return bool
552
-	 */
553
-	private static function passwordVerify($password, $hash) {
554
-		if (self::isPhpCryptBroken()) {
555
-			return crypt($password, $hash) === $hash;
556
-		} else {
557
-			return password_verify($password, $hash);
558
-		}
559
-	}
22
+    /** @var  string The primary key of this user. */
23
+    private $user_id;
24
+
25
+    /** @var  string The login name of this user. */
26
+    private $user_name;
27
+
28
+    /** @var  string The real (display) name of this user. */
29
+    private $real_name;
30
+
31
+    /** @var  string The email address of this user. */
32
+    private $email;
33
+
34
+    /** @var array Cached copy of the wt_user_setting table. */
35
+    private $preferences;
36
+
37
+    /** @var  User[] Only fetch users from the database once. */
38
+    private static $cache = array();
39
+
40
+    /**
41
+     * Find the user with a specified user_id.
42
+     *
43
+     * @param int|null $user_id
44
+     *
45
+     * @return User|null
46
+     */
47
+    public static function find($user_id) {
48
+        if (!array_key_exists($user_id, self::$cache)) {
49
+            $row = Database::prepare(
50
+                "SELECT user_id, user_name, real_name, email FROM `##user` WHERE user_id = ?"
51
+            )->execute(array($user_id))->fetchOneRow();
52
+            if ($row) {
53
+                self::$cache[$user_id] = new self($row);
54
+            } else {
55
+                self::$cache[$user_id] = null;
56
+            }
57
+        }
58
+
59
+        return self::$cache[$user_id];
60
+    }
61
+
62
+    /**
63
+     * Find the user with a specified user_name.
64
+     *
65
+     * @param string $user_name
66
+     *
67
+     * @return User|null
68
+     */
69
+    public static function findByUserName($user_name) {
70
+        $user_id = Database::prepare(
71
+            "SELECT user_id FROM `##user` WHERE user_name = :user_name"
72
+        )->execute(array(
73
+            'user_name' => $user_name,
74
+        ))->fetchOne();
75
+
76
+        return self::find($user_id);
77
+    }
78
+
79
+    /**
80
+     * Find the user with a specified email address.
81
+     *
82
+     * @param string $email
83
+     *
84
+     * @return User|null
85
+     */
86
+    public static function findByEmail($email) {
87
+        $user_id = Database::prepare(
88
+            "SELECT user_id FROM `##user` WHERE email = :email"
89
+        )->execute(array(
90
+            'email' => $email,
91
+        ))->fetchOne();
92
+
93
+        return self::find($user_id);
94
+    }
95
+
96
+    /**
97
+     * Find the user with a specified user_name or email address.
98
+     *
99
+     * @param string $identifier
100
+     *
101
+     * @return User|null
102
+     */
103
+    public static function findByIdentifier($identifier) {
104
+        $user_id = Database::prepare(
105
+            "SELECT user_id FROM `##user` WHERE ? IN (user_name, email)"
106
+        )->execute(array($identifier))->fetchOne();
107
+
108
+        return self::find($user_id);
109
+    }
110
+
111
+    /**
112
+     * Find the user with a specified genealogy record.
113
+     *
114
+     * @param Individual $individual
115
+     *
116
+     * @return User|null
117
+     */
118
+    public static function findByGenealogyRecord(Individual $individual) {
119
+        $user_id = Database::prepare(
120
+            "SELECT user_id" .
121
+            " FROM `##user_gedcom_setting`" .
122
+            " WHERE gedcom_id = :tree_id AND setting_name = 'gedcomid' AND setting_value = :xref"
123
+        )->execute(array(
124
+            'tree_id' => $individual->getTree()->getTreeId(),
125
+            'xref'    => $individual->getXref(),
126
+        ))->fetchOne();
127
+
128
+        return self::find($user_id);
129
+    }
130
+
131
+    /**
132
+     * Find the latest user to register.
133
+     *
134
+     * @return User|null
135
+     */
136
+    public static function findLatestToRegister() {
137
+        $user_id = Database::prepare(
138
+            "SELECT u.user_id" .
139
+            " FROM `##user` u" .
140
+            " LEFT JOIN `##user_setting` us ON (u.user_id=us.user_id AND us.setting_name='reg_timestamp') " .
141
+            " ORDER BY us.setting_value DESC LIMIT 1"
142
+        )->execute()->fetchOne();
143
+
144
+        return self::find($user_id);
145
+    }
146
+
147
+    /**
148
+     * Create a new user.
149
+     *
150
+     * The calling code needs to check for duplicates identifiers before calling
151
+     * this function.
152
+     *
153
+     * @param string $user_name
154
+     * @param string $real_name
155
+     * @param string $email
156
+     * @param string $password
157
+     *
158
+     * @return User
159
+     */
160
+    public static function create($user_name, $real_name, $email, $password) {
161
+        Database::prepare(
162
+            "INSERT INTO `##user` (user_name, real_name, email, password) VALUES (:user_name, :real_name, :email, :password)"
163
+        )->execute(array(
164
+            'user_name' => $user_name,
165
+            'real_name' => $real_name,
166
+            'email'     => $email,
167
+            'password'  => self::passwordHash($password),
168
+        ));
169
+
170
+        // Set default blocks for this user
171
+        $user = self::findByIdentifier($user_name);
172
+        Database::prepare(
173
+            "INSERT INTO `##block` (`user_id`, `location`, `block_order`, `module_name`)" .
174
+            " SELECT :user_id , `location`, `block_order`, `module_name` FROM `##block` WHERE `user_id` = -1"
175
+        )->execute(array('user_id' => $user->getUserId()));
176
+
177
+        return $user;
178
+    }
179
+
180
+    /**
181
+     * Get a count of all users.
182
+     *
183
+     * @return int
184
+     */
185
+    public static function count() {
186
+        return (int) Database::prepare(
187
+            "SELECT COUNT(*)" .
188
+            " FROM `##user`" .
189
+            " WHERE user_id > 0"
190
+        )->fetchOne();
191
+    }
192
+
193
+    /**
194
+     * Get a list of all users.
195
+     *
196
+     * @return User[]
197
+     */
198
+    public static function all() {
199
+        $users = array();
200
+
201
+        $rows = Database::prepare(
202
+            "SELECT user_id, user_name, real_name, email" .
203
+            " FROM `##user`" .
204
+            " WHERE user_id > 0" .
205
+            " ORDER BY user_name"
206
+        )->fetchAll();
207
+
208
+        foreach ($rows as $row) {
209
+            $users[] = new self($row);
210
+        }
211
+
212
+        return $users;
213
+    }
214
+
215
+    /**
216
+     * Get a list of all administrators.
217
+     *
218
+     * @return User[]
219
+     */
220
+    public static function allAdmins() {
221
+        $rows = Database::prepare(
222
+            "SELECT user_id, user_name, real_name, email" .
223
+            " FROM `##user`" .
224
+            " JOIN `##user_setting` USING (user_id)" .
225
+            " WHERE user_id > 0" .
226
+            "   AND setting_name = 'canadmin'" .
227
+            "   AND setting_value = '1'"
228
+        )->fetchAll();
229
+
230
+        $users = array();
231
+        foreach ($rows as $row) {
232
+            $users[] = new self($row);
233
+        }
234
+
235
+        return $users;
236
+    }
237
+
238
+    /**
239
+     * Get a list of all verified uses.
240
+     *
241
+     * @return User[]
242
+     */
243
+    public static function allVerified() {
244
+        $rows = Database::prepare(
245
+            "SELECT user_id, user_name, real_name, email" .
246
+            " FROM `##user`" .
247
+            " JOIN `##user_setting` USING (user_id)" .
248
+            " WHERE user_id > 0" .
249
+            "   AND setting_name = 'verified'" .
250
+            "   AND setting_value = '1'"
251
+        )->fetchAll();
252
+
253
+        $users = array();
254
+        foreach ($rows as $row) {
255
+            $users[] = new self($row);
256
+        }
257
+
258
+        return $users;
259
+    }
260
+
261
+    /**
262
+     * Get a list of all users who are currently logged in.
263
+     *
264
+     * @return User[]
265
+     */
266
+    public static function allLoggedIn() {
267
+        $rows = Database::prepare(
268
+            "SELECT DISTINCT user_id, user_name, real_name, email" .
269
+            " FROM `##user`" .
270
+            " JOIN `##session` USING (user_id)"
271
+        )->fetchAll();
272
+
273
+        $users = array();
274
+        foreach ($rows as $row) {
275
+            $users[] = new self($row);
276
+        }
277
+
278
+        return $users;
279
+    }
280
+
281
+    /**
282
+     * Create a new user object from a row in the database.
283
+     *
284
+     * @param \stdclass $user A row from the wt_user table
285
+     */
286
+    public function __construct(\stdClass $user) {
287
+        $this->user_id   = $user->user_id;
288
+        $this->user_name = $user->user_name;
289
+        $this->real_name = $user->real_name;
290
+        $this->email     = $user->email;
291
+    }
292
+
293
+    /**
294
+     * Delete a user
295
+     */
296
+    public function delete() {
297
+        // Don't delete the logs.
298
+        Database::prepare("UPDATE `##log` SET user_id=NULL WHERE user_id =?")->execute(array($this->user_id));
299
+        // Take over the user’s pending changes. (What else could we do with them?)
300
+        Database::prepare("DELETE FROM `##change` WHERE user_id=? AND status='rejected'")->execute(array($this->user_id));
301
+        Database::prepare("UPDATE `##change` SET user_id=? WHERE user_id=?")->execute(array(Auth::id(), $this->user_id));
302
+        Database::prepare("DELETE `##block_setting` FROM `##block_setting` JOIN `##block` USING (block_id) WHERE user_id=?")->execute(array($this->user_id));
303
+        Database::prepare("DELETE FROM `##block` WHERE user_id=?")->execute(array($this->user_id));
304
+        Database::prepare("DELETE FROM `##user_gedcom_setting` WHERE user_id=?")->execute(array($this->user_id));
305
+        Database::prepare("DELETE FROM `##gedcom_setting` WHERE setting_value=? AND setting_name IN ('CONTACT_USER_ID', 'WEBMASTER_USER_ID')")->execute(array((string) $this->user_id));
306
+        Database::prepare("DELETE FROM `##user_setting` WHERE user_id=?")->execute(array($this->user_id));
307
+        Database::prepare("DELETE FROM `##message` WHERE user_id=?")->execute(array($this->user_id));
308
+        Database::prepare("DELETE FROM `##user` WHERE user_id=?")->execute(array($this->user_id));
309
+    }
310
+
311
+    /** Validate a supplied password
312
+     * @param string $password
313
+     *
314
+     * @return bool
315
+     */
316
+    public function checkPassword($password) {
317
+        $password_hash = Database::prepare(
318
+            "SELECT password FROM `##user` WHERE user_id = ?"
319
+        )->execute(array($this->user_id))->fetchOne();
320
+
321
+        if ($this->passwordVerify($password, $password_hash)) {
322
+            if ($this->passwordNeedsRehash($password_hash)) {
323
+                $this->setPassword($password);
324
+            }
325
+
326
+            return true;
327
+        } else {
328
+            return false;
329
+        }
330
+    }
331
+
332
+    /**
333
+     * Get the numeric ID for this user.
334
+     *
335
+     * @return string
336
+     */
337
+    public function getUserId() {
338
+        return $this->user_id;
339
+    }
340
+
341
+    /**
342
+     * Get the login name for this user.
343
+     *
344
+     * @return string
345
+     */
346
+    public function getUserName() {
347
+        return $this->user_name;
348
+    }
349
+
350
+    /**
351
+     * Set the login name for this user.
352
+     *
353
+     * @param string $user_name
354
+     *
355
+     * @return $this
356
+     */
357
+    public function setUserName($user_name) {
358
+        if ($this->user_name !== $user_name) {
359
+            $this->user_name = $user_name;
360
+            Database::prepare(
361
+                "UPDATE `##user` SET user_name = ? WHERE user_id = ?"
362
+            )->execute(array($user_name, $this->user_id));
363
+        }
364
+
365
+        return $this;
366
+    }
367
+
368
+    /**
369
+     * Get the real name of this user.
370
+     *
371
+     * @return string
372
+     */
373
+    public function getRealName() {
374
+        return $this->real_name;
375
+    }
376
+
377
+    /**
378
+     * Get the real name of this user, for display on screen.
379
+     *
380
+     * @return string
381
+     */
382
+    public function getRealNameHtml() {
383
+        return '<span dir="auto">' . Filter::escapeHtml($this->real_name) . '</span>';
384
+    }
385
+
386
+    /**
387
+     * Set the real name of this user.
388
+     *
389
+     * @param string $real_name
390
+     *
391
+     * @return User
392
+     */
393
+    public function setRealName($real_name) {
394
+        if ($this->real_name !== $real_name) {
395
+            $this->real_name = $real_name;
396
+            Database::prepare(
397
+                "UPDATE `##user` SET real_name = ? WHERE user_id = ?"
398
+            )->execute(array($real_name, $this->user_id));
399
+        }
400
+
401
+        return $this;
402
+    }
403
+
404
+    /**
405
+     * Get the email address of this user.
406
+     *
407
+     * @return string
408
+     */
409
+    public function getEmail() {
410
+        return $this->email;
411
+    }
412
+
413
+    /**
414
+     * Set the email address of this user.
415
+     *
416
+     * @param string $email
417
+     *
418
+     * @return User
419
+     */
420
+    public function setEmail($email) {
421
+        if ($this->email !== $email) {
422
+            $this->email = $email;
423
+            Database::prepare(
424
+                "UPDATE `##user` SET email = ? WHERE user_id = ?"
425
+            )->execute(array($email, $this->user_id));
426
+        }
427
+
428
+        return $this;
429
+    }
430
+
431
+    /**
432
+     * Set the password of this user.
433
+     *
434
+     * @param string $password
435
+     *
436
+     * @return User
437
+     */
438
+    public function setPassword($password) {
439
+        Database::prepare(
440
+            "UPDATE `##user` SET password = ? WHERE user_id = ?"
441
+        )->execute(array($this->passwordHash($password), $this->user_id));
442
+
443
+        return $this;
444
+    }
445
+
446
+    /**
447
+     * Fetch a user option/setting from the wt_user_setting table.
448
+     *
449
+     * Since we'll fetch several settings for each user, and since there aren’t
450
+     * that many of them, fetch them all in one database query
451
+     *
452
+     * @param string      $setting_name
453
+     * @param string|null $default
454
+     *
455
+     * @return string|null
456
+     */
457
+    public function getPreference($setting_name, $default = null) {
458
+        if ($this->preferences === null) {
459
+            if ($this->user_id) {
460
+                $this->preferences = Database::prepare(
461
+                    "SELECT setting_name, setting_value FROM `##user_setting` WHERE user_id = ?"
462
+                )->execute(array($this->user_id))->fetchAssoc();
463
+            } else {
464
+                // Not logged in? We have no preferences.
465
+                $this->preferences = array();
466
+            }
467
+        }
468
+
469
+        if (array_key_exists($setting_name, $this->preferences)) {
470
+            return $this->preferences[$setting_name];
471
+        } else {
472
+            return $default;
473
+        }
474
+    }
475
+
476
+    /**
477
+     * Update a setting for the user.
478
+     *
479
+     * @param string $setting_name
480
+     * @param string $setting_value
481
+     *
482
+     * @return User
483
+     */
484
+    public function setPreference($setting_name, $setting_value) {
485
+        if ($this->user_id && $this->getPreference($setting_name) !== $setting_value) {
486
+            Database::prepare("REPLACE INTO `##user_setting` (user_id, setting_name, setting_value) VALUES (?, ?, LEFT(?, 255))")
487
+                ->execute(array($this->user_id, $setting_name, $setting_value));
488
+            $this->preferences[$setting_name] = $setting_value;
489
+        }
490
+
491
+        return $this;
492
+    }
493
+
494
+    /**
495
+     * Delete a setting for the user.
496
+     *
497
+     * @param string $setting_name
498
+     *
499
+     * @return User
500
+     */
501
+    public function deletePreference($setting_name) {
502
+        if ($this->user_id && $this->getPreference($setting_name) !== null) {
503
+            Database::prepare("DELETE FROM `##user_setting` WHERE user_id = ? AND setting_name = ?")
504
+                ->execute(array($this->user_id, $setting_name));
505
+            unset($this->preferences[$setting_name]);
506
+        }
507
+
508
+        return $this;
509
+    }
510
+
511
+    /**
512
+     * The ircmaxell/password_compat implementation of the password_hash() function
513
+     * relies on an encryption library which is not secure in PHP < 5.3.7
514
+     *
515
+     * @return bool
516
+     */
517
+    private static function isPhpCryptBroken() {
518
+        return PHP_VERSION_ID < 50307 && password_hash('foo', PASSWORD_DEFAULT) === false;
519
+    }
520
+
521
+    /**
522
+     * @param string $password
523
+     *
524
+     * @return string
525
+     */
526
+    private static function passwordHash($password) {
527
+        if (self::isPhpCryptBroken()) {
528
+            return crypt($password);
529
+        } else {
530
+            return password_hash($password, PASSWORD_DEFAULT);
531
+        }
532
+    }
533
+
534
+    /**
535
+     * @param string $hash
536
+     *
537
+     * @return bool
538
+     */
539
+    private static function passwordNeedsRehash($hash) {
540
+        if (self::isPhpCryptBroken()) {
541
+            return false;
542
+        } else {
543
+            return password_needs_rehash($hash, PASSWORD_DEFAULT);
544
+        }
545
+    }
546
+
547
+    /**
548
+     * @param string $password
549
+     * @param string $hash
550
+     *
551
+     * @return bool
552
+     */
553
+    private static function passwordVerify($password, $hash) {
554
+        if (self::isPhpCryptBroken()) {
555
+            return crypt($password, $hash) === $hash;
556
+        } else {
557
+            return password_verify($password, $hash);
558
+        }
559
+    }
560 560
 }
Please login to merge, or discard this patch.
Braces   +64 added lines, -32 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Provide an interface to the wt_user table.
20 20
  */
21
-class User {
21
+class User
22
+{
22 23
 	/** @var  string The primary key of this user. */
23 24
 	private $user_id;
24 25
 
@@ -44,7 +45,8 @@  discard block
 block discarded – undo
44 45
 	 *
45 46
 	 * @return User|null
46 47
 	 */
47
-	public static function find($user_id) {
48
+	public static function find($user_id)
49
+	{
48 50
 		if (!array_key_exists($user_id, self::$cache)) {
49 51
 			$row = Database::prepare(
50 52
 				"SELECT user_id, user_name, real_name, email FROM `##user` WHERE user_id = ?"
@@ -66,7 +68,8 @@  discard block
 block discarded – undo
66 68
 	 *
67 69
 	 * @return User|null
68 70
 	 */
69
-	public static function findByUserName($user_name) {
71
+	public static function findByUserName($user_name)
72
+	{
70 73
 		$user_id = Database::prepare(
71 74
 			"SELECT user_id FROM `##user` WHERE user_name = :user_name"
72 75
 		)->execute(array(
@@ -83,7 +86,8 @@  discard block
 block discarded – undo
83 86
 	 *
84 87
 	 * @return User|null
85 88
 	 */
86
-	public static function findByEmail($email) {
89
+	public static function findByEmail($email)
90
+	{
87 91
 		$user_id = Database::prepare(
88 92
 			"SELECT user_id FROM `##user` WHERE email = :email"
89 93
 		)->execute(array(
@@ -100,7 +104,8 @@  discard block
 block discarded – undo
100 104
 	 *
101 105
 	 * @return User|null
102 106
 	 */
103
-	public static function findByIdentifier($identifier) {
107
+	public static function findByIdentifier($identifier)
108
+	{
104 109
 		$user_id = Database::prepare(
105 110
 			"SELECT user_id FROM `##user` WHERE ? IN (user_name, email)"
106 111
 		)->execute(array($identifier))->fetchOne();
@@ -115,7 +120,8 @@  discard block
 block discarded – undo
115 120
 	 *
116 121
 	 * @return User|null
117 122
 	 */
118
-	public static function findByGenealogyRecord(Individual $individual) {
123
+	public static function findByGenealogyRecord(Individual $individual)
124
+	{
119 125
 		$user_id = Database::prepare(
120 126
 			"SELECT user_id" .
121 127
 			" FROM `##user_gedcom_setting`" .
@@ -133,7 +139,8 @@  discard block
 block discarded – undo
133 139
 	 *
134 140
 	 * @return User|null
135 141
 	 */
136
-	public static function findLatestToRegister() {
142
+	public static function findLatestToRegister()
143
+	{
137 144
 		$user_id = Database::prepare(
138 145
 			"SELECT u.user_id" .
139 146
 			" FROM `##user` u" .
@@ -157,7 +164,8 @@  discard block
 block discarded – undo
157 164
 	 *
158 165
 	 * @return User
159 166
 	 */
160
-	public static function create($user_name, $real_name, $email, $password) {
167
+	public static function create($user_name, $real_name, $email, $password)
168
+	{
161 169
 		Database::prepare(
162 170
 			"INSERT INTO `##user` (user_name, real_name, email, password) VALUES (:user_name, :real_name, :email, :password)"
163 171
 		)->execute(array(
@@ -182,7 +190,8 @@  discard block
 block discarded – undo
182 190
 	 *
183 191
 	 * @return int
184 192
 	 */
185
-	public static function count() {
193
+	public static function count()
194
+	{
186 195
 		return (int) Database::prepare(
187 196
 			"SELECT COUNT(*)" .
188 197
 			" FROM `##user`" .
@@ -195,7 +204,8 @@  discard block
 block discarded – undo
195 204
 	 *
196 205
 	 * @return User[]
197 206
 	 */
198
-	public static function all() {
207
+	public static function all()
208
+	{
199 209
 		$users = array();
200 210
 
201 211
 		$rows = Database::prepare(
@@ -217,7 +227,8 @@  discard block
 block discarded – undo
217 227
 	 *
218 228
 	 * @return User[]
219 229
 	 */
220
-	public static function allAdmins() {
230
+	public static function allAdmins()
231
+	{
221 232
 		$rows = Database::prepare(
222 233
 			"SELECT user_id, user_name, real_name, email" .
223 234
 			" FROM `##user`" .
@@ -240,7 +251,8 @@  discard block
 block discarded – undo
240 251
 	 *
241 252
 	 * @return User[]
242 253
 	 */
243
-	public static function allVerified() {
254
+	public static function allVerified()
255
+	{
244 256
 		$rows = Database::prepare(
245 257
 			"SELECT user_id, user_name, real_name, email" .
246 258
 			" FROM `##user`" .
@@ -263,7 +275,8 @@  discard block
 block discarded – undo
263 275
 	 *
264 276
 	 * @return User[]
265 277
 	 */
266
-	public static function allLoggedIn() {
278
+	public static function allLoggedIn()
279
+	{
267 280
 		$rows = Database::prepare(
268 281
 			"SELECT DISTINCT user_id, user_name, real_name, email" .
269 282
 			" FROM `##user`" .
@@ -283,7 +296,8 @@  discard block
 block discarded – undo
283 296
 	 *
284 297
 	 * @param \stdclass $user A row from the wt_user table
285 298
 	 */
286
-	public function __construct(\stdClass $user) {
299
+	public function __construct(\stdClass $user)
300
+	{
287 301
 		$this->user_id   = $user->user_id;
288 302
 		$this->user_name = $user->user_name;
289 303
 		$this->real_name = $user->real_name;
@@ -293,7 +307,8 @@  discard block
 block discarded – undo
293 307
 	/**
294 308
 	 * Delete a user
295 309
 	 */
296
-	public function delete() {
310
+	public function delete()
311
+	{
297 312
 		// Don't delete the logs.
298 313
 		Database::prepare("UPDATE `##log` SET user_id=NULL WHERE user_id =?")->execute(array($this->user_id));
299 314
 		// Take over the user’s pending changes. (What else could we do with them?)
@@ -313,7 +328,8 @@  discard block
 block discarded – undo
313 328
 	 *
314 329
 	 * @return bool
315 330
 	 */
316
-	public function checkPassword($password) {
331
+	public function checkPassword($password)
332
+	{
317 333
 		$password_hash = Database::prepare(
318 334
 			"SELECT password FROM `##user` WHERE user_id = ?"
319 335
 		)->execute(array($this->user_id))->fetchOne();
@@ -334,7 +350,8 @@  discard block
 block discarded – undo
334 350
 	 *
335 351
 	 * @return string
336 352
 	 */
337
-	public function getUserId() {
353
+	public function getUserId()
354
+	{
338 355
 		return $this->user_id;
339 356
 	}
340 357
 
@@ -343,7 +360,8 @@  discard block
 block discarded – undo
343 360
 	 *
344 361
 	 * @return string
345 362
 	 */
346
-	public function getUserName() {
363
+	public function getUserName()
364
+	{
347 365
 		return $this->user_name;
348 366
 	}
349 367
 
@@ -354,7 +372,8 @@  discard block
 block discarded – undo
354 372
 	 *
355 373
 	 * @return $this
356 374
 	 */
357
-	public function setUserName($user_name) {
375
+	public function setUserName($user_name)
376
+	{
358 377
 		if ($this->user_name !== $user_name) {
359 378
 			$this->user_name = $user_name;
360 379
 			Database::prepare(
@@ -370,7 +389,8 @@  discard block
 block discarded – undo
370 389
 	 *
371 390
 	 * @return string
372 391
 	 */
373
-	public function getRealName() {
392
+	public function getRealName()
393
+	{
374 394
 		return $this->real_name;
375 395
 	}
376 396
 
@@ -379,7 +399,8 @@  discard block
 block discarded – undo
379 399
 	 *
380 400
 	 * @return string
381 401
 	 */
382
-	public function getRealNameHtml() {
402
+	public function getRealNameHtml()
403
+	{
383 404
 		return '<span dir="auto">' . Filter::escapeHtml($this->real_name) . '</span>';
384 405
 	}
385 406
 
@@ -390,7 +411,8 @@  discard block
 block discarded – undo
390 411
 	 *
391 412
 	 * @return User
392 413
 	 */
393
-	public function setRealName($real_name) {
414
+	public function setRealName($real_name)
415
+	{
394 416
 		if ($this->real_name !== $real_name) {
395 417
 			$this->real_name = $real_name;
396 418
 			Database::prepare(
@@ -406,7 +428,8 @@  discard block
 block discarded – undo
406 428
 	 *
407 429
 	 * @return string
408 430
 	 */
409
-	public function getEmail() {
431
+	public function getEmail()
432
+	{
410 433
 		return $this->email;
411 434
 	}
412 435
 
@@ -417,7 +440,8 @@  discard block
 block discarded – undo
417 440
 	 *
418 441
 	 * @return User
419 442
 	 */
420
-	public function setEmail($email) {
443
+	public function setEmail($email)
444
+	{
421 445
 		if ($this->email !== $email) {
422 446
 			$this->email = $email;
423 447
 			Database::prepare(
@@ -435,7 +459,8 @@  discard block
 block discarded – undo
435 459
 	 *
436 460
 	 * @return User
437 461
 	 */
438
-	public function setPassword($password) {
462
+	public function setPassword($password)
463
+	{
439 464
 		Database::prepare(
440 465
 			"UPDATE `##user` SET password = ? WHERE user_id = ?"
441 466
 		)->execute(array($this->passwordHash($password), $this->user_id));
@@ -454,7 +479,8 @@  discard block
 block discarded – undo
454 479
 	 *
455 480
 	 * @return string|null
456 481
 	 */
457
-	public function getPreference($setting_name, $default = null) {
482
+	public function getPreference($setting_name, $default = null)
483
+	{
458 484
 		if ($this->preferences === null) {
459 485
 			if ($this->user_id) {
460 486
 				$this->preferences = Database::prepare(
@@ -481,7 +507,8 @@  discard block
 block discarded – undo
481 507
 	 *
482 508
 	 * @return User
483 509
 	 */
484
-	public function setPreference($setting_name, $setting_value) {
510
+	public function setPreference($setting_name, $setting_value)
511
+	{
485 512
 		if ($this->user_id && $this->getPreference($setting_name) !== $setting_value) {
486 513
 			Database::prepare("REPLACE INTO `##user_setting` (user_id, setting_name, setting_value) VALUES (?, ?, LEFT(?, 255))")
487 514
 				->execute(array($this->user_id, $setting_name, $setting_value));
@@ -498,7 +525,8 @@  discard block
 block discarded – undo
498 525
 	 *
499 526
 	 * @return User
500 527
 	 */
501
-	public function deletePreference($setting_name) {
528
+	public function deletePreference($setting_name)
529
+	{
502 530
 		if ($this->user_id && $this->getPreference($setting_name) !== null) {
503 531
 			Database::prepare("DELETE FROM `##user_setting` WHERE user_id = ? AND setting_name = ?")
504 532
 				->execute(array($this->user_id, $setting_name));
@@ -514,7 +542,8 @@  discard block
 block discarded – undo
514 542
 	 *
515 543
 	 * @return bool
516 544
 	 */
517
-	private static function isPhpCryptBroken() {
545
+	private static function isPhpCryptBroken()
546
+	{
518 547
 		return PHP_VERSION_ID < 50307 && password_hash('foo', PASSWORD_DEFAULT) === false;
519 548
 	}
520 549
 
@@ -523,7 +552,8 @@  discard block
 block discarded – undo
523 552
 	 *
524 553
 	 * @return string
525 554
 	 */
526
-	private static function passwordHash($password) {
555
+	private static function passwordHash($password)
556
+	{
527 557
 		if (self::isPhpCryptBroken()) {
528 558
 			return crypt($password);
529 559
 		} else {
@@ -536,7 +566,8 @@  discard block
 block discarded – undo
536 566
 	 *
537 567
 	 * @return bool
538 568
 	 */
539
-	private static function passwordNeedsRehash($hash) {
569
+	private static function passwordNeedsRehash($hash)
570
+	{
540 571
 		if (self::isPhpCryptBroken()) {
541 572
 			return false;
542 573
 		} else {
@@ -550,7 +581,8 @@  discard block
 block discarded – undo
550 581
 	 *
551 582
 	 * @return bool
552 583
 	 */
553
-	private static function passwordVerify($password, $hash) {
584
+	private static function passwordVerify($password, $hash)
585
+	{
554 586
 		if (self::isPhpCryptBroken()) {
555 587
 			return crypt($password, $hash) === $hash;
556 588
 		} else {
Please login to merge, or discard this patch.