문제

I'm trying to prep translation for a module. my config.php is just a copy from the framework, modified 'languages' for just 'fr'. Here's my config.php file

return array(
  'language'=>'en',
  'sourcePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  'messagePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'messages',
  'languages'=>array('fr'),
  'fileTypes'=>array('php'),
  'overwrite'=>true,
  'exclude'=>array(
    '.svn',
    '.gitignore',
    '/i18n/data',
    '/messages',
  ),
);

The command runs properly, and I get this kind of output:

Extracting messages from <MyProject>/protected/modules/admin/views/significantEvent/view.php...
...
Extracting messages from <MyProject>/protected/modules/admin/views/projectProgress/update.php...

But that's it. Nothing is changed anywhere, there's no new files, nothing was edited. It seems like the command didn't do anything but read all the files and tell me where to translate. What am I doing wrong?

도움이 되었습니까?

해결책

You will probably have to edit your messages/config.php file so it includes the contents of the module.

set the sourcepath part of the array to

'sourcePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..',

And set the 'exclude' part to

'exclude' => array(
        '.svn',
        '.gitignore',
        '/assets',
        '/css',
        '/images',
        '/js',
        '/yii',
        '.htaccess',
        'index.php',
        'index-test.php'
    )
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top