<commit_before><?php
class website_PageScriptDocumentElement extends import_ScriptDocumentElement
{
	private $isHomePage = false;
	private $isIndexPage = false;
	
	/**
	 * @return f_persistentdocument_PersistentDocument
	 */
	protected function initPersistentDocument()
	{
		return website_PageService::getInstance()->getNewDocumentInstance();
	}
	
	protected function getDocumentProperties()
	{
		$properties = parent::getDocumentProperties();
		if (isset($properties['template-attr']) && $properties['template-attr'] != '')
		{
			$template = $this->getAncestorAttribute($properties['template-attr']);
		}
		else
		{
			$template = $this->getAncestorAttribute('template');
		}
		if ($template !== null)
		{
			$properties['template'] = $template;
		}
		
		$page = $this->getPersistentDocument();
		if (isset($properties['url']))
		{
			$page->url = $properties['url'];<commit_msg>[FIX] website sample localization ; template initialization<commit_after><?php
class website_PageScriptDocumentElement extends import_ScriptDocumentElement
{
	private $isHomePage = false;
	private $isIndexPage = false;
	
	/**
	 * @return f_persistentdocument_PersistentDocument
	 */
	protected function initPersistentDocument()
	{
		return website_PageService::getInstance()->getNewDocumentInstance();
	}
	
	protected function getDocumentProperties()
	{
		$properties = parent::getDocumentProperties();
		
		
		$page = $this->getPersistentDocument();
		if ($page->isNew())
		{
			if (!isset($properties['template']))
			{
				if (isset($properties['template-attr']) && $properties['template-attr'] != '')
				{
					$template = $this->getAncestorAttribute($properties['template-attr']);
				}
				else
				{
					$template = $this->getAncestorAttribute('template');
				}
				if ($template !== null)
				{
					$properties['template'] = $template;
				}
			}
		}
		if (isset($properties['url']))
		{
			$page->url = $properties['url'];
{'fraction_non_alphanumeric': 0.15440792905581638, 'fraction_numerical': 0.0, 'mean_word_length': 4.8121212121212125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '7486117', 'n_tokens_mistral': 645, 'n_tokens_neox': 547, 'n_words': 92}