diff --git a/src/ui/form/prog/programeditdialog.cpp b/src/ui/form/prog/programeditdialog.cpp index 56fc4a37..b102a614 100644 --- a/src/ui/form/prog/programeditdialog.cpp +++ b/src/ui/form/prog/programeditdialog.cpp @@ -253,13 +253,15 @@ void ProgramEditDialog::retranslatePathPlaceholderText() const auto placeholderText = tr("# Examples:") // Prefix wildcard + '\n' + tr("# All programs in the sub-path:") - + QLatin1String("\nC:\\Git\\**") + + "\nC:\\Git\\**" // Name wildcard + '\n' + tr("# Name wildcard:") - + QLatin1String("\nC:\\Store\\app.v*.exe") + + "\nC:\\Store\\app.v*.exe" + "\nC:\\App.v*\\app.exe" // Env var + '\n' + tr("# Environment Variable:") - + QLatin1String("\n%SystemRoot%\\System32\\telnet.exe"); + + "\n%SystemRoot%\\System32\\telnet.exe" + "\n%ProgramFiles%\\Internet Explorer\\iexplore.exe"; m_editWildcard->setPlaceholderText(placeholderText); } diff --git a/src/ui/form/rule/ruleeditdialog.cpp b/src/ui/form/rule/ruleeditdialog.cpp index a7061745..81f7ed79 100644 --- a/src/ui/form/rule/ruleeditdialog.cpp +++ b/src/ui/form/rule/ruleeditdialog.cpp @@ -90,6 +90,8 @@ void RuleEditDialog::retranslateUi() m_cbExclusive->setText(tr("Exclusive")); m_btZones->retranslateUi(); + retranslateRulePlaceholderText(); + m_btOk->setText(tr("OK")); m_btCancel->setText(tr("Cancel")); @@ -105,6 +107,17 @@ void RuleEditDialog::retranslateComboRuleType() ControlUtil::setComboBoxTexts(m_comboRuleType, list); } +void RuleEditDialog::retranslateRulePlaceholderText() +{ + const auto placeholderText = tr("# Examples:") + // IP-Address:Port + + '\n' + tr("# IP address and port:") + + "\n1.1.1.1:udp(43)" + "\nip(1.1.1.1-8.8.8.8):port(43,80-8080)"; + + m_editRuleText->setPlaceholderText(placeholderText); +} + void RuleEditDialog::setupUi() { // Main Layout diff --git a/src/ui/form/rule/ruleeditdialog.h b/src/ui/form/rule/ruleeditdialog.h index c251f636..7c48b05d 100644 --- a/src/ui/form/rule/ruleeditdialog.h +++ b/src/ui/form/rule/ruleeditdialog.h @@ -39,6 +39,7 @@ private: void retranslateUi(); void retranslateComboRuleType(); + void retranslateRulePlaceholderText(); void setupUi(); QLayout *setupMainLayout();