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

False positive with QApplication::translate #4

Closed
SebastianJaworowicz opened this issue Jun 15, 2024 · 3 comments
Closed

False positive with QApplication::translate #4

SebastianJaworowicz opened this issue Jun 15, 2024 · 3 comments

Comments

@SebastianJaworowicz
Copy link

SebastianJaworowicz commented Jun 15, 2024

Hello,

I found false positive when using QApplication::translate, used HEAD sources.

code sample test.cpp

QString test = qApp->translate("SomeContex", "source");
QString test = QApplication::translate("SomeContex", "source");

Checker output test.txt

File	Line	Column	Value	Explanation	WarningID
test.cpp	2	41	"SomeContex"	String available for translation that probably should not be in function call: QApplication::translate	[suspectL10NString]

Startup parameters
i18n-check.exe -o test.txt -v --disable unencodedExtASCII test.cpp

@Blake-Madden
Copy link
Owner

Thanks for checking out the program!

Looks like I'm not taking QApplication::translate being called statically in account, should be an easy fix. I'll have something shortly.

Also, I'm about to check in a change that turns unencodedExtASCII off by default, so you won't need to explicitly disable it anymore. It seemed a little too pedantic to include by default the more I thought about it.

@SebastianJaworowicz
Copy link
Author

Thank you for quick fix, I see you hard coding every function so, QApplication::tr and QApplication::trUtf8 should be also added.

@Blake-Madden
Copy link
Owner

Oh, good point. Thanks, I'll get those fixed.

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

2 participants