The reason is the next line in the CPhpMessageSource file (getMessageFile function):
$class=new ReflectionClass($moduleClass); // <<< Yii can't find TranslationModule class here.
I didn’t dive into sources, but I had a similar problem when I forgot a “Module” suffix in message category, so Yii couldn’t find a class. Modules’ translation is really not obvious in Yii. But can I ask what’s the benefit of using a module for translations?
I’m going to incapsulate all features in modules, so that modules can be reused in multiple sites. To do so, I need to distribute translations with module files. Also, I think mixing all translation files in ‘protected/messages’ is hard to manage, at least for me.
What I really don’t understand is how modules distributed through http://www.yiiframework.com/extensions/ are translated? Good example is yii-user extension which is translated into several languages. Translations reside in ‘messages’ folder, configuration needs to be altered to include module, his models and components, everything like I did.