Of course. Yes, the key motivation is really coming from Node. We
(IBM) want to be able to produce localized outputs such as help, debug
and error messages in a reasonable way but there are a handful of
errors produced by V8 that are not intercepted by Node (For instance,
when someone attempts to modify a frozen object). We do not want to
end up with a situation where only some of the messages are localized
and others are not so I'm attempting to figure out a workable path.
And yes, the goal is to produce localized outputs for non-English
speaking developers (done in a way that is still "search friendly" so
that developers can easily look up details and documentation for any
specific error).

Within node core itself, assuming this capability lands, the default
would be for non-localized outputs. Vendors (such as IBM) who build on
top of Node would have the ability to generate
localized-but-still-fully-compatible binaries. We (like many
companies) have specific obligations to provide localized versions of
the software we provide and Node currently requires an exception
process for us since a localized version is not currently possible.

On Thu, Oct 8, 2015 at 9:21 AM, Jakob Kummerow <[email protected]> wrote:
> Can you shed some light on the motivation for this effort? What's the
> envisioned use case?
>
> I think V8's messages aren't usually user-visible -- or are they? Is this
> just about translating "TypeError" and the like for the benefit of
> non-English-speaking developers?
>
> On Thu, Oct 8, 2015 at 5:46 PM, James M Snell <[email protected]> wrote:
>>
>> Yes. There is a potential need for other such changes also. I won't
>> know the extent until I get in and start pulling the message templates
>> apart a bit. I'm hoping to keep the changes as minimal as possible.
>>
>> On Thu, Oct 8, 2015 at 8:36 AM, Yang Guo <[email protected]> wrote:
>> > also I can imagine that translated templates could have a different
>> > ordering
>> > of the message arguments. would we need numbered placeholders? i.e. %1
>> > %2 %3
>> > instead simply %?
>> >
>> >
>> > On Thu, Oct 8, 2015, 17:13 James M Snell <[email protected]> wrote:
>> >>
>> >> Yeah, this is the direction I was thinking but you're right, with the
>> >> current set up it's fairly brittle. I'll see if I can come up with an
>> >> implementation proposal that makes sense without causing too much
>> >> churn.
>> >>
>> >> On Thu, Oct 8, 2015 at 5:18 AM, Yang Guo <[email protected]> wrote:
>> >> > I could imagine an API that changes the message template backing
>> >> > store
>> >> > to an
>> >> > embedder-provided address. However, that would require keeping the
>> >> > localization up-to-date in lockstep with v8, as the array indices may
>> >> > change.
>> >> >
>> >> > Yang
>> >> >
>> >> >
>> >> > On Wed, Oct 7, 2015, 16:32 James Snell <[email protected]> wrote:
>> >> >>
>> >> >> Hello there! I'm currently investigating the feasibility of
>> >> >> introducing
>> >> >> output localization both to Node and V8. Given that V8 currently
>> >> >> hard
>> >> >> codes
>> >> >> it's messages in messages.h it's certainly a non-trivial task. I'd
>> >> >> like
>> >> >> to
>> >> >> explore (a) if l10n of V8's error messages would be possible and (b)
>> >> >> the
>> >> >> most efficient way of doing so.
>> >> >>
>> >> >>
>> >> >> - James
>> >> >>
>> >> >>
>> >> >> (originally had posted here:
>> >> >> https://code.google.com/p/v8/issues/detail?id=4475)
>> >> >>
>> >> >> --
>> >> >> --
>> >> >> v8-dev mailing list
>> >> >> [email protected]
>> >> >> http://groups.google.com/group/v8-dev
>> >> >> ---
>> >> >> You received this message because you are subscribed to the Google
>> >> >> Groups
>> >> >> "v8-dev" group.
>> >> >> To unsubscribe from this group and stop receiving emails from it,
>> >> >> send
>> >> >> an
>> >> >> email to [email protected].
>> >> >> For more options, visit https://groups.google.com/d/optout.
>> >> >
>> >> > --
>> >> > --
>> >> > v8-dev mailing list
>> >> > [email protected]
>> >> > http://groups.google.com/group/v8-dev
>> >> > ---
>> >> > You received this message because you are subscribed to a topic in
>> >> > the
>> >> > Google Groups "v8-dev" group.
>> >> > To unsubscribe from this topic, visit
>> >> > https://groups.google.com/d/topic/v8-dev/CzW7k_ot5fQ/unsubscribe.
>> >> > To unsubscribe from this group and all its topics, send an email to
>> >> > [email protected].
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> --
>> >> v8-dev mailing list
>> >> [email protected]
>> >> http://groups.google.com/group/v8-dev
>> >> ---
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "v8-dev" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to [email protected].
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > --
>> > v8-dev mailing list
>> > [email protected]
>> > http://groups.google.com/group/v8-dev
>> > ---
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "v8-dev" group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/v8-dev/CzW7k_ot5fQ/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to
>> > [email protected].
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> --
>> v8-dev mailing list
>> [email protected]
>> http://groups.google.com/group/v8-dev
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-dev/CzW7k_ot5fQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to