| Conditions | 2 |
| Total Lines | 22 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /** |
||
| 2 | * @package admin |
||
| 3 | */ |
||
| 4 | |||
| 5 | // eslint-disable-next-line sw-deprecation-rules/private-feature-declarations |
||
| 6 | export default async function initializeLocaleService() { |
||
| 7 | const factoryContainer = Shopware.Application.getContainer('factory'); |
||
| 8 | const localeFactory = factoryContainer.locale; |
||
| 9 | |||
| 10 | // Register default snippets |
||
| 11 | localeFactory.register('de-DE', {}); |
||
| 12 | localeFactory.register('en-GB', {}); |
||
| 13 | |||
| 14 | // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment |
||
| 15 | const snippetService = Shopware.Service('snippetService'); |
||
| 16 | |||
| 17 | if (snippetService) { |
||
| 18 | // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access |
||
| 19 | await snippetService.getSnippets(localeFactory); |
||
| 20 | } |
||
| 21 | |||
| 22 | return localeFactory; |
||
| 23 | } |
||
| 24 |