Development

Changeset 4374

You must first sign up to be able to contribute.

Changeset 4374

Show
Ignore:
Timestamp:
06/25/07 16:23:37 (6 years ago)
Author:
fabien
Message:

backported changes from trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfI18nExtractPlugin/data/tasks/sfPakeI18N.php

    r4367 r4374  
    7575  pake_echo_action('i18n', sprintf('found "%d" old i18n strings', count($extract->getOldMessages()))); 
    7676 
     77  if (isset($options['display-new'])) 
     78  { 
     79    pake_echo_action('i18n', sprintf('display new i18n strings', count($extract->getOldMessages()))); 
     80    foreach ($extract->getNewMessages() as $message) 
     81    { 
     82      echo '               '.$message."\n"; 
     83    } 
     84  } 
     85 
    7786  if (isset($options['auto-save'])) 
    7887  { 
     
    8089 
    8190    $extract->saveNewMessages(); 
     91  } 
     92 
     93  if (isset($options['display-old'])) 
     94  { 
     95    pake_echo_action('i18n', sprintf('display old i18n strings', count($extract->getOldMessages()))); 
     96    foreach ($extract->getOldMessages() as $message) 
     97    { 
     98      echo '               '.$message."\n"; 
     99    } 
    82100  } 
    83101 
  • plugins/sfI18nExtractPlugin/lib/sfI18nYamlValidateExtractor.class.php

    r4371 r4374  
    6464          continue; 
    6565        } 
     66 
    6667        foreach ($config['validators'][$name]['param'] as $key => $value) 
     68        { 
     69          if (preg_match('/(msg|error)$/', $key)) 
     70          { 
     71            $strings[] = $value; 
     72          } 
     73        } 
     74      } 
     75    } 
     76 
     77    // Old validate.yml format 
     78 
     79    // required messages 
     80    if (isset($config['names'])) 
     81    { 
     82      foreach ($config['names'] as $key => $value) 
     83      { 
     84        if (isset($value['required_msg'])) 
     85        { 
     86          $strings[] = $value['required_msg']; 
     87        } 
     88      } 
     89    } 
     90 
     91    // validators 
     92    foreach ($config as $key => $value) 
     93    { 
     94      if (isset($value['param']) && isset($value['class'])) 
     95      { 
     96        foreach ($value['param'] as $key => $value) 
    6797        { 
    6898          if (preg_match('/(msg|error)$/', $key)) 
  • plugins/sfI18nExtractPlugin/package.xml

    r4371 r4374  
    1313 <date>2007-06-25</date> 
    1414 <version> 
    15    <release>1.0.2</release> 
     15   <release>1.0.3</release> 
    1616   <api>1.0.0</api> 
    1717 </version>