concrete/src/Localization/Translation/Local/Factory.php
protected function getTranslationsStats(Translations $translations, DateTime $defaultUpdatedOn)
    {
        $result = null;
        foreach ($translations as $translation) {
            if ($translation->hasTranslation()) {
                $result = [
                    'version' => '',
                    'updatedOn' => $defaultUpdatedOn,
                ];
                break;
            }
        }
        if ($result !== null) {
            $h = $translations->getHeader('Project-Id-Version');
            if ($h && preg_match('/\s([\S]*\d[\S]*)$/', $h, $m)) {
                $result['version'] = $m[1];
            }
            $h = $translations->getHeader('PO-Revision-Date');
            if ($h) {
                try {
                    $result['updatedOn'] = new DateTime($h);
                } catch (Exception $x) {
                } catch (Throwable $x) {
                }
            }
        }

        return $result;
    }
protected function getTranslationsStats(Translations $translations, DateTime $defaultUpdatedOn)
    {
        $result = null;
        foreach ($translations as $translation) {
            if ($translation->hasTranslation()) {
                $result = [
                    'version' => '',
                    'updatedOn' => $defaultUpdatedOn,
                ];
                break;
            }
        }
        if ($result !== null) {
            $h = $translations->getHeader('Project-Id-Version');
            if ($h && preg_match('/\s([\S]*\d[\S]*)$/', $h, $m)) {
                $result['version'] = $m[1];
            }
            $h = $translations->getHeader('PO-Revision-Date');
            if ($h) {
                try {
                    $result['updatedOn'] = new DateTime($h);
                } catch (Exception $x) {
                } catch (Throwable $x) {
                }
            }
        }

        return $result;
    }
protected function getTranslationsStats ( Translations $ translations , DateTime $ defaultUpdatedOn ) { $ result = null ; foreach ( $ translations as $ translation ) { if ( $ translation -> hasTranslation ( ) ) { $ result = [ 'version' => '' , 'updatedOn' => $ defaultUpdatedOn , ] ; break ; } } if ( $ result !== null ) { $ h = $ translations -> getHeader ( 'Project-Id-Version' ) ; if ( $ h && preg_match ( '/\s([\S]*\d[\S]*)$/' , $ h , $ m ) ) { $ result [ 'version' ] = $ m [ 1 ] ; } $ h = $ translations -> getHeader ( 'PO-Revision-Date' ) ; if ( $ h ) { try { $ result [ 'updatedOn' ] = new DateTime ( $ h ) ; } catch ( Exception $ x ) { } catch ( Throwable $ x ) { } } } return $ result ; }
Get stats for a \Gettext\Translations instance.

@param Translations $translations
@param DateTime $defaultUpdatedOn

@return null|array {
@var string $version
@var DateTime $updatedOn
}
Get stats for a \ Gettext \ Translations instance .