Closed jorrit closed 2 years ago
indeed a nice enhancement. while checking for ICatalog instances seems like an ideal solution to work around, this would cause issues with other version of GetText and the like, who all may be using "GetString*" invocations but in different namespaces and so on, so unless all implementions would agree on a common ICatalog base interface, purely using method names as baseline is a reasonable approch, but some additional checks like yours are a sensible way to validate.
Thanks for merging @perpetualKid ! Could you make a release, if you have time?
My code contains several other methods named
GetString
. These methods take no arguments. This causes the extractor to fail with:Ideally, the parser would only consider method invocations on ICatalog instances. However, this seems difficult to achieve. That is why this PR prevents the exception by checking for the number of arguments.