From ccaa5c2c17aa5d299af6e2d1c1550aefe933be9f Mon Sep 17 00:00:00 2001 From: vBm Date: Fri, 10 Dec 2010 16:59:36 +0100 Subject: [PATCH] GUI: Initial addition of Serbian localization using clean English template. --- gui/cppcheck_de.ts | 12 +- gui/cppcheck_en.ts | 12 +- gui/cppcheck_fi.ts | 14 +- gui/cppcheck_ja.ts | 12 +- gui/cppcheck_nl.ts | 12 +- gui/cppcheck_pl.ts | 12 +- gui/cppcheck_ru.ts | 12 +- gui/cppcheck_se.ts | 12 +- gui/cppcheck_sr.ts | 1147 ++++++++++++++++++++++++++++++++++++ gui/gui.pro | 5 +- gui/translationhandler.cpp | 7 +- 11 files changed, 1228 insertions(+), 29 deletions(-) create mode 100644 gui/cppcheck_sr.ts diff --git a/gui/cppcheck_de.ts b/gui/cppcheck_de.ts index 5e8dd5bbf..4bf31a74f 100644 --- a/gui/cppcheck_de.ts +++ b/gui/cppcheck_de.ts @@ -651,6 +651,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -726,18 +731,18 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! Falsche Sprache angegeben! - + Language file %1 not found! Language file %1.qm not found! Sprachdatei %1 nicht gefunden! - + Failed to load translation for language %1 from file %2 Failed to load translation for language %1 from file %2.qm Die Übersetzungen der Sprache %1 konnten nicht aus der Datei %2 geladen werden @@ -1139,3 +1144,4 @@ Statistics + diff --git a/gui/cppcheck_en.ts b/gui/cppcheck_en.ts index 3a9042a3c..d8be56b4f 100644 --- a/gui/cppcheck_en.ts +++ b/gui/cppcheck_en.ts @@ -651,6 +651,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + Serbian + Project @@ -726,18 +731,18 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! Incorrect language specified! - + Language file %1 not found! Language file %1.qm not found! Could not find the file: %1! - + Failed to load translation for language %1 from file %2 Failed to load translation for language %1 from file %2.qm Failed to load translation for language %1 from file %2 @@ -1139,3 +1144,4 @@ Statistics + diff --git a/gui/cppcheck_fi.ts b/gui/cppcheck_fi.ts index 763cdfec4..7ca2e6b8a 100644 --- a/gui/cppcheck_fi.ts +++ b/gui/cppcheck_fi.ts @@ -28,7 +28,7 @@ This program is licensed under the terms of the GNU General Public License version 3 - Tämä ohjelma on lisensoitu GNU General + Tämä ohjelma on lisensoitu GNU General Public lisenssin version 3 alaisuuteen @@ -655,6 +655,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -730,18 +735,18 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! Virheellinen kieli valittu! - + Language file %1 not found! Language file %1.qm not found! Käännöstiedostoa %1 ei löytynyt! - + Failed to load translation for language %1 from file %2 Failed to load translation for language %1 from file %2.qm Käänöksen lataaminen kielelle %1 tiedostosta %2 epäonnistui @@ -1143,3 +1148,4 @@ Statistics + diff --git a/gui/cppcheck_ja.ts b/gui/cppcheck_ja.ts index 39855f505..507238b20 100644 --- a/gui/cppcheck_ja.ts +++ b/gui/cppcheck_ja.ts @@ -642,6 +642,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -717,17 +722,17 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! - + Language file %1 not found! 言語ファイル %1 が見つかりません! - + Failed to load translation for language %1 from file %2 @@ -1164,3 +1169,4 @@ Statistics + diff --git a/gui/cppcheck_nl.ts b/gui/cppcheck_nl.ts index f3d30f19d..7258e61f7 100644 --- a/gui/cppcheck_nl.ts +++ b/gui/cppcheck_nl.ts @@ -651,6 +651,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -726,18 +731,18 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! Ongeldige taal gespecifieerd! - + Language file %1 not found! Language file %1.qm not found! Kon het taalbestand niet vinden: %1! - + Failed to load translation for language %1 from file %2 Failed to load translation for language %1 from file %2.qm Kon de vertaling voor taal %1 in bestand %2 niet laden @@ -1139,3 +1144,4 @@ Statistics + diff --git a/gui/cppcheck_pl.ts b/gui/cppcheck_pl.ts index 11ef5ebc6..66c11ac35 100644 --- a/gui/cppcheck_pl.ts +++ b/gui/cppcheck_pl.ts @@ -633,6 +633,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -708,17 +713,17 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! - + Language file %1 not found! - + Failed to load translation for language %1 from file %2 @@ -1115,3 +1120,4 @@ Statistics + diff --git a/gui/cppcheck_ru.ts b/gui/cppcheck_ru.ts index eba1d75d9..c87b946f8 100644 --- a/gui/cppcheck_ru.ts +++ b/gui/cppcheck_ru.ts @@ -643,6 +643,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -718,18 +723,18 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! Выбран неверный язык! - + Language file %1 not found! Language file %1.qm not found! - + Failed to load translation for language %1 from file %2 Failed to load translation for language %1 from file %2.qm Ошибка загрузки переводов для языка %1 из файла %2 @@ -1128,3 +1133,4 @@ Statistics + diff --git a/gui/cppcheck_se.ts b/gui/cppcheck_se.ts index 389029902..912ed47c1 100644 --- a/gui/cppcheck_se.ts +++ b/gui/cppcheck_se.ts @@ -654,6 +654,11 @@ Do you want to stop the checking and exit Cppcheck?. Japanease + + + Serbian + + Project @@ -729,18 +734,18 @@ Do you want to stop the checking and exit Cppcheck?. QObject - + Incorrect language specified! valt språk är ej korrekt! - + Language file %1 not found! Language file %1.qm not found! Språk filen %1 hittades ej! - + Failed to load translation for language %1 from file %2 Failed to load translation for language %1 from file %2.qm Misslyckades med att ladda översättningen för %1 från filen %2 @@ -1142,3 +1147,4 @@ Statistics + diff --git a/gui/cppcheck_sr.ts b/gui/cppcheck_sr.ts new file mode 100644 index 000000000..a1a204f88 --- /dev/null +++ b/gui/cppcheck_sr.ts @@ -0,0 +1,1147 @@ + + + + + About + + + About Cppcheck + About Cppcheck + + + + Version %1 + Version %1 + + + + Cppcheck - A tool for static C/C++ code analysis. + Cppcheck - A tool for static C/C++ code analysis. + + + + Copyright © 2007-2010 Daniel Marjamäki and cppcheck team. + Copyright (C) 2007-2010 Daniel Marjamäki and cppcheck team. + Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team. + + + + This program is licensed under the terms +of the GNU General Public License version 3 + This program is licensed under the terms +of the GNU General Public License version 3 + + + + Visit Cppcheck homepage at %1 + Visit Cppcheck homepage at %1 + + + + ApplicationDialog + + + Add an application + Add a new application + + + + Here you can add applications that can open error files. +Specify a name for the application and the application to execute. + +The following texts are replaced with appropriate values when application is executed: +(file) - Filename containing the error +(line) - Line number containing the error +(message) - Error message +(severity) - Error severity + +Example opening a file with Kate and make Kate scroll to the correct line: +kate -l(line) (file) + Here you can add applications that can open error files. +Specify a name for the application and the application to execute. + +The following texts are replaced with appriproate values when application is executed: +(file) - Filename containing the error +(line) - Line number containing the error +(message) - Error message +(severity) - Error severity + +Example opening a file with Kate and make Kate scroll to the correct line: +kate -l(line) (file) + Here you can add applications that can open error files. +Specify a name for the application and the application to execute. + +The following texts are replaced with appriproate values when application is executed: +(file) - Filename containing the error +(line) - Line number containing the error +(message) - Error message +(severity) - Error severity + +Example opening a file with Kate and make Kate scroll to the correct line: +kate -l(line) (file) + + + + Application's name: + + + + + Command to execute: + + + + + Browse + Browse + + + + Executable files (*.exe);;All files(*.*) + Executable files (*.exe);;All files(*.*) + + + + Select viewer application + Select viewer application + + + + Cppcheck + Cppcheck + + + + You must specify a name and a path for the application! + You must specify a name and a path for the application! + + + + FileViewDialog + + + Could not find the file: %1 + Could not find the file: + + Could not find the file: %1 + + + + + Cppcheck + Cppcheck + + + + Could not read the file: %1 + Could not read the file: %1 + + + + HelpWindow + + + Cppcheck Help + + + + + Go back + + + + + Back + + + + + Go forward + + + + + Forward + + + + + Start + + + + + Home + + + + + LogView + + + Checking Log + + + + + Clear + + + + + Close + + + + + MainWindow + + + + + + + + + Cppcheck + Cppcheck + + + + Standard + Standard + + + + &File + &File + + + + &View + &View + + + + &Toolbars + + + + + &Check + &Check + + + + &Edit + &Edit + + + + &License... + &License... + + + + A&uthors... + A&uthors... + + + + &About... + &About... + + + + &Files... + &Files... + + + + Ctrl+F + Ctrl+F + + + + &Directory... + &Directory... + + + + Ctrl+D + Ctrl+D + + + + &Recheck files + &Recheck files + + + + Ctrl+R + Ctrl+R + + + + &Stop + &Stop + + + + Esc + Esc + + + + &Save results to file... + &Save results to file... + + + + Ctrl+S + Ctrl+S + + + + &Quit + &Quit + + + + &Clear results + &Clear results + + + + &Preferences + &Preferences + + + + Warnings + + + + + + Show warnings + + + + + Performance warnings + + + + + + Show performance warnings + + + + + Show &hidden + + + + + + Show common errors + Show common errors + + + + &Check all + &Check all + + + + &Uncheck all + &Uncheck all + + + + Collapse &all + Collapse &all + + + + &Expand all + &Expand all + + + + &Standard + + + + + Standard items + + + + + Toolbar + + + + + &Categories + + + + + Error categories + + + + + &Open XML... + + + + + Open P&roject File... + + + + + &New Project File... + + + + + &Log View + + + + + Log View + + + + + C&lose Project File + + + + + &Edit Project File... + + + + + &Statistics + + + + + &Contents + + + + + Categories + + + + + Style warnings + + + + + + Show style warnings + + + + + Common errors + + + + + Open the help contents + + + + + F1 + + + + + &Language + &Language + + + + &Help + &Help + + + + Select files to check + Select files to check + + + + Select directory to check + Select directory to check + + + + No suitable files found to check! + No suitable files found to check! + + + + License + License + + + + Authors + Authors + + + + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) + + + + Save the report file + Save the report file + + + + + XML files (*.xml) + XML files (*.xml) + + + + You must close the project file before selecting new files or directories! + + + + + + + Project: + + + + + Open the report file + + + + + Checking is running. + +Do you want to stop the checking and exit Cppcheck?. + + + + + Text files (*.txt) + Text files (*.txt) + + + + CSV files (*.csv) + + + + + Cppcheck - %1 + Cppcheck - %1 + + + + Failed to change the language: + +%1 + + + Failed to change language: + +%1 + Failed to change language: + +%1 + + + + + Cppcheck Help + + + + + Failed to load help file (not found) + + + + + Failed to load help file + + + + + + Project files (*.cppcheck);;All files(*.*) + + + + + Select Project File + + + + + Select Project Filename + + + + + No project file loaded + + + + + Finnish + Finski + + + + English + Engleski + + + + Dutch + Holandski + + + + Swedish + Švedski + + + + German + Nemački + + + + Russian + Ruski + + + + Polish + Poljski + + + + Japanease + Japanski + + + + Serbian + Srpski + + + + Project + + + + Cppcheck + Cppcheck + + + + Could not read the project file. + + + + + Could not write the project file. + + + + + ProjectFile + + + Project File + + + + + Project: + + + + + Paths: + + + + + + Browse... + + + + + Include paths: + + + + + Defines: + + + + + ProjectFileDialog + + + Project file: %1 + + + + + Select include directory + + + + + Select directory to check + Select directory to check + + + + QObject + + + Incorrect language specified! + Incorrect language specified! + + + + Language file %1 not found! + Language file %1.qm not found! + Could not find the file: %1! + + + + Failed to load translation for language %1 from file %2 + Failed to load translation for language %1 from file %2.qm + Failed to load translation for language %1 from file %2 + + + + ResultsTree + + + + File + File + + + + + Severity + Severity + + + + + Line + Line + + + + + Summary + + + + + Undefined file + Undefined file + + + + Copy filename + Copy filename + + + + Copy full path + Copy full path + + + + Copy message + + + + + Hide + + + + + Cppcheck + Cppcheck + + + + Configure the text file viewer program in Cppcheck preferences/Applications. + You can open this error by specifying applications in program's settings. + You can open this error by specifying applications in program's settings. + + + + Could not find the file! + + + + + Could not start %1 + +Please check the application path and parameters are correct. + Could not start %1 + +Please check the application path and parameters are correct. + + + + Could not find file: +%1 +Please select the directory where file is located. + + + + + Select Directory + + + + + style + Style + + + + error + Error + + + + warning + + + + + performance + + + + + ResultsView + + + + Cppcheck + Cppcheck + + + + No errors found. + No errors found. + + + + Errors were found, but they are configured to be hidden. +To toggle what kind of errors are shown, open view menu. + Errors were found, but they are configured to be hidden. +To toggle what kind of errors are shown, open view menu. + + + + + Failed to read the report. + + + + + Summary + + + + + Message + + + + + No errors found, nothing to save. + No errors found, nothing to save. + + + + + Failed to save the report. + Failed to save the report. + + + + Results + Results + + + + Settings + + + Preferences + Preferences + + + + General + General + + + + Include paths: + + + + + Add... + + + + + Number of threads: + Number of threads: + + + + Check all #ifdef configurations + Check all #ifdef configurations + + + + Show full path of files + Show full path of files + + + + Show "No errors found" message when no errors found + Show "No errors found" message when no errors found + + + + Show internal warnings in log + + + + + Applications + Applications + + + + Add application + Add application + + + + Delete application + Delete application + + + + Modify application + Modify application + + + + Set as default application + Set as default application + + + + Reports + Reports + + + + Save all errors when creating report + Save all errors when creating report + + + + Save full path to files in reports + Save full path to files in reports + + + + SettingsDialog + + + Add a new application + Add a new application + + + + Modify an application + Modify an application + + + + Select include directory + + + + + StatsDialog + + + + Statistics + + + + + Project + + + + + Project: + + + + + Paths: + + + + + Include paths: + + + + + Defines: + + + + + Previous Scan + + + + + Path Selected: + + + + + Number of Files Scanned: + + + + + Scan Duration: + + + + + Errors: + + + + + Warnings: + + + + + Stylistic warnings: + + + + + Performance issues: + + + + + Copy to Clipboard + + + + + %1 secs + + + + + Project Settings + Project: %1 + Paths: %2 + Include paths: %3 + Defines: %4 +Previous Scan + Path selected: %5 + Number of files scanned: %6 + Scan duration: %7 +Statistics + Errors: %8 + Warnings: %9 + Style warnings: %10 + Performance warnings: %11 + + + + + + <h3>Project Settings<h3> +<table> + <tr><th>Project:</th><td>%1</td></tr> + <tr><th>Paths:</th><td>%2</td></tr> + <tr><th>Include paths:</th><td>%3</td></tr> + <tr><th>Defines:</th><td>%4</td></tr> +</table> +<h3>Previous Scan</h3> +<table> + <tr><th>Path selected:</th><td>%5</td></tr> + <tr><th>Number of files scanned:</th><td>%6</td></tr> + <tr><th>Scan duration:</th><td>%7</td></tr> +</table> +<h3>Statistics</h3> + <tr><th>Errors:</th><td>%8</td></tr> + <tr><th>Warnings:</th><td>%9</td></tr> + <tr><th>Style warnings:</th><td>%10</td></tr> + <tr><th>Performance warnings:</th><td>%11</td></tr> +</table> + + + + + + diff --git a/gui/gui.pro b/gui/gui.pro index 1b19494d1..0cc155363 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -40,7 +40,8 @@ TRANSLATIONS = cppcheck_fi.ts \ cppcheck_de.ts \ cppcheck_pl.ts \ cppcheck_ru.ts \ - cppcheck_ja.ts + cppcheck_ja.ts \ + cppcheck_sr.ts # Windows-specific options CONFIG += embed_manifest_exe @@ -71,7 +72,7 @@ HEADERS += mainwindow.h \ filelist.h \ helpwindow.h \ statsdialog.h \ - checkstatistics.h + checkstatistics.h SOURCES += main.cpp \ mainwindow.cpp\ diff --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp index 6e814b38b..eac30938a 100644 --- a/gui/translationhandler.cpp +++ b/gui/translationhandler.cpp @@ -36,7 +36,8 @@ TranslationHandler::TranslationHandler(QObject *parent) : << QT_TRANSLATE_NOOP("MainWindow", "German") << QT_TRANSLATE_NOOP("MainWindow", "Russian") << QT_TRANSLATE_NOOP("MainWindow", "Polish") - << QT_TRANSLATE_NOOP("MainWindow", "Japanese"); + << QT_TRANSLATE_NOOP("MainWindow", "Japanese") + << QT_TRANSLATE_NOOP("MainWindow", "Serbian"); mFiles << "cppcheck_en" << "cppcheck_nl" @@ -45,7 +46,8 @@ TranslationHandler::TranslationHandler(QObject *parent) : << "cppcheck_de" << "cppcheck_ru" << "cppcheck_pl" - << "cppcheck_ja"; + << "cppcheck_ja" + << "cppcheck_sr"; //Load english as a fallback language QTranslator *english = new QTranslator(); @@ -153,3 +155,4 @@ int TranslationHandler::SuggestLanguage() const return index; } +