-
Notifications
You must be signed in to change notification settings - Fork 1
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
xgettext: multiple starting lines for a string are not well supported #13
Comments
When fixing this, please think of
so just splitting on |
Another option would be to use the
|
Note: if the goal is to provide each string found in a source code file and report it, but you don't need to necessarily report duplicates, then the current code is of course complete fine. |
Reference: #13 Reference: #14 Reported-by: Armijn Hemel @armijnhemel Signed-off-by: Philippe Ombredanne <[email protected]>
In the current xgettext implementation I can see at line 115 https://github.com/nexB/source-inspector/blob/9511f56b44ac7c5644b34d413146d58dd9fa7ea0/src/source_inpector/strings_xgettext.py#L115 the following:
This is likely leading to the wrong results, as a line can have multiple instances of
start_line
, which you aren't catching. As an example, I usedxgettext
with the same parameters as you did onlibbb/lineedit.c
from BusyBox:Some of the result lines:
As you can see there are multiple file/line number entries there. It seems that at some point the authors of
xgettext
decided to combine these. Your code does not correctly process these lines:The text was updated successfully, but these errors were encountered: