]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge commit 'upstream/master' into prv/po
authorintrigeri <intrigeri@boum.org>
Fri, 7 Nov 2008 21:19:24 +0000 (22:19 +0100)
committerintrigeri <intrigeri@boum.org>
Fri, 7 Nov 2008 21:19:24 +0000 (22:19 +0100)
13 files changed:
IkiWiki.pm
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/goodstuff.pm
IkiWiki/Plugin/txt.pm
debian/changelog
doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn [new file with mode: 0644]
doc/bugs/login_page_should_note_cookie_requirement.mdwn [new file with mode: 0644]
doc/bugs/messed_up_repository.mdwn [new file with mode: 0644]
doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
doc/plugins/contrib/po.mdwn
doc/plugins/goodstuff.mdwn
doc/plugins/meta.mdwn
po/ikiwiki.pot

index bab7b707aa6c485338fb3b863760e8019cd65e1c..91d2e6082a9291a24ffd17681bb8fc2b00470c2f 100644 (file)
@@ -120,7 +120,7 @@ sub getsetup () { #{{{
        },
        default_plugins => {
                type => "internal",
-               default => [qw{mdwn link inline htmlscrubber passwordauth
+               default => [qw{mdwn link inline meta htmlscrubber passwordauth
                                openid signinedit lockedit conditional
                                recentchanges parentlinks editpage}],
                description => "plugins to enable by default",
index 2e4c86f242ae0673899c6faa330896544218b705..c9c2880c5737a77bea1b4d268cb468a68b7cbc44 100644 (file)
@@ -520,10 +520,10 @@ sub aggregate (@) { #{{{
                }
 
                foreach my $entry ($f->entries) {
-                       my $content=$content=$entry->content->body;
+                       my $c=$entry->content;
                        # atom feeds may have no content, only a summary
-                       if (! defined $content && ref $entry->summary) {
-                               $content=$entry->summary->body;
+                       if (! defined $c && ref $entry->summary) {
+                               $c=$entry->summary;
                        }
 
                        add_page(
@@ -531,9 +531,10 @@ sub aggregate (@) { #{{{
                                copyright => $f->copyright,
                                title => defined $entry->title ? decode_entities($entry->title) : "untitled",
                                link => $entry->link,
-                               content => defined $content ? $content : "",
+                               content => defined $c ? $c->body : "",
                                guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
                                ctime => $entry->issued ? ($entry->issued->epoch || time) : time,
+                               base => (defined $c && $c->can("base")) ? $c->base : undef,
                        );
                }
        }
@@ -605,7 +606,8 @@ sub add_page (@) { #{{{
        my $template=template($feed->{template}, blind_cache => 1);
        $template->param(title => $params{title})
                if defined $params{title} && length($params{title});
-       $template->param(content => htmlescape(htmlabs($params{content}, $feed->{feedurl})));
+       $template->param(content => htmlescape(htmlabs($params{content},
+               defined $params{base} ? $params{base} : $feed->{feedurl})));
        $template->param(name => $feed->{name});
        $template->param(url => $feed->{url});
        $template->param(copyright => $params{copyright})
index ed1f4ddfc6cab5d88604be3fbe409ba3a573f642..a18e626d4c94b037d8a05c3c971ab9600f0f6e95 100644 (file)
@@ -10,7 +10,6 @@ my @bundle=qw{
        brokenlinks
        img
        map
-       meta
        more
        orphans
        pagecount
index e4c9e5d6a086ba59d0a826c0e7378e297454d734..e157bf07e1eff1b66c93f1ddc4b018846e42cfe8 100644 (file)
@@ -39,7 +39,7 @@ sub filter (@) {
        my $content = $params{content};
 
        if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) {
-               encode_entities($content);
+               encode_entities($content, "<>&");
                if ($findurl) {
                        my $finder = URI::Find->new(sub {
                                my ($uri, $orig_uri) = @_;
index d04e5ee25308bf6c920e4682eb69aab21ed95fc3..424c99ac48959c91dcef4e3130f872fb541fc0d2 100644 (file)
@@ -1,3 +1,15 @@
+ikiwiki (2.69) UNRELEASED; urgency=low
+
+  * aggregate: Try to query XML::Feed for the base url when derelevatising
+    links. Since this needs the just released XML::Feed 0.3, as well 
+    as a not yet released XML::RSS, it will fall back to the old method
+    if no xml:base info is available.
+  * meta: Plugin is now enabled by default since the basewiki uses it.
+  * txt: Do not encode quotes when filtering the txt, as that broke
+    later parsing of any directives on the page.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 06 Nov 2008 16:01:00 -0500
+
 ikiwiki (2.68) unstable; urgency=low
 
   * Add support for checking pushes from untrusted git committers. This can be
diff --git a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn
new file mode 100644 (file)
index 0000000..62931d8
--- /dev/null
@@ -0,0 +1,5 @@
+[[plugins/meta]] is not enabled by default, yet some pages in the default basewiki include [[the_meta_directive|ikiwiki/directive/meta]], notably the [[ikiwiki]] heirarchy.
+
+This means that the default output of "ikiwiki src dest", for two empty directories src and dest, result in the meta directive being displayed inline with the page text.
+
+> [[done]], meta now enabled by default.
diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn
new file mode 100644 (file)
index 0000000..e2d5a35
--- /dev/null
@@ -0,0 +1,17 @@
+At the moment, you go through the login shuffle and then are told that cookies are needed, so you lose all your data and login again.  It would be much slicker to note by the edit link, or at least on the login page, that cookies are required.
+
+> Hmm, it seems to me to be fairly obvious, since the vast majority of
+> websites that have a login require cookies. Such warnings used to be
+> common, but few sites bother with them anymore. --[[Joey]]
+
+Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie.
+
+> I considered doing this before, but it would require running the cgi once
+> to attempt to set the cookie and then redirecting to the cgi a second
+> time to check if it took, which is both complicated and probably would
+> look bad.
+
+Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted.
+
+> This is not very doable since most of the pages the user browses are
+> static pages in a static location.
diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn
new file mode 100644 (file)
index 0000000..e245b84
--- /dev/null
@@ -0,0 +1,21 @@
+I messed up my local clone of my repository.
+
+It appears that there is a special clone, which contains .ikiwiki, local.css, recentchanges, and the like.
+
+How can I create a new version of this clone?
+
+> No, there's the srcdir, which ikiwiki populates with some of those files
+> when run. Notably the .ikiwiki directory and all its contents, and the
+> recentchanges directory and its contents. But not local.css.
+> 
+> If you've lost .ikiwiki and it contained user registration info
+> (passwords etc), you've lost that info. Everything else can be 
+> regenerated by running `ikiwiki -setup your.setup`
+> 
+> If you still have .ikiwiki, but the git clone is messed up somehow, you
+> can just make a new clone and move .ikiwiki into it before running
+> ikiwiki. --[[Joey]]
+
+> > Great, that worked. Thanks Joey!
+
+[[!tag done]]
index d2d5a46edac994b3757f8734823ae18f941de789..22224483ed501a6976b91f7bb0eeb54b9c543c60 100644 (file)
@@ -15,3 +15,5 @@ Here is the header:
     [[GNU_Free_Documentation_License|/fdl]]."]]"""]]
 
 --[[tschwinge]]
+
+> [[done]], made it less zealous about encoding html entities. --[[Joey]]
index af215a493c20030b7a26d746d7d4f4a50d070068..cc19c53b37c385193b6350dc0c243fa61ab85098 100644 (file)
@@ -3,9 +3,11 @@ translated with gettext, using [po4a](http://po4a.alioth.debian.org/).
 
 More information:
 
-* It can be found in [my "po" branch](http://repo.or.cz/w/ikiwiki/intrigeri.git?a=shortlog;h=refs/heads/po): `git clone git://repo.or.cz/ikiwiki/intrigeri.git`
-* It involves adding three hooks to ikiwiki core.
-* It is documented (including TODO and plans for next work steps) in `doc/plugins/po.mdwn`, which can be found in the same branch.
+* It can be found in my "po" branch:
+  `git clone git://gaffer.ptitcanardnoir.org/ikiwiki.git`
+* It is self-contained, *i.e.* it does not modify ikiwiki core at all.
+* It is documented (including TODO and plans for next work steps) in
+  `doc/plugins/po.mdwn`, which can be found in the same branch.
 * No public demo site is available so far, I'm working on this.
 
 My plan is to get this plugin clean enough to be included in ikiwiki.
@@ -73,10 +75,49 @@ Any thoughts on this?
 >> and could only then translate it, right? I wonder if this will be clear
 >> though to the user.
 >>
+>>> Right: a broken link points to the URL that allows to create
+>>> a page that can either be a new master page or a non-translatable
+>>> page, depending on `po_translatable_pages` value. The best
+>>> solution I can thing of is to use [[plugins/edittemplate]] to
+>>> insert something like "Warning: this is a master page, that must
+>>> be written in $MASTER_LANGUAGE" into newly created master pages,
+>>> and maybe another warning message on newly created
+>>> non-translatable pages. It seems quite doable to me, but in order
+>>> to avoid breaking existing functionality, it implies to hack a bit
+>>> [[plugins/edittemplate]] so that multiple templates can be
+>>> inserted at page creation time. [[--intrigeri]]
+>>
 >> And also, is there any way to start a translation of a page into a new
 >> lanauge using the web interface?
->> 
+>>
+>>> When a new language is added to `po_slave_languages`, a rebuild is
+>>> triggered, and all missing PO files are created and checked into
+>>> VCS. An unpriviledged wiki user can not add a new language to
+>>> `po_slave_languages`, though. One could thing of adding the needed
+>>> interface to translate a page into a yet-unsupported slave
+>>> language, and this would automagically add this new language to
+>>> `po_slave_languages`. It would probably be useful in some
+>>> usecases, but I'm not comfortable with letting unpriviledged wiki
+>>> users change the wiki configuration as a side effect of their
+>>> actions; if this were to be implemented, special care would be
+>>> needed. [[--intrigeri]]
+>>>
+>>>> Actually I meant into any of the currently supported languages.
+>>>> I guess that if the template modification is made, it will list those
+>>>> languages on the page, and if a translation to a language is missing,
+>>>> the link will allow creating it?
+
 >> FWIW, I'm tracking your po branch in ikiwiki master git in the po
 >> branch. One thing I'd like to try in there is setting up a translated
 >> basewiki, which seems like it should be pretty easy to do, and would be
 >> a great demo! --[[Joey]]
+>>
+>>> I've merged your changes into my own branch, and made great
+>>> progress on the various todo items. Please note my repository
+>>> location has changed a few days ago, my user page was updated
+>>> accordingly, but I forgot to update this page at the same time.
+>>> Hoping it's not too complicated to relocated an existing remote...
+>>> (never done that, I'm a Git beginner as well as a Perl
+>>> newbie) --[[intrigeri]]a
+>>>>
+>>>> Just a matter of editing .git/config, thanks for the heads up.
index 83b60f4fa554f28cba4db953bb5db004c1a343cf..ed57c0f01336622eb9d53ebb339598dfca78080b 100644 (file)
@@ -12,7 +12,6 @@ Currently included:
 * [[brokenlinks]]
 * [[img]]
 * [[map]]
-* [[meta]]
 * [[more]]
 * [[orphans]]
 * [[pagecount]]
index afd55499303f42dd4284c457623bb543fd09003c..e49bdcc501bb0f3bfa91f6d18b79b0a0a2fb925b 100644 (file)
@@ -1,4 +1,4 @@
-[[!template id=plugin name=meta author="[[Joey]]"]]
+[[!template id=plugin name=meta core=1 author="[[Joey]]"]]
 [[!tag type/meta]]
 
 This plugin provides the [[ikiwiki/directive/meta]] [[ikiwiki/directive]],
index 5db0c51af0d487c5a55e53b752b2040d227ec2d4..6894dd2f6a326f5de0b49c21c2fcc50897882207 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-11-03 16:31-0500\n"
+"POT-Creation-Date: 2008-11-06 20:47-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -120,7 +120,7 @@ msgstr ""
 msgid "feed crashed XML::Feed!"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:590
+#: ../IkiWiki/Plugin/aggregate.pm:591
 #, perl-format
 msgid "creating new page %s"
 msgstr ""