source/content/personal_pronouns.html.php
9b21fc2c
 <?php
d42abfa2
 global $configuration;
 include_once("source/logic/server/data.php");
adddf67e
 include_once("source/logic/server/sql.php");
18080c63
 include_once("source/logic/server/table.php");
9b21fc2c
 
459c0868
 /*
18080c63
 function convert_persona($persona) {return [0 => "impersonal", 1 => "1st person", 2 => "2nd person", 3 => "3rd person"][$persona];}
 function convert_numerus($numerus) {return [0 => null, 1 => "singular", 2 => "plural"][$numerus];}
 function convert_genus($genus) {return [0 => "common", 1 => "masculine", 2 => "feminine", 3 => "neuter"][$genus];}
459c0868
  */
9b21fc2c
  ?>
579dbe00
 <section class="subsection" id="personal_pronouns">
9b21fc2c
 	<header>Personal Pronouns</header>
 <?php
459c0868
 	$data_common = read_json("source/data/common.json");
 	$data_pronouns = read_json("source/data/personal_pronouns.json");
adddf67e
 	
 	$data = $data_pronouns["words"];
 	{
 		{
f6c51a47
 			if (false)
 			{
 				$data = sql_cross($data, $data_common["counts"]);
 				$data = sql_select($data, function ($row) {return ($row["count_id"] == $row["id"]);});
 				$data = sql_delete($data, ["count_id", "id"]);
 				$data = sql_rename($data, "name", "count_name");
 			}
 			else
 			{
 				$data = sql_rename($data, "count_id", "count_name");
 			}
adddf67e
 		}
 		{
f6c51a47
 			if (false)
 			{
 				$data = sql_cross($data, $data_common["persons"]);
 				$data = sql_select($data, function ($row) {return ($row["person_id"] == $row["id"]);});
 				$data = sql_delete($data, ["person_id", "id"]);
 				$data = sql_rename($data, "name", "person_name");
 			}
 			else
 			{
 				$data = sql_rename($data, "person_id", "person_name");
 			}
adddf67e
 		}
 		{
f6c51a47
 			if (false)
 			{
 				$data = sql_cross($data, $data_common["genders"]);
 				$data = sql_select($data, function ($row) {return ($row["gender_id"] == $row["id"]);});
 				$data = sql_delete($data, ["gender_id", "id"]);
 				$data = sql_rename($data, "name", "gender_name");
 			}
 			else
 			{
 				$data = sql_rename($data, "gender_id", "gender_name");
 			}
adddf67e
 		}
 		{
f6c51a47
 			if (false)
 			{
 				$data = sql_cross($data, $data_pronouns["types"]);
 				$data = sql_select($data, function ($row) {return ($row["type_id"] == $row["id"]);});
 				$data = sql_delete($data, ["type_id", "id"]);
 				$data = sql_rename($data, "name", "type_name");
 			}
 			else
 			{
 				$data = sql_rename($data, "type_id", "type_name");
 			}
adddf67e
 		}
 		{
5da1fdb3
 			if (false)
f6c51a47
 			{
 				$data = sql_cross($data, $data_common["cases"]);
 				$data = sql_select($data, function ($row) {return ($row["case_id"] == $row["id"]);});
 				$data = sql_delete($data, ["case_id", "id"]);
 				$data = sql_rename($data, "name", "case_name");
 			}
 			else
 			{
 				$data = sql_rename($data, "case_id", "case_name");
 			}
adddf67e
 		}
 	}
 	
f6c51a47
 	{
424abdf9
 		// $data = sql_select($data, function ($row) {return ($row["type_name"] == "nor");});
270847a5
 		$data = sql_select($data, function ($row) {global $configuration; return (($row["language_id"] == "flk") or ($row["language_id"] == $configuration["target"]));});
f6c51a47
 	}
 	
