goi18n extract will now extract strings wrapped in a T function, in addition to the other cases it extracts strings from.
I also added an example CLI application to go with the web application that shows how to embed i18n files, and use T wrapper functions for translations.
Reason
This feature will help people like me migrating from v1 to v2 of this library. V1 encouraged the use of the T wrapper, so having a way to easily extract those strings would make my life a lot easier, and I assume others who make the migration as well.
Thanks for your time reviewing this issue, and I'll address any issues you may have with the code.
Also thanks for making this library in the first place.
Purpose
goi18n extract
will now extract strings wrapped in aT
function, in addition to the other cases it extracts strings from. I also added an example CLI application to go with the web application that shows how to embed i18n files, and use T wrapper functions for translations.Reason
This feature will help people like me migrating from v1 to v2 of this library. V1 encouraged the use of the
T
wrapper, so having a way to easily extract those strings would make my life a lot easier, and I assume others who make the migration as well.Thanks for your time reviewing this issue, and I'll address any issues you may have with the code. Also thanks for making this library in the first place.