protected function initialize()
    {
        if ($this->initialized) {
            return;
        }

        parent::initialize();

        // Add resources files directly, so that we still have translations
        // event if we don't run translation:import
        $standardResources = $this->getStandardResources();
        foreach ($standardResources as $resource) {
            parent::addResource($resource['format'], $resource['path'], $resource['locale'], $resource['domain']);
        }

        // Register all catalogues we have in the storage
        $repo = $this->container->get('liip.translation.repository');
        $locales = $repo->getLocaleList();
        foreach ($repo->getDomainList() as $domain) {
            foreach ($locales as $locale) {
                parent::addResource('liip', 'intermediate.storage', $locale, $domain);
            }
        }

        $this->initialized = true;
    }