Giter VIP home page Giter VIP logo

i18n-check's Introduction

Hi there ๐Ÿ‘‹

I'm a:

  • ๐Ÿ“ˆ Institutional Data Analyst
  • ๐Ÿ’ป C++ Developer
  • ๐Ÿ“š Readability Formula Researcher
  • ๐Ÿ–‹๏ธ Amateur Typesetter
  • ๐ŸŒ (former!) Localization Engineer
  • ๐Ÿ“ท (very) Amateur Photographer

GitHub stats

Top Langs

i18n-check's People

Contributors

blake-madden avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

i18n-check's Issues

Marking texts as aviable for translation not working

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::trand QApplication::trUtf8

Build with newest sources.

False positive with QApplication::translate

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

Add option to distinguish your target C++ version

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.