Added Better English Translation on Some Elements, Made About Widget look more pleasing, Changed Navigation Panel a Bit

This commit is contained in:
Viktor M 2023-02-06 21:51:58 +01:00
parent 3153bab4e2
commit 28d6f52cce
8 changed files with 140 additions and 102 deletions

View File

@ -6,6 +6,7 @@ AboutNdd::AboutNdd(QWidget *parent)
ui.setupUi(this);
ui.label->setOpenExternalLinks(true);
connect(ui.aboutPushButton, &QPushButton::clicked, this, &AboutNdd::onButtonOkayClicked);
}
AboutNdd::~AboutNdd()
@ -15,3 +16,8 @@ void AboutNdd::appendText(QString text)
{
ui.nddMsgText->appendPlainText(text);
}
void AboutNdd::onButtonOkayClicked()
{
close();
}

View File

@ -13,6 +13,9 @@ public:
void appendText(QString text);
private slots:
void onButtonOkayClicked();
private:
Ui::AboutNddClass ui;
};
};

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>114</height>
<height>180</height>
</rect>
</property>
<property name="maximumSize">
@ -17,7 +17,7 @@
</size>
</property>
<property name="windowTitle">
<string>AboutNdd</string>
<string>About Notepad--</string>
</property>
<property name="windowIcon">
<iconset resource="RealCompare.qrc">
@ -33,25 +33,76 @@
<property name="bottomMargin">
<number>2</number>
</property>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout0">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>General Public License</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="nddMsgText">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="plainText">
<string>This software is licensed under the terms of the GNU General Public License version 3 (GPLv3). You are free to redistribute and modify the software in accordance with the license.
This software is distributed with the hope that it will be useful, but without any warranties, including the implied warranties of merchantability or fitness for a particular purpose. Please see the GNU General Public License for more information.
A copy of the GPLv3 license should have been provided along with this software. If you have not received a copy, it can be found at https://www.gnu.org/licenses/.</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://gitee.com/cxasm/notepad--&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Click to get the latest version of notepad-- or source code&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Home: &lt;a href=&quot;https://gitee.com/cxasm/notepad--&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;https://gitee.com/cxasm/notepad--&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPlainTextEdit" name="nddMsgText">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="plainText">
<string>opensoure webhttps://gitee.com/cxasm/notepad--</string>
</property>
</widget>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="aboutPushButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>28</height>
</size>
</property>
<property name="text">
<string>Okay</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"/>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>

View File

@ -3464,7 +3464,7 @@ void CCNotePad::tabClose(int index, bool isInQuit)
{
QApplication::beep();
int ret = QMessageBox::question(this, tr("Save File?"), tr("if save file %1 ?").arg(filePath), tr("Yes"), tr("No"), tr("Cancel"));
int ret = QMessageBox::question(this, tr("Do you want to save changes to « %1 » before closing?").arg(filePath), tr("If you don't save the changes you made, you'll lose them forever."), tr("Yes"), tr("No"), tr("Cancel"));
//保存
if (ret == 0)
@ -7333,18 +7333,18 @@ void CCNotePad::slot_aboutNdd()
{
AboutNdd* pWin = new AboutNdd();
pWin->setAttribute(Qt::WA_DeleteOnClose);
QString title = tr("Ndd Version %1").arg(VersionStr);
QString title = tr("Notepad-- Version %1").arg(VersionStr);
pWin->setWindowTitle(title);
pWin->appendText(title);
int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
if (1 == status)
{
pWin->appendText(tr("Registered Version"));
}
else
{
pWin->appendText(tr("Free Trial"));
}
// int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
// if (1 == status)
// {
// pWin->appendText(tr("Registered Version"));
// }
// else
// {
// pWin->appendText(tr("Free Trial"));
// }
pWin->show();
registerEscKeyShort(pWin);
#ifdef uos
@ -7352,6 +7352,7 @@ void CCNotePad::slot_aboutNdd()
#endif
}
void CCNotePad::addWatchFilePath(QString filePath)
{
getRegularFilePath(filePath);
@ -7646,25 +7647,25 @@ void CCNotePad::slot_donate()
#endif
}
void CCNotePad::slot_registerCmd(int cmd, int code)
{
if (cmd == 1)
{
//服务器返回注册码的消息。 //0 试用 1 正版 2 正版过期 3 错误key
int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
if (status != code)
{
NddSetting::updataKeyValueFromNumSets(SOFT_STATUS, code);
}
emit signRegisterReplay(code);
}
}
// void CCNotePad::slot_registerCmd(int cmd, int code)
// {
// if (cmd == 1)
// {
// //服务器返回注册码的消息。 //0 试用 1 正版 2 正版过期 3 错误key
// int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
// if (status != code)
// {
// NddSetting::updataKeyValueFromNumSets(SOFT_STATUS, code);
// }
//
// emit signRegisterReplay(code);
// }
//}
//获取注册码
void CCNotePad::slot_register()
{
}
//void CCNotePad::slot_register()
//{
//}
//当前正在使用的所有语言的tags
void CCNotePad::getCurUseLexerTags(QVector<QString>& tags)
@ -8920,5 +8921,4 @@ void CCNotePad::slot_shortcutManager()
adjustWInPos(pWin);
#endif
pWin->show();
}
}

