]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/hardcoded___34__Discussion__34___link.mdwn
web commit by tschwinge: Problem with umlauts and friends.
[ikiwiki.git] / 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". --[[Paweł|ptecza]]
16
17 > There are good reasons for feeding a full html link into the template,
18 > rather than the urls used for the other links. For one, the Discussion
19 > link needs to be different if the Discussion page doesn't yet exist.
20
21 >> You can always use `<tmpl_if>` and `<tmpl_else>` construct in that place ;) --[[Paweł|ptecza]]
22
23 >>> Not without duplicating the logic that constructs a link to an
24 >>> existing/nonexisting page in two places, one in code in ikiwiki and one
25 >>> in the template. Not good design. --[[Joey]]
26  
27 > As noted in [[todo/l10n]], there are some other places in ikiwiki
28 > that hard code English strings, and I feel that using standard gettext
29 > and po files is the best approach for these, although Recai suggested an
30 > approach of translating the strings using a template file. --[[Joey]]
31
32 >> You know that I rather prefer static templates, but it's your choice,
33 >> of course.
34 >> 
35 >> BTW, is there a chance for configurable name of Discussion page?
36 >> In my wiki I use only Polish name of pages, so I would like to have
37 >> dyskusja.html page, instead of discussion.html page. --[[Paweł|ptecza]]
38
39 >>> Ikiwiki is now fully internationalised, so you can change the name of
40 >>> the Discussion page and quite a lot more (but hardly everything) by
41 >>> translating it. [[bugs/done]]! There's a `po/debconf.pot` in the source
42 >>> now for translating. See [[translation]]. --[[Joey]]
43
44 >>>> Joey, you're great! ;) Thanks a lot! I'll try ikiwiki l10n stuff soon. --[[Paweł|ptecza]]