From 8ba32abaf27110d86a52720bcb738402bf90fadb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 17:55:01 -0400 Subject: review: question --- doc/plugins/contrib/cvs/discussion | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/plugins/contrib/cvs/discussion (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion b/doc/plugins/contrib/cvs/discussion new file mode 100644 index 000000000..e2411af63 --- /dev/null +++ b/doc/plugins/contrib/cvs/discussion @@ -0,0 +1,5 @@ +I've started reviewing this, and the main thing I don't like is the +post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. +That just seems unnecessarily complicated. Why can't ikiwiki itself detect +the "cvs add " call and avoid doing anything in that case? +--[[Joey]] -- cgit v1.2.3 From 3401dc6110ac785c1df3f447d2f1de017be92538 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 18:12:28 -0400 Subject: fix name --- doc/plugins/contrib/cvs/discussion | 5 ----- doc/plugins/contrib/cvs/discussion.mdwn | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 doc/plugins/contrib/cvs/discussion create mode 100644 doc/plugins/contrib/cvs/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion b/doc/plugins/contrib/cvs/discussion deleted file mode 100644 index e2411af63..000000000 --- a/doc/plugins/contrib/cvs/discussion +++ /dev/null @@ -1,5 +0,0 @@ -I've started reviewing this, and the main thing I don't like is the -post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. -That just seems unnecessarily complicated. Why can't ikiwiki itself detect -the "cvs add " call and avoid doing anything in that case? ---[[Joey]] diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn new file mode 100644 index 000000000..e2411af63 --- /dev/null +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -0,0 +1,5 @@ +I've started reviewing this, and the main thing I don't like is the +post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. +That just seems unnecessarily complicated. Why can't ikiwiki itself detect +the "cvs add " call and avoid doing anything in that case? +--[[Joey]] -- cgit v1.2.3 From d13c07dec1a5516b7fa595004e16021f2a182bb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 15:20:46 -0400 Subject: noticed a problem --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2fbf67016..4e1bf20bb 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -277,6 +277,15 @@ That used to be so, but the bug was fixed. Does this mean that po might be replacing the only link on a page, in error? --[[Joey]] +Name of toplevel index page +--------------------------- + +Normally at the top index page of a wiki, you see the wiki name at +the top. However, at the top *translated* index page, you see something +like "index.da". + + + Documentation ------------- -- cgit v1.2.3 From 1b63a0e4fae5396014ed222647ae9c3c88a35de5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 16:15:36 -0400 Subject: another problem --- doc/plugins/po.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 4e1bf20bb..5016f1037 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -282,9 +282,17 @@ Name of toplevel index page Normally at the top index page of a wiki, you see the wiki name at the top. However, at the top *translated* index page, you see something -like "index.da". +like "index.da". --[[Joey]] +Pagespecs +--------- +I was suprised that, when using the map directive, a pagespec of "*" +listed all the translated pages as well as regular pages. That can +make a big difference to an existing wiki when po is turned on, +and seems generally not wanted. +(OTOH, you do want to match translated pages by +default when locking pages.) --[[Joey]] Documentation ------------- -- cgit v1.2.3 From 43e895ec78a00a53aca31a5b38c18e8ef4ab6842 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 17:29:05 -0400 Subject: another problem --- doc/plugins/po.mdwn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 5016f1037..f738d61de 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -248,7 +248,7 @@ ea753782b222bf4ba2fb4683b6363afdd9055b64, which should be reverted once [[intrigeri]]'s `meta` branch is merged. An integration branch, called `meta-po`, merges [[intrigeri]]'s `po` -and `meta` branches, and thus has thise additional features. +and `meta` branches, and thus has this additional features. Self links ---------- @@ -294,6 +294,18 @@ and seems generally not wanted. (OTOH, you do want to match translated pages by default when locking pages.) --[[Joey]] +Edit links on untranslated pages +-------------------------------- + +If a page is not translated yet, the "translated" version of it +displays wikilinks to other, existing (but not yet translated?) +pages as edit links, as if those pages do not exist. + +That's really confusing, especially as clicking such a link +brings up an edit form to create a new, english page. + +This is with po_link_to=current. With default, it doesn't happen.. + Documentation ------------- -- cgit v1.2.3 From 7d901b9a5412e94ab127fcc447536e391eba0399 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 19:16:22 -0400 Subject: another problem.. --- doc/plugins/po.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f738d61de..f6409aae5 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -306,6 +306,20 @@ brings up an edit form to create a new, english page. This is with po_link_to=current. With default, it doesn't happen.. +Double commits of po files +-------------------------- + +When adding a new english page, the po files are created, committed, +and then committed again. The second commit makes this change: + + -"Content-Type: text/plain; charset=utf-8\n" + -"Content-Transfer-Encoding: ENCODING" + +"Content-Type: text/plain; charset=UTF-8\n" + +"Content-Transfer-Encoding: ENCODING\n" + +Same thing happens when a change to an existing page triggers a po file +update. + Documentation ------------- -- cgit v1.2.3 From 7ea1f9692687310fb434a7cc6e6f84b57b9f4ef8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 19:39:51 -0400 Subject: apache config details --- doc/plugins/po.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f6409aae5..30f2e158e 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -114,7 +114,8 @@ Apache Using Apache `mod_negotiation` makes it really easy to have Apache serve any page in the client's preferred language, if available. -This is the default Debian Apache configuration. + +Add 'Options MultiViews' to the wiki directory's configuration in Apache. When `usedirs` is enabled, one has to set `DirectoryIndex index` for the wiki context. @@ -123,6 +124,8 @@ Setting `DefaultLanguage LL` (replace `LL` with your default MIME language code) for the wiki context can help to ensure `bla/page/index.en.html` is served as `Content-Language: LL`. +For details, see [Apache's documentation](http://httpd.apache.org/docs/2.2/content-negotiation.html). + lighttpd -------- -- cgit v1.2.3 From 0e4f67842a449d4f25b79836078a352007ea27b9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 21:00:27 -0400 Subject: update --- doc/plugins/po.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 30f2e158e..684593bf3 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -307,7 +307,7 @@ pages as edit links, as if those pages do not exist. That's really confusing, especially as clicking such a link brings up an edit form to create a new, english page. -This is with po_link_to=current. With default, it doesn't happen.. +This is with po_link_to=current or negotiated. With default, it doesn't happen.. Double commits of po files -------------------------- -- cgit v1.2.3 From 4ff3e2a540d154d49dfc70fb89dcc8422f2047e3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 22:18:05 -0400 Subject: po: Better fix for missing underlay translation problem. If a page is taken from the underlay, and one of the specified languages does not have po files in the underlay, it would create a broken link to the translated version of the page for that language. With this change, there's no broken link. --- IkiWiki/Plugin/po.pm | 4 ++-- doc/plugins/po.mdwn | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index ce32aab05..aa3d72b90 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -891,7 +891,7 @@ sub percenttranslated ($) { my $page=shift; $page=~s/^\///; - return gettext("0") unless istranslation($page); + return gettext("N/A") unless istranslation($page); my $file=srcfile($pagesources{$page}); my $masterfile = srcfile($pagesources{masterpage($page)}); my %options = ( @@ -934,7 +934,7 @@ sub otherlanguagesloop ($) { master => 1, }; } - else { + elsif (istranslation($otherpage)) { push @ret, { url => urlto_with_orig_beautiful_urlpath($otherpage, $page), code => $lang, diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 684593bf3..3766ad295 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -307,7 +307,8 @@ pages as edit links, as if those pages do not exist. That's really confusing, especially as clicking such a link brings up an edit form to create a new, english page. -This is with po_link_to=current or negotiated. With default, it doesn't happen.. +This is with po_link_to=current or negotiated. With default, it doesn't +happen.. --[[Joey]] Double commits of po files -------------------------- @@ -321,7 +322,7 @@ and then committed again. The second commit makes this change: +"Content-Transfer-Encoding: ENCODING\n" Same thing happens when a change to an existing page triggers a po file -update. +update. --[[Joey]] Documentation ------------- -- cgit v1.2.3 From 216f5b5b203ca3ea9ddb3f6d8c2e03dae35aeb7e Mon Sep 17 00:00:00 2001 From: PaulePanter Date: Sun, 16 Aug 2009 08:34:57 -0400 Subject: Add sentence to clarify how to get feeds for the RecentChanges page. --- doc/plugins/recentchanges.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/recentchanges.mdwn b/doc/plugins/recentchanges.mdwn index 4ab2cd078..9375296a4 100644 --- a/doc/plugins/recentchanges.mdwn +++ b/doc/plugins/recentchanges.mdwn @@ -24,3 +24,6 @@ Here's an example of how to show only changes that Joey didn't make. \[[!inline pages="internal(recentchanges/change_*) and !author(joey) and !author(http://joey.kitenet.net*)" template=recentchanges show=0]] + +If you want to generate feeds for the RecentChanges page, you have to use +[[`rss`_or_`atom`_in_the_setup_file|/todo/minor adjustment to setup documentation for recentchanges feeds]]. -- cgit v1.2.3 From b5576b556027e8f9b9ad52e02b383b8644adfb33 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 16 Aug 2009 11:58:28 -0400 Subject: Life is simpler on a git branch. --- doc/plugins/contrib/cvs.mdwn | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index f466b9399..23e00201f 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -1,14 +1,11 @@ [[!template id=plugin name=cvs core=0 author="[[schmonz]]"]] +[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] + This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. -### Installation and usage -7. Apply patches to [`IkiWiki.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-IkiWiki.pm.diff) -and [`ikiwiki-makerepo`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-ikiwiki-makerepo.diff). -7. Rebuild and install ikiwiki. +### Usage 7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan IPC::Cmd]], [[!cpan String::ShellQuote]], and [cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. -7. Download [`cvs.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs.pm) into a suitable `$libdir/IkiWiki/Plugin`. -7. While setting up a wiki [[by hand|setup/byhand]], also specify `--libdir` until you get to the point where you have a setup file. (This ensures the CVS plugin is found and its settings stanza included.) 7. Adjust CVS-related parameters in your setup file. Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn't need it, but you yourself might. Here's a good general-purpose one: @@ -20,7 +17,7 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn rdiff -u ### Implementation details -* Diffs are against [[3.14159|news/version_3.14159]]. `cvs.pm` started life as a copy of `svn.pm`. +* `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. * `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. * [[ikiwiki-makerepo]]: * creates a repository, @@ -30,7 +27,7 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). ### To do -* Add automated tests. ([Blindly adding svn-like tests to `t/file_pruned.t`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-t-file_pruned.t.diff) doesn't do the trick.) +* Add automated tests. (Blindly adding svn-like tests to `t/file_pruned.t` doesn't do the trick.) * If the argument to `cvs add` smells like a binary file, `cvs add -kb` it (for [[plugins/attachment]] support). * Don't slurp the entire `cvsps` output into memory (!). * Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. -- cgit v1.2.3 From db041b8854d2d3f7137367e11e960ac4f6cdb6c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 16 Aug 2009 13:53:44 -0400 Subject: minor problem --- doc/plugins/po.mdwn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 3766ad295..3f91775f1 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -308,7 +308,19 @@ That's really confusing, especially as clicking such a link brings up an edit form to create a new, english page. This is with po_link_to=current or negotiated. With default, it doesn't -happen.. --[[Joey]] +happen.. + +Also, this may only happen if the page being linked to is coming from an +underlay, and the underlays lack translation to a given language. +--[[Joey]] + +recentchanges links to po files +------------------------------- + +When a po file is changed, the recentchanges page shows a link such as +"sandbox.es". But, clicking on it goes to the English (or negotiated +language) version of the page. It would be better in this one case if +the link went direct to the translated version of the page. --[[Joey]] Double commits of po files -------------------------- -- cgit v1.2.3 From f712ffa66df2edc119d34a09a76b0c4d82563543 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Aug 2009 14:12:37 -0400 Subject: another issue --- doc/plugins/po.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 3f91775f1..dca2f5d66 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -336,6 +336,11 @@ and then committed again. The second commit makes this change: Same thing happens when a change to an existing page triggers a po file update. --[[Joey]] +Ugly messages with empty files +------------------------------ + +If there are empty .mdwn files, the po plugin displays some ugly messages. + Documentation ------------- -- cgit v1.2.3 From 24d43bea075354ecd8546131529a064140b9039c Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 20 Aug 2009 16:10:56 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index e2411af63..847d0f92a 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -3,3 +3,33 @@ post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. That just seems unnecessarily complicated. Why can't ikiwiki itself detect the "cvs add " call and avoid doing anything in that case? --[[Joey]] + +> The wrapper wrapper does three things: +> +> 7. It ignores `cvs add `, since this is a weird CVS +> behavior that ikiwiki gets confused by and doesn't need to act on. +> 7. It prevents `cvs` locking against itself: `cvs commit` takes a +> write lock and runs the post-commit hook, which runs `cvs update`, +> which wants a read lock and sleeps forever -- unless the post-commit +> hook runs in the background so the commit can "finish". +> 7. It fails silently if the ikiwiki post-commit hook is missing. +> CVS doesn't have any magic post-commit filenames, so hooks have to +> be configured explicitly. I don't think a commit will actually fail +> if a configured post-commit hook is missing (though I can't test +> this at the moment). +> +> Thing 1 can probably be handled within ikiwiki, if that seems less +> gross to you. +> +> Thing 2 I'm less sure of. (I'd like to see the web UI return +> immediately on save anyway, to a temporary "rebuilding, please wait +> if you feel like knowing when it's done" page, but this problem +> with CVS happens with any kind of commit, and could conceivably +> happen with some other VCS.) +> +> Thing 3 I think I did in order to squelch the error messages that +> were bollixing up the CGI. It was easy to do this in the wrapper +> wrapper, but if that's going away, it can be done just as easily +> with output redirection in `CVSROOT/loginfo`. +> +> --[[schmonz]] -- cgit v1.2.3 From 73e562edc865c6357cc1b4c8436e0a44957800e8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 21 Aug 2009 16:09:26 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 847d0f92a..ed6cf506e 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -20,16 +20,34 @@ the "cvs add " call and avoid doing anything in that case? > > Thing 1 can probably be handled within ikiwiki, if that seems less > gross to you. -> + +>> It seems like it might be. You can use a `getopt` hook to check +>> `@ARGV` to see how it was called. --[[Joey]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem > with CVS happens with any kind of commit, and could conceivably > happen with some other VCS.) -> + +>> None of the other VCSes let a write lock block a read lock, apparently. +>> +>> Anyway, re the backgrounding, when committing via the web, the +>> post-commit hook doesn't run anyway; the rendering is done via the +>> ikiwiki CGI. It would certianly be nice if it popped up a quick "working" +>> page and replaced it with the updated page when done, but that's +>> unrelated; the post-commit +>> hook only does rendering when committing using the VCS directly. The +>> backgrounding you do actually seems safe enough -- but tacking +>> on a " &" to the ikiwiki wrapper call doesn't need a wrapper script, +>> does it? --[[Joey]] + > Thing 3 I think I did in order to squelch the error messages that > were bollixing up the CGI. It was easy to do this in the wrapper > wrapper, but if that's going away, it can be done just as easily > with output redirection in `CVSROOT/loginfo`. > > --[[schmonz]] + +>> If the error messages screw up the CGI they must go to stdout. +>> I thought we had stderr even in the the CVS dark ages. ;-) --[[Joey]] -- cgit v1.2.3 From 7849d675a3cf3792a271a2fa9fc9172b394b3f25 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sat, 22 Aug 2009 02:02:34 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index ed6cf506e..65b6befd1 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -24,6 +24,13 @@ the "cvs add " call and avoid doing anything in that case? >> It seems like it might be. You can use a `getopt` hook to check >> `@ARGV` to see how it was called. --[[Joey]] +>>> This does the trick iff the post-commit wrapper passes its args +>>> along. Committed on my branch. This seems potentially dangerous, +>>> since the args passed to ikiwiki are influenced by web commits. +>>> I don't see an exploit, but for paranoia's sake, maybe the wrapper +>>> should only be built with execv() if the cvs plugin is loaded? +>>> --[[schmonz]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem @@ -42,6 +49,9 @@ the "cvs add " call and avoid doing anything in that case? >> on a " &" to the ikiwiki wrapper call doesn't need a wrapper script, >> does it? --[[Joey]] +>>> Nope, it works fine to append it to the `CVSROOT/loginfo` line. +>>> Fixed on my branch. --[[schmonz]] + > Thing 3 I think I did in order to squelch the error messages that > were bollixing up the CGI. It was easy to do this in the wrapper > wrapper, but if that's going away, it can be done just as easily @@ -51,3 +61,10 @@ the "cvs add " call and avoid doing anything in that case? >> If the error messages screw up the CGI they must go to stdout. >> I thought we had stderr even in the the CVS dark ages. ;-) --[[Joey]] + +>>> Some messages go to stderr, but definitely not all. That's why +>>> I wound up reaching for IPC::Cmd, to execute the command line +>>> safely while shutting CVS up. Anyway, I've tested what happens +>>> if a configured post-commit hook is missing, and it seems fine, +>>> probably also thanks to IPC::Cmd. +>>> --[[schmonz]] -- cgit v1.2.3 From 2acc71849d78d1dde7ac237e8ebc54d33548e9e7 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sat, 22 Aug 2009 03:52:45 -0400 Subject: no more wrapper wrapper --- doc/plugins/contrib/cvs.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 23e00201f..6b600eef7 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -22,8 +22,7 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), - * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook (and avoid `cvs` locking against itself), - * configures the wrapper itself as a post-commit hook in `CVSROOT/loginfo`. + * configures the post-commit hook in `CVSROOT/loginfo`. * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). ### To do -- cgit v1.2.3 From 59527de76708616bc8966d0ced3577573c3062b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Aug 2009 14:29:18 -0400 Subject: uh oh --- doc/plugins/contrib/cvs/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 65b6befd1..b063a53c2 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -31,6 +31,11 @@ the "cvs add " call and avoid doing anything in that case? >>> should only be built with execv() if the cvs plugin is loaded? >>> --[[schmonz]] +>>>> Hadn't considered that. While in wrapper mode the normal getopt is not +>>>> done, plugin getopt still runs, and so any unsafe options that +>>>> other plugins support could be a problem if another user runs +>>>> the setuid wrapper and passes those options through. --[[Joey]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 0d5a8bc3f060a26069df4c20880888303ff41d55 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 23 Aug 2009 15:41:29 -0400 Subject: new rsync plugin --- doc/plugins/contrib/rsync.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/plugins/contrib/rsync.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/rsync.mdwn b/doc/plugins/contrib/rsync.mdwn new file mode 100644 index 000000000..71cd63947 --- /dev/null +++ b/doc/plugins/contrib/rsync.mdwn @@ -0,0 +1,21 @@ +[[!template id=plugin name=rsync core=0 author="[[schmonz]]"]] + +[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] + +This plugin allows ikiwiki to push generated pages to another host +by running a command such as `rsync`. + +### Usage +7. Enable automated SSH key exchange between ikiwiki and the remote + host. [keychain](http://www.gentoo.org/proj/en/keychain/) makes + it easy to use a passphrase-protected key for this purpose. It's + also a good idea to specify the exact command line to be permitted + in the remote host's `$HOME/.ssh/authorized_keys`. +7. Set `rsync_command` in your setup file. If you're using a + passphrase-protected key, then set `rsync_command` to a shell + script which reads `keychain`'s current state before calling + `rsync`. + +### Implementation details +* The plugin relies on a new "postrefresh" hook called at the very end of + `IkiWiki/Render.pm:refresh()`. -- cgit v1.2.3 From 18a7b65094ca761fea0785a81f3c0923ea66b018 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 23 Aug 2009 18:15:56 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index b063a53c2..2de938fb7 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -36,6 +36,19 @@ the "cvs add " call and avoid doing anything in that case? >>>> other plugins support could be a problem if another user runs >>>> the setuid wrapper and passes those options through. --[[Joey]] +>>>>> I've tried compiling the argument check into the wrapper as +>>>>> the first thing main() does, and was surprised to find that +>>>>> this doesn't prevent the `cvs add ` deadlock in a web +>>>>> commit. I was convinced this'd be a reasonable solution, +>>>>> especially if conditionalized on the cvs plugin being loaded, +>>>>> but it doesn't work. And I stuck debug printfs at the beginning +>>>>> of all the rcs_foo() subs, and whatever `cvs add ` is +>>>>> doing to ikiwiki isn't visible to my plugin, because none of +>>>>> those subs are getting called. Nuts. Can you think of anything +>>>>> else that might solve the problem, or should I go back to +>>>>> generating a minimal wrapper wrapper that checks for just +>>>>> this one thing? --[[schmonz]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 80ca685385cd827f19718eaea5fb772782f68d3b Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 23 Aug 2009 23:27:53 -0400 Subject: why I needed this, in case it's useful to someone else --- doc/plugins/contrib/rsync/discussion.mdwn | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/plugins/contrib/rsync/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn new file mode 100644 index 000000000..a2c2eb725 --- /dev/null +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -0,0 +1,27 @@ +## A use case + +Why I needed this plugin: I have two web servers available to me +for a project. Neither does everything I need, but together they +do. (This is a bit like the [Amazon S3 +scenario](http://kitenet.net/~joey/blog/entry/running_a_wiki_on_Amazon_S3/).) + +Server (1) is a university web server. It provides plentiful space +and bandwidth, easy authentication for people editing the wiki, and +a well-known stable URL. The wiki really wants to live here and +very easily could except that the server doesn't allow arbitrary +CGIs. + +Server (2) is provided by a generous alumnus's paid [[tips/DreamHost]] +account. Disk and particularly network usage need to be minimized +because over some threshold it costs him. CGI, etc. are available. + +My plan was to host the wiki on server (1) by taking advantage of +server (2) to store the repository, source checkout, and generated +pages, to host the repository browser, and to handle ikiwiki's CGI +operations. In order for this to work, web edits on (2) would need +to automatically push any changed pages to (1). + +As a proof of concept, I added an rsync post-commit hook after +ikiwiki's usual. It worked, just not for web edits, which is how +the wiki will be used. So I wrote this plugin to finish the job. +The wiki now lives on (1), and clicking "edit" just works. -- cgit v1.2.3 From a27861c512bcf5808c59d9bc2b38c80b559d6d69 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Mon, 24 Aug 2009 03:13:25 -0400 Subject: Comment on another possible solution to the use case. --- doc/plugins/contrib/rsync/discussion.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index a2c2eb725..b2d21e6d5 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -25,3 +25,14 @@ As a proof of concept, I added an rsync post-commit hook after ikiwiki's usual. It worked, just not for web edits, which is how the wiki will be used. So I wrote this plugin to finish the job. The wiki now lives on (1), and clicking "edit" just works. + +> Just out of interest, why use `rsync` and not `git push`. i.e. a +> different setup to solve the same problem would be to run a +> normal ikiwiki setup on the universities server with its git +> repository available over ssh (same security setup your using +> for rsync should work for git over ssh). On the cgi-capable server, +> when it would rsync, make it git push. It would seem that git +> has enough information that it should be able to be more +> network efficient. It also means that corruption at one end +> wouldn't be propagated to the other end. -- [[Will]] + -- cgit v1.2.3 From 8d504e6b3dcacd333c0b07387e7acd3bf8a65d9c Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 24 Aug 2009 04:20:31 -0400 Subject: response --- doc/plugins/contrib/rsync/discussion.mdwn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index b2d21e6d5..20c04af0f 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -24,7 +24,7 @@ to automatically push any changed pages to (1). As a proof of concept, I added an rsync post-commit hook after ikiwiki's usual. It worked, just not for web edits, which is how the wiki will be used. So I wrote this plugin to finish the job. -The wiki now lives on (1), and clicking "edit" just works. +The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] > Just out of interest, why use `rsync` and not `git push`. i.e. a > different setup to solve the same problem would be to run a @@ -36,3 +36,13 @@ The wiki now lives on (1), and clicking "edit" just works. > network efficient. It also means that corruption at one end > wouldn't be propagated to the other end. -- [[Will]] +>> Hey, that's a nice solution. (The site was in svn to begin with, +>> but it's in git now.) One advantage of my approach in this particular +>> case: server (1) doesn't have `git` installed, but does have `rsync`, +>> so (1)'s environment can remain completely untweaked other than the +>> SSH arrangement. I kind of like that all the sysadmin effort is +>> contained on one host. +>> +>> This plugin is definitely still useful for projects not able to use +>> a DVCS (of which I've got at least one other), and possibly for +>> other uses not yet imagined. ;-) --[[schmonz]] -- cgit v1.2.3 From 43db8269a002daf00ac6195d4bd70018b4b68b75 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 15:47:24 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 2de938fb7..e1fa6e428 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -49,6 +49,9 @@ the "cvs add " call and avoid doing anything in that case? >>>>> generating a minimal wrapper wrapper that checks for just >>>>> this one thing? --[[schmonz]] +>>>>>> I don't see how there could possibly be a difference between +>>>>>> ikiwiki's C wrapper and your shell wrapper wrapper here. --[[Joey]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 145d89a6fc03936cc36d70946a8471da9bfe468a Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 01:05:07 -0400 Subject: po: maybe fixed self links --- doc/plugins/po.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index dca2f5d66..b4c8b135e 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -260,7 +260,9 @@ If a page contains a WikiLink to itself, ikiwiki does not normally turn that into a hyperlink. However, if a translated page contains a WikiLink to itself, a hyperlink is inserted, at least with the default `po_link_to` the link points to the English version of the page. Is there a -good reason for that to be done? --[[Joey]] +good reason for that to be done? --[[Joey]] + +> The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] Language display order ---------------------- -- cgit v1.2.3 From 7bd7e78e4a7d31c460909776057687e0e29dba12 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 01:41:55 -0400 Subject: po: commenting some TODO items --- doc/plugins/po.mdwn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index b4c8b135e..45630d763 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -282,12 +282,23 @@ That used to be so, but the bug was fixed. Does this mean that po might be replacing the only link on a page, in error? --[[Joey]] +> It would replace it. The only problematic case is when another +> plugin has its own reasons, in its `scan` hook, to add a page +> that is already there to `$links{$page}`. This other plugin's +> effect might then be changed by po's `scan` hook... which could +> be either good (better overall l10n) or bad (break the other +> plugin's goal). --[[intrigeri]] + Name of toplevel index page --------------------------- Normally at the top index page of a wiki, you see the wiki name at the top. However, at the top *translated* index page, you see something -like "index.da". --[[Joey]] +like "index.da". --[[Joey]] + +> I suggest changing `Render.pm`, line 115, to replace the `$page eq 'index'` +> test with a predicate call such as isindexpage($page). Such a predicate +> function could then be overriden by the po plugin. --[[intrigeri]] Pagespecs --------- -- cgit v1.2.3 From d5a04b2de9ce027c0e4cd47c9342bcd3db7f9f27 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 02:00:48 -0400 Subject: po: more TODO items comments and patches --- 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 45630d763..079a36633 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -335,6 +335,10 @@ When a po file is changed, the recentchanges page shows a link such as language) version of the page. It would be better in this one case if the link went direct to the translated version of the page. --[[Joey]] +> The (untested) commit 496e8523c670 in my po branch might fix this... +> or at least, I believe, put someone on the right track. +> --[[intrigeri]] + Double commits of po files -------------------------- -- cgit v1.2.3 From 4ce93af516360a223016681961481f51a3ce81f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Aug 2009 13:09:43 -0400 Subject: translation of directives --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 079a36633..9273da399 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -358,6 +358,15 @@ Ugly messages with empty files If there are empty .mdwn files, the po plugin displays some ugly messages. +Translation of directives +------------------------- + +If a translated page contains a directive, it may expand to some english +text, or text in whatever single language ikiwiki is configured to "speak". + +Maybe there could be a way to switch ikiwiki to speaking another language +when building a non-english page? Then the directives would get translated. + Documentation ------------- -- cgit v1.2.3 From 18fc71f033cf0ff9ccd6ef16212ce3b4e34ac725 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 12:56:24 -0400 Subject: unsure if this patch is enough --- doc/plugins/po.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 9273da399..b77c545d9 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -264,6 +264,11 @@ good reason for that to be done? --[[Joey]] > The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] +>> It may fix it in passing, but shouldn't it also be fixed for the other +>> `po_link_to` styles? (Also, if `mybestlink` is going to always +>> just return `bestlink` in this case, there seems no reason to inject +>> it.) --[[Joey]] + Language display order ---------------------- -- cgit v1.2.3 From e1acb707db3f204708f88648ed80762689a15425 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 12:57:04 -0400 Subject: cherry-picked fix for recentchanges links --- doc/plugins/po.mdwn | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index b77c545d9..2e32d78fd 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -332,18 +332,6 @@ Also, this may only happen if the page being linked to is coming from an underlay, and the underlays lack translation to a given language. --[[Joey]] -recentchanges links to po files -------------------------------- - -When a po file is changed, the recentchanges page shows a link such as -"sandbox.es". But, clicking on it goes to the English (or negotiated -language) version of the page. It would be better in this one case if -the link went direct to the translated version of the page. --[[Joey]] - -> The (untested) commit 496e8523c670 in my po branch might fix this... -> or at least, I believe, put someone on the right track. -> --[[intrigeri]] - Double commits of po files -------------------------- -- cgit v1.2.3 From 5e515b493c00c70095aeb8bad1e0b7757ed943db Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 13:10:31 -0400 Subject: followups --- doc/plugins/po.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2e32d78fd..65573b877 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -294,6 +294,12 @@ that po might be replacing the only link on a page, in error? > be either good (better overall l10n) or bad (break the other > plugin's goal). --[[intrigeri]] +>> Right.. well, the cases where links are added is very small. +>> Grepping for `add_link`, it's just done by link, camelcase, meta, and +>> tag. All of these are supposed to work just link regular links +>> so I'd think that is ok. We could probably remove the currently scary +>> comment about only wanting to change the first link. --[[Joey]] + Name of toplevel index page --------------------------- @@ -305,6 +311,14 @@ like "index.da". --[[Joey]] > test with a predicate call such as isindexpage($page). Such a predicate > function could then be overriden by the po plugin. --[[intrigeri]] +>> Could do that, but if you have such a function it's natural to want to +>> use it elsewhere. Not clear to me it would make sense for po to override +>> such a function if it were used in some of the other places that compare +>> to index. +>> +>> The other option would be for po to override the template setting. +>> --[[Joey]] + Pagespecs --------- -- cgit v1.2.3 From 7d35d17f956740a310465d5162b9313e120694a3 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 27 Aug 2009 20:01:24 +0200 Subject: doc/po: follow-up Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 65573b877..2c230d409 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -300,6 +300,8 @@ that po might be replacing the only link on a page, in error? >> so I'd think that is ok. We could probably remove the currently scary >> comment about only wanting to change the first link. --[[Joey]] +>>> Commit 3c2bffe21b91684 in my po branch does this. --[[intrigeri]] + Name of toplevel index page --------------------------- -- cgit v1.2.3 From 6bc3206af16f4910e49478319a8e81d74c7de342 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 27 Aug 2009 20:21:16 +0200 Subject: doc/po: follow-up --- doc/plugins/po.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2c230d409..1d343e0f8 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -321,6 +321,8 @@ like "index.da". --[[Joey]] >> The other option would be for po to override the template setting. >> --[[Joey]] +>>> Great idea. Commit 6c0f9c691c3df3a in my po branch does it. --[[intrigeri]] + Pagespecs --------- -- cgit v1.2.3 From eaa782a1856cff50df68f1135955d58dc97bb833 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 27 Aug 2009 20:38:36 +0200 Subject: doc/po(self-links): follow-ups Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 1d343e0f8..673bbf406 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -265,9 +265,20 @@ good reason for that to be done? --[[Joey]] > The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] >> It may fix it in passing, but shouldn't it also be fixed for the other ->> `po_link_to` styles? (Also, if `mybestlink` is going to always ->> just return `bestlink` in this case, there seems no reason to inject ->> it.) --[[Joey]] +>> `po_link_to` styles? + +>>> Other `po_link_to` styles already work ok: say there is +>>> a \[[dest]] link on a page called `dest`. When rendering +>>> `dest.LL`, `mybestlink` returns `dest.LL`, and `htmllink` is then +>>> able to detect, and manage correctly, that it is a self-link. +>>> --[[intrigeri]] + +>> (Also, if `mybestlink` is going to always just return `bestlink` in +>> this case, there seems no reason to inject it.) --[[Joey]] + +>>> Right. Commit cdc3576c8d1efb2 in my po branch prevents +>>> `mybestlink` to be injected when `po_link_to` is +>>> `default`. --[[intrigeri]] Language display order ---------------------- -- cgit v1.2.3 From ffcd97ce52edd73f092d15aae89bbacad99b38b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 15:49:12 -0400 Subject: change cherry-picked; move to discussion --- doc/plugins/po.mdwn | 24 ------------------------ doc/plugins/po/discussion.mdwn | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 24 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 673bbf406..9c4d8ffbd 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -289,30 +289,6 @@ order, as `po_slave_languages` is a hash. It would need to be converted to an array to support this. (If twere done, twere best done quickly.) --[[Joey]] -Duplicate %links ? ------------------- - -I notice code in the scan hook that seems to assume -that %links will accumulate duplicate links for a page. -That used to be so, but the bug was fixed. Does this mean -that po might be replacing the only link on a page, in error? ---[[Joey]] - -> It would replace it. The only problematic case is when another -> plugin has its own reasons, in its `scan` hook, to add a page -> that is already there to `$links{$page}`. This other plugin's -> effect might then be changed by po's `scan` hook... which could -> be either good (better overall l10n) or bad (break the other -> plugin's goal). --[[intrigeri]] - ->> Right.. well, the cases where links are added is very small. ->> Grepping for `add_link`, it's just done by link, camelcase, meta, and ->> tag. All of these are supposed to work just link regular links ->> so I'd think that is ok. We could probably remove the currently scary ->> comment about only wanting to change the first link. --[[Joey]] - ->>> Commit 3c2bffe21b91684 in my po branch does this. --[[intrigeri]] - Name of toplevel index page --------------------------- diff --git a/doc/plugins/po/discussion.mdwn b/doc/plugins/po/discussion.mdwn index 1c3f0e752..ab822e76c 100644 --- a/doc/plugins/po/discussion.mdwn +++ b/doc/plugins/po/discussion.mdwn @@ -699,3 +699,28 @@ and via CGI, have been tested. * general test with `indexpages` enabled: **not OK** * general test with `po_link_to=default` with `userdirs` enabled: **OK** * general test with `po_link_to=default` with `userdirs` disabled: **OK** + +Duplicate %links ? +------------------ + +I notice code in the scan hook that seems to assume +that %links will accumulate duplicate links for a page. +That used to be so, but the bug was fixed. Does this mean +that po might be replacing the only link on a page, in error? +--[[Joey]] + +> It would replace it. The only problematic case is when another +> plugin has its own reasons, in its `scan` hook, to add a page +> that is already there to `$links{$page}`. This other plugin's +> effect might then be changed by po's `scan` hook... which could +> be either good (better overall l10n) or bad (break the other +> plugin's goal). --[[intrigeri]] + +>> Right.. well, the cases where links are added is very small. +>> Grepping for `add_link`, it's just done by link, camelcase, meta, and +>> tag. All of these are supposed to work just link regular links +>> so I'd think that is ok. We could probably remove the currently scary +>> comment about only wanting to change the first link. --[[Joey]] + +>>> Commit 3c2bffe21b91684 in my po branch does this. --[[intrigeri]] +>>>> Cherry-picked --[[Joey]] -- cgit v1.2.3 From f8ad1bfec4e12944482d5f58a0961b0c476602c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 15:50:43 -0400 Subject: fix cherry-picked --- debian/changelog | 1 + doc/plugins/po.mdwn | 21 --------------------- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'doc/plugins') diff --git a/debian/changelog b/debian/changelog index 69e197e37..9f10c2913 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,7 @@ ikiwiki (3.1415926) UNRELEASED; urgency=low * Rebuild wikis on upgrade to this version to fix bloat caused by the dependency bug. * htmltidy: Print a warning message if tidy fails. Closes: #543722 + * po: Fix name of translated toplevel index page. (intrigeri) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 9c4d8ffbd..f020adac2 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -289,27 +289,6 @@ order, as `po_slave_languages` is a hash. It would need to be converted to an array to support this. (If twere done, twere best done quickly.) --[[Joey]] -Name of toplevel index page ---------------------------- - -Normally at the top index page of a wiki, you see the wiki name at -the top. However, at the top *translated* index page, you see something -like "index.da". --[[Joey]] - -> I suggest changing `Render.pm`, line 115, to replace the `$page eq 'index'` -> test with a predicate call such as isindexpage($page). Such a predicate -> function could then be overriden by the po plugin. --[[intrigeri]] - ->> Could do that, but if you have such a function it's natural to want to ->> use it elsewhere. Not clear to me it would make sense for po to override ->> such a function if it were used in some of the other places that compare ->> to index. ->> ->> The other option would be for po to override the template setting. ->> --[[Joey]] - ->>> Great idea. Commit 6c0f9c691c3df3a in my po branch does it. --[[intrigeri]] - Pagespecs --------- -- cgit v1.2.3 From 18e4fa65399f2a21bd943b0e62b81a100f941d44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 15:54:44 -0400 Subject: fix merged --- debian/changelog | 1 + doc/plugins/po.mdwn | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) (limited to 'doc/plugins') diff --git a/debian/changelog b/debian/changelog index 9f10c2913..b4169c576 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ ikiwiki (3.1415926) UNRELEASED; urgency=low by the dependency bug. * htmltidy: Print a warning message if tidy fails. Closes: #543722 * po: Fix name of translated toplevel index page. (intrigeri) + * po: Fix display of links from a translated page to itself (ntrigeri) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f020adac2..57459c1ef 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -253,33 +253,6 @@ once [[intrigeri]]'s `meta` branch is merged. An integration branch, called `meta-po`, merges [[intrigeri]]'s `po` and `meta` branches, and thus has this additional features. -Self links ----------- - -If a page contains a WikiLink to itself, ikiwiki does not normally -turn that into a hyperlink. However, if a translated page contains a -WikiLink to itself, a hyperlink is inserted, at least with the default -`po_link_to` the link points to the English version of the page. Is there a -good reason for that to be done? --[[Joey]] - -> The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] - ->> It may fix it in passing, but shouldn't it also be fixed for the other ->> `po_link_to` styles? - ->>> Other `po_link_to` styles already work ok: say there is ->>> a \[[dest]] link on a page called `dest`. When rendering ->>> `dest.LL`, `mybestlink` returns `dest.LL`, and `htmllink` is then ->>> able to detect, and manage correctly, that it is a self-link. ->>> --[[intrigeri]] - ->> (Also, if `mybestlink` is going to always just return `bestlink` in ->> this case, there seems no reason to inject it.) --[[Joey]] - ->>> Right. Commit cdc3576c8d1efb2 in my po branch prevents ->>> `mybestlink` to be injected when `po_link_to` is ->>> `default`. --[[intrigeri]] - Language display order ---------------------- -- cgit v1.2.3 From 8064acf87fb7e708a03e47dd82457dec237e886e Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 13:19:48 +0200 Subject: doc/po: reported bug + patches wrt. created page type Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 57459c1ef..3b152586e 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -317,6 +317,19 @@ text, or text in whatever single language ikiwiki is configured to "speak". Maybe there could be a way to switch ikiwiki to speaking another language when building a non-english page? Then the directives would get translated. +Created page type +----------------- + +The interdiction to create pages of type po was broken by the new +`page_types` code. This is fixed in my po branch by +commit 1914ae2fd24e1e802. + +While I was there, I also added some code to set a new default value +to the type select field in case it was previously set to "po". +This code favors the type of the linking page's masterpage on page +creation (when `from=page.LL`). This is commit c9301d2c296f682. +--[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From cc6000f0b9b82b19ea4635edcace2f6ba164adf1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 07:34:09 -0400 Subject: both changes picked --- debian/changelog | 3 +++ doc/plugins/po.mdwn | 2 ++ 2 files changed, 5 insertions(+) (limited to 'doc/plugins') diff --git a/debian/changelog b/debian/changelog index 045f27540..d10bc36cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,9 @@ ikiwiki (3.1415926) UNRELEASED; urgency=low * po: Fix name of translated toplevel index page. (intrigeri) * po: Fix display of links from a translated page to itself (ntrigeri) * Add Czech basewiki translation from Miroslav Kure. + * po: fix interdiction to create pages of type po (intrigeri) + * po: po: favor the type of linking page's masterpage on page creation + (intrigeri) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 3b152586e..fdef41e45 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -330,6 +330,8 @@ This code favors the type of the linking page's masterpage on page creation (when `from=page.LL`). This is commit c9301d2c296f682. --[[intrigeri]] +> Both cherry picked. --[[Joey]] + Documentation ------------- -- cgit v1.2.3 From e3b5d7013717af732b36efd9e4abe1f14d0f3175 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 14:41:32 +0200 Subject: doc/po: bug report + patch proposal wrt. inline's post form's rootpage Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index fdef41e45..39b237c73 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -332,6 +332,17 @@ creation (when `from=page.LL`). This is commit c9301d2c296f682. > Both cherry picked. --[[Joey]] +inline's post form's rootpage +----------------------------- + +When a translatable page (say it is called "bugs") contains an +[[inline directive|ikiwiki/directive/inline]] with `postform` enabled, +the rootpage is l10n'd on translations pages (e.g. "bugs.fr" gets +a `rootpage` value of `bugs.fr`). This is usually not what's expected, +as translation pages are not supposed to have subpages. My po branch +has code (e671e72053e81fa, which depends on 72ac9821e56637) that fixes +this. --[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From 6be874612539d3148d288fc6a4c47743a7c0c8fc Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 16:38:13 +0200 Subject: doc/po: report problem with link() + propose patch Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 39b237c73..031188a67 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -343,6 +343,15 @@ as translation pages are not supposed to have subpages. My po branch has code (e671e72053e81fa, which depends on 72ac9821e56637) that fixes this. --[[intrigeri]] +link() pagespec on translation pages +------------------------------------ + +The `link()` pagespec, on translation pages, currently tests whether +a given page links to the *current translation page*, rather than +whether it links to its master page. I believe the later is generally +expected. Commit 646c9a4c95a480 in my po branch fixes this. +--[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From 2ba54735ce78a80d9577bef068f674559dddf57b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 18:22:11 -0400 Subject: po test suite failure --- doc/plugins/po.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 031188a67..4fecaeb53 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -352,6 +352,12 @@ whether it links to its master page. I believe the later is generally expected. Commit 646c9a4c95a480 in my po branch fixes this. --[[intrigeri]] +2 test suite failures +-------------------- + +t/po is currently failing tests 57 and 59 (and I would like to release +soon..) --[[Joey]] + Documentation ------------- -- cgit v1.2.3 From 94727e7fcfff204030bec64509ecedacb0abd6dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 19:49:22 -0400 Subject: merged --- doc/plugins/po.mdwn | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 4fecaeb53..04420c115 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -317,41 +317,6 @@ text, or text in whatever single language ikiwiki is configured to "speak". Maybe there could be a way to switch ikiwiki to speaking another language when building a non-english page? Then the directives would get translated. -Created page type ------------------ - -The interdiction to create pages of type po was broken by the new -`page_types` code. This is fixed in my po branch by -commit 1914ae2fd24e1e802. - -While I was there, I also added some code to set a new default value -to the type select field in case it was previously set to "po". -This code favors the type of the linking page's masterpage on page -creation (when `from=page.LL`). This is commit c9301d2c296f682. ---[[intrigeri]] - -> Both cherry picked. --[[Joey]] - -inline's post form's rootpage ------------------------------ - -When a translatable page (say it is called "bugs") contains an -[[inline directive|ikiwiki/directive/inline]] with `postform` enabled, -the rootpage is l10n'd on translations pages (e.g. "bugs.fr" gets -a `rootpage` value of `bugs.fr`). This is usually not what's expected, -as translation pages are not supposed to have subpages. My po branch -has code (e671e72053e81fa, which depends on 72ac9821e56637) that fixes -this. --[[intrigeri]] - -link() pagespec on translation pages ------------------------------------- - -The `link()` pagespec, on translation pages, currently tests whether -a given page links to the *current translation page*, rather than -whether it links to its master page. I believe the later is generally -expected. Commit 646c9a4c95a480 in my po branch fixes this. ---[[intrigeri]] - 2 test suite failures -------------------- -- cgit v1.2.3