Merge remote branch 'upstream/master' into prv/po
authorintrigeri <intrigeri@boum.org>
Tue, 29 Jun 2010 13:53:51 +0000 (15:53 +0200)
committerintrigeri <intrigeri@boum.org>
Tue, 29 Jun 2010 13:53:51 +0000 (15:53 +0200)
Conflicts:
doc/plugins/po.mdwn

18 files changed:
.gitattributes [new file with mode: 0644]
IkiWiki/Plugin/hnb.pm
debian/changelog
doc/bugs/po_vs_templates.mdwn [new file with mode: 0644]
doc/ikiwikiusers.mdwn
doc/plugins/contrib/field/discussion.mdwn
doc/plugins/po.mdwn
doc/rcs/cvs.mdwn
doc/sandbox.mdwn
doc/setup/byhand.mdwn
doc/todo/Add_HTML_support_to_po_plugin.mdwn [new file with mode: 0644]
doc/todo/Fix_selflink_in_po_plugin.mdwn
doc/users/schmonz.mdwn
t/bazaar.t
t/cvs.t
t/git.t
t/mercurial.t
t/svn.t

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..5d42584
--- /dev/null
@@ -0,0 +1 @@
+debian/changelog merge=dpkg-mergechangelogs
index 32c9cf3ada5b1ed3ed65114177fbcade05d0eaf2..5157a6b93ce54c80ffac7330e50033cde57eddb4 100644 (file)
@@ -33,8 +33,8 @@ sub htmlize (@) {
        # hnb outputs version number etc. every time to STDOUT, so
        # using files makes it easier to seprarate.
 
-       my $tmpin  = mkstemp( "/tmp/ikiwiki-hnbin.XXXXXXXXXX"  );
-       my $tmpout = mkstemp( "/tmp/ikiwiki-hnbout.XXXXXXXXXX" );
+       my ($infh, $tmpin)  = mkstemp( "/tmp/ikiwiki-hnbin.XXXXXXXXXX"  );
+       my ($outfh, $tmpout) = mkstemp( "/tmp/ikiwiki-hnbout.XXXXXXXXXX" );
 
        open(TMP, '>', $tmpin) or die "Can't write to $tmpin: $!";
        print TMP $params{content};
index ae1d23479a0004a497f167fa88fc1ded1f46d811..15ae21a55c729179623c13b21d31e11464daef7e 100644 (file)
@@ -12,6 +12,8 @@ ikiwiki (3.20100624) UNRELEASED; urgency=low
   * Fixed some confusion and bugginess about whether
     rcs_getctime/rcs_getmtime were passed absolute or relative filenames.
     (Make it relative like everything else.)
+  * hnb: Fixed broken use of mkstemp that had caused dangling temp files,
+    and prevented actually rendering hnb files.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 23 Jun 2010 15:30:04 -0400
 
diff --git a/doc/bugs/po_vs_templates.mdwn b/doc/bugs/po_vs_templates.mdwn
new file mode 100644 (file)
index 0000000..a0ccc5f
--- /dev/null
@@ -0,0 +1,17 @@
+The po plugin's protection against processing loops (i.e. the
+alreadyfiltered stuff) is playing against us: the template plugin
+triggers a filter hooks run with the very same ($page, $destpage)
+arguments pair that is used to identify an already filtered page.
+
+Processing an included template can then mark the whole translation
+page as already filtered, which prevented `po_to_markup` to be called on
+the PO content.
+
+Symptoms: the unprocessed gettext file goes unfiltered to the
+generated HTML.
+
+This has been fixed in my po branch.
+
+-- [[intrigeri]]
+
+[[!tag patch]]
index 8fb348c3d96b9565da7474efa351c08818fb9e7e..e2465108ab92ba49f19e07ce36168fccd75a955d 100644 (file)
@@ -147,6 +147,7 @@ Personal sites and blogs
 * [Ertug Karamatli](http://pages.karamatli.com)
 * [Jonatan Walck](http://jonatan.walck.i2p/) a weblog + wiki over [I2P](http://i2p2.de/). Also [mirrored](http://jonatan.walck.se/) to the Internet a few times per day.
 * [Daniel Wayne Armstrong](http://circuidipity.com/)
+* [Mukund](https://www.mukund.org/)
 
 Please feel free to add your own ikiwiki site!
 
index 103e061e5e5eda8eb02c9ae482f0bbd7a54cae39..5f4c9b9429d9de70270dfbcad2c74e32b2752bf8 100644 (file)
@@ -324,3 +324,5 @@ smcv's discuission of field author vs meta author above. --[[Joey]]
 >>> the side-effects, but use `field` as an interface to get the values of those special fields.
 
 >>> --[[KathrynAndersen]]
+
+I was just looking at HTML5 and wondered if the field plugin should generate the new Microdata tags (as well as the internal structures)? <http://slides.html5rocks.com/#slide19> -- [[Will]]
index dc0b638e2d2e14cfbc832cf0e89fe3578be76e37..30bac7068e5436b177ee9915f65783fcbd72b175 100644 (file)
@@ -281,6 +281,9 @@ 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]] 
 
+> Any simple testcase to reproduce it, please? I've never seen this
+> happen yet. --[[intrigeri]]
+
 Double commits of po files
 --------------------------
 
@@ -295,11 +298,18 @@ 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]] 
 
