Search code examples
shellvalidationcakephpcakephp-2.x

cakephp i18n shell not extracting validation msgs


I'm trying to generate the pot files from my site with cake's i18n shell useing cake 2.3. As mentioned in the cake docs the shell should automatically extract the validation msgs. However, none of the validation strings turn up in my pot files.

My validation array simply looks like (also note the validationDomain):

public $validationDomain  = 'validation_errors';

public $validate = array(             
    'currency' => array(
        'notempty' => array(
            'rule' => array('notempty'),
            'message' => 'Select a currency'
        ),
    ),
    'title' => array(
        'notempty' => array(
            'rule' => array('notempty'),
            'message' => 'Fill out a title'
        ),
    )

... etc
)

What am i not seeing here?!

Thanks allot!


Solution

  • Figured it out. Apparently the i18n shell does not work when targeting a particular folder. My validation messages were only extracted when running the shell on the whole app folder.

    Hope this helps.