]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/xgettext_issue.mdwn
version needed
[ikiwiki.git] / doc / bugs / xgettext_issue.mdwn
1 I ran into a problem when installing from svn.  I got "invalid variable
2 interpolation" errors for Wrappers.pm.  I added the flag '--extract-all' to
3 'po/Makefile' and 'po/t' to the xgettext line.  Once I did that I was able
4 to make and make test just fine. --HarleyPig
5
6 > It would be helpful if you could post the actual error message you saw.
7 > Also would be nice to know what versions of perl and gettext you have.
8 > Perhaps your xgettext is an older version from before it natively
9 > supported perl.
10 > Adding --extract-all doesn't seem like a good idea, since this causes it
11 > to treat every string in the entire wiki as translatable. I don't know
12 > what you're talking about regarding 'po/t'. --[[Joey]]
13
14 >> make[1]: Entering directory `/home/www/ikiwiki/po'
15 >> Rebuilding the pot file
16 >> xgettext ../IkiWiki/CGI.pm ../IkiWiki/Plugin/aggregate.pm ../IkiWiki/Plugin/brokenlinks.pm ../IkiWiki/Plugin/camelcase.pm ../IkiWiki/Plugin/ddate.pm ../IkiWiki/Plugin/favicon.pm ../IkiWiki/Plugin/fortune.pm ../IkiWiki/Plugin/goodstuff.pm ../IkiWiki/Plugin/googlecalendar.pm ../IkiWiki/Plugin/haiku.pm ../IkiWiki/Plugin/html.pm ../IkiWiki/Plugin/htmlscrubber.pm ../IkiWiki/Plugin/htmltidy.pm ../IkiWiki/Plugin/httpauth.pm ../IkiWiki/Plugin/img.pm ../IkiWiki/Plugin/inline.pm ../IkiWiki/Plugin/linkmap.pm ../IkiWiki/Plugin/map.pm ../IkiWiki/Plugin/mdwn.pm ../IkiWiki/Plugin/meta.pm ../IkiWiki/Plugin/mirrorlist.pm ../IkiWiki/Plugin/openid.pm ../IkiWiki/Plugin/orphans.pm ../IkiWiki/Plugin/otl.pm ../IkiWiki/Plugin/pagecount.pm ../IkiWiki/Plugin/pagestats.pm ../IkiWiki/Plugin/passwordauth.pm ../IkiWiki/Plugin/poll.pm ../IkiWiki/Plugin/polygen.pm ../IkiWiki/Plugin/rawhtml.pm ../IkiWiki/Plugin/rst.pm ../IkiWiki/Plugin/search.pm ../IkiWiki/Plugin/shortcut.pm ../IkiWiki/Plugin/sidebar.pm ../IkiWiki/Plugin/skeleton.pm ../IkiWiki/Plugin/smiley.pm ../IkiWiki/Plugin/tag.pm ../IkiWiki/Plugin/template.pm ../IkiWiki/Plugin/textile.pm ../IkiWiki/Plugin/toc.pm ../IkiWiki/Plugin/toggle.pm ../IkiWiki/Plugin/typography.pm ../IkiWiki/Plugin/wikitext.pm ../IkiWiki/Rcs/Stub.pm ../IkiWiki/Rcs/git.pm ../IkiWiki/Rcs/mercurial.pm ../IkiWiki/Rcs/svn.pm ../IkiWiki/Rcs/tla.pm ../IkiWiki/Render.pm ../IkiWiki/Setup.pm ../IkiWiki/Setup/Standard.pm ../IkiWiki/UserInfo.pm ../IkiWiki/Wrapper.pm ../ikiwiki.in ../IkiWiki.pm -o ikiwiki.pot -Lperl --add-comments=translators ../IkiWiki/Wrapper.pm:64: invalid variable interpolation at "$"
17 >> make[1]: *** [ikiwiki.pot] Error 1
18 >> make[1]: Leaving directory `/home/www/ikiwiki/po'
19 >> make: *** [extra_build] Error 2
20 >>
21 >> harleypig ikiwiki # xgettext --version
22 >>
23 >> xgettext (GNU gettext-tools) 0.15
24 >>
25 >> harleypig ikiwiki # perl -v
26 >>
27 >> This is perl, v5.8.8 built for i686-linux
28 >>
29 >> Sorry about the po/t report ... it was the test file I used to figure out what was wrong and I forgot to remove it.  This is against the subversion repository, version 2338.
30 >> The referenced line has a $! variable, which the documentation for gettext indicates is the problem.
31
32 >>> Ok, I think that you need to upgrade xgettext to 0.16. However, there's
33 >>> no reason why you should need to rebuild the pot file anyway, so I've
34 >>> checked it into svn, and that's one problem [[bugs/done]].
35
36 >>>> FWIW, I get the same error when building manually from SVN trunk on Ubuntu Edgy. I'm also using xgettext 0.15, because it's the latest version that's in the repos. However,
37 >>>> I don't think that's the sole problem because I can build fine on another (Debian) box which is running _0.14.4_... I know very little about `gettext`, but could this be
38 >>>> related to my language settings? On the Edgy box I have `LANGUAGE=en_GB:en` and `LANG=en_GB.UTF-8`. The `ikiwiki` package installs on Edgy with no problems. --Ben
39
40 >>>>> You'll only see the problem if it needs to rebuild po/ikiwiki.pot,
41 >>>>> which it generally doesn't if you're just building the package. If
42 >>>>> you edit files and build, it will rebuilt the pot and then fail with
43 >>>>> older gettexts. --[[Joey]]
44
45 >>>>>> I guess I'm confused then, because I do get that error when I just build. :-( To reproduce:
46
47     svn co svn://ikiwiki.kitenet.net/ikiwiki/trunk ikiwiki
48     cd ikiwiki
49     perl Makefile.PL
50     make
51
52 >>>>>> Then I see:
53
54 <pre>
55 ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
56 ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
57 ./pm_filter /usr/local 1.44 /usr/local/share/perl/5.8.8 < ikiwiki.in > ikiwiki.out
58 make -C po
59 make[1]: Entering directory `/home/ben/tmp/ikiwiki/po'
60 Rebuilding the pot file
61 xgettext ../IkiWiki/CGI.pm ../IkiWiki/Plugin/aggregate.pm ../IkiWiki/Plugin/anonok.pm ../IkiWiki/Plugin/brokenlinks.pm ../IkiWiki/Plugin/camelcase.pm ../IkiWiki/Plugin/conditional.pm ../IkiWiki/Plugin/ddate.pm ../IkiWiki/Plugin/favicon.pm ../IkiWiki/Plugin/fortune.pm ../IkiWiki/Plugin/goodstuff.pm ../IkiWiki/Plugin/googlecalendar.pm ../IkiWiki/Plugin/haiku.pm ../IkiWiki/Plugin/html.pm ../IkiWiki/Plugin/htmlscrubber.pm ../IkiWiki/Plugin/htmltidy.pm ../IkiWiki/Plugin/httpauth.pm ../IkiWiki/Plugin/img.pm ../IkiWiki/Plugin/inline.pm ../IkiWiki/Plugin/linkmap.pm ../IkiWiki/Plugin/lockedit.pm ../IkiWiki/Plugin/map.pm ../IkiWiki/Plugin/mdwn.pm ../IkiWiki/Plugin/meta.pm ../IkiWiki/Plugin/mirrorlist.pm ../IkiWiki/Plugin/more.pm ../IkiWiki/Plugin/opendiscussion.pm ../IkiWiki/Plugin/openid.pm ../IkiWiki/Plugin/orphans.pm ../IkiWiki/Plugin/otl.pm ../IkiWiki/Plugin/pagecount.pm ../IkiWiki/Plugin/pagestats.pm ../IkiWiki/Plugin/passwordauth.pm ../IkiWiki/Plugin/poll.pm ../IkiWiki/Plugin/polygen.pm ../IkiWiki/Plugin/prettydate.pm ../IkiWiki/Plugin/rawhtml.pm ../IkiWiki/Plugin/rst.pm ../IkiWiki/Plugin/search.pm ../IkiWiki/Plugin/shortcut.pm ../IkiWiki/Plugin/sidebar.pm ../IkiWiki/Plugin/signinedit.pm ../IkiWiki/Plugin/skeleton.pm ../IkiWiki/Plugin/smiley.pm ../IkiWiki/Plugin/tag.pm ../IkiWiki/Plugin/template.pm ../IkiWiki/Plugin/textile.pm ../IkiWiki/Plugin/toc.pm ../IkiWiki/Plugin/toggle.pm ../IkiWiki/Plugin/typography.pm ../IkiWiki/Plugin/wikitext.pm ../IkiWiki/Rcs/Stub.pm ../IkiWiki/Rcs/git.pm ../IkiWiki/Rcs/mercurial.pm ../IkiWiki/Rcs/svn.pm ../IkiWiki/Rcs/tla.pm ../IkiWiki/Render.pm ../IkiWiki/Setup.pm ../IkiWiki/Setup/Standard.pm ../IkiWiki/UserInfo.pm ../IkiWiki/Wrapper.pm ../ikiwiki.in ../IkiWiki.pm -o ikiwiki.pot -Lperl --add-comments=translators
62 ../IkiWiki/Wrapper.pm:64: invalid variable interpolation at "$"
63 make[1]: *** [ikiwiki.pot] Error 1
64 make[1]: Leaving directory `/home/ben/tmp/ikiwiki/po'
65 make: *** [extra_build] Error 2
66 </pre>
67
68 >>>>>> Other than installing a newer version of `gettext` from outside of the repos, is there any workaround?  
69
70 >>>>>>> It's probably because you're pulling it from svn, and I don't
71 >>>>>>> always update the pot file every time I commit to svn. So this will
72 >>>>>>> affect svn checkouts, but not released tarballs. Anyway, I put in a
73 >>>>>>> workaround.. [[bugs/done]] --[[Joey]]