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

Localization of user replies

From: Norbert Unterberg <nepo_at_gmx.net>
Date: 2004-12-05 20:13:21 CET

While doing some polishing work on the German translation, I noticed
something which currently fails to localize: The user's response when
subversion asks questions:

Example: in clients/cmdline/prompt.c:297 subversion asks the user:
(R)eject, accept (t)emporarily or accept (p)ermanently?
Obviously the possible replies are R, T, P which correspond to the first
letters of some words in the question. These letters are hard coded in
the source code and can not be localized. Can you imagine how hard is it
to find adequate words in different languages that also contain these
letters?

Here my suggestion:
Allow to localize the replies as well. This should not be too hard and
coud be done like this:
Add an additional string that contains the possiblie user replies in
upper and lower case:

const char *replies = _("RrTtPp"); /* allow l10n */

...

  svn_stringbuf_appendcstr

    (buf, _("(R)eject, accept (t)emporarily or accept (p)ermanently? "));

...

  SVN_ERR (prompt (&choice, buf->data, FALSE, ctx, pool));

  if (choice && (choice[0] == replies[2] || choice[0] == replies[3]))

   { ... }

  else if (may_save && choice && (choice[0] == replies[4] || choice[0] == replies[5]))

   { ... }

The person working on the translation would then translate the question
and the replies string, and had the ability to find the best replies for
his language.

What do you think?

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 5 20:14:42 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.