- enhancement: **Linux** convert to "gbk"/"gb18030" encodings when run under "zh_CN" locale

This commit is contained in:
Roy Qu 2022-03-13 20:54:50 +08:00
parent 79b8478af3
commit 265422a50d
3 changed files with 156 additions and 128 deletions

View File

@ -15,6 +15,7 @@ Red Panda C++ Version 1.0.0
- fix: syntax color of #include header filenames not correct
- enhancement: disable "code completion" will disable enhanced syntax highlight
- enhancement: match bracket
- enhancement: **Linux** convert to "gbk"/"gb18030" encodings when run under "zh_CN" locale
Red Panda C++ Version 0.14.5
- fix: the "gnu c++ 20" option in compiler set options is wrong

View File

@ -3788,11 +3788,11 @@ Are you really want to continue?</oldsource>
<message>
<location filename="mainwindow.ui" line="560"/>
<location filename="mainwindow.ui" line="2640"/>
<location filename="mainwindow.cpp" line="4308"/>
<location filename="mainwindow.cpp" line="4311"/>
<location filename="mainwindow.cpp" line="4315"/>
<location filename="mainwindow.cpp" line="4318"/>
<location filename="mainwindow.cpp" line="5961"/>
<location filename="mainwindow.cpp" line="4328"/>
<location filename="mainwindow.cpp" line="4331"/>
<location filename="mainwindow.cpp" line="4335"/>
<location filename="mainwindow.cpp" line="4338"/>
<location filename="mainwindow.cpp" line="5981"/>
<source>Issues</source>
<translation></translation>
</message>
@ -4215,7 +4215,7 @@ Are you really want to continue?</oldsource>
<message>
<location filename="mainwindow.ui" line="359"/>
<location filename="mainwindow.ui" line="362"/>
<location filename="mainwindow.cpp" line="6296"/>
<location filename="mainwindow.cpp" line="6316"/>
<source>New Problem Set</source>
<translation></translation>
</message>
@ -4234,14 +4234,14 @@ Are you really want to continue?</oldsource>
<message>
<location filename="mainwindow.ui" line="401"/>
<location filename="mainwindow.ui" line="404"/>
<location filename="mainwindow.cpp" line="6339"/>
<location filename="mainwindow.cpp" line="6359"/>
<source>Save Problem Set</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="415"/>
<location filename="mainwindow.ui" line="418"/>
<location filename="mainwindow.cpp" line="6363"/>
<location filename="mainwindow.cpp" line="6383"/>
<source>Load Problem Set</source>
<translation></translation>
</message>
@ -4580,7 +4580,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2315"/>
<location filename="mainwindow.cpp" line="5177"/>
<location filename="mainwindow.cpp" line="5197"/>
<source>Clear all breakpoints</source>
<translation></translation>
</message>
@ -4681,7 +4681,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2469"/>
<location filename="mainwindow.cpp" line="5901"/>
<location filename="mainwindow.cpp" line="5921"/>
<source>Rename Symbol</source>
<translation></translation>
</message>
@ -4702,13 +4702,13 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2489"/>
<location filename="mainwindow.cpp" line="6092"/>
<location filename="mainwindow.cpp" line="6112"/>
<source>Export As RTF</source>
<translation>RTF</translation>
</message>
<message>
<location filename="mainwindow.ui" line="2494"/>
<location filename="mainwindow.cpp" line="6114"/>
<location filename="mainwindow.cpp" line="6134"/>
<source>Export As HTML</source>
<translation>HTML</translation>
</message>
@ -5208,7 +5208,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="277"/>
<location filename="mainwindow.cpp" line="6305"/>
<location filename="mainwindow.cpp" line="6325"/>
<source>Problem Set %1</source>
<translation>%1</translation>
</message>
@ -5282,15 +5282,15 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="2344"/>
<location filename="mainwindow.cpp" line="6173"/>
<location filename="mainwindow.cpp" line="6213"/>
<location filename="mainwindow.cpp" line="6193"/>
<location filename="mainwindow.cpp" line="6233"/>
<source>Bookmark Description</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2345"/>
<location filename="mainwindow.cpp" line="6174"/>
<location filename="mainwindow.cpp" line="6214"/>
<location filename="mainwindow.cpp" line="6194"/>
<location filename="mainwindow.cpp" line="6234"/>
<source>Description:</source>
<translation></translation>
</message>
@ -5402,16 +5402,16 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="2737"/>
<location filename="mainwindow.cpp" line="3580"/>
<location filename="mainwindow.cpp" line="3584"/>
<location filename="mainwindow.cpp" line="3600"/>
<location filename="mainwindow.cpp" line="3604"/>
<source>New Folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2742"/>
<location filename="mainwindow.cpp" line="3594"/>
<location filename="mainwindow.cpp" line="3600"/>
<location filename="mainwindow.cpp" line="5762"/>
<location filename="mainwindow.cpp" line="3614"/>
<location filename="mainwindow.cpp" line="3620"/>
<location filename="mainwindow.cpp" line="5782"/>
<source>Delete</source>
<translation></translation>
</message>
@ -5441,228 +5441,233 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2982"/>
<location filename="mainwindow.cpp" line="2904"/>
<source>Convert to %1</source>
<translation type="unfinished">%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3002"/>
<source>%1 files autosaved</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3291"/>
<location filename="mainwindow.cpp" line="3311"/>
<source>Set answer to...</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3323"/>
<location filename="mainwindow.cpp" line="3343"/>
<source>select other file...</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3329"/>
<location filename="mainwindow.cpp" line="3349"/>
<source>Select Answer Source File</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3331"/>
<location filename="mainwindow.cpp" line="3351"/>
<source>C/C++Source Files (*.c *.cpp *.cc *.cxx)</source>
<oldsource>C/C++Source Files (*.c *.cpp *.cc *.cxx</oldsource>
<translation>C/C++ (*.c *.cpp *.cc *.cxx)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3595"/>
<location filename="mainwindow.cpp" line="3615"/>
<source>Do you really want to delete %1?</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3601"/>
<location filename="mainwindow.cpp" line="3621"/>
<source>Do you really want to delete %1 files?</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3804"/>
<location filename="mainwindow.cpp" line="3824"/>
<source>Save project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3805"/>
<location filename="mainwindow.cpp" line="3825"/>
<source>The project &apos;%1&apos; has modifications.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3807"/>
<location filename="mainwindow.cpp" line="6299"/>
<location filename="mainwindow.cpp" line="3827"/>
<location filename="mainwindow.cpp" line="6319"/>
<source>Do you want to save it?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3894"/>
<location filename="mainwindow.cpp" line="3905"/>
<location filename="mainwindow.cpp" line="3914"/>
<location filename="mainwindow.cpp" line="3925"/>
<source>File Changed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3977"/>
<location filename="mainwindow.cpp" line="3997"/>
<source>New Project File?</source>
<translation>?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3978"/>
<location filename="mainwindow.cpp" line="3998"/>
<source>Do you want to add the new file to the project?</source>
<translation>?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4054"/>
<location filename="mainwindow.cpp" line="4064"/>
<location filename="mainwindow.cpp" line="4076"/>
<location filename="mainwindow.cpp" line="6352"/>
<location filename="mainwindow.cpp" line="4074"/>
<location filename="mainwindow.cpp" line="4084"/>
<location filename="mainwindow.cpp" line="4096"/>
<location filename="mainwindow.cpp" line="6372"/>
<source>Save Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4236"/>
<location filename="mainwindow.cpp" line="4256"/>
<source>Change Project Compiler Set</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4237"/>
<location filename="mainwindow.cpp" line="4257"/>
<source>Change the project&apos;s compiler set will lose all custom compiler set options.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4239"/>
<location filename="mainwindow.cpp" line="4259"/>
<source>Do you really want to do that?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5178"/>
<location filename="mainwindow.cpp" line="5198"/>
<source>Do you really want to clear all breakpoints in this file?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5376"/>
<location filename="mainwindow.cpp" line="5396"/>
<source>New project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5377"/>
<location filename="mainwindow.cpp" line="5397"/>
<source>Close %1 and start new project?</source>
<translation>&apos;%1&apos;?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5390"/>
<location filename="mainwindow.cpp" line="5410"/>
<source>Folder not exist</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5391"/>
<location filename="mainwindow.cpp" line="5411"/>
<source>Folder &apos;%1&apos; doesn&apos;t exist. Create it now?</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5398"/>
<location filename="mainwindow.cpp" line="5418"/>
<source>Can&apos;t create folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5399"/>
<location filename="mainwindow.cpp" line="5419"/>
<source>Failed to create folder &apos;%1&apos;.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5414"/>
<location filename="mainwindow.cpp" line="5434"/>
<source>Save new project as</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5763"/>
<location filename="mainwindow.cpp" line="5783"/>
<source>Folder %1 is not empty.</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5764"/>
<location filename="mainwindow.cpp" line="5784"/>
<source>Do you really want to delete it?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6234"/>
<location filename="mainwindow.cpp" line="6254"/>
<source>Change working folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6235"/>
<location filename="mainwindow.cpp" line="6255"/>
<source>File &apos;%1&apos; is not in the current working folder.</source>
<oldsource>File &apos;%1&apos; is not in the current working folder</oldsource>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6238"/>
<location filename="mainwindow.cpp" line="6258"/>
<source>Do you want to change working folder to &apos;%1&apos;?</source>
<translation>&apos;%1&apos;?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6877"/>
<location filename="mainwindow.cpp" line="6897"/>
<source>Can&apos;t Commit</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6878"/>
<location filename="mainwindow.cpp" line="6898"/>
<source>Git needs user info to commit.</source>
<translation>Git需要用信息进行提交</translation>
</message>
<message>
<location filename="mainwindow.ui" line="2559"/>
<location filename="mainwindow.ui" line="2562"/>
<location filename="mainwindow.cpp" line="6275"/>
<location filename="mainwindow.cpp" line="6295"/>
<source>Choose Working Folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6645"/>
<location filename="mainwindow.cpp" line="6697"/>
<location filename="mainwindow.cpp" line="6665"/>
<location filename="mainwindow.cpp" line="6717"/>
<source>Header Exists</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6646"/>
<location filename="mainwindow.cpp" line="6698"/>
<location filename="mainwindow.cpp" line="6666"/>
<location filename="mainwindow.cpp" line="6718"/>
<source>Header file &quot;%1&quot; already exists!</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6703"/>
<location filename="mainwindow.cpp" line="6723"/>
<source>Source Exists</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6704"/>
<location filename="mainwindow.cpp" line="6724"/>
<source>Source file &quot;%1&quot; already exists!</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6856"/>
<location filename="mainwindow.cpp" line="6876"/>
<source>Can&apos;t commit!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6857"/>
<location filename="mainwindow.cpp" line="6877"/>
<source>The following files are in conflicting:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6862"/>
<location filename="mainwindow.cpp" line="6882"/>
<source>Commit Message</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6862"/>
<location filename="mainwindow.cpp" line="6882"/>
<source>Commit Message:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6865"/>
<location filename="mainwindow.cpp" line="6885"/>
<source>Commit Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6866"/>
<location filename="mainwindow.cpp" line="6886"/>
<source>Commit message shouldn&apos;t be empty!</source>
<translation></translation>
</message>
@ -5671,125 +5676,125 @@ Are you really want to continue?</oldsource>
<translation type="vanished">Dev-C++ (*.dev)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5427"/>
<location filename="mainwindow.cpp" line="5447"/>
<source>New project fail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5428"/>
<location filename="mainwindow.cpp" line="5448"/>
<source>Can&apos;t assign project template</source>
<translation>使</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5523"/>
<location filename="mainwindow.cpp" line="5543"/>
<source>Remove file</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5524"/>
<location filename="mainwindow.cpp" line="5544"/>
<source>Remove the file from disk?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5713"/>
<location filename="mainwindow.cpp" line="5733"/>
<source>untitled</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5723"/>
<location filename="mainwindow.cpp" line="5743"/>
<source>New Project File Name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5724"/>
<location filename="mainwindow.cpp" line="5744"/>
<source>File Name:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5730"/>
<location filename="mainwindow.cpp" line="5750"/>
<source>File Already Exists!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5731"/>
<location filename="mainwindow.cpp" line="5751"/>
<source>File &apos;%1&apos; already exists!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5472"/>
<location filename="mainwindow.cpp" line="5492"/>
<source>Add to project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5416"/>
<location filename="mainwindow.cpp" line="5436"/>
<source>Red Panda C++ project file (*.dev)</source>
<translation>C++(*.dev)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5887"/>
<location filename="mainwindow.cpp" line="5907"/>
<source>Rename Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5888"/>
<location filename="mainwindow.cpp" line="5908"/>
<source>Symbol &apos;%1&apos; is defined in system header.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5902"/>
<location filename="mainwindow.cpp" line="5922"/>
<source>New Name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6035"/>
<location filename="mainwindow.cpp" line="6047"/>
<location filename="mainwindow.cpp" line="6055"/>
<location filename="mainwindow.cpp" line="6067"/>
<source>Replace Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6036"/>
<location filename="mainwindow.cpp" line="6056"/>
<source>Can&apos;t open file &apos;%1&apos; for replace!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6048"/>
<location filename="mainwindow.cpp" line="6068"/>
<source>Contents has changed since last search!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6094"/>
<location filename="mainwindow.cpp" line="6114"/>
<source>Rich Text Format Files (*.rtf)</source>
<translation>RTF格式文件 (*.rtf)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6116"/>
<location filename="mainwindow.cpp" line="6136"/>
<source>HTML Files (*.html)</source>
<translation>HTML文件 (*.html)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6297"/>
<location filename="mainwindow.cpp" line="6317"/>
<source>The current problem set is not empty.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6315"/>
<location filename="mainwindow.cpp" line="6335"/>
<source>Problem %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6341"/>
<location filename="mainwindow.cpp" line="6365"/>
<location filename="mainwindow.cpp" line="6361"/>
<location filename="mainwindow.cpp" line="6385"/>
<source>Problem Set Files (*.pbs)</source>
<translation> (*.pbs)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6371"/>
<location filename="mainwindow.cpp" line="6391"/>
<source>Load Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3483"/>
<location filename="mainwindow.cpp" line="6385"/>
<location filename="mainwindow.cpp" line="3503"/>
<location filename="mainwindow.cpp" line="6405"/>
<source>Problem Case %1</source>
<translation>%1</translation>
</message>
@ -5803,12 +5808,12 @@ Are you really want to continue?</oldsource>
<location filename="mainwindow.cpp" line="1102"/>
<location filename="mainwindow.cpp" line="2225"/>
<location filename="mainwindow.cpp" line="2881"/>
<location filename="mainwindow.cpp" line="3901"/>
<location filename="mainwindow.cpp" line="4012"/>
<location filename="mainwindow.cpp" line="4205"/>
<location filename="mainwindow.cpp" line="4217"/>
<location filename="mainwindow.cpp" line="4625"/>
<location filename="mainwindow.cpp" line="4637"/>
<location filename="mainwindow.cpp" line="3921"/>
<location filename="mainwindow.cpp" line="4032"/>
<location filename="mainwindow.cpp" line="4225"/>
<location filename="mainwindow.cpp" line="4237"/>
<location filename="mainwindow.cpp" line="4645"/>
<location filename="mainwindow.cpp" line="4657"/>
<source>Error</source>
<translation></translation>
</message>
@ -5829,81 +5834,83 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3102"/>
<location filename="mainwindow.cpp" line="3239"/>
<location filename="mainwindow.cpp" line="3122"/>
<location filename="mainwindow.cpp" line="3259"/>
<source>Version Control</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3895"/>
<location filename="mainwindow.cpp" line="3915"/>
<source>File &apos;%1&apos; was changed.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3895"/>
<location filename="mainwindow.cpp" line="3915"/>
<source>Reload its content from disk?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3906"/>
<location filename="mainwindow.cpp" line="3926"/>
<source>File &apos;%1&apos; was removed.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3906"/>
<location filename="mainwindow.cpp" line="3926"/>
<source>Keep it open?</source>
<translation>C++</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4005"/>
<location filename="mainwindow.cpp" line="4025"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4401"/>
<location filename="mainwindow.cpp" line="4421"/>
<source>Compile Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4407"/>
<location filename="mainwindow.cpp" line="4427"/>
<source>Run Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4654"/>
<location filename="mainwindow.cpp" line="4668"/>
<location filename="mainwindow.cpp" line="2910"/>
<location filename="mainwindow.cpp" line="4674"/>
<location filename="mainwindow.cpp" line="4688"/>
<source>Confirm Convertion</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4655"/>
<location filename="mainwindow.cpp" line="4669"/>
<location filename="mainwindow.cpp" line="2911"/>
<location filename="mainwindow.cpp" line="4675"/>
<location filename="mainwindow.cpp" line="4689"/>
<source>The editing file will be saved using %1 encoding. &lt;br /&gt;This operation can&apos;t be reverted. &lt;br /&gt;Are you sure to continue?</source>
<translation>使%1&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4819"/>
<location filename="mainwindow.cpp" line="4839"/>
<source>New Watch Expression</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4820"/>
<location filename="mainwindow.cpp" line="4840"/>
<source>Enter Watch Expression (it is recommended to use &apos;this-&gt;&apos; for class members):</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4873"/>
<location filename="mainwindow.cpp" line="4893"/>
<source>Parsing file %1 of %2: &quot;%3&quot;</source>
<translation>%1/%2&quot;%3&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4895"/>
<location filename="mainwindow.cpp" line="4901"/>
<location filename="mainwindow.cpp" line="4915"/>
<location filename="mainwindow.cpp" line="4921"/>
<source>Done parsing %1 files in %2 seconds</source>
<translation>%1,%2</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4898"/>
<location filename="mainwindow.cpp" line="4918"/>
<source>(%1 files per second)</source>
<translation>(%1</translation>
</message>
@ -8046,7 +8053,7 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6286"/>
<location filename="mainwindow.cpp" line="6306"/>
<location filename="settingsdialog/settingsdialog.cpp" line="170"/>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
<location filename="settingsdialog/settingsdialog.cpp" line="209"/>
@ -8122,15 +8129,15 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6287"/>
<location filename="mainwindow.cpp" line="6600"/>
<location filename="mainwindow.cpp" line="6307"/>
<location filename="mainwindow.cpp" line="6620"/>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
<location filename="settingsdialog/settingsdialog.cpp" line="206"/>
<source>Program Runner</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6599"/>
<location filename="mainwindow.cpp" line="6619"/>
<location filename="settingsdialog/settingsdialog.cpp" line="206"/>
<source>Problem Set</source>
<translation></translation>

View File

@ -2897,6 +2897,26 @@ void MainWindow::buildEncodingMenu()
mMenuEncoding->addAction(ui->actionConvert_to_ANSI);
mMenuEncoding->addAction(ui->actionConvert_to_UTF_8);
QList<PCharsetInfo> charsetsForLocale = pCharsetInfoManager->findCharsetByLocale(pCharsetInfoManager->localeName());
foreach(const PCharsetInfo& charset, charsetsForLocale) {
QAction * action = new QAction(
tr("Convert to %1").arg(QString(charset->name)));
connect(action, &QAction::triggered,
[charset,this](){
Editor * editor = mEditorList->getEditor();
if (editor == nullptr)
return;
if (QMessageBox::warning(this,tr("Confirm Convertion"),
tr("The editing file will be saved using %1 encoding. <br />This operation can't be reverted. <br />Are you sure to continue?")
.arg(QString(charset->name)),
QMessageBox::Yes, QMessageBox::No)!=QMessageBox::Yes)
return;
editor->convertToEncoding(charset->name);
});
mMenuEncoding->addAction(action);
}
ui->menuEdit->insertMenu(ui->actionFoldAll,mMenuEncoding);
ui->menuEdit->insertSeparator(ui->actionFoldAll);
ui->actionAuto_Detect->setCheckable(true);