mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-09 16:15:45 +00:00
improve test notification
This commit is contained in:
parent
52bb577885
commit
1146340184
26
lang/de.ts
26
lang/de.ts
@ -4,7 +4,7 @@
|
||||
<context>
|
||||
<name>Default Alert</name>
|
||||
<message>
|
||||
<location filename="../src/libsnore/application.cpp" line="34"/>
|
||||
<location filename="../src/libsnore/application_p.cpp" line="30"/>
|
||||
<source>Default</source>
|
||||
<translation>Standart</translation>
|
||||
</message>
|
||||
@ -183,24 +183,24 @@
|
||||
<context>
|
||||
<name>Snore::SnoreCore</name>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="242"/>
|
||||
<source>This is Snore</source>
|
||||
<translation>Dies ist Snore</translation>
|
||||
<location filename="../src/libsnore/snore.cpp" line="259"/>
|
||||
<source>This is </source>
|
||||
<translation>Dies ist </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="243"/>
|
||||
<source>Project Website</source>
|
||||
<translation>Projekt Webseite</translation>
|
||||
<location filename="../src/libsnore/snore.cpp" line="261"/>
|
||||
<source>Everything is awesome!</source>
|
||||
<translation>Alles ist super!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="247"/>
|
||||
<source>Hello World</source>
|
||||
<translation>Hallo Welt</translation>
|
||||
<location filename="../src/libsnore/snore.cpp" line="265"/>
|
||||
<source>Hello There!</source>
|
||||
<translation>Hallo da!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="248"/>
|
||||
<source>Test Action</source>
|
||||
<translation>Test Aktion</translation>
|
||||
<location filename="../src/libsnore/snore.cpp" line="266"/>
|
||||
<source>Awesome Action!</source>
|
||||
<translation>Grossartige Aktion!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
18
lang/en.ts
18
lang/en.ts
@ -4,7 +4,7 @@
|
||||
<context>
|
||||
<name>Default Alert</name>
|
||||
<message>
|
||||
<location filename="../src/libsnore/application.cpp" line="34"/>
|
||||
<location filename="../src/libsnore/application_p.cpp" line="30"/>
|
||||
<source>Default</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -183,23 +183,23 @@
|
||||
<context>
|
||||
<name>Snore::SnoreCore</name>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="242"/>
|
||||
<source>This is Snore</source>
|
||||
<location filename="../src/libsnore/snore.cpp" line="259"/>
|
||||
<source>This is </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="243"/>
|
||||
<source>Project Website</source>
|
||||
<location filename="../src/libsnore/snore.cpp" line="261"/>
|
||||
<source>Everything is awesome!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="247"/>
|
||||
<source>Hello World</source>
|
||||
<location filename="../src/libsnore/snore.cpp" line="265"/>
|
||||
<source>Hello There!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsnore/snore.cpp" line="248"/>
|
||||
<source>Test Action</source>
|
||||
<location filename="../src/libsnore/snore.cpp" line="266"/>
|
||||
<source>Awesome Action!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -256,12 +256,13 @@ Notification SnoreCore::getActiveNotificationByID(uint id) const
|
||||
void SnoreCore::displayExapleNotification()
|
||||
{
|
||||
Application app = SnoreCorePrivate::instance()->defaultApplication();
|
||||
QString text = QLatin1String("<i>") + tr("This is Snore") + QLatin1String("</i><br>") +
|
||||
QLatin1String("<a href=\"https://github.com/Snorenotify/Snorenotify\">") + tr("Project Website") + QLatin1String("</a><br>");
|
||||
QString text = QLatin1String("<i>") + tr("This is ") + app.name() + QLatin1String("</i><br>"
|
||||
"<b>") +
|
||||
tr("Everything is awesome!") + QLatin1String("</b><br>");
|
||||
if (!app.constHints().value("use-markup").toBool()) {
|
||||
text = Utils::normalizeMarkup(text, Utils::NO_MARKUP);
|
||||
}
|
||||
Notification noti(app, app.defaultAlert(), tr("Hello World"), text, app.icon());
|
||||
noti.addAction(Action(1, tr("Test Action")));
|
||||
Notification noti(app, app.defaultAlert(), tr("Hello There!"), text, app.icon());
|
||||
noti.addAction(Action(1, tr("Awesome Action!")));
|
||||
broadcastNotification(noti);
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotNotify(Snore::Notification notification) override;
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
void load() override;
|
||||
void load() override;
|
||||
};
|
||||
|
||||
#endif // OSXNOTIFICATIONCENTER_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user