From 98d2d9833d04a88d2e1b1f6f92668190d8d36195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Wed, 7 Apr 2010 04:55:32 +0200 Subject: Javascript to generate TOCs --- templates/page.mako | 26 +++++++++++++++++++++++++- templates/pages/translating.mako | 3 +++ 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/page.mako b/templates/page.mako index 264ddee..49671ff 100644 --- a/templates/page.mako +++ b/templates/page.mako @@ -1,5 +1,6 @@ <%! title = "" + uses_menu = False %> <%inherit file="/root.mako" /> @@ -7,6 +8,29 @@

${self.attr.title}

${next.body()} +% if self.attr.uses_menu: + +% endif + + +<%def name="style()"> + ${parent.style()} + + + <%def name="h2()"> -

» ${caller.body()}

+ <% + if self.attr.uses_menu: + c = capture(caller.body) + name = c.replace(" ", "_").lower() + mlist = getattr(self.attr, "mlist", []) + mlist.append((str(name), str(c))) + + self.attr.mlist = mlist + else: + name = "#" + %> +

» ${caller.body()}

diff --git a/templates/pages/translating.mako b/templates/pages/translating.mako index 6e76b33..2135480 100644 --- a/templates/pages/translating.mako +++ b/templates/pages/translating.mako @@ -1,5 +1,6 @@ <%! title = "Translation Guide" + uses_menu = True %> <%inherit file="/page.mako" /> @@ -7,6 +8,8 @@ Portato supports native languages. Nevertheless the translations into these languages have to be created. This page shows how to add a new translation or how to extend an existing translation.

+
+ <%self:h2>Short introduction about NLS in Linux

All translatable strings of a program are listed in a *.pot file. For each translation a single $LANG.po file is created, which holds each translatable string and the corresponding translation. During installation these po-files are compiled into .mo files, which are then used to get the translations during runtime. -- cgit v1.2.3