View File

@ -178,7 +178,7 @@ public slots:
void slot_batch_rename();
void slot_options();
void slot_donate();
void slot_registerCmd(int cmd, int code);
// void slot_registerCmd(int cmd, int code);
void slot_viewStyleChange(QString tag, int styleId, QColor & fgColor, QColor & bkColor, QFont & font, bool fontChange);
void slot_viewLexerChange(QString tag);
void slot_findInDir();
@ -278,7 +278,7 @@ private slots:
void slot_toDarkStyle();
void slot_toLavenderBlush();
void slot_toMistyRose();*/
void slot_register();
//void slot_register();
void slot_slectionChanged();
void slot_preHexPage();

View File

@ -79,7 +79,7 @@
<x>0</x>
<y>0</y>
<width>1458</width>
<height>23</height>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -87,7 +87,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="title">
<string>File(&amp;F)</string>
<string>File (&amp;F)</string>
</property>
<addaction name="actionNewFile"/>
<addaction name="actionOpenFile"/>
@ -103,7 +103,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="title">
<string>Edit(&amp;E)</string>
<string>Edit (&amp;E)</string>
</property>
<widget class="QMenu" name="menuformat_conversion">
<property name="title">
@ -180,11 +180,11 @@
</widget>
<widget class="QMenu" name="menuSearch">
<property name="title">
<string>Search(&amp;S)</string>
<string>Search (&amp;S)</string>
</property>
<widget class="QMenu" name="menuBook_Mark">
<property name="title">
<string>Book Mark</string>
<string>Bookmark</string>
</property>
</widget>
<widget class="QMenu" name="menuMark_Color">
@ -204,7 +204,7 @@
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View(&amp;V)</string>
<string>View (&amp;V)</string>
</property>
<widget class="QMenu" name="menudisplay_symbols">
<property name="title">
@ -232,7 +232,7 @@
</widget>
<widget class="QMenu" name="menuCode">
<property name="title">
<string>Encoding(&amp;N)</string>
<string>Encoding (&amp;N)</string>
</property>
<widget class="QMenu" name="menuASNI">
<property name="title">
@ -263,7 +263,7 @@
</widget>
<widget class="QMenu" name="menuLanguage">
<property name="title">
<string>Language(&amp;L)</string>
<string>Language (&amp;L)</string>
</property>
<widget class="QMenu" name="menuP">
<property name="title">
@ -466,7 +466,7 @@
</widget>
<widget class="QMenu" name="menuSet">
<property name="title">
<string>Set(&amp;T)</string>
<string>Set (&amp;T)</string>
</property>
<widget class="QMenu" name="menuLanguage_2">
<property name="title">
@ -495,7 +495,7 @@
</widget>
<widget class="QMenu" name="menuTools">
<property name="title">
<string>Tools(&amp;O)</string>
<string>Tools (&amp;O)</string>
</property>
</widget>
<addaction name="menuFile"/>
@ -1575,11 +1575,6 @@
<string>Chinese</string>
</property>
</action>
<action name="actionRegister">
<property name="text">
<string>Register</string>
</property>
</action>
<action name="actionLanguage_Format">
<property name="text">
<string>Theme Style</string>
@ -1904,7 +1899,7 @@
</action>
<action name="actioninfo">
<property name="text">
<string>AboutNdd</string>
<string>About Notepad--</string>
</property>
</action>
<action name="action1">
@ -2695,22 +2690,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>actionRegister</sender>
<signal>triggered()</signal>
<receiver>CCNotePad</receiver>
<slot>slot_register()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>601</x>
<y>394</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionLanguage_Format</sender>
<signal>triggered()</signal>
@ -3497,7 +3476,6 @@
<slot>slot_toMistyRose()</slot>
<slot>slot_changeEnglish()</slot>
<slot>slot_changeChinese()</slot>
<slot>slot_register()</slot>
<slot>slot_langFormat()</slot>
<slot>slot_reOpenTextMode()</slot>
<slot>slot_reOpenHexMode()</slot>

