if ($preprocessing{$page}++ > 3) {
# Avoid loops of preprocessed pages preprocessing
# other pages that preprocess them, etc.
+ #translators: The first parameter is a
+ #translators: preprocessor directive name,
+ #translators: the second a page name, the
+ #translators: third a number.
return "[[".sprintf(gettext("%s preprocessing loop detected on %s at depth %i"),
$command, $page, $preprocessing{$page}).
"]]";
if (pagespec_match($page, userinfo_get($admin, "locked_pages"))) {
return 1 if $nonfatal;
+ #translators: The first parameter is a page name,
+ #translators: second is the user who locked it.
error(sprintf(gettext("%s is locked by %s and cannot be edited"),
htmllink("", "", $page, 1),
userlink($admin)));
hook(type => "preprocess", no_override => 1, id => $params{name},
call => sub { shortcut_expand($params{url}, $params{desc}, @_) });
+ #translators: This is used to display what shortcuts are defined.
+ #translators: First parameter is the name of the shortcut, the second
+ #translators: is an URL.
return sprintf(gettext("shortcut %s points to %s"), $params{name}, $params{url});
} # }}}
sub setup () { # {{{
my $setup=possibly_foolish_untaint($config{setup});
delete $config{setup};
+ #translators: The first parameter is a filename, and the second
+ #translators: is a (probably not translated) error message.
open (IN, $setup) || error(sprintf(gettext("cannot read %s: %s"), $setup, $!));
my $code;
{
else {
$pagelist.=join(" ", @changed_pages);
}
+ #translators: The three variables are the name of the wiki,
+ #translators: A list of one or more pages that were changed,
+ #translators: And the name of the user making the change.
+ #translators: This is used as the subject of a commit email.
my $subject=sprintf(gettext("update of %s's %s by %s"),
$config{wikiname}, $pagelist, $user);
$configstring=~s/"/\\"/g;
$configstring=~s/\n/\\\n/g;
+ #translators: The first parameter is a filename, and the second is
+ #translators: a (probably not translated) error message.
open(OUT, ">$wrapper.c") || error(sprintf(gettext("failed to write %s: %s"), "$wrapper.c", $!));;
print OUT <<"EOF";
/* A wrapper for ikiwiki, can be safely made suid. */
EOF
close OUT;
if (system("gcc", "$wrapper.c", "-o", $wrapper) != 0) {
+ #translators: The parameter is a C filename.
error(sprintf(gettext("failed to compile %s"), "$wrapper.c"));
}
unlink("$wrapper.c");
! chmod(oct($config{wrappermode}), $wrapper)) {
error("chmod $wrapper: $!");
}
+ #translators: The parameter is a filename.
printf(gettext("successfully generated %s\n"), $wrapper);
} #}}}
please write more verbose gettext messages and don't fear using
subject there. It will be huge help for me and other ikiwiki
translators. Thank you! :) --Pawel
+
+> Well, those messages are mostly laconic because they're output by
+> ikiwiki running in unix program mode and other tight situations, and
+> it should be clear from context when you see the expanded message what
+> the various bits are.
+>
+> For example, "update of foowiki's MooBar by joey" seems to say enough to
+> be clear (and fit in mutt's subject line display), while the corresponding
+> "actualizado el wiki foowiki y la página MooBar por el usuario joey" feels
+> a bit verbose. (And should it say "updated foowiki *and* the MooBar page"
+> like that? My Spanish sucks though..) In my crappy Spanish I might instead
+> say something like "actualizado MooBar de foowiki por joey". Or maybe
+> "actualizado página Moobar por joey"?
+>
+> Anyway, to get back to your point, it's true that translators often
+> need additonal context about things like what variables expand to, and
+> size limits. This is generally done by adding comments in the pot file,
+> and I've turned that on, and added a few. --[[Joey]]
ikiwiki.pot: $(POTFILES)
@echo "Rebuilding the pot file"
- xgettext $(POTFILES) -o ikiwiki.pot -Lperl
+ xgettext $(POTFILES) -o ikiwiki.pot -Lperl --add-comments=translators
clean:
rm -f ikiwiki.pot $(MOFILES) messages messages.mo
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-01-03 14:11-0500\n"
+"POT-Creation-Date: 2007-01-04 06:58-0500\n"
"PO-Revision-Date: 2007-01-03 09:37+0100\n"
"Last-Translator: Víctor Moral <victor@taquiones.net>\n"
"Language-Team: spanish <es@li.org>\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-#: ../IkiWiki/CGI.pm:49
+#. translators: The first parameter is a page name,
+#. translators: second is the user who locked it.
+#: ../IkiWiki/CGI.pm:51
#, perl-format
msgid "%s is locked by %s and cannot be edited"
msgstr "La página %s está bloqueada por %s y no puede modificarse"
-#: ../IkiWiki/CGI.pm:139
+#: ../IkiWiki/CGI.pm:141
msgid "You need to log in first."
msgstr "Antes es necesario identificarse"
-#: ../IkiWiki/CGI.pm:257
+#: ../IkiWiki/CGI.pm:259
msgid "Preferences saved."
msgstr "Las preferencias se han guardado."
-#: ../IkiWiki/CGI.pm:408 ../IkiWiki/Plugin/inline.pm:162
+#: ../IkiWiki/CGI.pm:410 ../IkiWiki/Plugin/inline.pm:162
#: ../IkiWiki/Render.pm:97 ../IkiWiki/Render.pm:161
msgid "discussion"
msgstr "comentarios"
-#: ../IkiWiki/CGI.pm:447
+#: ../IkiWiki/CGI.pm:449
#, perl-format
msgid "creating %s"
msgstr "creando página %s"
-#: ../IkiWiki/CGI.pm:464 ../IkiWiki/CGI.pm:507
+#: ../IkiWiki/CGI.pm:466 ../IkiWiki/CGI.pm:509
#, perl-format
msgid "editing %s"
msgstr "modificando página %s"
-#: ../IkiWiki/CGI.pm:624
+#: ../IkiWiki/CGI.pm:626
msgid "You are banned."
msgstr "Ha sido expulsado."
msgid "shortcut missing name or url parameter"
msgstr "shortcut necesita el párametro name ó el parámetro url"
-#: ../IkiWiki/Plugin/shortcut.pm:30
+#. translators: This is used to display what shortcuts are defined.
+#. translators: First parameter is the name of the shortcut, the second
+#. translators: is an URL.
+#: ../IkiWiki/Plugin/shortcut.pm:33
#, perl-format
msgid "shortcut %s points to %s"
msgstr "El atajo %s lleva a %s"
msgid "ikiwiki: cannot render %s"
msgstr "ikwiki: no puedo convertir la página %s"
-#: ../IkiWiki/Setup.pm:13
+#. translators: The first parameter is a filename, and the second
+#. translators: is a (probably not translated) error message.
+#: ../IkiWiki/Setup.pm:15
#, perl-format
msgid "cannot read %s: %s"
msgstr "no puedo leer el archivo %s: %s"
msgid "done"
msgstr "completado"
-#: ../IkiWiki/UserInfo.pm:135
+#. translators: The three variables are the name of the wiki,
+#. translators: A list of one or more pages that were changed,
+#. translators: And the name of the user making the change.
+#. translators: This is used as the subject of a commit email.
+#: ../IkiWiki/UserInfo.pm:139
#, perl-format
msgid "update of %s's %s by %s"
msgstr "actualizado el wiki %s y la página %s por el usuario %s"
msgid "wrapper filename not specified"
msgstr "el programa envoltorio no ha sido especificado"
-#: ../IkiWiki/Wrapper.pm:62
+#. translators: The first parameter is a filename, and the second is
+#. translators: a (probably not translated) error message.
+#: ../IkiWiki/Wrapper.pm:64
#, perl-format
msgid "failed to write %s: %s"
msgstr "no puedo escribir en %s: %s"
-#: ../IkiWiki/Wrapper.pm:97
+#. translators: The parameter is a C filename.
+#: ../IkiWiki/Wrapper.pm:100
#, perl-format
msgid "failed to compile %s"
msgstr "ha fallado la compilación del programa envoltorio %s"
-#: ../IkiWiki/Wrapper.pm:104
+#. translators: The parameter is a filename.
+#: ../IkiWiki/Wrapper.pm:108
#, perl-format
msgid "successfully generated %s\n"
msgstr "creado con éxito el programa envoltorio %s\n"
msgid "Error"
msgstr "Error"
-#: ../IkiWiki.pm:520
+#. translators: The first parameter is a
+#. translators: preprocessor directive name,
+#. translators: the second a page name, the
+#. translators: third a number.
+#: ../IkiWiki.pm:524
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""