Skip to content

Commit

Permalink
Use translation extension (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 18, 2023
1 parent 67fc384 commit 1116256
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
},
"require": {
"php": ">=8.1.0",
"contributte/console": "^0.9",
"contributte/monolog": "^0.5",
"contributte/translation": "^2.0",
"cweagans/composer-patches": "^1.7",
"fastybird/bootstrap-library": "dev-main",
"fastybird/exchange-library": "dev-main",
Expand All @@ -56,7 +59,6 @@
},
"require-dev": {
"brianium/paratest": "^7.3",
"contributte/translation": "^2.0",
"dg/bypass-finals": "^1.4",
"infection/infection": "^0.27",
"orisai/coding-standard": "^3.2",
Expand Down
13 changes: 12 additions & 1 deletion src/DI/TriggersExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace FastyBird\Module\Triggers\DI;

use Contributte\Translation;
use Doctrine\Persistence;
use FastyBird\Library\Bootstrap\Boot as BootstrapBoot;
use FastyBird\Module\Triggers\Commands;
Expand Down Expand Up @@ -46,7 +47,7 @@
*
* @author Adam Kadlec <[email protected]>
*/
class TriggersExtension extends DI\CompilerExtension
class TriggersExtension extends DI\CompilerExtension implements Translation\DI\TranslationProviderInterface
{

public const NAME = 'fbTriggersModule';
Expand Down Expand Up @@ -297,4 +298,14 @@ public function afterCompile(PhpGenerator\ClassType $class): void
);
}

/**
* @return array<string>
*/
public function getTranslationResources(): array
{
return [
__DIR__ . '/../Translations/',
];
}

}

0 comments on commit 1116256

Please sign in to comment.