How can I get a list of all text that needs to be translated?

I was wandering if there is any mechanism by which I could get a list of all the text that needs to be translated on my site? I’m using yii\i18n\DbMessageSource and whenever I’m showing text I use the Yii::t(“category”,“message”) function. I went as far as using Gii to generate the basic CRUD functions of the db tables but my website is not very small. Do I have to comb through all my lines of code to find where I used the Yii::t(…) function? It would be nice to have some mechanism which could list all text which is not transltated in the database. Anyone have any ideas???

thanks

There’s a command line tool for it.

http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#using-the-message-command

I tried this but the problem with this is that since my translations are in the database it scans and outputs a file with all instances of the Yii::t(…) function but does not differentiate between the ones that I have already translated or the ones I have not translated yet… And in the documentation it does not mention how to confirgure the message command for the scenario where I use DBMessageSource… Is there any other way to get this done???

Oh, I’m sorry. I myself don’t know the answer to it, since I haven’t used DBMessageSource so far.

Well, it’s not documented in details, but “message” command seems to be able to handle DBMessageSource.

Class yii\console\controllers\MessageController

http://www.yiiframework.com/doc-2.0/yii-console-controllers-messagecontroller.html

$format should be specified as "db", and "$sourceMessageTable" should be given as you like, if you want to use DBMessageSource.

message command works with all the formats supported.