Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit cd2c3d86 authored by Volker Krause's avatar Volker Krause

Improve train trip event description

parent 070a471a
......@@ -311,9 +311,18 @@ KCalCore::Event::Ptr SemanticUrlHandler::eventForTrainReservation(const QVariant
event->setDtStart(JsonLdDocument::readProperty(trip, "departureTime").toDateTime());
event->setDtEnd(JsonLdDocument::readProperty(trip, "arrivalTime").toDateTime());
event->setAllDay(false);
event->setDescription(i18n("Booking reference: %1",
JsonLdDocument::readProperty(reservation, "reservationNumber").toString()
));
QStringList desc;
auto s = JsonLdDocument::readProperty(trip, "departurePlatform").toString();
if (!s.isEmpty())
desc.push_back(i18n("Departure platform: %1", s));
s = JsonLdDocument::readProperty(trip, "arrivalPlatform").toString();
if (!s.isEmpty())
desc.push_back(i18n("Arrival platform: %1", s));
s = JsonLdDocument::readProperty(reservation, "reservationNumber").toString();
if (!s.isEmpty())
desc.push_back(i18n("Booking reference: %1", s));
event->setDescription(desc.join(QLatin1Char('\n')));
return event;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment