D14841: Add booking.com unstrucured data extractor (french)

Laurent Montel noreply at phabricator.kde.org
Tue Aug 14 16:52:45 BST 2018


mlaurent added inline comments.

INLINE COMMENTS

> booking.js:43
> +        var hotel = text.match(regExMap[locale]['hotelInformation']);
> +        console.log(hotel);
> +        if (!hotel)

You can remove it.

> booking.js:45
> +        if (!hotel)
> +            return null;
> +

you return even if it can be another locale ?

> booking.js:61
> +        if (!arrivalDate)
> +            return null;
> +        res.checkinTime = JsonLd.toDateTime(arrivalDate[1] + " " + arrivalDate[2], "dddd d MMMM yyyy hh:mm", locale);

same here

> booking.js:78
> +        if (!name)
> +            return null;
> +        res.underName.name = name[1];

same

REPOSITORY
  R1003 KItinerary: Travel Reservation handling library

REVISION DETAIL
  https://phabricator.kde.org/D14841

To: bport, vkrause, mlaurent
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180814/909dbff9/attachment.html>


More information about the kde-pim mailing list