[SMS App] Add i18n application domain for messaging app

## Summary

Add KLocalizedString::setApplicationDomain for kdeconnect-sms

Per the programmer guide, this must be done, otherwise translations will not happen.
https://api.kde.org/frameworks/ki18n/html/prg_guide.html

## Test Plan

### Before:
kdeconnect-sms would spew errors like `kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "%1" msgid_plural: "" msgctxt: ""`
(Translations still seem to work, though)

### After:
No more ki18n errors, translation works.
This commit is contained in:
Simon Redman 2023-01-23 04:42:59 +00:00
parent 5b716dde02
commit b76fe488b9

View file

@ -45,6 +45,7 @@ int main(int argc, char *argv[])
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv); QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("kdeconnect-sms");
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"))); app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
KAboutData aboutData(QStringLiteral("kdeconnect.sms"), KAboutData aboutData(QStringLiteral("kdeconnect.sms"),
i18n("KDE Connect SMS"), i18n("KDE Connect SMS"),