summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-02 17:24:54 +0100
committerintrigeri <intrigeri@boum.org>2009-01-02 17:24:54 +0100
commit33f9eeb4fb2a530840922098121a5d22d92cf890 (patch)
treea5b590e3a297000997f4d3fbe77d904f4b65bdb7 /IkiWiki/Plugin
parentda26603e0780b3079ee8e94ec3651fdc615cc3f9 (diff)
po/i18n: move the function names out of the translatable strings
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm23
1 files changed, 13 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 7cec589ab..a920618fa 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -128,7 +128,8 @@ sub getsetup () {
sub checkconfig () {
foreach my $field (qw{po_master_language po_slave_languages}) {
if (! exists $config{$field} || ! defined $config{$field}) {
- error(sprintf(gettext("Must specify %s when using the %s plugin"), $field, 'po'));
+ error(sprintf(gettext("Must specify %s when using the %s plugin"),
+ $field, 'po'));
}
}
if (! (keys %{$config{po_slave_languages}})) {
@@ -150,8 +151,8 @@ sub checkconfig () {
elsif (! grep {
$config{po_link_to} eq $_
} ('default', 'current', 'negotiated')) {
- warn(sprintf(gettext('po_link_to=%s is not a valid setting, falling back to po_link_to=default'),
- $config{po_link_to}));
+ warn(sprintf(gettext('%s is not a valid value for po_link_to, falling back to po_link_to=default'),
+ $config{po_link_to}));
$config{po_link_to}='default';
}
elsif ($config{po_link_to} eq "negotiated" && ! $config{usedirs}) {
@@ -495,7 +496,7 @@ sub formbuilder (@) {
else {
# make sure the default value is not po;
# does this case actually happen?
- debug sprintf("po(formbuilder) type field is not select - not implemented yet");
+ debug "po(formbuilder) ".gettext("type field is not select - not implemented yet");
}
}
}
@@ -784,19 +785,21 @@ sub refreshpofiles ($@) {
my $potfile=potfile($masterfile);
(-e $potfile)
- or error(sprintf(gettext("po(refreshpofiles) POT file (%s) does not exist"),
- $potfile));
+ or error("po(refreshpofiles) ".sprintf(gettext("POT file (%s) does not exist"),
+ $potfile));
foreach my $pofile (@pofiles) {
IkiWiki::prep_writefile(basename($pofile),dirname($pofile));
if (-e $pofile) {
system("msgmerge", "-U", "--backup=none", $pofile, $potfile) == 0
- or error(sprintf(gettext("po(refreshpofiles) failed to update %s"),
+ or error("po(refreshpofiles) ".
+ sprintf(gettext("failed to update %s"),
$pofile));
}
else {
File::Copy::syscopy($potfile,$pofile)
- or error(sprintf(gettext("po(refreshpofiles) failed to copy the POT file to %s"),
+ or error("po(refreshpofiles) ".
+ sprintf(gettext("failed to copy the POT file to %s"),
$pofile));
}
}
@@ -844,8 +847,8 @@ sub percenttranslated ($) {
'file_in_name' => [ $masterfile ],
'file_in_charset' => 'utf-8',
'file_out_charset' => 'utf-8',
- ) or error(sprintf(gettext("po(percenttranslated) failed to translate %s"),
- $page));
+ ) or error("po(percenttranslated) ".
+ sprintf(gettext("failed to translate %s"), $page));
my ($percent,$hit,$queries) = $doc->stats();
$percent =~ s/\.[0-9]+$//;
return $percent;