Skip to content

Commit

Permalink
feat(package): add package mapping for views and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelAlphonso committed Jun 13, 2022
1 parent 288fed7 commit 61de3e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ private function registerTranslator(Container $container)
$container['translator/config'] = function (Container $container) {
$appConfig = isset($container['config']) ? $container['config'] : [];
$transConfig = isset($appConfig['translator']) ? $appConfig['translator'] : null;
if (isset($transConfig['paths'])) {
$transConfig['paths'] = $container['package/map']->map($transConfig['paths']);
}
return new TranslatorConfig($transConfig);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/view/src/Charcoal/View/ViewServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function registerLoaderServices(Container $container): void
$container['view/loader/dependencies'] = function (Container $container): array {
return [
'base_path' => $container['config']['base_path'],
'paths' => $container['view/config']['paths']
'paths' => $container['package/map']->map($container['view/config']['paths'])
];
};

Expand Down

0 comments on commit 61de3e7

Please sign in to comment.