<commit_before><?php
class Vps_Component_Generator_PseudoPage_Static extends Vps_Component_Generator_Static
{
    protected function _formatSelectFilename(Vps_Component_Select $select)
    {
        return $select;
    }

    protected function _acceptKey($key, $select, $parentData)
    {
        $ret = parent::_acceptKey($key, $select, $parentData);
        if ($ret && $select->hasPart(Vps_Component_Select::WHERE_FILENAME)) {
            $filename = $select->getPart(Vps_Component_Select::WHERE_FILENAME);
            if ($filename != $this->_getFilenameFromRow($key, $parentData)) return false;
        }
        return $ret;
    }

    protected function _getFilenameFromRow($componentKey, $parentData)
    {
        $ret = false;

        $c = $this->_settings;
        if (isset($c['filename'])) {
            $ret = $c['filename'];
        }
        if (!$ret && isset($c['name'])) {
            $ret = $c['name'];
        }
        if (!$ret) {
            $ret = $componentKey;
        }
        return Vps_Filter::filterStatic($ret, 'Ascii');
    }

    protected function _formatConfig($parentData, $componentKey)
    {
        $c = $this->_settings;

        $data = parent::_formatConfig($parentData, $componentKey);
        $data['name'] = isset($c['name']) ? $c['name'] : $componentKey;
        $data['filename'] = $this->_getFilenameFromRow($componentKey, $parentData);
        $data['rel'] = isset($c['rel']) ? $c['rel'] : '';
        $data['isPseudoPage'] = true;
        return $data;<commit_msg>Name von statischen Unterseiten wird mit trlStatic übersetzt<commit_after><?php
class Vps_Component_Generator_PseudoPage_Static extends Vps_Component_Generator_Static
{
    protected function _formatSelectFilename(Vps_Component_Select $select)
    {
        return $select;
    }

    protected function _acceptKey($key, $select, $parentData)
    {
        $ret = parent::_acceptKey($key, $select, $parentData);
        if ($ret && $select->hasPart(Vps_Component_Select::WHERE_FILENAME)) {
            $filename = $select->getPart(Vps_Component_Select::WHERE_FILENAME);
            if ($filename != $this->_getFilenameFromRow($key, $parentData)) return false;
        }
        return $ret;
    }

    protected function _getFilenameFromRow($componentKey, $parentData)
    {
        $ret = false;

        $c = $this->_settings;
        if (isset($c['filename'])) {
            $ret = $c['filename'];
        }
        if (!$ret && isset($c['name'])) {
            $ret = $c['name'];
            if ($parentData) {
                $pData = is_array($parentData) ? $parentData[0] : $parentData;
                $ret = $pData->trlStaticExecute($ret);
            }
        }
        if (!$ret) {
            $ret = $componentKey;
        }
        return Vps_Filter::filterStatic($ret, 'Ascii');
    }

    protected function _formatConfig($parentData, $componentKey)
    {
        $c = $this->_settings;

        $data = parent::_formatConfig($parentData, $componentKey);
        $data['name'] = isset($c['name']) ? $parentData->trlStaticExecute($c['name']) : $componentKey;
        $data['filename'] = $this->_getFilenameFromRow($componentKey, $parentData);
        $data['rel'] = isset($c['rel']) ? $c['rel'] : '';
        $data['isPseudoPage'] = true;
        return $data;
{'fraction_non_alphanumeric': 0.15639234740358335, 'fraction_numerical': 0.0003036744609778318, 'mean_word_length': 2.7517084282460136, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5619464', 'n_tokens_mistral': 987, 'n_tokens_neox': 980, 'n_words': 174}