<commit_before><?php

/*
 * This file is part of the symfony package.
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * @package    symfony
 * @subpackage i18n
 * @author     <NAME> <<EMAIL>>
 * @version    SVN: $Id: sfI18nApplicationExtract.class.php 14872 2009-01-19 08:32:06Z fabien $
 */
class cmsI18nApplicationExtract extends sfI18nApplicationExtract
{
  protected $extractObjects = array();

  /**
   * Configures the current extract object.
   */
  public function configure()
  {
    $this->extractObjects = array();

    // Modules
    $moduleNames = sfFinder::type('dir')->maxdepth(0)->relative()->in(sfConfig::get('sf_app_module_dir'));
    foreach ($moduleNames as $moduleName)
    {
      $this->extractObjects[] = new sfI18nModuleExtract($this->i18n, $this->culture, array('module' => $moduleName));
    }
  }

  /**
   * Extracts i18n strings.
   *
   * This class must be implemented by subclasses.
   */
  public function extract()
  {
    foreach ($this->extractObjects as $extractObject)
    {
      $extractObject->extract();
    }

    // Add global templates
    $this->extractFromPhpFiles(sfConfig::get('sf_app_template_dir'));

    // ADDED: lib/form,validator and /templates
    $this->extractFromPhpFiles(sfConfig::get('sf_root_dir').DIRECTORY_SEPARATOR.'templates');
    $this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'form');
    $this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'validator');
    <commit_msg>Adding helpers to i18n extract<commit_after><?php

/*
 * This file is part of the symfony package.
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * @package    symfony
 * @subpackage i18n
 * @author     <NAME> <<EMAIL>>
 * @version    SVN: $Id: sfI18nApplicationExtract.class.php 14872 2009-01-19 08:32:06Z fabien $
 */
class cmsI18nApplicationExtract extends sfI18nApplicationExtract
{
  protected $extractObjects = array();

  /**
   * Configures the current extract object.
   */
  public function configure()
  {
    $this->extractObjects = array();

    // Modules
    $moduleNames = sfFinder::type('dir')->maxdepth(0)->relative()->in(sfConfig::get('sf_app_module_dir'));
    foreach ($moduleNames as $moduleName)
    {
      $this->extractObjects[] = new sfI18nModuleExtract($this->i18n, $this->culture, array('module' => $moduleName));
    }
  }

  /**
   * Extracts i18n strings.
   *
   * This class must be implemented by subclasses.
   */
  public function extract()
  {
    foreach ($this->extractObjects as $extractObject)
    {
      $extractObject->extract();
    }

    // Add global templates
    $this->extractFromPhpFiles(sfConfig::get('sf_app_template_dir'));

    // ADDED: lib/form,validator and /templates
    $this->extractFromPhpFiles(sfConfig::get('sf_root_dir').DIRECTORY_SEPARATOR.'templates');
    $this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'form');
    $this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'validator');
    $this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'helper');
    
{'fraction_non_alphanumeric': 0.14444778814324405, 'fraction_numerical': 0.021065302437556426, 'mean_word_length': 4.013574660633484, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 44, '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': '6425009', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1052, 'n_words': 215}