+> * The s/utf-8/UTF-8 part is fixed in my po branch.
+> * The ENCODING\n part is due to an inconsistency in po4a, which
+>   I've just send a patch for. --[[intrigeri]]
+
 Ugly messages with empty files
 ------------------------------
 
 If there are empty .mdwn files, the po plugin displays some ugly messages.
 
+> This is due to a bug in po4a (not checking definedness of a
+> variable). One-liner patch sent. --[[intrigeri]]
+
 Translation of directives
 -------------------------
 
index f0bd0f6f0da902e7888fbf580c8950687b19d5d4..9beb08ecef02ffd6e08fe91e7ee30114037b13d3 100644 (file)
@@ -20,8 +20,9 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn
  * creates a repository,
  * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS),
  * 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
-* 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.
+* Have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce commits into changesets. Reasons:
+    7. Obviates the need to scrape the repo's complete history to determine the last N changesets. (Repositories without such records can fall back on the `cvsps` and `File::ReadBackwards` code.)
+    7. Arranges for ikiwiki to be run once per changeset, rather than CVS's once per committed file (!), which is a waste at best and bug-inducing at worst. (Currently, on multi-directory commits, only the first directory's changes get mentioned in [[recentchanges|plugins/recentchanges]].)
 * Perhaps prevent web edits from attempting to create `.../CVS/foo.mdwn` (and `.../cvs/foo.mdwn` on case-insensitive filesystems); thanks to the CVS metadata directory, the attempt will fail anyway (and much more confusingly) if we don't.
index 8ecaf1cb9d4347fa717174197cf83c9cdcb68942..4c8621f1cad4ca58cba6de91ce90898478a0fb8b 100644 (file)
@@ -1,5 +1,11 @@
 This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version  ]]).
 
+<<<<<<< HEAD
+Test conflict.
+=======
+Testing 123.
+>>>>>>> 8cc8bb52f7913e429be7e14203177ef374645718
+
 # Header
 
 ## Subheader2
index afd1ac27f6323271ffbb3e11782109b9a67ebda6..86cff5af4e58696eb8ada93e5b35771406ed421e 100644 (file)
@@ -177,7 +177,7 @@ about using the git repositories.
 
 Once your wiki is checked in to the revision control system, you should
 configure ikiwiki to use revision control. Edit your ikiwiki.setup, set
-`rcs` to the the revision control system you chose to use.  Be careful, 
+`rcs` to the revision control system you chose to use.  Be careful, 
 you may need to use the 'fullname'.  For example, 'hg' doesn't work, you
 should use mercurial.  Be sure to set `svnrepo` to the directory for your
 repository, if using subversion. Uncomment the configuration for the wrapper
diff --git a/doc/todo/Add_HTML_support_to_po_plugin.mdwn b/doc/todo/Add_HTML_support_to_po_plugin.mdwn
new file mode 100644 (file)
index 0000000..ec29e4f
--- /dev/null
@@ -0,0 +1,7 @@
+The HTML page type should be fully supported by the PO plugin: po4a's
+HTML support is able to extract translatable strings and to disregard
+the rest.
+
+This is implemented in my po branch, please review. --[[intrigeri]]
+
+[[!tag patch]]
index 87fa38911aa8b4890fe9a4c9558caeff04262a74..b83d2814a1ca1896f0e2eb887e7fb76b4b3fcedc 100644 (file)
@@ -6,3 +6,5 @@ isn't. --[[intrigeri]]
 Fixed in my po branch. --[[intrigeri]]
 
 [[!tag patch]]
+
+> bump?
index ed3332bf90f5c804a6fd1ef42b6e0bd4c42cd855..ec282c99091cbf58b7cc747c363ce89d5a3bbc86 100644 (file)
@@ -2,4 +2,4 @@
 
 [[!map pages="!*/Discussion and ((link(users/schmonz) and plugins/*) or rcs/cvs)"]]
 
-In progress: a plugin for [WIND authentication](http://www.columbia.edu/acis/rad/authmethods/wind/).
+I've also written a plugin for [WIND authentication](http://www.columbia.edu/acis/rad/authmethods/wind/), which may or may not be of general utility.
index 3e54ec4dc8f57ee7601f572d090a5dd66f04a822..cd840fbe1b39d2d48340430da718e1e8788d5c79 100755 (executable)
@@ -6,11 +6,14 @@ BEGIN {
        $dir = "/tmp/ikiwiki-test-bzr.$$";
        my $bzr=`which bzr`;
        chomp $bzr;
-       if (! -x $bzr || ! mkdir($dir)) {
+       if (! -x $bzr) {
                eval q{
-                       use Test::More skip_all => "bzr not available or could not make test dir"
+                       use Test::More skip_all => "bzr not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 17;
 
diff --git a/t/cvs.t b/t/cvs.t
index 96359ab6e2a6bb9773af99179cf567da8732b3b1..5ed377ed5e7234b369cc456d814e4ceefb51266c 100755 (executable)
--- a/t/cvs.t
+++ b/t/cvs.t
@@ -8,11 +8,14 @@ BEGIN {
        chomp $cvs;
        my $cvsps=`which cvsps`;
        chomp $cvsps;
-       if (! -x $cvs || ! -x $cvsps || ! mkdir($dir)) {
+       if (! -x $cvs || ! -x $cvsps) {
                eval q{
-                       use Test::More skip_all => "cvs or cvsps not available or could not make test dir"
+                       use Test::More skip_all => "cvs or cvsps not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
        foreach my $module ('File::ReadBackwards', 'File::MimeInfo') {
                eval qq{use $module};
                if ($@) {
diff --git a/t/git.t b/t/git.t
index ee778ebf0ab38050eabd52f8528c25d1fe392058..6d847dfb04d56808dab435a125bc6cbadcfd3af0 100755 (executable)
--- a/t/git.t
+++ b/t/git.t
@@ -7,11 +7,14 @@ BEGIN {
        $dir="/tmp/ikiwiki-test-git.$$";
        my $git=`which git`;
        chomp $git;
-       if (! -x $git || ! mkdir($dir)) {
+       if (! -x $git) {
                eval q{
-                       use Test::More skip_all => "git not available or could not make test dir"
+                       use Test::More skip_all => "git not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 18;
 
index b64ea8e563a0a0f6a683fa095374712c194a2c38..4918fc76e9a0bb37adecc18ecbf47cc1eba1a795 100755 (executable)
@@ -6,11 +6,14 @@ BEGIN {
        $dir = "/tmp/ikiwiki-test-hg.$$";
        my $hg=`which hg`;
        chomp $hg;
-       if (! -x $hg || ! mkdir($dir)) {
+       if (! -x $hg) {
                eval q{
-                       use Test::More skip_all => "hg not available or could not make test dir"
+                       use Test::More skip_all => "hg not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 11;
 
diff --git a/t/svn.t b/t/svn.t
index 82b71b5fc1a404fc81159b6585c47997e9a4eb10..cce8452a66107dfb89c301200c22035087bf77de 100755 (executable)
--- a/t/svn.t
+++ b/t/svn.t
@@ -8,11 +8,14 @@ BEGIN {
        chomp $svn;
        my $svnadmin=`which svnadmin`;
        chomp $svnadmin;
-       if (! -x $svn || ! -x $svnadmin || ! mkdir($dir)) {
+       if (! -x $svn || ! -x $svnadmin) {
                eval q{
-                       use Test::More skip_all => "svn not available or could not make test dir"
+                       use Test::More skip_all => "svn or svnadmin not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 12;