From 056daf25928cff3c4f6afeca4c2dbde00948c4a7 Mon Sep 17 00:00:00 2001 From: Jana Peper Date: Thu, 19 Dec 2024 10:51:26 +0100 Subject: feat: add proofread task type Signed-off-by: Jana Peper --- .../TaskTypes/TextToTextProofread.php | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php (limited to 'lib/public') diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php b/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php new file mode 100644 index 00000000000..a7775f276ee --- /dev/null +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php @@ -0,0 +1,91 @@ +l = $l10nFactory->get('core'); + } + + + /** + * @inheritDoc + * @since 31.0.0 + */ + public function getName(): string { + return $this->l->t('Proofread'); + } + + /** + * @inheritDoc + * @since 31.0.0 + */ + public function getDescription(): string { + return $this->l->t('Proofreads a text and lists corrections'); + } + + /** + * @return string + * @since 31.0.0 + */ + public function getId(): string { + return self::ID; + } + + /** + * @return ShapeDescriptor[] + * @since 31.0.0 + */ + public function getInputShape(): array { + return [ + 'input' => new ShapeDescriptor( + $this->l->t('Text'), + $this->l->t('The text to proofread'), + EShapeType::Text + ), + ]; + } + + /** + * @return ShapeDescriptor[] + * @since 31.0.0 + */ + public function getOutputShape(): array { + return [ + 'output' => new ShapeDescriptor( + $this->l->t('Corrections'), + $this->l->t('The corrections that should be made in your text'), + EShapeType::Text + ), + ]; + } +} -- cgit v1.2.3