public function build($locale, $domain = 'gui')
    {
        $cache = new ConfigCache($this->cacheDir.'/translations-'.$locale.'.js', $this->debug);

        if (!$cache->isFresh()) {
            $content = $this->buildContent($locale, $domain);

            $cache->write($content->getContent(), $content->getResources());

            if (!$this->debug) {
                $this->compressor->compressFile((string) $cache);
            }
        }

        return new Asset((string) $cache);
    }