]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/googlecalendar.pm
* Allow disabling of plugins included in goodstuff.
[ikiwiki.git] / IkiWiki / Plugin / googlecalendar.pm
index c99563d9591f856ed7e01661534733ea812b206e..7620384f52d9a2bf3c724418d4c401233993c0d0 100644 (file)
@@ -4,12 +4,11 @@ package IkiWiki::Plugin::googlecalendar;
 use warnings;
 use strict;
 use IkiWiki;
-use IPC::Open2;
 
 sub import { #{{{
-       IkiWiki::hook(type => "preprocess", id => "googlecalendar",
+       hook(type => "preprocess", id => "googlecalendar",
                call => \&preprocess);
-       IkiWiki::hook(type => "format", id => "googlecalendar",
+       hook(type => "format", id => "googlecalendar",
                call => \&format);
 } # }}}
 
@@ -20,7 +19,7 @@ sub preprocess (@) { #{{{
        # Avoid XSS attacks..
        my ($url)=$params{html}=~m#iframe\s+src="http://www\.google\.com/calendar/embed\?([^"<>]+)"#;
        if (! defined $url || ! length $url) {
-               return "[[googlecalendar failed to find url in html]]";
+               return "[[".gettext("googlecalendar failed to find url in html")."]]";
        }
        my ($height)=$params{html}=~m#height="(\d+)"#;
        my ($width)=$params{html}=~m#width="(\d+)"#;