Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude files and skip lines #77

Open
maconfr opened this issue Feb 26, 2016 · 2 comments
Open

Exclude files and skip lines #77

maconfr opened this issue Feb 26, 2016 · 2 comments

Comments

@maconfr
Copy link

maconfr commented Feb 26, 2016

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".

@omarkohl
Copy link
Contributor

+1 for this. We get the same output and it would be nice to clean that up.

@thet
Copy link
Contributor

thet commented Jan 3, 2022

I used the --list-files option to circumvent this issue.
See:
#103
#102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants