Merge remote branch 'upstream/master' into prv/po
commit
22d9822437
|
@ -16,7 +16,6 @@ perl -MCPAN -e 'install Bundle::IkiWiki::Extras'
|
||||||
|
|
||||||
=head1 CONTENTS
|
=head1 CONTENTS
|
||||||
|
|
||||||
Digest::SHA1
|
|
||||||
Authen::Passphrase
|
Authen::Passphrase
|
||||||
Search::Xapian
|
Search::Xapian
|
||||||
RPC::XML
|
RPC::XML
|
||||||
|
|
|
@ -37,10 +37,10 @@ sub render_graph (\%) {
|
||||||
$src .= "}\n";
|
$src .= "}\n";
|
||||||
|
|
||||||
# Use the sha1 of the graphviz code as part of its filename.
|
# Use the sha1 of the graphviz code as part of its filename.
|
||||||
eval q{use Digest::SHA1};
|
eval q{use Digest::SHA};
|
||||||
error($@) if $@;
|
error($@) if $@;
|
||||||
my $dest=$params{page}."/graph-".
|
my $dest=$params{page}."/graph-".
|
||||||
IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($src)).
|
IkiWiki::possibly_foolish_untaint(Digest::SHA::sha1_hex($src)).
|
||||||
".png";
|
".png";
|
||||||
will_render($params{page}, $dest);
|
will_render($params{page}, $dest);
|
||||||
|
|
||||||
|
|
|
@ -190,15 +190,15 @@ sub pageterm ($) {
|
||||||
# 240 is the number used by omindex to decide when to hash an
|
# 240 is the number used by omindex to decide when to hash an
|
||||||
# overlong term. This does not use a compatible hash method though.
|
# overlong term. This does not use a compatible hash method though.
|
||||||
if (length $page > 240) {
|
if (length $page > 240) {
|
||||||
eval q{use Digest::SHA1};
|
eval q{use Digest::SHA};
|
||||||
if ($@) {
|
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;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Note no colon, therefore it's guaranteed to not overlap
|
# Note no colon, therefore it's guaranteed to not overlap
|
||||||
# with a page with the same name as the hash..
|
# 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 {
|
else {
|
||||||
return "U:".$page;
|
return "U:".$page;
|
||||||
|
|
|
@ -122,10 +122,10 @@ sub preprocess (@) {
|
||||||
|
|
||||||
# Use the sha1 of the php code that generates the sparkline as
|
# Use the sha1 of the php code that generates the sparkline as
|
||||||
# the base for its filename.
|
# the base for its filename.
|
||||||
eval q{use Digest::SHA1};
|
eval q{use Digest::SHA};
|
||||||
error($@) if $@;
|
error($@) if $@;
|
||||||
my $fn=$params{page}."/sparkline-".
|
my $fn=$params{page}."/sparkline-".
|
||||||
IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($php)).
|
IkiWiki::possibly_foolish_untaint(Digest::SHA::sha1_hex($php)).
|
||||||
".png";
|
".png";
|
||||||
will_render($params{page}, $fn);
|
will_render($params{page}, $fn);
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ ikiwiki (3.20100723) UNRELEASED; urgency=low
|
||||||
* meta: Allow syntax closer to html meta to be used.
|
* meta: Allow syntax closer to html meta to be used.
|
||||||
* Add new disable hook, allowing plugins to perform cleanup after they
|
* Add new disable hook, allowing plugins to perform cleanup after they
|
||||||
have been disabled.
|
have been disabled.
|
||||||
|
* Use Digest::SHA built into perl rather than external Digest::SHA1
|
||||||
|
to simplify dependencies. Closes: #591040
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Fri, 23 Jul 2010 14:00:32 -0400
|
-- Joey Hess <joeyh@debian.org> Fri, 23 Jul 2010 14:00:32 -0400
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl,
|
||||||
libxml-feed-perl, libmailtools-perl, perlmagick,
|
libxml-feed-perl, libmailtools-perl, perlmagick,
|
||||||
libfile-mimeinfo-perl, libcrypt-ssleay-perl,
|
libfile-mimeinfo-perl, libcrypt-ssleay-perl,
|
||||||
liblocale-gettext-perl (>= 1.05-1), libtext-typography-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,
|
libsparkline-php, texlive, dvipng, libtext-wikicreole-perl,
|
||||||
libsort-naturally-perl, libtext-textile-perl, libhighlight-perl,
|
libsort-naturally-perl, libtext-textile-perl, libhighlight-perl,
|
||||||
po4a (>= 0.35-1), gettext, libyaml-perl
|
po4a (>= 0.35-1), gettext, libyaml-perl
|
||||||
|
|
|
@ -8,3 +8,5 @@ I can reproduce this bug in a test site. --[[Joey]]
|
||||||
> I could reproduce this bug at some point during the merge of a buggy
|
> I could reproduce this bug at some point during the merge of a buggy
|
||||||
> version of my ordered slave languages patch, but I cannot anymore.
|
> version of my ordered slave languages patch, but I cannot anymore.
|
||||||
> Could you please try again? --[[intrigeri]]
|
> Could you please try again? --[[intrigeri]]
|
||||||
|
|
||||||
|
>> Cannot reproduce with 3.20100722, [[done]] I guess. --[[Joey]]
|
||||||
|
|
|
@ -22,4 +22,4 @@ Some example graphs:
|
||||||
[[!graph src="a -- b -- c -- a;" prog="circo" type="graph"]]
|
[[!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.
|
||||||
|
|
|
@ -247,8 +247,8 @@ TODO
|
||||||
[[!inline pages="todo/po:* and !todo/done and !link(todo/done) and !todo/*/*"
|
[[!inline pages="todo/po:* and !todo/done and !link(todo/done) and !todo/*/*"
|
||||||
feeds=no actions=no archive=yes show=0]]
|
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
|
If a page is not translated yet, the "translated" version of it
|
||||||
displays wikilinks to other, existing (but not yet translated?)
|
displays wikilinks to other, existing (but not yet translated?)
|
||||||
|
@ -302,3 +302,16 @@ underlay, and the underlays lack translation to a given language.
|
||||||
>>>> this could be solved by adding `SRCDIR/basewiki` as an underlay
|
>>>> this could be solved by adding `SRCDIR/basewiki` as an underlay
|
||||||
>>>> to your l10n wiki configuration, possibly using the
|
>>>> to your l10n wiki configuration, possibly using the
|
||||||
>>>> `add_underlays` configuration directive. --[[intrigeri]]
|
>>>> `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]]
|
||||||
|
|
||||||
|
>>>>>> 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]]
|
||||||
|
|
|
@ -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
|
>>> need improvements to the deletion UI to de-confuse that. It's fine to
|
||||||
>>> put that off until needed --[[Joey]]
|
>>> 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
|
* 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
|
should be treated properly by po4a using the markdown option - at least with my
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
This plugin adds full text search to ikiwiki, using the
|
This plugin adds full text search to ikiwiki, using the
|
||||||
[xapian](http://xapian.org/) engine, its
|
[xapian](http://xapian.org/) engine, its
|
||||||
[omega](http://xapian.org/docs/omega/overview.html) frontend, and the
|
[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.
|
perl modules.
|
||||||
|
|
||||||
The [[ikiwiki/searching]] page describes how to write search queries.
|
The [[ikiwiki/searching]] page describes how to write search queries.
|
||||||
|
|
|
@ -16,7 +16,7 @@ to use the plugin, you will need:
|
||||||
php can find it when `sparkline/Sparkline.php` is required.
|
php can find it when `sparkline/Sparkline.php` is required.
|
||||||
* The GD PHP module used by the Sparkline library.
|
* The GD PHP module used by the Sparkline library.
|
||||||
* A "php" program in the path, that can run standalone php programs.
|
* 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:
|
On a Debian system, this can be accomplished by installing these packages:
|
||||||
`libsparkline-php` `php5-gd` `php5-cli` `libdigest-sha1-perl`
|
`libsparkline-php` `php5-gd` `php5-cli` `libdigest-sha1-perl`
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
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]]
|
||||||
|
|
||||||
|
>>>> I eventually did, and got rid of the ugly double rebuild of pages
|
||||||
|
>>>> at build time. This involved adding a `rescan` hook. Rationale
|
||||||
|
>>>> and details are in my po branch commit messages. I believe this
|
||||||
|
>>>> new way of handling meta title escaping to be far more robust.
|
||||||
|
>>>> Moreover this new implementation is more generic, feels more
|
||||||
|
>>>> logical to me, and probably fixes other similar bugs outside the
|
||||||
|
>>>> meta plugin scope. Please have a look when you can.
|
||||||
|
>>>> --[[intrigeri]]
|
||||||
|
|
||||||
|
>>>>> Glad you have tackled this. Looking at
|
||||||
|
>>>>> 25447bccae0439ea56da7a788482a4807c7c459d,
|
||||||
|
>>>>> I wonder how this rescan hook is different from a scan hook
|
||||||
|
>>>>> with `last => 1` ? Ah, it comes *after* the preprocess hook
|
||||||
|
>>>>> 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]]
|
|
@ -1,2 +1,4 @@
|
||||||
ikiwiki now has a `disable` hook. Should the po plugin remove the po
|
ikiwiki now has a `disable` hook. Should the po plugin remove the po
|
||||||
files from the source repository when it has been disabled?
|
files from the source repository when it has been disabled?
|
||||||
|
|
||||||
|
> pot files, possibly, but the po files contain work, so no. --[[Joey]]
|
||||||
|
|
|
@ -31,7 +31,6 @@ Requires: perl(HTML::Scrubber)
|
||||||
Requires: perl(XML::Simple)
|
Requires: perl(XML::Simple)
|
||||||
Requires: perl(CGI::FormBuilder)
|
Requires: perl(CGI::FormBuilder)
|
||||||
Requires: perl(CGI::Session)
|
Requires: perl(CGI::Session)
|
||||||
Requires: perl(Digest::SHA1)
|
|
||||||
|
|
||||||
Requires: python-docutils
|
Requires: python-docutils
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue