blake-madden / i18n-check Goto Github PK
View Code? Open in Web Editor NEWInternationalization & localization analysis system.
Internationalization & localization analysis system.
Values such as %2$s
are not currently handled. The number and $
needs to be stripped and also reordered into the list of commands based on the provided number.
Hello,
I have test case like this
void TestCLass::TestCase(const QString &text1, const QString &text2)
{
QLabel *test1 = new QLabel("label example 1");
test1->setText("label example 2");
QLabel test2;
test2.setText("text example 1");
QLabel test3;
test3.setText(tr("text example 2"));
QLabel *test4 = new QLabel(text1);
test4->setText(text2);
QColor col1("red");
col1.setNamedColor("yellow");
QColor col2("#2F2F2F");
col2.setNamedColor("black");
QColor col3(_DT("blue"));
QColor col4(_DT("#2F2F2F"));
QString test1 = qApp->translate("SomeContex", "source");
QString test2 = QApplication::translate("SomeContex", "source");
QString test3 = QApplication::tr("SomeContex", "source");
QString test3 = QApplication::trUtf8("SomeContex", "source");
}
void TestCLass::TestCase2()
{
TestCase("Test text", "Another test text");
}
Startup params
i18n-check.exe -o test.txt test.cpp
Output
File Line Column Value Explanation WarningID
test.cpp 27 36 "SomeContex" String available for translation that probably should not be in function call: QApplication::tr [suspectL10NString]
test.cpp 28 40 "SomeContex" String available for translation that probably should not be in function call: QApplication::trUtf8 [suspectL10NString]
If i good understood this functionality, every QLabel's text and parameters in execution of TestCase
function should be marked as text available for translation, but it's not happening . Am I doing something wrong here?
Also c5e8e51 didn't fixed the problem with QApplication::tr
and QApplication::trUtf8
Build with newest sources.
Some of the wxWidgets deprecation warnings assume that you can target C++17 through C++20, which isn't always the case. Explaining the C++17 or C++20 requirement in the warning isn't enough; you need to be able to suppress these warnings if you are targeting C++17 (which is wxWidgets own target).
Variable detection will see this:
CString const = ...
as having a const
data type. It should see CString
as the type.
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
KDE and Qt use %n
(positional number) for their equivalent to printf
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.