View File

@ -60,7 +60,7 @@
<item>
<widget class="QCheckBox" name="leftBox">
<property name="text">
<string>save left document ?</string>
<string>Save Left Document?</string>
</property>
<property name="checked">
<bool>true</bool>
@ -70,7 +70,7 @@
<item>
<widget class="QCheckBox" name="rightBox">
<property name="text">
<string>save right document ?</string>
<string>Save Right Document?</string>
</property>
<property name="checked">
<bool>true</bool>
@ -140,7 +140,7 @@
</size>
</property>
<property name="text">
<string>save selected</string>
<string>Save Selected</string>
</property>
</widget>
</item>
@ -159,7 +159,7 @@
</size>
</property>
<property name="text">
<string>discard</string>
<string>Discard</string>
</property>
</widget>
</item>
@ -178,7 +178,7 @@
</size>
</property>
<property name="text">
<string>cancel</string>
<string>Cancel</string>
</property>
</widget>
</item>

View File

@ -40,7 +40,7 @@
</size>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tab_find">
<attribute name="title">
@ -1462,8 +1462,8 @@
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>572</x>
<y>251</y>
<x>674</x>
<y>288</y>
</hint>
<hint type="destinationlabel">
<x>169</x>
@ -1510,8 +1510,8 @@
<slot>slot_replaceFindNext()</slot>
<hints>
<hint type="sourcelabel">
<x>94</x>
<y>60</y>
<x>448</x>
<y>69</y>
</hint>
<hint type="destinationlabel">
<x>588</x>
@ -1526,8 +1526,8 @@
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>94</x>
<y>45</y>
<x>448</x>
<y>213</y>
</hint>
<hint type="destinationlabel">
<x>588</x>
@ -1542,8 +1542,8 @@
<slot>slot_replace()</slot>
<hints>
<hint type="sourcelabel">
<x>94</x>
<y>64</y>
<x>448</x>
<y>103</y>
</hint>
<hint type="destinationlabel">
<x>588</x>
@ -1558,8 +1558,8 @@
<slot>slot_replaceAll()</slot>
<hints>
<hint type="sourcelabel">
<x>94</x>
<y>67</y>
<x>448</x>
<y>137</y>
</hint>
<hint type="destinationlabel">
<x>588</x>
@ -1574,8 +1574,8 @@
<slot>slot_replaceAllInOpenDoc()</slot>
<hints>
<hint type="sourcelabel">
<x>94</x>
<y>76</y>
<x>448</x>
<y>180</y>
</hint>
<hint type="destinationlabel">
<x>588</x>
@ -1638,8 +1638,8 @@
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>572</x>
<y>142</y>
<x>674</x>
<y>171</y>
</hint>
<hint type="destinationlabel">
<x>564</x>
@ -1718,8 +1718,8 @@
<slot>slot_findPrev()</slot>
<hints>
<hint type="sourcelabel">
<x>484</x>
<y>73</y>
<x>674</x>
<y>103</y>
</hint>
<hint type="destinationlabel">
<x>294</x>