Skip to content

Commit 1f5122b

Browse files
committed
[FEATURE] Translate flash message title
Refs web-vision#343
1 parent 307b8dc commit 1f5122b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Classes/Hooks/UsageProcessAfterFinishHook.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ public function processCmdmap_afterFinish(DataHandler $dataHandler): void
3939
return;
4040
}
4141

42-
$label = $this->getLanguageService()->sL(
42+
$title = $this->getLanguageService()->sL(
43+
'LLL:EXT:wv_deepltranslate/Resources/Private/Language/locallang.xlf:usages.flashmassage.title'
44+
);
45+
$message = $this->getLanguageService()->sL(
4346
'LLL:EXT:wv_deepltranslate/Resources/Private/Language/locallang.xlf:usages.flashmassage.limit.description'
4447
);
4548

@@ -53,8 +56,8 @@ public function processCmdmap_afterFinish(DataHandler $dataHandler): void
5356

5457
$flashMessage = GeneralUtility::makeInstance(
5558
FlashMessage::class,
56-
sprintf($label, $usage->character->count, $usage->character->limit),
57-
'Deepl Usage',
59+
sprintf($message, $usage->character->count, $usage->character->limit),
60+
$title,
5861
$severity,
5962
true
6063
);

Resources/Private/Language/locallang.xlf

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
<source>Information not available</source>
181181
</trans-unit>
182182
<trans-unit id="usages.flashmassage.title">
183-
<source>DeepL Translate </source>
183+
<source>DeepL usage and quota</source>
184184
</trans-unit>
185185
<trans-unit id="usages.flashmassage.limit.description">
186186
<source>DeepL Translate Limit %s / %s</source>

0 commit comments

Comments
 (0)