Exclude files and skip lines
In the current version pot-create outputs the following message in our project:
$ pot-create --keyword=_ts app -o app/locale/translations.pot
./app/utils.py[92]: Message argument must be a string
./app/utils.py[118]: Message argument must be a string
No translatable strings found, aborting
In line 92 we defined our translation function which is also used as keyword
def _ts(string, mapping=None):
pass
I think the python extractor should ignore this in general.
And in line 118 we used this function with variables, which is intended.
It would be great to be able to exclude files from directory scan and/or to skip lines lines by a simple comment hint like e.g. "# I18N !skip".
+1 for this. We get the same output and it would be nice to clean that up.
I used the --list-files option to circumvent this issue.
See:
https://github.com/wichert/lingua/issues/103
https://github.com/wichert/lingua/pull/102