]> sipb.mit.edu Git - ikiwiki.git/commitdiff
added some comments for translators
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 4 Jan 2007 12:00:23 +0000 (12:00 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 4 Jan 2007 12:00:23 +0000 (12:00 +0000)
IkiWiki.pm
IkiWiki/CGI.pm
IkiWiki/Plugin/shortcut.pm
IkiWiki/Setup.pm
IkiWiki/UserInfo.pm
IkiWiki/Wrapper.pm
doc/translation/discussion.mdwn
po/Makefile
po/es.po

index 8f7d8d20b4f22381e18cb556249a64ccb3887b8b..5b78014d110982c688c564fa969dff3bbddc0c66 100644 (file)
@@ -517,6 +517,10 @@ sub preprocess ($$$;$) { #{{{
                        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}).
                                "]]";
index 5d21d0674eca2b273aaeef28e77e5c418b62531a..85fc1a38614b17ce38984a597319306140eba2ea 100644 (file)
@@ -46,6 +46,8 @@ sub page_locked ($$;$) { #{{{
                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)));
index 9479306a8c37d4558b05cead14ee47119c9477e9..2a4a36a41764e29d7f50bcb03f50af167f32538a 100644 (file)
@@ -27,6 +27,9 @@ sub preprocess_shortcut (@) { #{{{
        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});
 } # }}}
 
index 560bc798bf4cd03da85e16eeb97aeed4d72125a5..2d6e1d1cffe082315e3f64493c570e86c7d39649 100644 (file)
@@ -10,6 +10,8 @@ package IkiWiki;
 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;
        {
index 03d63cc23376722cee7663828e91e69b0fb79030..267f5d9cd980d41b21750072bd92652564e2479a 100644 (file)
@@ -132,6 +132,10 @@ sub send_commit_mails ($$$@) { #{{{
                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);
 
index e761085fb8d54cad74fdd41fe29071e93cac5c0d..beabc56491b386940686997753ec8e8490063bac 100644 (file)
@@ -59,6 +59,8 @@ EOF
        $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. */
@@ -94,6 +96,7 @@ $envsave
 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");
@@ -101,6 +104,7 @@ EOF
            ! chmod(oct($config{wrappermode}), $wrapper)) {
                error("chmod $wrapper: $!");
        }
+       #translators: The parameter is a filename.
        printf(gettext("successfully generated %s\n"), $wrapper);
 } #}}}
 
index 32cc3f5e9f5584b73b8f3a79c956376f768fdad2..1ee89d57dba47cecd8ed0aba266b54678e4fd570 100644 (file)
@@ -72,3 +72,21 @@ So I have a request to Joey and the rest of ikiwiki coders:
 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]]
index 910114e67f647b6d06c46ac3d5a0a5d84f97eb79..2d34c6fe8f65155976b594a33a45abced9084340 100644 (file)
@@ -16,7 +16,7 @@ install: all
 
 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
index a384e566ff7adae932fcc3eebda086abfe9bb994..619171f8c876724d452c2ad7d6f94c2c402b27e9 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
 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"
@@ -16,35 +16,37 @@ msgstr ""
 "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."
 
@@ -211,7 +213,10 @@ msgstr "actualizando el índice de búsquedas de hyperstraier"
 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"
@@ -296,7 +301,9 @@ msgstr "eliminando la página %s puesto que ya no se deriva de %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"
@@ -317,7 +324,11 @@ msgstr "actualizando el wiki.."
 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"
@@ -336,17 +347,21 @@ msgstr ""
 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"
@@ -365,7 +380,11 @@ msgstr ""
 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 ""