aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/hardcoded___34__Discussion__34___link.mdwn
blob: 0444a1d2b1c68b9f166426be737fdefe7cd271ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
I can't translate "Discussion" link in `templates/inlinepage.tmpl`
and `templates/page.tmpl` files, because it's hardcoded in
ikiwiki sources:

    ptecza@horus:~/svn/ikiwiki$ rgrep -i DISCUSSIONLINK . |grep -v '.svn'
    ./templates/inlinepage.tmpl:<TMPL_IF NAME="DISCUSSIONLINK">
    ./templates/inlinepage.tmpl:<li><TMPL_VAR DISCUSSIONLINK></li>
    ./templates/page.tmpl:<TMPL_IF NAME="DISCUSSIONLINK">
    ./templates/page.tmpl:<li><TMPL_VAR DISCUSSIONLINK><br /></li>
    ./IkiWiki/Plugin/inline.pm:                                     $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
    ./IkiWiki/Render.pm:            $template->param(discussionlink => htmllink($page, $page, "Discussion", 1, 1));

I hope it's a bug, not a feature, because I don't have the same
problem with other links, for example "Edit", "RecentChanges"
or "History".

--Pawel

> There are good reasons for feeding a full html link into the template,
> rather than the urls used for the other links. For one, the Discussion
> link needs to be different if the Discussion page doesn't yet exist.
> 
> As noted in [[patchqueue/l10n]], there are some other places in ikiwiki
> that hard code English strings, and I feel that using standard gettext
> and po files is the best approach for these, although Recai suggested an
> approach of translating the strings using a template file. --[[Joey]]