From 885e4b607ae6cdcd48c792ce45c8b7faa29a76fb Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 31 Dec 2008 16:45:55 +0100 Subject: po: new po_translation_status_in_links option ... to make configurable the last implemented feature. Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index cee7a7654..33bc2b057 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -110,6 +110,13 @@ sub getsetup () { #{{{ safe => 1, rebuild => 1, }, + po_translation_status_in_links => { + type => "boolean", + example => 1, + description => "display translation status in links to translations", + safe => 1, + rebuild => 1, + }, } #}}} sub checkconfig () { #{{{ @@ -144,6 +151,10 @@ sub checkconfig () { #{{{ warn(gettext('po_link_to=negotiated requires usedirs to be enabled, falling back to po_link_to=default')); $config{po_link_to}='default'; } + if (! exists $config{po_translation_status_in_links} || + ! defined $config{po_translation_status_in_links}) { + $config{po_translation_status_in_links}=1; + } push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/; } #}}} @@ -492,6 +503,7 @@ sub mynicepagetitle ($;$) { #{{{ my $res = $origsubs{'nicepagetitle'}->($page, $unescaped); return $res unless istranslation($page); + return $res unless $config{po_translation_status_in_links}; return $res.' ('.percenttranslated($page).' %)'; } #}}} -- cgit v1.2.3 ter'>treecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
committerJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
commitfd54908da2b05c526dd3bee9b6dcd093214a220d (patch)
treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/37/21/20190625010001.E6F741CD2E2@lxp5.free-owl.de
parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
Diffstat (limited to 'tags/37/21/20190625010001.E6F741CD2E2@lxp5.free-owl.de')
/127c4d4127cacc.127cacc127c4d4@algx.net/inbox?h=master'>tags/37/e8/127c4d4127cacc.127cacc127c4d4@algx.net/inbox
0
-rw-r--r--tags/37/e8/127c4d4127cacc.127cacc127c4d4@algx.net/old0
2 files changed, 0 insertions, 0 deletions