File tree Expand file tree Collapse file tree
lib/public/TextProcessing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626namespace OCP \TextProcessing ;
2727
2828use OCP \IL10N ;
29+ use OCP \L10N \IFactory ;
2930
3031/**
3132 * This is the text processing task type for free prompting
3233 * @since 27.1.0
3334 */
3435class FreePromptTaskType implements ITaskType {
36+ private IL10N $ l ;
37+
3538 /**
3639 * Constructor for FreePromptTaskType
3740 *
38- * @param IL10N $l
41+ * @param IFactory $l10nFactory
3942 * @since 27.1.0
4043 */
4144 public function __construct (
42- private IL10N $ l ,
45+ IFactory $ l10nFactory ,
4346 ) {
47+ $ this ->l = $ l10nFactory ->get ('core ' );
4448 }
4549
4650
Original file line number Diff line number Diff line change 2626namespace OCP \TextProcessing ;
2727
2828use OCP \IL10N ;
29+ use OCP \L10N \IFactory ;
2930
3031/**
3132 * This is the text processing task type for creating headline
3233 * @since 27.1.0
3334 */
3435class HeadlineTaskType implements ITaskType {
36+ private IL10N $ l ;
37+
3538 /**
3639 * Constructor for HeadlineTaskType
3740 *
38- * @param IL10N $l
41+ * @param IFactory $l10nFactory
3942 * @since 27.1.0
4043 */
4144 public function __construct (
42- private IL10N $ l ,
45+ IFactory $ l10nFactory ,
4346 ) {
47+ $ this ->l = $ l10nFactory ->get ('core ' );
4448 }
4549
4650
@@ -57,6 +61,6 @@ public function getName(): string {
5761 * @since 27.1.0
5862 */
5963 public function getDescription (): string {
60- return $ this ->l ->t ('Generates a possible headline for a text ' );
64+ return $ this ->l ->t ('Generates a possible headline for a text. ' );
6165 }
6266}
Original file line number Diff line number Diff line change 2626namespace OCP \TextProcessing ;
2727
2828use OCP \IL10N ;
29+ use OCP \L10N \IFactory ;
2930
3031/**
3132 * This is the text processing task type for summaries
3233 * @since 27.1.0
3334 */
3435class SummaryTaskType implements ITaskType {
36+
37+ private IL10N $ l ;
38+
3539 /**
3640 * Constructor for SummaryTaskType
3741 *
38- * @param IL10N $l
42+ * @param IFactory $l10nFactory
3943 * @since 27.1.0
4044 */
4145 public function __construct (
42- private IL10N $ l ,
46+ IFactory $ l10nFactory ,
4347 ) {
48+ $ this ->l = $ l10nFactory ->get ('core ' );
4449 }
4550
4651
Original file line number Diff line number Diff line change 2626namespace OCP \TextProcessing ;
2727
2828use OCP \IL10N ;
29+ use OCP \L10N \IFactory ;
2930
3031/**
3132 * This is the text processing task type for topics extraction
3233 * @since 27.1.0
3334 */
3435class TopicsTaskType implements ITaskType {
36+ private IL10N $ l ;
37+
3538 /**
3639 * Constructor for TopicsTaskType
3740 *
38- * @param IL10N $l
41+ * @param IFactory $l10nFactory
3942 * @since 27.1.0
4043 */
4144 public function __construct (
42- private IL10N $ l ,
45+ IFactory $ l10nFactory ,
4346 ) {
47+ $ this ->l = $ l10nFactory ->get ('core ' );
4448 }
4549
4650
You can’t perform that action at this time.
0 commit comments