You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First of all I must say nslocalizer looks like a great tool. Thank you for open-sourcing it!
I've installed nslocalizer according to Installation section of readme and I'm using it this way nslocalizer --project Inbbbox.xcodeproj/ --target Inbbbox --find-unused. Unfortunately, it's not working for me, please see crash report. Project I'm trying to check is open-sourced so you can check it for yourself (https://github.com/netguru/inbbbox-ios)
Let me know if you need more informations, happy to help to debug this issue.
Crash Report:
Summary Goes Here
Traceback (most recent call last):
File "/usr/local/Cellar/nslocalizer/1.0/libexec/bin/nslocalizer", line 9, in <module>
load_entry_point('nslocalizer==1.0', 'console_scripts', 'nslocalizer')()
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/main.py", line 117, in main
Executor.run(args)
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/Executor/Executor.py", line 75, in run
unused_strings = cls.findUnusedStrings(xcodeproj_file, desired_targets)
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/Executor/Executor.py", line 98, in findUnusedStrings
code_files.extend(CodeFinder.getCodeFileList(project.project_file, target))
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/Finder/CodeFinder.py", line 45, in getCodeFileList
all_file_refs = [PathFinder.resolveFilePathForReference(project, build_file.store[pbProj.PBX_Constants.kPBX_BUILDFILE_fileRef]) for build_file in all_build_files]
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/Finder/CodeFinder.py", line 45, in <listcomp>
all_file_refs = [PathFinder.resolveFilePathForReference(project, build_file.store[pbProj.PBX_Constants.kPBX_BUILDFILE_fileRef]) for build_file in all_build_files]
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/Finder/PathFinder.py", line 34, in resolveFilePathForReference
file_path = reference.resolvePath(project)
File "/usr/local/Cellar/nslocalizer/1.0/libexec/lib/python3.5/site-packages/nslocalizer/xcodeproj/pbProj/PBXItem.py", line 77, in __getattr__
return getattr(self.store, attrib)
AttributeError: 'dict' object has no attribute 'resolvePath'
The text was updated successfully, but these errors were encountered:
Thanks for the crash report, I will give it a go myself to reproduce the crash; however i would like to know if there are any parts of this that are auto-generated through some other tool.
OK, I found an fixed the issue. It seems that there was a xcdatamodel file being included in list of source files for the project. I've address it to handle that type of file correctly. That uncovered some additional bugs which have now been fixed. I will be able to push the 1.0.1 update as soon as pypi propagates the update of the package i distribute pbPlist which is used for parsing the xcodeproj's project.pbxproj file as well as the .strings and .stringsdict files. I have run the updated code against the repo in question and it works fine now. I'll update and close this ticket once I publish the update via GitHub and homebrew.
Type of issue: [ Bug ]
Related Files:
None
Description:
Hi! First of all I must say
nslocalizer
looks like a great tool. Thank you for open-sourcing it!I've installed
nslocalizer
according toInstallation
section of readme and I'm using it this waynslocalizer --project Inbbbox.xcodeproj/ --target Inbbbox --find-unused
. Unfortunately, it's not working for me, please see crash report. Project I'm trying to check is open-sourced so you can check it for yourself (https://github.com/netguru/inbbbox-ios)Let me know if you need more informations, happy to help to debug this issue.
Crash Report:
Summary Goes Here
The text was updated successfully, but these errors were encountered: