From bf8b3188a368d001c41e2f9547c90514423971c4 Mon Sep 17 00:00:00 2001 From: Haowei Hsu Date: Sun, 4 Jun 2023 13:51:48 +0800 Subject: [PATCH] GUI: Add zh_TW translation (#5108) --- gui/cppcheck_zh_TW.ts | 2831 ++++++++++++++++++++++++++++++++++++ gui/gui.pro | 3 +- gui/translationhandler.cpp | 1 + win_installer/cppcheck.wxs | 1 + 4 files changed, 2835 insertions(+), 1 deletion(-) create mode 100644 gui/cppcheck_zh_TW.ts diff --git a/gui/cppcheck_zh_TW.ts b/gui/cppcheck_zh_TW.ts new file mode 100644 index 000000000..ea7d3d0ff --- /dev/null +++ b/gui/cppcheck_zh_TW.ts @@ -0,0 +1,2831 @@ + + + + + About + + + About Cppcheck + + + + + Version %1 + + + + + Cppcheck - A tool for static C/C++ code analysis. + + + + + Copyright © 2007-%1 Cppcheck team. + + + + + This program is licensed under the terms +of the GNU General Public License version 3 + + + + + Visit Cppcheck homepage at %1 + + + + + <html><head/><body><p>Many thanks to these libraries that we use:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">pcre</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">picojson</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">qt</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">tinyxml2</li></ul></body></html> + + + + + ApplicationDialog + + + Add an application + + + + + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. + +The following texts in parameters 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: +Executable: kate +Parameters: -l(line) (file) + + + + + &Name: + + + + + &Executable: + + + + + &Parameters: + + + + + Browse + + + + + Executable files (*.exe);;All files(*.*) + + + + + Select viewer application + + + + + Cppcheck + + + + + You must specify a name, a path and optionally parameters for the application! + + + + + ComplianceReportDialog + + + Compliance Report + + + + + Project name + + + + + Project version + + + + + List of files with md5 checksums + + + + + Compliance report + + + + + HTML files (*.html) + + + + + Save compliance report + + + + + Failed to import '%1', can not show files in compliance report + + + + + FileViewDialog + + + Could not find the file: %1 + + + + + + Cppcheck + + + + + Could not read the file: %1 + + + + + HelpDialog + + + Cppcheck GUI help + + + + + Contents + + + + + Index + + + + + Helpfile '%1' was not found + + + + + Cppcheck + + + + + LibraryAddFunctionDialog + + + Add function + + + + + Function name(s) + + + + + Number of arguments + + + + + LibraryDialog + + + Library Editor + + + + + Open + + + + + Save + + + + + Save as + + + + + Functions + + + + + Sort + + + + + Add + + + + + Filter: + + + + + Comments + + + + + noreturn + + + + + False + + + + + True + + + + + Unknown + + + + + return value must be used + + + + + ignore function in leaks checking + + + + + Arguments + + + + + Edit + + + + + + Library files (*.cfg) + + + + + Open library file + + + + + + + Cppcheck + + + + + Cannot open file %1. + + + + + Failed to load %1. %2. + + + + + Cannot save file %1. + + + + + Save the library as + + + + + LibraryEditArgDialog + + + Edit argument + + + + + <html><head/><body> +<p>Is bool value allowed? For instance result from comparison or from '!' operator.</p> +<p>Typically, set this if the argument is a pointer, size, etc.</p> +<p>Example:</p> +<pre> memcmp(x, y, i == 123); // last argument should not have a bool value</pre> +</body></html> + + + + + Not bool + + + + + <html><head/><body> +<p>Is a null parameter value allowed?</p> +<p>Typically this should be used on any pointer parameter that does not allow null.</p> +<p>Example:</p> +<pre> strcpy(x,y); // neither x or y is allowed to be null.</pre> +</body></html> + + + + + Not null + + + + + Not uninit + + + + + String + + + + + Format string + + + + + Min size of buffer + + + + + + Type + + + + + + None + + + + + + argvalue + + + + + + mul + + + + + + strlen + + + + + + Arg + + + + + + Arg2 + + + + + and + + + + + Valid values + + + + + MainWindow + + + + + + + + + + + + + + + + + Cppcheck + + + + + Checking for updates + + + + + Hide + + + + + &File + + + + + &View + + + + + &Toolbars + + + + + &Help + + + + + A&nalyze + + + + + C++ standard + + + + + &C standard + + + + + &Edit + + + + + Standard + + + + + Categories + + + + + Filter + + + + + &License... + + + + + A&uthors... + + + + + &About... + + + + + &Files... + + + + + + Analyze files + + + + + Ctrl+F + + + + + &Directory... + + + + + + Analyze directory + + + + + Ctrl+D + + + + + &Reanalyze modified files + + + + + Ctrl+R + + + + + Reanal&yze all files + + + + + &Stop + + + + + + Stop analysis + + + + + Esc + + + + + &Save results to file... + + + + + Ctrl+S + + + + + &Quit + + + + + Ctrl+Q + + + + + &Clear results + + + + + &Preferences + + + + + Style war&nings + + + + + + Show style warnings + + + + + E&rrors + + + + + + Show errors + + + + + &Check all + + + + + &Uncheck all + + + + + Collapse &all + + + + + &Expand all + + + + + &Standard + + + + + Standard items + + + + + &Contents + + + + + Open the help contents + + + + + F1 + + + + + Toolbar + + + + + &Categories + + + + + Error categories + + + + + &Open XML... + + + + + Open P&roject File... + + + + + Ctrl+Shift+O + + + + + Sh&ow Scratchpad... + + + + + &New Project File... + + + + + Ctrl+Shift+N + + + + + &Log View + + + + + Log View + + + + + C&lose Project File + + + + + &Edit Project File... + + + + + &Statistics + + + + + &Warnings + + + + + + Show warnings + + + + + Per&formance warnings + + + + + + Show performance warnings + + + + + Show &hidden + + + + + &Information + + + + + Show information messages + + + + + &Portability + + + + + Show portability warnings + + + + + Show Cppcheck results + + + + + Clang + + + + + Show Clang results + + + + + &Filter + + + + + Filter results + + + + + Windows 32-bit ANSI + + + + + Windows 32-bit Unicode + + + + + Unix 32-bit + + + + + Unix 64-bit + + + + + Windows 64-bit + + + + + P&latforms + + + + + C++&11 + + + + + C&99 + + + + + &Posix + + + + + C&11 + + + + + &C89 + + + + + &C++03 + + + + + &Print... + + + + + Print the Current Report + + + + + Print Pre&view... + + + + + Open a Print Preview Dialog for the Current Results + + + + + &Library Editor... + + + + + Open library editor + + + + + &Auto-detect language + + + + + &Enforce C++ + + + + + E&nforce C + + + + + C++14 + + + + + Reanalyze and check library + + + + + Check configuration (defines, includes) + + + + + C++17 + + + + + C++20 + + + + + Compliance report... + + + + + Cppcheck GUI. + +Syntax: + cppcheck-gui [OPTIONS] [files or paths] + +Options: + -h, --help Print this help + -p <file> Open given project file and start checking it + -l <file> Open given results xml file + -d <directory> Specify the directory that was checked to generate the results xml specified with -l + -v, --version Show program version + --data-dir=<directory> This option is for installation scripts so they can configure the directory where + datafiles are located (translations, cfg). The GUI is not started when this option + is used. + + + + + Cppcheck GUI - Command line parameters + + + + + + Quick Filter: + + + + + + + + Project: + + + + + There was a problem with loading the editor application settings. + +This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. + + + + + No suitable files found to analyze! + + + + + You must close the project file before selecting new files or directories! + + + + + C/C++ Source + + + + + Compile database + + + + + Visual Studio + + + + + Borland C++ Builder 6 + + + + + Select files to analyze + + + + + Select directory to analyze + + + + + Select configuration + + + + + Select the configuration that will be analyzed + + + + + Found project file: %1 + +Do you want to load this project file instead? + + + + + Found project files from the directory. + +Do you want to proceed analysis without using any of these project files? + + + + + + Information + + + + + The library '%1' contains unknown elements: +%2 + + + + + File not found + + + + + Bad XML + + + + + Missing attribute + + + + + Bad attribute value + + + + + Unsupported format + + + + + Duplicate platform type + + + + + Platform type redefined + + + + + Unknown element + + + + + Unknown issue + + + + + Failed to load the selected library '%1'. +%2 + + + + + Error + + + + + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. + + + + + Current results will be cleared. + +Opening a new XML file will clear current results. +Do you want to proceed? + + + + + + XML files (*.xml) + + + + + Open the report file + + + + + Analyzer is running. + +Do you want to stop the analysis and exit Cppcheck? + + + + + About + + + + + License + + + + + Authors + + + + + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) + + + + + Save the report file + + + + + Text files (*.txt) + + + + + CSV files (*.csv) + + + + + Project files (*.cppcheck);;All files(*.*) + + + + + Select Project File + + + + + Build dir '%1' does not exist, create it? + + + + + To check the project using addons, you need a build directory. + + + + + Failed to open file + + + + + Unknown project file format + + + + + Failed to import project file + + + + + Failed to import '%1': %2 + +Analysis is stopped. + + + + + Failed to import '%1', analysis is stopped + + + + + Project files (*.cppcheck) + + + + + Select Project Filename + + + + + No project file loaded + + + + + The project file + +%1 + + could not be found! + +Do you want to remove the file from the recently used projects -list? + + + + + Install + + + + + New version available: %1. %2 + + + + + NewSuppressionDialog + + + New suppression + + + + + Error ID + + + + + File name + + + + + Line number + + + + + Symbol name + + + + + Edit suppression + + + + + Platforms + + + Native + + + + + Unix 32-bit + + + + + Unix 64-bit + + + + + Windows 32-bit ANSI + + + + + Windows 32-bit Unicode + + + + + Windows 64-bit + + + + + ProjectFile + + + Project File + + + + + Paths and Defines + + + + + Import Project (Visual studio / compile database/ Borland C++ Builder 6) + + + + + + Browse... + + + + + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> + + + + + Analyze all Visual Studio configurations + + + + + Selected VS Configurations + + + + + Paths: + + + + + + Add... + + + + + + + Edit + + + + + + + + Remove + + + + + Defines: + + + + + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int + + + + + Undefines: + + + + + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 + + + + + Include Paths: + + + + + Up + + + + + Down + + + + + Types and Functions + + + + + Platform + + + + + Libraries + + + + + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. + + + + + + Analysis + + + + + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) + + + + + This is a workfolder that Cppcheck will use for various purposes. + + + + + Parser + + + + + Cppcheck (built in) + + + + + Clang (experimental) + + + + + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. + + + + + Check that each class has a safe public interface + + + + + Limit analysis + + + + + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) + + + + + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) + + + + + Max CTU depth + + + + + Max recursion in template instantiation + + + + + Warning options + + + + + Root path: + + + + + Filepaths in warnings will be relative to this path + + + + + Warning tags (separated by semicolon) + + + + + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. + + + + + Exclude source files + + + + + Exclude folder... + + + + + Exclude file... + + + + + Suppressions + + + + + Add + + + + + + Addons + + + + + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. + + + + + Y2038 + + + + + Thread safety + + + + + Coding standards + + + + + Misra C 2012 + + + + + MISRA rule texts + + + + + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> + + + + + ... + + + + + Misra C++ 2008 + + + + + Cert C + + + + + CERT-INT35-C: int precision (if size equals precision, you can leave empty) + + + + + Cert C++ + + + + + Autosar + + + + + Bug hunting (Premium) + + + + + Bug hunting + + + + + External tools + + + + + Clang-tidy + + + + + Clang analyzer + + + + + ProjectFileDialog + + + Project file: %1 + + + + + Clang-tidy (not found) + + + + + Select Cppcheck build dir + + + + + Visual Studio + + + + + Compile database + + + + + Borland C++ Builder 6 + + + + + Import Project + + + + + Select a directory to check + + + + + Select include directory + + + + + Select directory to ignore + + + + + Source files + + + + + All files + + + + + Exclude file + + + + + Select MISRA rule texts file + + + + + MISRA rule texts file (%1) + + + + + QObject + + + Thin + + + + + ExtraLight + + + + + Light + + + + + Normal + + + + + Medium + + + + + DemiBold + + + + + Bold + + + + + ExtraBold + + + + + Black + + + + + Editor Foreground Color + + + + + Editor Background Color + + + + + Highlight Background Color + + + + + Line Number Foreground Color + + + + + Line Number Background Color + + + + + Keyword Foreground Color + + + + + Keyword Font Weight + + + + + Class Foreground Color + + + + + Class Font Weight + + + + + Quote Foreground Color + + + + + Quote Font Weight + + + + + Comment Foreground Color + + + + + Comment Font Weight + + + + + Symbol Foreground Color + + + + + Symbol Background Color + + + + + Symbol Font Weight + + + + + Set to Default Light + + + + + Set to Default Dark + + + + + line %1: Unhandled element %2 + + + + + line %1: Mandatory attribute '%2' missing in '%3' + + + + + (Not found) + + + + + Unknown language specified! + + + + + Language file %1 not found! + + + + + Failed to load translation for language %1 from file %2 + + + + + QPlatformTheme + + + OK + + + + + Cancel + + + + + Close + + + + + Save + + + + + ResultsTree + + + Undefined file + + + + + note + + + + + style + + + + + error + + + + + warning + + + + + performance + + + + + portability + + + + + information + + + + + debug + + + + + Recheck + + + + + Copy + + + + + Hide + + + + + Hide all with id + + + + + Open containing folder + + + + + Suppress selected id(s) + + + + + + Tag + + + + + No tag + + + + + + Cppcheck + + + + + No editor application configured. + +Configure the editor application for Cppcheck in preferences/Applications. + + + + + No default editor application selected. + +Please select the default editor application in preferences/Applications. + + + + + Could not find the file! + + + + + Could not start %1 + +Please check the application path and parameters are correct. + + + + + Could not find file: + + + + + Please select the folder '%1' + + + + + Select Directory '%1' + + + + + Please select the directory where file is located. + + + + + Select Directory + + + + + File + + + + + Severity + + + + + Line + + + + + Id + + + + + Inconclusive + + + + + Summary + + + + + Since date + + + + + ResultsView + + + Results + + + + + Analysis Log + + + + + Warning Details + + + + + + Failed to save the report. + + + + + Print Report + + + + + No errors found, nothing to print. + + + + + %p% (%1 of %2 files checked) + + + + + + Cppcheck + + + + + No errors found. + + + + + 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. + + + + + XML format version 1 is no longer supported. + + + + + First included by + + + + + Id + + + + + Bug hunting analysis is incomplete + + + + + Clear Log + + + + + Copy this Log entry + + + + + Copy complete Log + + + + + ScratchPad + + + Scratchpad + + + + + Copy or write some C/C++ code here: + + + + + Optionally enter a filename (mainly for automatic language detection) and click on "Check": + + + + + filename + + + + + Check + + + + + Settings + + + Preferences + + + + + General + + + + + Number of threads: + + + + + Ideal count: + + + + + Force checking all #ifdef configurations + + + + + Show full path of files + + + + + Show "No errors found" message when no errors found + + + + + Display error Id in column "Id" + + + + + Enable inline suppressions + + + + + Check for inconclusive errors also + + + + + Show statistics on check completion + + + + + Check for updates + + + + + Show internal warnings in log + + + + + Applications + + + + + Add... + + + + + + Edit... + + + + + Remove + + + + + Set as default + + + + + Reports + + + + + Save all errors when creating report + + + + + Save full path to files in reports + + + + + Language + + + + + Addons + + + + + Python binary (leave this empty to use python in the PATH) + + + + + + + ... + + + + + MISRA addon + + + + + MISRA rule texts file + + + + + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> + + + + + Clang + + + + + Clang path (leave empty to use system PATH) + + + + + Visual Studio headers + + + + + <html><head/><body><p>Paths to Visual Studio headers, separated by semicolon ';'.</p><p>You can open a Visual Studio command prompt, write &quot;SET INCLUDE&quot;. Then copy/paste the paths.</p></body></html> + + + + + Code Editor + + + + + Code Editor Style + + + + + System Style + + + + + Default Light Style + + + + + Default Dark Style + + + + + Custom + + + + + SettingsDialog + + + N/A + + + + + The executable file "%1" is not available + + + + + Add a new application + + + + + Modify an application + + + + + [Default] + + + + + [Default] + + + + + Select python binary + + + + + Select MISRA File + + + + + Select clang path + + + + + StatsDialog + + + + + + Statistics + + + + + + Project + + + + + Project: + + + + + Paths: + + + + + Include paths: + + + + + Defines: + + + + + Undefines: + + + + + + Previous Scan + + + + + Path Selected: + + + + + Number of Files Scanned: + + + + + Scan Duration: + + + + + Errors: + + + + + Warnings: + + + + + Stylistic warnings: + + + + + Portability warnings: + + + + + Performance issues: + + + + + Information messages: + + + + + History + + + + + File: + + + + + Copy to Clipboard + + + + + Pdf Export + + + + + File: + + + + + No cppcheck build dir + + + + + 1 day + + + + + %1 days + + + + + 1 hour + + + + + %1 hours + + + + + 1 minute + + + + + %1 minutes + + + + + 1 second + + + + + %1 seconds + + + + + 0.%1 seconds + + + + + and + + + + + + Errors + + + + + + Warnings + + + + + + Style warnings + + + + + + Portability warnings + + + + + + Performance warnings + + + + + + Information messages + + + + + Export PDF + + + + + Project Settings + + + + + Paths + + + + + Include paths + + + + + Defines + + + + + Undefines + + + + + Path selected + + + + + Number of files scanned + + + + + Scan duration + + + + + ThreadResult + + + %1 of %2 files checked + + + + + TranslationHandler + + + Failed to change the user interface language: + +%1 + +The user interface language has been reset to English. Open the Preferences-dialog to select any of the available languages. + + + + + Cppcheck + + + + + TxtReport + + + inconclusive + + + + + toFilterString + + + All supported files (%1) + + + + + All files (%1) + + + + diff --git a/gui/gui.pro b/gui/gui.pro index e1a3a94d5..186426dae 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -88,7 +88,8 @@ TRANSLATIONS = cppcheck_de.ts \ cppcheck_ru.ts \ cppcheck_sr.ts \ cppcheck_sv.ts \ - cppcheck_zh_CN.ts + cppcheck_zh_CN.ts \ + cppcheck_zh_TW.ts # Windows-specific options CONFIG += embed_manifest_exe diff --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp index eaa04cb3a..4e29762b0 100644 --- a/gui/translationhandler.cpp +++ b/gui/translationhandler.cpp @@ -48,6 +48,7 @@ TranslationHandler::TranslationHandler(QObject *parent) : // Add our available languages // Keep this list sorted addTranslation("Chinese (Simplified)", "cppcheck_zh_CN"); + addTranslation("Chinese (Traditional)", "cppcheck_zh_TW"); addTranslation("Dutch", "cppcheck_nl"); addTranslation("English", "cppcheck_en"); addTranslation("Finnish", "cppcheck_fi"); diff --git a/win_installer/cppcheck.wxs b/win_installer/cppcheck.wxs index f7c957aa2..3324a11f8 100644 --- a/win_installer/cppcheck.wxs +++ b/win_installer/cppcheck.wxs @@ -80,6 +80,7 @@ +