File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 "yiisoft/config" : " ^1.1" ,
3737 "yiisoft/csrf" : " ^1.2" ,
3838 "yiisoft/data-response" : " ^1.0" ,
39- "yiisoft/definitions" : " ^2 .0" ,
40- "yiisoft/di" : " ^1.1 " ,
39+ "yiisoft/definitions" : " ^3 .0" ,
40+ "yiisoft/di" : " ^1.2 " ,
4141 "yiisoft/error-handler" : " ^2.0" ,
4242 "yiisoft/factory" : " ^1.0" ,
4343 "yiisoft/files" : " ^2.0" ,
4646 "yiisoft/i18n" : " ^1.1" ,
4747 "yiisoft/log" : " ^2.0" ,
4848 "yiisoft/log-target-file" : " ^2.0" ,
49- "yiisoft/router" : " ^1.2" ,
50- "yiisoft/router-fastroute" : " ^1.1" ,
51- "yiisoft/translator" : " ^1.1" ,
52- "yiisoft/translator-formatter-intl" : " ^1.0" ,
53- "yiisoft/translator-message-php" : " ^1.0" ,
49+ "yiisoft/router" : " ^2.0" ,
50+ "yiisoft/router-fastroute" : " ^2.0" ,
51+ "yiisoft/translator" : " ^2.0" ,
52+ "yiisoft/translator-message-php" : " ^1.1" ,
5453 "yiisoft/view" : " ^6.0" ,
5554 "yiisoft/yii-console" : " ^1.3" ,
5655 "yiisoft/yii-debug" : " ^3.0@dev" ,
Original file line number Diff line number Diff line change 44
55use Yiisoft \Aliases \Aliases ;
66use Yiisoft \Translator \CategorySource ;
7- use Yiisoft \Translator \Formatter \ Intl \ IntlMessageFormatter ;
7+ use Yiisoft \Translator \IntlMessageFormatter ;
88use Yiisoft \Translator \Message \Php \MessageSource ;
99
1010/** @var array $params */
1111
1212return [
1313 // Configure application CategorySource
14- 'translation.app ' => static function (Aliases $ aliases ) use ($ params ) {
15- return new CategorySource (
16- $ params ['yiisoft/translator ' ]['defaultCategory ' ],
17- new MessageSource ($ aliases ->get ('@messages ' )),
18- new IntlMessageFormatter (),
19- );
20- },
14+ 'translation.app ' => [
15+ 'definition ' => static function (Aliases $ aliases ) use ($ params ) {
16+ return new CategorySource (
17+ $ params ['yiisoft/translator ' ]['defaultCategory ' ],
18+ new MessageSource ($ aliases ->get ('@messages ' )),
19+ new IntlMessageFormatter (),
20+ );
21+ },
22+ 'tags ' => ['translation.categorySource ' ],
23+ ],
2124];
Original file line number Diff line number Diff line change 5353 'locale ' => 'en ' ,
5454 'fallbackLocale ' => 'en ' ,
5555 'defaultCategory ' => 'app ' ,
56- 'categorySources ' => [
57- // You can add categories from your application and additional modules using `Reference::to` below
58- // Reference::to(ApplicationCategorySource::class),
59- Reference::to ('translation.app ' ),
60- ],
6156 ],
6257
6358 'yiisoft/yii-view ' => [
Original file line number Diff line number Diff line change 66use Yiisoft \Router \Route ;
77
88return [
9- Route::get ('/ ' )
10- ->action ([SiteController::class, 'index ' ])
11- ->name ('home ' ),
9+ Route::get ('/ ' )->action ([SiteController::class, 'index ' ])->name ('home ' ),
1210];
You can’t perform that action at this time.
0 commit comments