Script for collecting all translatable strings in the codebase? I have hundreds of strings in my code-base that which translation i.e. strings inside t() function.

Is there a script that can traverse through my code-base and collect all the strings and export them to an excel file?

Or else, Is there any other way?
By default, every string you wrap in the t() function is going to be added to the localization database by the core Drupal locale module as soon as Drupal encounters the occurrence. You can then use the translation interface to search for these new strings and update them manually or export a Gettext Portable Object Template file

http://example.com/admin/config/regional/translate/export

These files are in text format and easily editable by non-technical users, ex:

#: misc/tabledrag.js
msgid "Hide row weights"
msgstr ""


There are a number of tools available for working with gettext files, I would recommend the Localization client module for doing this work within the Drupal interface. There is also an option to convert these files to excel and back using csv2po but I haven't used this:

http://docs.translatehouse.org/projects/translate-toolkit/en/latest/guides/using_csv2po.html