[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] More po updates

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-05-23 15:16:37 CEST

On Sat, 22 May 2004, Nicolás Lichtmaier wrote:

> When I'm bored I do this:
>
And you push work on all the translators, too:-)

Here are some comments. Mostly too long lines, but a few others. Also, I
didn't mention all cases with long lines. You have to look through the
last half of the patch for some more. Otherwise, it looks fine.

Index: subversion/libsvn_client/checkout.c
===================================================================
--- subversion/libsvn_client/checkout.c (revisión: 9860)
+++ subversion/libsvn_client/checkout.c (copia de trabajo)
@@ -93,10 +94,10 @@
       SVN_ERR (ra_lib->check_path (session, "", revnum, &kind, pool));
       if (kind == svn_node_none)
         return svn_error_createf (SVN_ERR_RA_ILLEGAL_URL, NULL,
- "URL '%s' doesn't exist", URL);
+ _("URL '%s' doesn't exist"), URL);
       else if (kind == svn_node_file)
         return svn_error_createf (SVN_ERR_UNSUPPORTED_FEATURE , NULL,
- "URL '%s' refers to a file, not a directory",
+ _("URL '%s' refers to a file, not a directory"),

Line length >80.

Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revisión: 9860)
+++ subversion/libsvn_client/diff.c (copia de trabajo)
@@ -89,8 +89,8 @@
   int i;

   SVN_ERR (file_printf_from_utf8 (file,
- APR_EOL_STR "Property changes on: %s"
- APR_EOL_STR, path));
+ _("%sProperty changes on: %s%s"),
+ APR_EOL_STR, APR_EOL_STR, path));

The last two args should be swapped. BTW, I don't know if this is part of the
diff "format", so should it really be translated? This last question
applies to the whole file, I think. Maybe others have an opinion?

Index: subversion/libsvn_client/commit_util.c
@@ -217,7 +217,7 @@
       && (kind != svn_node_none))
     {
       return svn_error_createf
- (SVN_ERR_NODE_UNKNOWN_KIND, NULL, "Unknown entry kind for '%s'", path);
+ (SVN_ERR_NODE_UNKNOWN_KIND, NULL, _("Unknown entry kind for '%s'"), path);

Line length.

@@ -586,10 +586,10 @@
       SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, subpool));
       if (! entry)
         return svn_error_createf (SVN_ERR_ENTRY_NOT_FOUND, NULL,
- "'%s' is not under version control", target);
+ _("'%s' is not under version control"), target);

Dito.

@@ -640,9 +640,9 @@
       if ((entry->copied) && (entry->schedule == svn_wc_schedule_normal))
         return svn_error_createf
           (SVN_ERR_ILLEGAL_TARGET, NULL,
- "Entry for '%s' is marked as 'copied' but is not itself scheduled\n"
- "for addition. Perhaps you're committing a target that this\n"
- "inside of an unversioned (or not-yet-versioned) directory?",
+ _("Entry for '%s' is marked as 'copied' but is not itself scheduled\n"
+ "for addition. Perhaps you're committing a target that this\n"
+ "inside of an unversioned (or not-yet-versioned) directory?"),

Dito.

@@ -1334,10 +1334,10 @@
   const char *copystuffs = "";
   if (copyfrom_path && SVN_IS_VALID_REVNUM(copyfrom_revision))
     copystuffs = apr_psprintf (pool,
- " (copied from %s:%ld)",
+ _(" (copied from %s:%ld)"),
                                copyfrom_path,
                                copyfrom_revision);
- fprintf (stderr, " Adding : %s%s\n", path, copystuffs);
+ fprintf (stderr, _(" Adding : %s%s\n"), path, copystuffs);
   *baton = new_baton;
   return (*db->eb->real_editor->add_file) (path, db->real_baton,
                                            copyfrom_path, copyfrom_revision,

This and the rest of this file is used for debugging only. We don't need to
internationalize that, do we? :-)

Index: subversion/clients/cmdline/propdel-cmd.c
===================================================================
--- subversion/clients/cmdline/propdel-cmd.c (revisión: 9860)
+++ subversion/clients/cmdline/propdel-cmd.c (copia de trabajo)
@@ -80,12 +82,12 @@
          which needs to be converted to a URL. */
       if (targets->nelts <= 0)
         return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, NULL,
- "No URL target available");
+ _("No URL target available"));
       target = ((const char **) (targets->elts))[0];
       SVN_ERR (svn_client_url_from_path (&URL, target, pool));
       if (URL == NULL)
         return svn_error_create(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
- "Either a URL or versioned item is required");
+ _("Either a URL or versioned item is required"));

Line length.

Index: subversion/clients/cmdline/log-cmd.c
===================================================================
--- subversion/clients/cmdline/log-cmd.c (revisión: 9860)
+++ subversion/clients/cmdline/log-cmd.c (copia de trabajo)
@@ -252,8 +253,9 @@
     {
       lines = num_lines (msg_stdout);
       SVN_ERR (svn_stream_printf (lb->out, pool,
- " | %d line%s", lines,
- (lines > 1) ? "s" : ""));
+ (lines == 1) ?
+ _(" | %d line") : _(" | %d lines"),
+ lines));
     }

Hmmm... Did we reach consensus about using ngettext? According to the gettext
manual, this doesn't work for all languages, i.e. languages with more than
two plural forms.

//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 23 15:11:03 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.