Question

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?

Was it helpful?

Solution

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'
    )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top