po(formbuilder_setup): use a template to display the warning
authorintrigeri <intrigeri@boum.org>
Fri, 2 Jan 2009 11:27:10 +0000 (12:27 +0100)
committerintrigeri <intrigeri@boum.org>
Fri, 2 Jan 2009 11:27:10 +0000 (12:27 +0100)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm
templates/pocreatepage.tmpl [new file with mode: 0644]

index 2f43c498347e9bb4b763caebff30e3a6713a6444..c8b5e8fdef481b2dc9ba35afe22e5b89bb1d9a1e 100644 (file)
@@ -447,11 +447,9 @@ sub formbuilder_setup (@) {
 
        return unless (defined $form->field("do") && $form->field("do") eq "create");
 
-       $form->tmpl_param(
-               message => sprintf(
-                               gettext('**WARNING: this page must be written in %s**'),
-                               $config{po_master_language}{name})
-       );
+       my $template=template("pocreatepage.tmpl");
+       $template->param(LANG => $config{po_master_language}{name});
+       $form->tmpl_param(message => $template->output);
 }
 
 
diff --git a/templates/pocreatepage.tmpl b/templates/pocreatepage.tmpl
new file mode 100644 (file)
index 0000000..96c8fdd
--- /dev/null
@@ -0,0 +1,3 @@
+<p>
+<b>WARNING</b> this page must be written in <TMPL_VAR NAME="LANG">.
+</p>
\ No newline at end of file