From: Hamatoma Date: Wed, 3 Apr 2024 17:58:52 +0000 (+0200) Subject: V 0.1.1 Verb improvements X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=697157dd39f654897de965d1c14e89d5d09afc54;p=gadeku.git V 0.1.1 Verb improvements - GermanGrammar - only entry of infinitive on verbs --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 0593f5f..b47c180 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,9 @@ +# V 0.1.1 Verb improvements + +# Added +- GermanGrammar + +# Changed +- only entry of infinitive on verbs + # V 0.1.0 Initial commit diff --git a/app/Helpers/GermanGrammar.php b/app/Helpers/GermanGrammar.php new file mode 100644 index 0000000..febc372 --- /dev/null +++ b/app/Helpers/GermanGrammar.php @@ -0,0 +1,86 @@ + 'required', - 'participle' => 'required', + 'verb' => 'required', 'separablepart' => '', 'transitive' => 'required', 'usage' => 'required', @@ -218,24 +218,20 @@ class VerbController extends Controller $rc = back()->withErrors($validator)->withInput(); } else { $validated = $validator->validated(); - $base = $fields['verb']; - $base = substr($base, 0, strlen($base) - 2); - $tail1 = str_ends_with($base, 's') ? 't' : 'st'; - $tail2 = 'en'; - $tail0 = 'e'; - $validated ['presence1s'] = $base . $tail0; - $validated ['presence2s'] = $base . $tail1; - $validated ['presence3s'] = $base . $tail1; - $validated ['presence1p'] = $base . $tail2; - $validated ['presence2p'] = $base . $tail1; - $validated ['presence3p'] = $base . $tail2; - $base = $validated['imperfect1s']; - $base = substr($base, 0, strlen($base) - 1); - $validated ['imperfect2s'] = $base . $tail1; - $validated ['imperfect3s'] = $base . $tail1; - $validated ['imperfect1p'] = $base . $tail2; - $validated ['imperfect2p'] = $base . $tail1; - $validated ['imperfect3p'] = $base . $tail2; + $verb = $fields['verb']; + $validated ['participle'] = GermanGrammar::verbParticipe($verb); + $validated ['presence1s'] = GermanGrammar::verbPresent($verb, 1, true); + $validated ['presence2s'] = GermanGrammar::verbPresent($verb, 2, true); + $validated ['presence3s'] = GermanGrammar::verbPresent($verb, 3, true); + $validated ['presence1p'] = GermanGrammar::verbPresent($verb, 1, false); + $validated ['presence2p'] = GermanGrammar::verbPresent($verb, 2, false); + $validated ['presence3p'] = GermanGrammar::verbPresent($verb, 3, false); + $validated ['imperfect1s'] = GermanGrammar::verbImperfect($verb, 1, true); + $validated ['imperfect2s'] = GermanGrammar::verbImperfect($verb, 2, true); + $validated ['imperfect3s'] = GermanGrammar::verbImperfect($verb, 3, true); + $validated ['imperfect1p'] = GermanGrammar::verbImperfect($verb, 1, false); + $validated ['imperfect2p'] = GermanGrammar::verbImperfect($verb, 2, false); + $validated ['imperfect3p'] = GermanGrammar::verbImperfect($verb, 3, false); $word = Word::create([ 'word' => $fields['verb'], 'wordtype_scope' => 2002, diff --git a/composer.lock b/composer.lock index 2adec0d..8d2875e 100644 --- a/composer.lock +++ b/composer.lock @@ -3374,16 +3374,16 @@ }, { "name": "symfony/console", - "version": "v7.0.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f" + "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6b099f3306f7c9c2d2786ed736d0026b2903205f", - "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f", + "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", + "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", "shasum": "" }, "require": { @@ -3447,7 +3447,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.0.4" + "source": "https://github.com/symfony/console/tree/v7.0.6" }, "funding": [ { @@ -3463,7 +3463,7 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2024-04-01T11:04:53+00:00" }, { "name": "symfony/css-selector", @@ -3599,16 +3599,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.0.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "677b24759decff69e65b1e9d1471d90f95ced880" + "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/677b24759decff69e65b1e9d1471d90f95ced880", - "reference": "677b24759decff69e65b1e9d1471d90f95ced880", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/46a4cc138f799886d4bd70477c55c699d3e9dfc8", + "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8", "shasum": "" }, "require": { @@ -3654,7 +3654,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.0.4" + "source": "https://github.com/symfony/error-handler/tree/v7.0.6" }, "funding": [ { @@ -3670,7 +3670,7 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2024-03-19T11:57:22+00:00" }, { "name": "symfony/event-dispatcher", @@ -3754,16 +3754,16 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.4.0", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + "reference": "4e64b49bf370ade88e567de29465762e316e4224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/4e64b49bf370ade88e567de29465762e316e4224", + "reference": "4e64b49bf370ade88e567de29465762e316e4224", "shasum": "" }, "require": { @@ -3810,7 +3810,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.2" }, "funding": [ { @@ -3826,7 +3826,7 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/finder", @@ -3894,16 +3894,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.0.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "439fdfdd344943254b1ef6278613e79040548045" + "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/439fdfdd344943254b1ef6278613e79040548045", - "reference": "439fdfdd344943254b1ef6278613e79040548045", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8789625dcf36e5fbf753014678a1e090f1bc759c", + "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c", "shasum": "" }, "require": { @@ -3951,7 +3951,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.0.4" + "source": "https://github.com/symfony/http-foundation/tree/v7.0.6" }, "funding": [ { @@ -3967,20 +3967,20 @@ "type": "tidelift" } ], - "time": "2024-02-08T19:22:56+00:00" + "time": "2024-03-19T11:46:48+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.0.5", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72" + "reference": "34c872391046d59af804af62d4573b829cfe4824" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72", - "reference": "37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/34c872391046d59af804af62d4573b829cfe4824", + "reference": "34c872391046d59af804af62d4573b829cfe4824", "shasum": "" }, "require": { @@ -4063,7 +4063,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.0.5" + "source": "https://github.com/symfony/http-kernel/tree/v7.0.6" }, "funding": [ { @@ -4079,20 +4079,20 @@ "type": "tidelift" } ], - "time": "2024-03-04T21:05:24+00:00" + "time": "2024-04-03T06:12:25+00:00" }, { "name": "symfony/mailer", - "version": "v7.0.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "72e16d87bf50a3ce195b9470c06bb9d7b816ea85" + "reference": "eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/72e16d87bf50a3ce195b9470c06bb9d7b816ea85", - "reference": "72e16d87bf50a3ce195b9470c06bb9d7b816ea85", + "url": "https://api.github.com/repos/symfony/mailer/zipball/eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0", + "reference": "eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0", "shasum": "" }, "require": { @@ -4143,7 +4143,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.0.4" + "source": "https://github.com/symfony/mailer/tree/v7.0.6" }, "funding": [ { @@ -4159,20 +4159,20 @@ "type": "tidelift" } ], - "time": "2024-02-03T21:34:19+00:00" + "time": "2024-03-28T09:20:36+00:00" }, { "name": "symfony/mime", - "version": "v7.0.3", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716" + "reference": "99362408c9abdf8c7cadcf0529b6fc8b16f5ace2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716", - "reference": "c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716", + "url": "https://api.github.com/repos/symfony/mime/zipball/99362408c9abdf8c7cadcf0529b6fc8b16f5ace2", + "reference": "99362408c9abdf8c7cadcf0529b6fc8b16f5ace2", "shasum": "" }, "require": { @@ -4192,6 +4192,7 @@ "league/html-to-markdown": "^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", "symfony/property-access": "^6.4|^7.0", "symfony/property-info": "^6.4|^7.0", "symfony/serializer": "^6.4|^7.0" @@ -4226,7 +4227,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.0.3" + "source": "https://github.com/symfony/mime/tree/v7.0.6" }, "funding": [ { @@ -4242,7 +4243,7 @@ "type": "tidelift" } ], - "time": "2024-01-30T08:34:29+00:00" + "time": "2024-03-21T19:37:36+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5018,16 +5019,16 @@ }, { "name": "symfony/routing", - "version": "v7.0.5", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19" + "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19", - "reference": "ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19", + "url": "https://api.github.com/repos/symfony/routing/zipball/cded64e5bbf9f31786f1055fcc76718fdd77519c", + "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c", "shasum": "" }, "require": { @@ -5079,7 +5080,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.0.5" + "source": "https://github.com/symfony/routing/tree/v7.0.6" }, "funding": [ { @@ -5095,20 +5096,20 @@ "type": "tidelift" } ], - "time": "2024-02-27T12:34:35+00:00" + "time": "2024-03-28T21:02:11+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", "shasum": "" }, "require": { @@ -5161,7 +5162,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" }, "funding": [ { @@ -5177,7 +5178,7 @@ "type": "tidelift" } ], - "time": "2023-12-26T14:02:43+00:00" + "time": "2023-12-19T21:51:00+00:00" }, { "name": "symfony/string", @@ -5361,16 +5362,16 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "06450585bf65e978026bda220cdebca3f867fde7" + "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7", - "reference": "06450585bf65e978026bda220cdebca3f867fde7", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/43810bdb2ddb5400e5c5e778e27b210a0ca83b6b", + "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b", "shasum": "" }, "require": { @@ -5419,7 +5420,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.2" }, "funding": [ { @@ -5435,7 +5436,7 @@ "type": "tidelift" } ], - "time": "2023-12-26T14:02:43+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/uid", @@ -5513,16 +5514,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.0.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e03ad7c1535e623edbb94c22cc42353e488c6670" + "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e03ad7c1535e623edbb94c22cc42353e488c6670", - "reference": "e03ad7c1535e623edbb94c22cc42353e488c6670", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb", + "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb", "shasum": "" }, "require": { @@ -5576,7 +5577,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.0.4" + "source": "https://github.com/symfony/var-dumper/tree/v7.0.6" }, "funding": [ { @@ -5592,7 +5593,7 @@ "type": "tidelift" } ], - "time": "2024-02-15T11:33:06+00:00" + "time": "2024-03-19T11:57:22+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", diff --git a/resources/views/verb/create.blade.php b/resources/views/verb/create.blade.php index aa33c92..1954de3 100644 --- a/resources/views/verb/create.blade.php +++ b/resources/views/verb/create.blade.php @@ -7,14 +7,10 @@ - -