Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gui/applicationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void ApplicationDialog::ok()
{
if (mUI->mName->text().isEmpty() || mUI->mPath->text().isEmpty()) {
QMessageBox msg(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
tr("You must specify a name, a path and optionally parameters for the application!"),
QMessageBox::Ok,
this);
Expand Down
445 changes: 199 additions & 246 deletions gui/cppcheck_de.ts

Large diffs are not rendered by default.

465 changes: 187 additions & 278 deletions gui/cppcheck_es.ts

Large diffs are not rendered by default.

473 changes: 181 additions & 292 deletions gui/cppcheck_fi.ts

Large diffs are not rendered by default.

485 changes: 171 additions & 314 deletions gui/cppcheck_fr.ts

Large diffs are not rendered by default.

463 changes: 186 additions & 277 deletions gui/cppcheck_it.ts

Large diffs are not rendered by default.

439 changes: 202 additions & 237 deletions gui/cppcheck_ja.ts

Large diffs are not rendered by default.

443 changes: 198 additions & 245 deletions gui/cppcheck_ka.ts

Large diffs are not rendered by default.

459 changes: 184 additions & 275 deletions gui/cppcheck_ko.ts

Large diffs are not rendered by default.

473 changes: 181 additions & 292 deletions gui/cppcheck_nl.ts

Large diffs are not rendered by default.

453 changes: 193 additions & 260 deletions gui/cppcheck_ru.ts

Large diffs are not rendered by default.

463 changes: 186 additions & 277 deletions gui/cppcheck_sr.ts

Large diffs are not rendered by default.

453 changes: 193 additions & 260 deletions gui/cppcheck_sv.ts

Large diffs are not rendered by default.

459 changes: 190 additions & 269 deletions gui/cppcheck_zh_CN.ts

Large diffs are not rendered by default.

447 changes: 196 additions & 251 deletions gui/cppcheck_zh_TW.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gui/fileviewdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void FileViewDialog::loadTextFile(const QString &filename, QTextEdit *edit)
msg = msg.arg(filename);

QMessageBox msgbox(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
msg,
QMessageBox::Ok,
this);
Expand All @@ -68,7 +68,7 @@ void FileViewDialog::loadTextFile(const QString &filename, QTextEdit *edit)
msg = msg.arg(filename);

QMessageBox msgbox(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
msg,
QMessageBox::Ok,
this);
Expand Down
2 changes: 1 addition & 1 deletion gui/helpdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ HelpDialog::HelpDialog(QWidget *parent) :
if (helpFile.isEmpty()) {
const QString msg = tr("Helpfile '%1' was not found").arg("online-help.qhc");
QMessageBox msgBox(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
msg,
QMessageBox::Ok,
this);
Expand Down
6 changes: 3 additions & 3 deletions gui/librarydialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void LibraryDialog::openCfg()
QFile file(selectedFile);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("Cannot open file %1.").arg(selectedFile),
QMessageBox::Ok,
this);
Expand All @@ -119,7 +119,7 @@ void LibraryDialog::openCfg()
const QString errmsg = tempdata.open(file);
if (!errmsg.isNull()) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("Failed to load %1. %2.").arg(selectedFile).arg(errmsg),
QMessageBox::Ok,
this);
Expand Down Expand Up @@ -156,7 +156,7 @@ void LibraryDialog::saveCfg()
mUi->buttonSave->setEnabled(false);
} else {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("Cannot save file %1.").arg(mFileName),
QMessageBox::Ok,
this);
Expand Down
30 changes: 15 additions & 15 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ void MainWindow::loadSettings()
"Please check (and fix) the editor application settings, otherwise the editor "
"program might not start correctly.");
QMessageBox msgBox(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
msg,
QMessageBox::Ok,
this);
Expand Down Expand Up @@ -665,7 +665,7 @@ void MainWindow::doAnalyzeFiles(const QStringList &files, const bool checkLibrar

if (fileNames.isEmpty()) {
QMessageBox msg(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
tr("No suitable files found to analyze!"),
QMessageBox::Ok,
this);
Expand Down Expand Up @@ -750,7 +750,7 @@ QStringList MainWindow::selectFilesToAnalyze(QFileDialog::FileMode mode)
{
if (mProjectFile) {
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Cppcheck"));
msgBox.setWindowTitle("Cppcheck");
const QString msg(tr("You must close the project file before selecting new files or directories!"));
msgBox.setText(msg);
msgBox.setIcon(QMessageBox::Critical);
Expand All @@ -767,8 +767,8 @@ QStringList MainWindow::selectFilesToAnalyze(QFileDialog::FileMode mode)
QMap<QString,QString> filters;
filters[tr("C/C++ Source")] = FileList::getDefaultFilters().join(" ");
filters[tr("Compile database")] = compile_commands_json;
filters[tr("Visual Studio")] = "*.sln *.vcxproj";
filters[tr("Borland C++ Builder 6")] = "*.bpr";
filters["Visual Studio"] = "*.sln *.vcxproj";
filters["Borland C++ Builder 6"] = "*.bpr";
QString lastFilter = mSettings->value(SETTINGS_LAST_ANALYZE_FILES_FILTER).toString();
selected = QFileDialog::getOpenFileNames(this,
tr("Select files to analyze"),
Expand Down Expand Up @@ -855,7 +855,7 @@ void MainWindow::analyzeDirectory()
if (projFiles.size() == 1) {
// If one project file found, suggest loading it
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Cppcheck"));
msgBox.setWindowTitle("Cppcheck");
const QString msg(tr("Found project file: %1\n\nDo you want to "
"load this project file instead?").arg(projFiles[0]));
msgBox.setText(msg);
Expand All @@ -877,7 +877,7 @@ void MainWindow::analyzeDirectory()
// If multiple project files found inform that there are project
// files also available.
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Cppcheck"));
msgBox.setWindowTitle("Cppcheck");
const QString msg(tr("Found project files from the directory.\n\n"
"Do you want to proceed analysis without "
"using any of these project files?"));
Expand Down Expand Up @@ -1461,7 +1461,7 @@ void MainWindow::openResults()
{
if (mUI->mResults->hasResults()) {
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Cppcheck"));
msgBox.setWindowTitle("Cppcheck");
const QString msg(tr("Current results will be cleared.\n\n"
"Opening a new XML file will clear current results.\n"
"Do you want to proceed?"));
Expand Down Expand Up @@ -1590,7 +1590,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
"Do you want to stop the analysis and exit Cppcheck?"));

QMessageBox msg(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
text,
QMessageBox::Yes | QMessageBox::No,
this);
Expand Down Expand Up @@ -1931,15 +1931,15 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const QStringLis
buildDir = inf.canonicalPath() + '/' + buildDir;
if (!QDir(buildDir).exists()) {
QMessageBox msg(QMessageBox::Question,
tr("Cppcheck"),
"Cppcheck",
tr("Build dir '%1' does not exist, create it?").arg(buildDir),
QMessageBox::Yes | QMessageBox::No,
this);
if (msg.exec() == QMessageBox::Yes) {
QDir().mkpath(buildDir);
} else if (!projectFile->getAddons().isEmpty()) {
QMessageBox m(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("To check the project using addons, you need a build directory."),
QMessageBox::Ok,
this);
Expand Down Expand Up @@ -1993,7 +1993,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const QStringLis

if (!errorMessage.isEmpty()) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("Failed to import '%1': %2\n\nAnalysis is stopped.").arg(prjfile).arg(errorMessage),
QMessageBox::Ok,
this);
Expand All @@ -2002,7 +2002,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const QStringLis
}
} catch (InternalError &e) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("Failed to import '%1' (%2), analysis is stopped").arg(prjfile).arg(QString::fromStdString(e.errorMessage)),
QMessageBox::Ok,
this);
Expand Down Expand Up @@ -2074,7 +2074,7 @@ void MainWindow::editProjectFile()
{
if (!mProjectFile) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("No project file loaded"),
QMessageBox::Ok,
this);
Expand Down Expand Up @@ -2148,7 +2148,7 @@ void MainWindow::openRecentProject()
"used projects -list?").arg(project));

QMessageBox msg(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
text,
QMessageBox::Yes | QMessageBox::No,
this);
Expand Down
16 changes: 8 additions & 8 deletions gui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</size>
</property>
<property name="windowTitle">
<string>Cppcheck</string>
<string notr="true">Cppcheck</string>
</property>
<property name="iconSize">
<size>
Expand Down Expand Up @@ -684,10 +684,10 @@
<normaloff>:/cppcheck-gui.png</normaloff>:/cppcheck-gui.png</iconset>
</property>
<property name="text">
<string>Cppcheck</string>
<string notr="true">Cppcheck</string>
</property>
<property name="toolTip">
<string>Show Cppcheck results</string>
<string>Show results</string>
</property>
</action>
<action name="mActionShowClang">
Expand Down Expand Up @@ -992,39 +992,39 @@
<bool>true</bool>
</property>
<property name="text">
<string>Misra C</string>
<string notr="true">Misra C</string>
</property>
</action>
<action name="mActionReportMisraCpp2008">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Misra C++ 2008</string>
<string notr="true">Misra C++ 2008</string>
</property>
</action>
<action name="mActionReportCertC">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Cert C</string>
<string notr="true">Cert C</string>
</property>
</action>
<action name="mActionReportCertCpp">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Cert C++</string>
<string notr="true">Cert C++</string>
</property>
</action>
<action name="mActionReportMisraCpp2023">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Misra C++ 2023</string>
<string notr="true">Misra C++ 2023</string>
</property>
</action>
<action name="mActionReportAutosar">
Expand Down
10 changes: 5 additions & 5 deletions gui/platforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ void Platforms::add(const QString &title, Platform::Type platform)
void Platforms::init()
{
add(tr("Native"), Platform::Type::Native);
add(tr("Unix 32-bit"), Platform::Type::Unix32);
add(tr("Unix 64-bit"), Platform::Type::Unix64);
add(tr("Windows 32-bit ANSI"), Platform::Type::Win32A);
add(tr("Windows 32-bit Unicode"), Platform::Type::Win32W);
add(tr("Windows 64-bit"), Platform::Type::Win64);
add("Unix 32-bit", Platform::Type::Unix32);
add("Unix 64-bit", Platform::Type::Unix64);
add("Windows 32-bit ANSI", Platform::Type::Win32A);
add("Windows 32-bit Unicode", Platform::Type::Win32W);
add("Windows 64-bit", Platform::Type::Win64);
}

int Platforms::getCount() const
Expand Down
4 changes: 2 additions & 2 deletions gui/projectfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1001,14 +1001,14 @@
<item>
<widget class="QCheckBox" name="mToolClangTidy">
<property name="text">
<string>Clang-tidy</string>
<string notr="true">Clang-Tidy</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mToolClangAnalyzer">
<property name="text">
<string>Clang analyzer</string>
<string notr="true">Clang Static Analyzer</string>
</property>
</widget>
</item>
Expand Down
6 changes: 3 additions & 3 deletions gui/projectfiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile)
mUI->mToolClangAnalyzer->setChecked(projectFile->getClangAnalyzer());
mUI->mToolClangTidy->setChecked(projectFile->getClangTidy());
if (CheckThread::clangTidyCmd().isEmpty()) {
mUI->mToolClangTidy->setText(tr("Clang-tidy (not found)"));
mUI->mToolClangTidy->setText("Clang-Tidy (" + tr("not found") + ")");
mUI->mToolClangTidy->setEnabled(false);
}
mUI->mEditTags->setText(projectFile->getTags().join(';'));
Expand Down Expand Up @@ -646,9 +646,9 @@ void ProjectFileDialog::browseImportProject()
const QFileInfo inf(mProjectFile->getFilename());
const QDir &dir = inf.absoluteDir();
QMap<QString,QString> filters;
filters[tr("Visual Studio")] = "*.sln *.vcxproj";
filters["Visual Studio"] = "*.sln *.vcxproj";
filters[tr("Compile database")] = "compile_commands.json";
filters[tr("Borland C++ Builder 6")] = "*.bpr";
filters["Borland C++ Builder 6"] = "*.bpr";
QString fileName = QFileDialog::getOpenFileName(this, tr("Import Project"),
dir.canonicalPath(),
toFilterString(filters));
Expand Down
6 changes: 3 additions & 3 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static QStringList getLabels() {
QObject::tr("Rule"),
QObject::tr("Since date"),
QObject::tr("Tags"),
QObject::tr("CWE")};
"CWE"};
}

static Severity getSeverity(ReportType reportType, const ErrorItem& errorItem) {
Expand Down Expand Up @@ -741,7 +741,7 @@ void ResultsTree::startApplication(const ResultItem *target, int application)
//If there are no applications specified, tell the user about it
if (mApplications->getApplicationCount() == 0) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("No editor application configured.\n\n"
"Configure the editor application for Cppcheck in preferences/Applications."),
QMessageBox::Ok,
Expand All @@ -755,7 +755,7 @@ void ResultsTree::startApplication(const ResultItem *target, int application)

if (application == -1) {
QMessageBox msg(QMessageBox::Critical,
tr("Cppcheck"),
"Cppcheck",
tr("No default editor application selected.\n\n"
"Please select the default editor application in preferences/Applications."),
QMessageBox::Ok,
Expand Down
4 changes: 2 additions & 2 deletions gui/resultsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void ResultsView::checkingFinished()
//Tell user that we found no errors
if (!hasResults()) {
QMessageBox msg(QMessageBox::Information,
tr("Cppcheck"),
"Cppcheck",
tr("No errors found."),
QMessageBox::Ok,
this);
Expand All @@ -358,7 +358,7 @@ void ResultsView::checkingFinished()
QString text = tr("Errors were found, but they are configured to be hidden.\n" \
"To toggle what kind of errors are shown, open view menu.");
QMessageBox msg(QMessageBox::Information,
tr("Cppcheck"),
"Cppcheck",
text,
QMessageBox::Ok,
this);
Expand Down
2 changes: 1 addition & 1 deletion gui/translationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool TranslationHandler::setLanguage(const QString &code)
"the Preferences-dialog to select any of the available "
"languages.").arg(error));
QMessageBox msgBox(QMessageBox::Warning,
tr("Cppcheck"),
"Cppcheck",
msg,
QMessageBox::Ok);
msgBox.exec();
Expand Down