You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@collab.net> on 2001/07/10 15:54:15 UTC

Re: i18n and wrapper-tools

[I've moved this thread to `dev@subversion.tigris.org', from
`issues@...'.  -kff].

"Stefan Monnier" <mo...@rum.cs.yale.edu>:
> While it is sometimes nice to see messages in my mother tongue,
> I'm wondering if Subversion does its i18n properly.
> 
> More specifically, I'd like to make sure that all messages are
> easy to recognize for a wrapper tool (such as an Emacs interface
> to Subversion).  I guess it means something like "add a message
> number" so we don't need to look at the message itself and
> also make sure that the text itself can be skipped easily
> (f.ex. by disallowing \n inside the text and terminating all messages
> with \n).

Subversion doesn't have any i18n at all, at the moment.  While it is
on the goals list, all developers are currently working on other
things; no one is actively making i18n happen yet.

Would you be interested in helping with it?  ("Helping" is putting it
charitably -- you'd really have to take complete ownership of the i18n
issue, and figure out what needs to be done throughout Subversion.)

It would be wonderful to have any volunteer step forward for this --
otherwise, the i18n work will almost surely have to be put off until
post-1.0.  That wouldn't be horrible, since this is the sort of thing
that _can_ be added later without huge code perturbance, however, it
would be nice to avoid the delay.

See this message

   http://subversion.tigris.org/servlets/ReadMsg?msgId=25162&listName=dev

and its surrounding thread for some previous discussion of this issue.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Branko Čibej <br...@xbc.nu>.
Done. `svn' now has a --setlocale option, which already does what we'll 
want (never mind that we're not doing any localisation yet). Anyone who 
wants to wrap `svn' and parse the output had better start using this 
option, it'll save you a lot of grief later on.

    Brane


Branko �ibej wrote:

> Karl Fogel wrote:
>
>> +1 on the switch idea.  It's a lot easier to handle than various shell
>> syntaces for specifying environment, and those aren't even always
>> available.  Will make testing a lot easier too.
>>
>> Branko, I'm assuming you mean to commit this, correct if wrong...
>
> O.K., I'll do this.
>
>> (is there other stuff that has to be done first?)
>>
> Well, apr_setlocale() would be nice, but that opens a whole new kettle 
> of fish. :-)
>
> I'll just call setlocale(), with the understanding that 
> "--setlocale=C" will be the only portable usage -- thus saith the C 
> standard.
>
>    Brane
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Branko Čibej <br...@xbc.nu>.
Karl Fogel wrote:

>+1 on the switch idea.  It's a lot easier to handle than various shell
>syntaces for specifying environment, and those aren't even always
>available.  Will make testing a lot easier too.
>
>Branko, I'm assuming you mean to commit this, correct if wrong... 
>
O.K., I'll do this.

>(is there other stuff that has to be done first?)
>
Well, apr_setlocale() would be nice, but that opens a whole new kettle 
of fish. :-)

I'll just call setlocale(), with the understanding that "--setlocale=C" 
will be the only portable usage -- thus saith the C standard.

    Brane


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM :   <br...@acm.org>            http://www.acm.org/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Karl Fogel <kf...@collab.net>.
+1 on the switch idea.  It's a lot easier to handle than various shell
syntaces for specifying environment, and those aren't even always
available.  Will make testing a lot easier too.

Branko, I'm assuming you mean to commit this, correct if wrong... (is
there other stuff that has to be done first?)

-K

Branko Čibej <br...@xbc.nu> writes:
> There's a very simple way for the someday-to-be-forthcoming
> svn-mode.el and similar wrappers to avoid l10n-related problems:
> instead of running
> 
>     svn <parameters>
> 
> you just run
> 
>     env LC_ALL=C LANG=C svn <parameters>
> 
> 
> Perhaps, in order to support such tools, might we consider adding a
> "--setlocale=name" switch to svn, that would override the locale
> defined by the environment? For one thing, that would work on non-Unix
> platforms that don't have env; for another, it would help test the
> various translations, once we have them.
> 
>     Brane
> 
> 
> Karl Fogel wrote:
> 
> >[I've moved this thread to `dev@subversion.tigris.org', from
> >`issues@...'.  -kff].
> >
> >"Stefan Monnier" <mo...@rum.cs.yale.edu>:
> >
> >>While it is sometimes nice to see messages in my mother tongue,
> >>I'm wondering if Subversion does its i18n properly.
> >>
> >>More specifically, I'd like to make sure that all messages are
> >>easy to recognize for a wrapper tool (such as an Emacs interface
> >>to Subversion).  I guess it means something like "add a message
> >>number" so we don't need to look at the message itself and
> >>also make sure that the text itself can be skipped easily
> >>(f.ex. by disallowing \n inside the text and terminating all messages
> >>with \n).
> >>
> >
> >Subversion doesn't have any i18n at all, at the moment.  While it is
> >on the goals list, all developers are currently working on other
> >things; no one is actively making i18n happen yet.
> >
> >Would you be interested in helping with it?  ("Helping" is putting it
> >charitably -- you'd really have to take complete ownership of the i18n
> >issue, and figure out what needs to be done throughout Subversion.)
> >
> >It would be wonderful to have any volunteer step forward for this --
> >otherwise, the i18n work will almost surely have to be put off until
> >post-1.0.  That wouldn't be horrible, since this is the sort of thing
> >that _can_ be added later without huge code perturbance, however, it
> >would be nice to avoid the delay.
> >
> >See this message
> >
> >   http://subversion.tigris.org/servlets/ReadMsg?msgId=25162&listName=dev
> >
> >and its surrounding thread for some previous discussion of this issue.
> >
> >-Karl
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> >For additional commands, e-mail: dev-help@subversion.tigris.org
> >
> 
> 
> --
> Brane Čibej
>     home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
>     work:   <br...@hermes.si>   http://www.hermes-softlab.com/
>      ACM :   <br...@acm.org>            http://www.acm.org/
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Rick Price <rp...@opentext.com>.
Forcing the appropriate locale would probably make it easier to wrap with
Emacs......

That way the output would be the same every time.

----- Original Message -----
From: "Tripp Lilley" <tl...@perspex.com>
To: "Branko �ibej" <br...@xbc.nu>
Cc: <de...@subversion.tigris.org>
Sent: Tuesday, July 10, 2001 6:44 PM
Subject: Re: i18n and wrapper-tools


>
> I agree with the earlier thread that argued in favor of using the APIs
> over wrapping scripts, but there -are- some environs in which
> wrapping the script is preferable (emacs, for instance, seems such a
> case).
>
> --
>    Tripp Lilley  *  http://stargate.eheart.sg505.net/~tlilley/
> --------------------------------------------------------------------------
>    "I've been so weird it would have killed a normal man."
>    It Is What It Is - Bruton / Fleming (performed by The Highwaymen)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Branko Čibej <br...@xbc.nu>.
Tripp Lilley wrote:

>On Tue, 10 Jul 2001, Branko [ISO-8859-2] E`ibej wrote:
>
>>Perhaps, in order to support such tools, might we consider adding a 
>>"--setlocale=name" switch to svn, that would override the locale defined 
>>by the environment? For one thing, that would work on non-Unix platforms 
>>that don't have env; for another, it would help test the various 
>>translations, once we have them.
>>
>
>The latest version of Perforce officially introduced a command-line switch
>that forces all output into marshalled Python data structs. While I don't
>like the idea of tying so tightly to one wrapper language, the idea of
>providing special modes that actually return output in script-friendly
>form is a good one... 
>
>	svn --setoutputmode=XML ...
>	svn --setoutputmode=Python ...
>	svn --setoutputmode=Perl ...
>

Yes, that would be nice to have, someday. Or even 
"--output-filter=path/to/libsomething.so", if you want complete 
flexibility. But "someday" is definitely the watchword here. :-)

We'll start with "--setlocale", which avoids the real problem we'd have 
in the presence of l10n. Let's defer other possibilities to post-2.0.

>I agree with the earlier thread that argued in favor of using the APIs
>over wrapping scripts, but there -are- some environs in which
>wrapping the script is preferable (emacs, for instance, seems such a
>case).
>
Right. I may not like it, but I agree.

Brane


-- 
Brane �ibej
home: <br...@xbc.nu> http://www.xbc.nu/brane/
work: <br...@hermes.si> http://www.hermes-softlab.com/
ACM : <br...@acm.org> http://www.acm.org/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Tripp Lilley <tl...@perspex.com>.
On Tue, 10 Jul 2001, Branko [ISO-8859-2] �ibej wrote:

> Perhaps, in order to support such tools, might we consider adding a 
> "--setlocale=name" switch to svn, that would override the locale defined 
> by the environment? For one thing, that would work on non-Unix platforms 
> that don't have env; for another, it would help test the various 
> translations, once we have them.

The latest version of Perforce officially introduced a command-line switch
that forces all output into marshalled Python data structs. While I don't
like the idea of tying so tightly to one wrapper language, the idea of
providing special modes that actually return output in script-friendly
form is a good one... 

	svn --setoutputmode=XML ...
	svn --setoutputmode=Python ...
	svn --setoutputmode=Perl ...

I agree with the earlier thread that argued in favor of using the APIs
over wrapping scripts, but there -are- some environs in which
wrapping the script is preferable (emacs, for instance, seems such a
case).

-- 
   Tripp Lilley  *  http://stargate.eheart.sg505.net/~tlilley/
--------------------------------------------------------------------------
   "I've been so weird it would have killed a normal man."
   It Is What It Is - Bruton / Fleming (performed by The Highwaymen)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: i18n and wrapper-tools

Posted by Branko Čibej <br...@xbc.nu>.
There's a very simple way for the someday-to-be-forthcoming svn-mode.el 
and similar wrappers to avoid l10n-related problems: instead of running

    svn <parameters>

you just run

    env LC_ALL=C LANG=C svn <parameters>


Perhaps, in order to support such tools, might we consider adding a 
"--setlocale=name" switch to svn, that would override the locale defined 
by the environment? For one thing, that would work on non-Unix platforms 
that don't have env; for another, it would help test the various 
translations, once we have them.

    Brane


Karl Fogel wrote:

>[I've moved this thread to `dev@subversion.tigris.org', from
>`issues@...'.  -kff].
>
>"Stefan Monnier" <mo...@rum.cs.yale.edu>:
>
>>While it is sometimes nice to see messages in my mother tongue,
>>I'm wondering if Subversion does its i18n properly.
>>
>>More specifically, I'd like to make sure that all messages are
>>easy to recognize for a wrapper tool (such as an Emacs interface
>>to Subversion).  I guess it means something like "add a message
>>number" so we don't need to look at the message itself and
>>also make sure that the text itself can be skipped easily
>>(f.ex. by disallowing \n inside the text and terminating all messages
>>with \n).
>>
>
>Subversion doesn't have any i18n at all, at the moment.  While it is
>on the goals list, all developers are currently working on other
>things; no one is actively making i18n happen yet.
>
>Would you be interested in helping with it?  ("Helping" is putting it
>charitably -- you'd really have to take complete ownership of the i18n
>issue, and figure out what needs to be done throughout Subversion.)
>
>It would be wonderful to have any volunteer step forward for this --
>otherwise, the i18n work will almost surely have to be put off until
>post-1.0.  That wouldn't be horrible, since this is the sort of thing
>that _can_ be added later without huge code perturbance, however, it
>would be nice to avoid the delay.
>
>See this message
>
>   http://subversion.tigris.org/servlets/ReadMsg?msgId=25162&listName=dev
>
>and its surrounding thread for some previous discussion of this issue.
>
>-Karl
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM :   <br...@acm.org>            http://www.acm.org/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org