Christian Fraß commited on 2018-08-21 22:38:20
Zeige 21 geänderte Dateien mit 223 Einfügungen und 60 Löschungen.
| ... | ... |
@@ -2,14 +2,17 @@ |
| 2 | 2 |
<header>Adpositions</header> |
| 3 | 3 |
{{call::_proposal.html.tpl}}
|
| 4 | 4 |
<!-- |
| 5 |
- <p>The following list gives an overview over prepositions:</p> |
|
| 5 |
+ <li>The following list gives an overview over prepositions:</li> |
|
| 6 | 6 |
--> |
| 7 | 7 |
{{fold:adpositions.words:situation_id:type_id/reference_id}}
|
| 8 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Ek skal varte foran."], "eng" => ["I will wait in front."]])); ?></p>
|
|
| 9 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Du mut blive bakan."], "eng" => ["You must stay in the back."]])); ?></p>
|
|
| 10 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Han sta nedan de brüg."], "eng" => ["He stands under the bridge."]])); ?></p>
|
|
| 11 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Hun flüg uvan de volker."], "eng" => ["She flies above the clouds."]])); ?></p>
|
|
| 12 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Vi kan gae in de timer."], "eng" => ["We can go into the room."]])); ?></p>
|
|
| 13 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Je skal löpe ut de hus."], "eng" => ["You shall run out of the house."]])); ?></p>
|
|
| 8 |
+ <p>Some examples:</p> |
|
| 9 |
+ <ul> |
|
| 10 |
+ <li>{{fsdraft_format_correlation:section-adpositions.examples.0:type_sentence}}</li>
|
|
| 11 |
+ <li>{{fsdraft_format_correlation:section-adpositions.examples.1:type_sentence}}</li>
|
|
| 12 |
+ <li>{{fsdraft_format_correlation:section-adpositions.examples.2:type_sentence}}</li>
|
|
| 13 |
+ <li>{{fsdraft_format_correlation:section-adpositions.examples.3:type_sentence}}</li>
|
|
| 14 |
+ <li>{{fsdraft_format_correlation:section-adpositions.examples.4:type_sentence}}</li>
|
|
| 15 |
+ <li>{{fsdraft_format_correlation:section-adpositions.examples.5:type_sentence}}</li>
|
|
| 16 |
+ </ul> |
|
| 14 | 17 |
</section> |
| 15 | 18 |
|
| ... | ... |
@@ -1,14 +1,7 @@ |
| 1 | 1 |
<section class="section" id="attributes"> |
| 2 | 2 |
<header>Attributes</header> |
| 3 |
-<?php |
|
| 4 |
- compose |
|
| 5 |
- ( |
|
| 6 |
- [ |
|
| 7 |
- "comparation", |
|
| 8 |
- "adjectives", |
|
| 9 |
- "adverbs", |
|
| 10 |
- ] |
|
| 11 |
- ); |
|
| 12 |
- ?> |
|
| 3 |
+ {{call::comparation.html.tpl}}
|
|
| 4 |
+ {{call::adjectives.html.tpl}}
|
|
| 5 |
+ {{call::adverbs.html.tpl}}
|
|
| 13 | 6 |
</section> |
| 14 | 7 |
|
| ... | ... |
@@ -2,7 +2,7 @@ |
| 2 | 2 |
<header>Cases</header> |
| 3 | 3 |
<p>Regular nouns can appear in two cases: <span class="grammarterm">nominative</span> and <span class="grammarterm">genitive</span>.</p> |
| 4 | 4 |
<p>The base form of a noun is the nominative, which does not receive any marker.</p> |
| 5 |
- <p>The genitive is formed by appending the suffix <?php echo(mark("-(e)s", ["type_word", "lang_flk"])); ?> to the word, e.g. <?php echo(format_correlation("type_word")(["flk" => ["dages"], "eng" => ["days"]])); ?>. The marker for the plural has to be applied first, e.g. <?php echo(format_correlation("type_word")(["flk" => ["dager(e)s"], "eng" => ["days'"]])); ?>.</p>
|
|
| 5 |
+ <p>The genitive is formed by appending the suffix <?php echo(mark("-(e)s", ["type_word", "lang_flk"])); ?> to the word, e.g. {{fsdraft_format_correlation:section-cases.example1:type_word}}. The marker for the plural has to be applied first, e.g. {{fsdraft_format_correlation:section-cases.example2:type_word}}.</p>
|
|
| 6 | 6 |
<p></p> |
| 7 | 7 |
</section> |
| 8 | 8 |
|
| ... | ... |
@@ -7,16 +7,9 @@ |
| 7 | 7 |
<section class="section" id="conjugation"> |
| 8 | 8 |
<header>Conjugation</header> |
| 9 | 9 |
<p>In Folksprak verbs are not conjugated for different participants (<span class="grammarterm">personae</span>), number of actors (<span class="grammarterm">numeri</span>) or grammatical genders (<span class="grammarterm">genera</span>).</p> |
| 10 |
-<?php |
|
| 11 |
- compose |
|
| 12 |
- ( |
|
| 13 |
- [ |
|
| 14 |
- "infinite_verbforms", |
|
| 15 |
- "modal_verbs", |
|
| 16 |
- "tempora_and_modi", |
|
| 17 |
- "negation", |
|
| 18 |
- ] |
|
| 19 |
- ); |
|
| 20 |
- ?> |
|
| 10 |
+ {{call::infinite_verbforms.html.tpl}}
|
|
| 11 |
+ {{call::modal_verbs.html.tpl}}
|
|
| 12 |
+ {{call::tempora_and_modi.html.tpl}}
|
|
| 13 |
+ {{call::negation.html.tpl}}
|
|
| 21 | 14 |
</section> |
| 22 | 15 |
|
| ... | ... |
@@ -1,15 +1,8 @@ |
| 1 | 1 |
<section class="section" id="declension"> |
| 2 | 2 |
<header>Declension</header> |
| 3 |
-<?php |
|
| 4 |
- compose |
|
| 5 |
- ( |
|
| 6 |
- [ |
|
| 7 |
- "numeri", |
|
| 8 |
- "cases", |
|
| 9 |
- "definiteness", |
|
| 10 |
- ] |
|
| 11 |
- ); |
|
| 12 |
- ?> |
|
| 3 |
+ {{call::numeri.html.tpl}}
|
|
| 4 |
+ {{call::cases.html.tpl}}
|
|
| 5 |
+ {{call::definiteness.html.tpl}}
|
|
| 13 | 6 |
<p>The following table summarizes the information of this section:</p> |
| 14 | 7 |
<?php |
| 15 | 8 |
$data_common = read_json("source/data/common.json");
|
| ... | ... |
@@ -140,5 +133,5 @@ |
| 140 | 133 |
] |
| 141 | 134 |
)->generate(); |
| 142 | 135 |
?> |
| 143 |
-<p><?php echo(format_correlation("type_sentence")(["flk" => ["Vi kan seje de huses vindöger"], "eng" => ["We can see the houses windows."]])); ?></p></section>
|
|
| 136 |
+<p>{{fsdraft_format_correlation:section-declension.example:type_sentence}}</p></section>
|
|
| 144 | 137 |
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
<section class="subsection" id="definiteness"> |
| 2 | 2 |
<header>Definiteness</header> |
| 3 |
- <p>The undefinite aspect of a singular noun is formed by using the article <?php echo(mark("en", ["type_word", "lang_flk"])); ?>, e.g. <?php echo(format_correlation("type_word")(["flk" => ["en dag"], "eng" => ["a day"]])); ?>. Undefinite plural nouns don't have an article, e.g. <?php echo(format_correlation("type_word")(["flk" => ["dager"], "eng" => ["days"]])); ?>.</p>
|
|
| 4 |
- <p>The definite aspect of both singular and plural nouns is formed by using the article <?php echo(mark("de", ["type_word", "lang_flk"])); ?>, e.g. <?php echo(format_correlation("type_word")(["flk" => ["de dag"], "eng" => ["the day"]])); ?>.</p>
|
|
| 3 |
+ <p>The undefinite aspect of a singular noun is formed by using the article <?php echo(mark("en", ["type_word", "lang_flk"])); ?>, e.g. {{fsdraft_format_correlation:section-definiteness.example1:type_word}}. Undefinite plural nouns don't have an article, e.g. {{fsdraft_format_correlation:section-definiteness.example2:type_word}}.</p>
|
|
| 4 |
+ <p>The definite aspect of both singular and plural nouns is formed by using the article <?php echo(mark("de", ["type_word", "lang_flk"])); ?>, e.g. {{fsdraft_format_correlation:section-definiteness.example3:type_word}}.</p>
|
|
| 5 | 5 |
<span class="todo">abstract aspect like in "sand is dry"</span> |
| 6 | 6 |
</section> |
| 7 | 7 |
|
| ... | ... |
@@ -25,8 +25,8 @@ |
| 25 | 25 |
{{call::introduction.html.tpl}}
|
| 26 | 26 |
{{call::basics.html.tpl}}
|
| 27 | 27 |
{{call::vocabulary.html.tpl}}
|
| 28 |
- [[call::grammar.html.tpl]] |
|
| 29 |
- [[call::examples.html.tpl]] |
|
| 28 |
+ {{call::grammar.html.tpl}}
|
|
| 29 |
+ {{call::examples.html.tpl}}
|
|
| 30 | 30 |
</div> |
| 31 | 31 |
</body> |
| 32 | 32 |
</html> |
| ... | ... |
@@ -1,15 +1,8 @@ |
| 1 | 1 |
<section class="chapter" id="grammar"> |
| 2 | 2 |
<header>Grammar</header> |
| 3 |
-<?php |
|
| 4 |
- compose |
|
| 5 |
- ( |
|
| 6 |
- [ |
|
| 7 |
- "conjugation", |
|
| 8 |
- "declension", |
|
| 9 |
- "attributes", |
|
| 10 |
- "sentence_structure", |
|
| 11 |
- ] |
|
| 12 |
- ); |
|
| 13 |
- ?> |
|
| 3 |
+ {{call::conjugation.html.tpl}}
|
|
| 4 |
+ {{call::declension.html.tpl}}
|
|
| 5 |
+ {{call::attributes.html.tpl}}
|
|
| 6 |
+ {{call::sentence_structure.html.tpl}}
|
|
| 14 | 7 |
</section> |
| 15 | 8 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
<section class="subsection" id="numeri"> |
| 2 | 2 |
<header>Count</header> |
| 3 | 3 |
<?php proposal(); ?> |
| 4 |
- <p>The plural of a noun is formed by appending the syllable <?php echo(mark("-er", ["type_word", "lang_flk"])); ?>, e.g. <?php echo(format_correlation("type_word")(["flk" => ["dager"], "eng" => ["days"]])); ?>.</p>
|
|
| 4 |
+ <p>The plural of a noun is formed by appending the syllable <?php echo(mark("-er", ["type_word", "lang_flk"])); ?>, e.g. {{fsdraft_format_correlation:section-numeri.example:type_word}}.</p>
|
|
| 5 | 5 |
</section> |
| 6 | 6 |
|
| ... | ... |
@@ -13,7 +13,7 @@ |
| 13 | 13 |
</div> |
| 14 | 14 |
<div class="note note_information"> |
| 15 | 15 |
<span class="note_content"> |
| 16 |
- <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>
|
|
| 16 |
+ <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 {{fsdraft_format_correlation:section-personal_pronouns.example:type_sentence}} (A's book was given to B).</p>
|
|
| 17 | 17 |
</span> |
| 18 | 18 |
</div> |
| 19 | 19 |
<div class="note note_reasoning"> |
| ... | ... |
@@ -1,9 +1,9 @@ |
| 1 | 1 |
<section class="chapter" id="vocabulary"> |
| 2 | 2 |
<header>Vocabulary</header> |
| 3 |
- [[call::principles.html.tpl]] |
|
| 3 |
+ {{call::principles.html.tpl}}
|
|
| 4 | 4 |
{{call::pronouns.html.tpl}}
|
| 5 | 5 |
{{call::adpositions.html.tpl}}
|
| 6 |
- [[call::word_functions.html.tpl]] |
|
| 6 |
+ {{call::word_functions.html.tpl}}
|
|
| 7 | 7 |
{{call::dictionary.html.tpl}}
|
| 8 | 8 |
</section> |
| 9 | 9 |
|
| ... | ... |
@@ -0,0 +1,28 @@ |
| 1 |
+{
|
|
| 2 |
+ "examples": [ |
|
| 3 |
+ {
|
|
| 4 |
+ "flk": ["Ek skal varte foran."], |
|
| 5 |
+ "eng": ["I will wait in front."] |
|
| 6 |
+ }, |
|
| 7 |
+ {
|
|
| 8 |
+ "flk": ["Du mut blive bakan."], |
|
| 9 |
+ "eng": ["You must stay in the back."] |
|
| 10 |
+ }, |
|
| 11 |
+ {
|
|
| 12 |
+ "flk": ["Han sta nedan de brüg."], |
|
| 13 |
+ "eng": ["He stands under the bridge."] |
|
| 14 |
+ }, |
|
| 15 |
+ {
|
|
| 16 |
+ "flk": ["Hun flüg uvan de volker."], |
|
| 17 |
+ "eng": ["She flies above the clouds."] |
|
| 18 |
+ }, |
|
| 19 |
+ {
|
|
| 20 |
+ "flk": ["Vi kan gae in de timer."], |
|
| 21 |
+ "eng": ["We can go into the room."] |
|
| 22 |
+ }, |
|
| 23 |
+ {
|
|
| 24 |
+ "flk": ["Je skal löpe ut de hus."], |
|
| 25 |
+ "eng": ["You shall run out of the house."] |
|
| 26 |
+ } |
|
| 27 |
+ ] |
|
| 28 |
+} |
| ... | ... |
@@ -0,0 +1,113 @@ |
| 1 |
+"use strict"; |
|
| 2 |
+exports.__esModule = true; |
|
| 3 |
+ |
|
| 4 |
+const configuration = {
|
|
| 5 |
+ "replace_fs_umlauts": false, |
|
| 6 |
+ "target": "eng", |
|
| 7 |
+}; |
|
| 8 |
+ |
|
| 9 |
+ |
|
| 10 |
+/** |
|
| 11 |
+ * @author kcf |
|
| 12 |
+ */ |
|
| 13 |
+function mark( |
|
| 14 |
+ core, |
|
| 15 |
+ classes |
|
| 16 |
+) {
|
|
| 17 |
+ if (configuration["replace_fs_umlauts"]) {
|
|
| 18 |
+ if ((classes.indexOf("lang_fs") >= 0) && (classes.indexOf("letter") < 0)) {
|
|
| 19 |
+ core = ( |
|
| 20 |
+ core |
|
| 21 |
+ .replace(new RegExp("ö", "g"), "oy")
|
|
| 22 |
+ .replace(new RegExp("ü", "g"), "uy")
|
|
| 23 |
+ ); |
|
| 24 |
+ } |
|
| 25 |
+ } |
|
| 26 |
+ return ('<span class="' + classes.join(" ") + '">' + core + '</span>');
|
|
| 27 |
+} |
|
| 28 |
+ |
|
| 29 |
+/** |
|
| 30 |
+ * @author kcf |
|
| 31 |
+ */ |
|
| 32 |
+function format_single( |
|
| 33 |
+ type, |
|
| 34 |
+ language |
|
| 35 |
+) {
|
|
| 36 |
+ return ( |
|
| 37 |
+ function (piece) {
|
|
| 38 |
+ return mark(piece, [type, "lang_" + language]); |
|
| 39 |
+ } |
|
| 40 |
+ ); |
|
| 41 |
+} |
|
| 42 |
+ |
|
| 43 |
+ |
|
| 44 |
+/** |
|
| 45 |
+ * @author kcf |
|
| 46 |
+ */ |
|
| 47 |
+function format_list( |
|
| 48 |
+ type, |
|
| 49 |
+ language |
|
| 50 |
+) {
|
|
| 51 |
+ return ( |
|
| 52 |
+ function (pieces) {
|
|
| 53 |
+ return ( |
|
| 54 |
+ (pieces.length <= 0) |
|
| 55 |
+ ? "?" |
|
| 56 |
+ : pieces.map(format_single(type, language)).join(", ")
|
|
| 57 |
+ ); |
|
| 58 |
+ } |
|
| 59 |
+ ); |
|
| 60 |
+} |
|
| 61 |
+ |
|
| 62 |
+ |
|
| 63 |
+/** |
|
| 64 |
+ * @author kcf |
|
| 65 |
+ */ |
|
| 66 |
+function format_correlation( |
|
| 67 |
+ type, |
|
| 68 |
+ language_from = "flk", |
|
| 69 |
+ language_to = null |
|
| 70 |
+) {
|
|
| 71 |
+ if (language_to === null) language_to = configuration["target"]; |
|
| 72 |
+ return ( |
|
| 73 |
+ function (source) {
|
|
| 74 |
+ let output = ""; |
|
| 75 |
+ output += format_list(type, language_from)(source[language_from]); |
|
| 76 |
+ output += " ~ "; |
|
| 77 |
+ output += format_list(type, language_to)(source[language_to]); |
|
| 78 |
+ return output; |
|
| 79 |
+ } |
|
| 80 |
+ ); |
|
| 81 |
+} |
|
| 82 |
+ |
|
| 83 |
+ |
|
| 84 |
+/** |
|
| 85 |
+ * @author kcf |
|
| 86 |
+ */ |
|
| 87 |
+function definieren() {
|
|
| 88 |
+ return {
|
|
| 89 |
+ "name": "fsdraft", |
|
| 90 |
+ "befehle": [ |
|
| 91 |
+ {
|
|
| 92 |
+ "name": "fsdraft_mark", |
|
| 93 |
+ "funktion": function (args) {
|
|
| 94 |
+ let classes = rags; |
|
| 95 |
+ return function (wert) {
|
|
| 96 |
+ return mark(wert, classes); |
|
| 97 |
+ }; |
|
| 98 |
+ } |
|
| 99 |
+ }, |
|
| 100 |
+ {
|
|
| 101 |
+ "name": "fsdraft_format_correlation", |
|
| 102 |
+ "funktion": function (args) {
|
|
| 103 |
+ let type = args.shift(); |
|
| 104 |
+ return function (wert) {
|
|
| 105 |
+ return format_correlation(type)(wert); |
|
| 106 |
+ }; |
|
| 107 |
+ } |
|
| 108 |
+ }, |
|
| 109 |
+ ], |
|
| 110 |
+ }; |
|
| 111 |
+} |
|
| 112 |
+exports.definieren = definieren; |
|
| 113 |
+ |