579dbe00295a534a278b929d1ff998da9d2838c1
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

1) <?php
fenris advanced

fenris authored 8 years ago

2) global $configuration;
3) include_once("source/logic/server/data.php");
fenris foo

fenris authored 8 years ago

4) include_once("source/logic/server/table.php");
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

5) 
fenris foo

fenris authored 8 years ago

6) function convert_persona($persona) {return [0 => "impersonal", 1 => "1st person", 2 => "2nd person", 3 => "3rd person"][$persona];}
7) function convert_numerus($numerus) {return [0 => null, 1 => "singular", 2 => "plural"][$numerus];}
8) function convert_genus($genus) {return [0 => "common", 1 => "masculine", 2 => "feminine", 3 => "neuter"][$genus];}
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

9)  ?>
bfadmin-master advanced

bfadmin-master authored 8 years ago

10) <section class="subsection" id="personal_pronouns">
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

11) 	<header>Personal Pronouns</header>
bfadmin-master advanced

bfadmin-master authored 8 years ago

12) 	<div class="note_error">This section is only a proposal yet; not part of the draft.</div>
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

13) <?php
fenris foo

fenris authored 8 years ago

14) 	$table = new class_table
15) 	(
16) 		[
17) 			new class_column
18) 			(
19) 				"Case",
20) 				function ($row)
21) 				{
22) 					return [
23) 						convert_persona($row["persona"]),
24) 						convert_numerus($row["numerus"]),
25) 						convert_genus($row["genus"]),
26) 					];
27) 				},
28) 				function ($value)
29) 				{
30) 					return implode(" / ", $value);
31) 				}
32) 			),
33) 			/*
34) 			 */
35) 			new class_column
36) 			(
37) 				$configuration["languagemap"]["fs"],
38) 				function ($row)
39) 				{
40) 					return $row["fs"];
41) 				},
42) 				function ($value)
43) 				{
44) 					return implode(", ", array_map(function ($word) {return mark($word, ["word", "lang_fs"]);}, $value));
45) 				}
46) 			),
47) 			new class_column
48) 			(
49) 				$configuration["languagemap"][$configuration["target"]],
50) 				function ($row)
51) 				{
52) 					global $configuration;
53) 					return $row[$configuration["target"]];
54) 				},
55) 				function ($value)
56) 				{
57) 					return ((count($value) == 0) ? "--" : implode(", ", array_map(function ($word) {global $configuration; return mark($word, ["word", "lang_" . $configuration["target"]]);}, $value)));
58) 				}
59) 			),
60) 		],
61) 		read_json("source/data/personal_pronouns.json")
62) 	);
63) 	$table->generate();
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

64)  ?>
fenris foo

fenris authored 8 years ago

65) 	<p>For the flected and otherwise related forms of the personal pronouns see the section <a href="#grammar/declension">Declension</a>.</p>