18080c63
 	$table = new class_table
 	(
 		[
adddf67e
 			new class_column("Language", "language_id"),
 			new class_column("Count", "count_name"),
 			new class_column("Person", "person_name"),
 			new class_column("Gender", "gender_name"),
 			new class_column("Type", "type_name"),
 			new class_column("Case", "case_name"),
 			new class_column("Words", "words", function ($x) {return json_encode($x);}),
18080c63
 		],
adddf67e
 		$data
 	);
 	
2809be59
 	$table->snap
adddf67e
 	(
 		[
 			"label_vertical" => function ($column) {return "";},
 			"columns_vertical" =>
 			[
459c0868
 				$table->columns_get()[1],
 				$table->columns_get()[2],
 				$table->columns_get()[3],
adddf67e
 			],
 			"label_horizontal" => function ($column, $value) {return $value;},
 			"columns_horizontal" =>
 			[
5da1fdb3
 				$table->columns_get()[4],
459c0868
 				$table->columns_get()[5],
adddf67e
 			],
 			"columns_data" =>
 			[
 				$table->columns_get()[0],
 				$table->columns_get()[6],
 			],
 			"data_aggregator" => function ($values)
 			{
 				return $values;
 			},
8794e319
 			"data_formatter" => function_chain
 			(
 				[
 					object_from_array("language_id"),
 					object_map(object_attribute("words")),
 					format_correlation("type_word"),
 				]
 			),
adddf67e
 		]
2809be59
 	)->generate();
9b21fc2c
  ?>
5da1fdb3
 	<div class="note note_information">
 		<span class="note_content">
f662d51c
 			<p>Since the word <?php echo(mark("man", ["type_word", "lang_flk"])); ?> simply means <?php echo(mark("human being", ["type_word", "lang_en"])); ?>, it can be understood as an implicit way to express an abstract actor; similar words like <?php echo(mark("lüd", ["type_word", "lang_flk"])); ?> (<?php echo(mark("people", ["type_word", "lang_en"])); ?>) or <?php echo(mark("di", ["type_word", "lang_flk"])); ?> can be used as well.</p>
5da1fdb3
 		</span>
 	</div>
 	<div class="note note_information">
 		<span class="note_content">
f662d51c
 			<p>The honorific salutation is expressed by the plural form <?php echo(mark("je", ["type_word", "lang_flk"])); ?>; however it should be avoided in usual speech in favor of the singular form <?php echo(mark("du", ["type_word", "lang_flk"])); ?>.</p>
5da1fdb3
 		</span>
 	</div>
 	<div class="note note_information">
 		<span class="note_content">
f662d51c
 			<p>A reflexive genitive can be formed by inserting the word <?php echo(mark("egen", ["word", "lang_flk"])); ?> (<?php echo(mark("own", ["type_word", "lang_en"])); ?>), for example <?php echo(format_correlation("type_sentence")(["flk" => ["Han (A) hav givt to ham (B) hans egen buk."], "eng" => ["He (A) has given (to) him (B) his own book."]])); ?> (A's book was given to B).</p>
5da1fdb3
 		</span>
 	</div>
424abdf9
 	<div class="note note_reasoning">
 		<input type="checkbox" class="note_hide" title="click to show/hide" id="note_02"/>
 		<label class="note_label note_label_show" for="note_02">show</label>
 		<label class="note_label note_label_hide" for="note_02">hide</label>
 		<span class="note_content">
f662d51c
 			<p>When finding appropriate personal pronouns, the most intricate cases were the 3rd person singular and the 2nd person plural; both turned out to be very diverse among the modern Germanic languages. While for the 2nd person plural we could find a sufficient satisfying solution after a while, the 3rd person singular kept defying. In the end we came to the settlement to use a Swedish-like solution including the pronoun <?php echo(mark("hen", ["type_word", "lang_flk"])); ?>, which is not bound to any sexus so that it can be used for actors in general.</p>
424abdf9
 		</span>
 	</div>
9b21fc2c
 </section>