web commit by http://getopenid.com/ptecza: Response
[ikiwiki] / doc / bugs / hardcoded___34__Discussion__34___link.mdwn
1 I can't translate "Discussion" link in `templates/inlinepage.tmpl`
2 and `templates/page.tmpl` files, because it's hardcoded in
3 ikiwiki sources:
4
5     ptecza@horus:~/svn/ikiwiki$ rgrep -i DISCUSSIONLINK . |grep -v '.svn'
6     ./templates/inlinepage.tmpl:<TMPL_IF NAME="DISCUSSIONLINK">
7     ./templates/inlinepage.tmpl:<li><TMPL_VAR DISCUSSIONLINK></li>
8     ./templates/page.tmpl:<TMPL_IF NAME="DISCUSSIONLINK">
9     ./templates/page.tmpl:<li><TMPL_VAR DISCUSSIONLINK><br /></li>
10     ./IkiWiki/Plugin/inline.pm:                                     $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
11     ./IkiWiki/Render.pm:            $template->param(discussionlink => htmllink($page, $page, "Discussion", 1, 1));
12
13 I hope it's a bug, not a feature, because I don't have the same
14 problem with other links, for example "Edit", "RecentChanges"
15 or "History".
16
17 --Pawel
18
19 > There are good reasons for feeding a full html link into the template,
20 > rather than the urls used for the other links. For one, the Discussion
21 > link needs to be different if the Discussion page doesn't yet exist.
22
23 >> You can always use <tmpl_if> and <tmpl_else> construct in that place ;) --Pawel
24  
25 > As noted in [[patchqueue/l10n]], there are some other places in ikiwiki
26 > that hard code English strings, and I feel that using standard gettext
27 > and po files is the best approach for these, although Recai suggested an
28 > approach of translating the strings using a template file. --[[Joey]]
29
30 >> You know that I rather prefer static templates, but it's your choice,
31 >> of course.
32 >> 
33 >> BTW, is there a chance for configurable name of Discussion page?
34 >> In my wiki I use only Polish name of pages, so I would like to have
35 >> dyskusja.html page, instead of discussion.html page. --Pawel