From 543bc7af8be315e44ccca575b788e566bc122db2 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 30 Jul 2010 16:19:50 +0200 Subject: eventually got rid of the double rebuild issue. please have a look. --- doc/plugins/po/discussion.mdwn | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po/discussion.mdwn b/doc/plugins/po/discussion.mdwn index 73858c818..50998e822 100644 --- a/doc/plugins/po/discussion.mdwn +++ b/doc/plugins/po/discussion.mdwn @@ -644,28 +644,6 @@ daring a timid "please pull"... or rather, please review again :) >>> need improvements to the deletion UI to de-confuse that. It's fine to >>> put that off until needed --[[Joey]] >> -> * Re the meta title escaping issue worked around by `change`. -> I suppose this does not only affect meta, but other things -> at scan time too. Also, handling it only on rebuild feels -> suspicious -- a refresh could involve changes to multiple -> pages and trigger the same problem, I think. Also, exposing -> this rebuild to the user seems really ugly, not confidence inducing. -> -> So I wonder if there's a better way. Such as making po, at scan time, -> re-run the scan hooks, passing them modified content (either converted -> from po to mdwn or with the escaped stuff cheaply de-escaped). (Of -> course the scan hook would need to avoid calling itself!) -> -> (This doesn't need to block the merge, but I hope it can be addressed -> eventually..) -> -> --[[Joey]] ->> ->> I'll think about it soon. ->> ->> --[[intrigeri]] ->> ->>> Did you get a chance to? --[[Joey]] * As discussed at [[todo/l10n]] the templates needs to be translatable too. They should be treated properly by po4a using the markdown option - at least with my -- cgit v1.2.3 From fee00fdb7a4ebb52e90f739cca33def70497620e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 Jul 2010 15:54:25 -0400 Subject: Use Digest::SHA built into perl rather than external Digest::SHA1 to simplify dependencies. Closes: #591040 --- Bundle/IkiWiki/Extras.pm | 1 - IkiWiki/Plugin/graphviz.pm | 4 ++-- IkiWiki/Plugin/search.pm | 6 +++--- IkiWiki/Plugin/sparkline.pm | 4 ++-- debian/changelog | 2 ++ debian/control | 2 +- doc/plugins/graphviz.mdwn | 2 +- doc/plugins/search.mdwn | 2 +- doc/plugins/sparkline.mdwn | 2 +- ikiwiki.spec | 1 - 10 files changed, 13 insertions(+), 13 deletions(-) (limited to 'doc/plugins') diff --git a/Bundle/IkiWiki/Extras.pm b/Bundle/IkiWiki/Extras.pm index 5bbd7b8c6..64e907306 100644 --- a/Bundle/IkiWiki/Extras.pm +++ b/Bundle/IkiWiki/Extras.pm @@ -16,7 +16,6 @@ perl -MCPAN -e 'install Bundle::IkiWiki::Extras' =head1 CONTENTS -Digest::SHA1 Authen::Passphrase Search::Xapian RPC::XML diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm index dfd66a03e..4ed8b89f1 100644 --- a/IkiWiki/Plugin/graphviz.pm +++ b/IkiWiki/Plugin/graphviz.pm @@ -37,10 +37,10 @@ sub render_graph (\%) { $src .= "}\n"; # Use the sha1 of the graphviz code as part of its filename. - eval q{use Digest::SHA1}; + eval q{use Digest::SHA}; error($@) if $@; my $dest=$params{page}."/graph-". - IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($src)). + IkiWiki::possibly_foolish_untaint(Digest::SHA::sha1_hex($src)). ".png"; will_render($params{page}, $dest); diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 1cf762fce..8fb9dff0c 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -190,15 +190,15 @@ sub pageterm ($) { # 240 is the number used by omindex to decide when to hash an # overlong term. This does not use a compatible hash method though. if (length $page > 240) { - eval q{use Digest::SHA1}; + eval q{use Digest::SHA}; if ($@) { - debug("search: ".sprintf(gettext("need Digest::SHA1 to index %s"), $page)) if $@; + debug("search: ".sprintf(gettext("need Digest::SHA to index %s"), $page)) if $@; return undef; } # Note no colon, therefore it's guaranteed to not overlap # with a page with the same name as the hash.. - return "U".lc(Digest::SHA1::sha1_hex($page)); + return "U".lc(Digest::SHA::sha1_hex($page)); } else { return "U:".$page; diff --git a/IkiWiki/Plugin/sparkline.pm b/IkiWiki/Plugin/sparkline.pm index 1b1d04cba..e28d2605a 100644 --- a/IkiWiki/Plugin/sparkline.pm +++ b/IkiWiki/Plugin/sparkline.pm @@ -122,10 +122,10 @@ sub preprocess (@) { # Use the sha1 of the php code that generates the sparkline as # the base for its filename. - eval q{use Digest::SHA1}; + eval q{use Digest::SHA}; error($@) if $@; my $fn=$params{page}."/sparkline-". - IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($php)). + IkiWiki::possibly_foolish_untaint(Digest::SHA::sha1_hex($php)). ".png"; will_render($params{page}, $fn); diff --git a/debian/changelog b/debian/changelog index 5645b34d4..25123cecc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ ikiwiki (3.20100723) UNRELEASED; urgency=low * meta: Allow syntax closer to html meta to be used. * Add new disable hook, allowing plugins to perform cleanup after they have been disabled. + * Use Digest::SHA built into perl rather than external Digest::SHA1 + to simplify dependencies. Closes: #591040 -- Joey Hess Fri, 23 Jul 2010 14:00:32 -0400 diff --git a/debian/control b/debian/control index 0562a4a99..049a685b0 100644 --- a/debian/control +++ b/debian/control @@ -34,7 +34,7 @@ Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libcrypt-ssleay-perl, liblocale-gettext-perl (>= 1.05-1), libtext-typography-perl, - libtext-csv-perl, libdigest-sha1-perl, graphviz, libnet-amazon-s3-perl, + libtext-csv-perl, graphviz, libnet-amazon-s3-perl, libsparkline-php, texlive, dvipng, libtext-wikicreole-perl, libsort-naturally-perl, libtext-textile-perl, libhighlight-perl, po4a (>= 0.35-1), gettext, libyaml-perl diff --git a/doc/plugins/graphviz.mdwn b/doc/plugins/graphviz.mdwn index 65130ae8c..d57d7dc94 100644 --- a/doc/plugins/graphviz.mdwn +++ b/doc/plugins/graphviz.mdwn @@ -22,4 +22,4 @@ Some example graphs: [[!graph src="a -- b -- c -- a;" prog="circo" type="graph"]] """]] -This plugin uses the [[!cpan Digest::SHA1]] perl module. +This plugin uses the [[!cpan Digest::SHA]] perl module. diff --git a/doc/plugins/search.mdwn b/doc/plugins/search.mdwn index 92cc5945a..e95739cf3 100644 --- a/doc/plugins/search.mdwn +++ b/doc/plugins/search.mdwn @@ -4,7 +4,7 @@ This plugin adds full text search to ikiwiki, using the [xapian](http://xapian.org/) engine, its [omega](http://xapian.org/docs/omega/overview.html) frontend, and the -[[!cpan Search::Xapian]], [[!cpan Digest::SHA1]], and [[!cpan HTML::Scrubber]] +[[!cpan Search::Xapian]], [[!cpan Digest::SHA]], and [[!cpan HTML::Scrubber]] perl modules. The [[ikiwiki/searching]] page describes how to write search queries. diff --git a/doc/plugins/sparkline.mdwn b/doc/plugins/sparkline.mdwn index ee3928d7e..83e24a27d 100644 --- a/doc/plugins/sparkline.mdwn +++ b/doc/plugins/sparkline.mdwn @@ -16,7 +16,7 @@ to use the plugin, you will need: php can find it when `sparkline/Sparkline.php` is required. * The GD PHP module used by the Sparkline library. * A "php" program in the path, that can run standalone php programs. -* [[!cpan Digest::SHA1]] +* [[!cpan Digest::SHA]] On a Debian system, this can be accomplished by installing these packages: `libsparkline-php` `php5-gd` `php5-cli` `libdigest-sha1-perl` diff --git a/ikiwiki.spec b/ikiwiki.spec index 43065b7f5..ca5794704 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -31,7 +31,6 @@ Requires: perl(HTML::Scrubber) Requires: perl(XML::Simple) Requires: perl(CGI::FormBuilder) Requires: perl(CGI::Session) -Requires: perl(Digest::SHA1) Requires: python-docutils -- cgit v1.2.3 From 2ab89b4462557e59e5ccaccf419e5bb3809a643a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Aug 2010 12:25:35 -0400 Subject: response --- doc/plugins/po.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index ac2df2d18..154c4cbde 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -302,3 +302,7 @@ underlay, and the underlays lack translation to a given language. >>>> this could be solved by adding `SRCDIR/basewiki` as an underlay >>>> to your l10n wiki configuration, possibly using the >>>> `add_underlays` configuration directive. --[[intrigeri]] + +>>>>> There is no complete Swedish underlay translation yet, so it is not +>>>>> shipped in ikiwiki. I don't think it's a misconfiguration to use +>>>>> a language that doesn't have translated underlays. --[[Joey]] -- cgit v1.2.3 From e083e4caa8175c4ccc45dd06e9b9cd784dcbbc94 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 2 Aug 2010 03:23:30 +0200 Subject: ackĀ² MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/plugins/po.mdwn | 13 +++++++++++-- doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 154c4cbde..0f1d66d32 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -247,8 +247,8 @@ TODO [[!inline pages="todo/po:* and !todo/done and !link(todo/done) and !todo/*/*" feeds=no actions=no archive=yes show=0]] -l10n wiki misconfiguration --------------------------- +broken links to translatable basewiki pages that lack po files +-------------------------------------------------------------- If a page is not translated yet, the "translated" version of it displays wikilinks to other, existing (but not yet translated?) @@ -306,3 +306,12 @@ underlay, and the underlays lack translation to a given language. >>>>> There is no complete Swedish underlay translation yet, so it is not >>>>> shipped in ikiwiki. I don't think it's a misconfiguration to use >>>>> a language that doesn't have translated underlays. --[[Joey]] + +>>>>>> Ok. The problem is triggered when using a language that doesn't +>>>>>> have translated underlays, *and* defining +>>>>>> `po_translatable_pages` in a way that renders the base wiki +>>>>>> pages translatable in po's view of things, which in turns makes +>>>>>> the po plugin act as if the translation pages did exist, +>>>>>> although they do not in this case. I still need to have a deep +>>>>>> look at the underlays-related code you added to `po.pm` a while +>>>>>> ago. Stay tuned. --[[intrigeri]] diff --git a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn index 86b0ccd72..d4e1f743c 100644 --- a/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn +++ b/doc/todo/po:_avoid_rebuilding_to_fix_meta_titles.mdwn @@ -38,3 +38,6 @@ Re the meta title escaping issue worked around by `change`. >>>>> in scan mode. Hmm, I wonder if there's any reason to have >>>>> the scan hook called before those as it does now. Reordering >>>>> those 2 lines could avoid adding a new hook. --[[Joey]] + +>>>>>> Sure. I was fearing to break other plugins if I did so, so I +>>>>>> did not dare to. I'll try this. --[[intrigeri]] -- cgit v1.2.3