-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: initial localization support (work in progress) #3413
Conversation
This is a work in progress effort to introduce the *optional* ability to localize node's own outputs. Currently, Node (and V8) outputs english only error, debug and help output. This is a step towards allowing translated versions of node to be built. Currently, this is hidden behind the --with-intl=full-icu switch. This is because there are certain capabilities of ICU that are only enabled with the full data set. This is a work in progress that SHOULD NOT BE LANDED in master yet.
The good thing about having only one language is that you can search the Internet for error messages and triage bug reports from users and such. It can already be difficult when errors come from the operating system With internationalization comes the need for some sort of identifier being printed for each message, so that one may know what that message actually is, but that also requires a lookup table for identifiers to their original messages. Does this functionality exist in ICU? |
ICU provides the message bundle mechanism. We would provide the actual lookup. It's not yet implemented within this PR, but my intent is to include the message identifier whenever a localized message is output. I was then planning to implement a simple userland utility installable from npm that would explain every error code with a localized description. e.g. something like... $ npm install -g nexp
$ nexp NODE_ERR_001
...description printed here... |
That sounds like a good plan. Just thought I'd mention this concern, but it is good that it has already been thought of. On October 20, 2015 7:47:12 PM GMT+03:00, James M Snell notifications@github.com wrote:
|
Quick comment while I'm scanning the code -- maybe the |
Yep, that will need to be worked out. One of the reasons I put it into deps is because of the optional ICU dependency. If ICU is not included in the build, the l10n dep is not built and linked in. However, because of the need for keeping the messages in sync with the source, having it out as a dependency doesn't make the most sense in the long run. As I said on the TC call, we need to figure out the "least annoying" way to set this up. As an aside: right now ICU support is still optional in the build by default. It may be time to revisit that and make ICU build by default (e.g. make |
Original commit log follows: darwin: translate EPROTOTYPE to ECONNRESET (nodejs#3413) macOS versions 10.10 and 10.15 - and presumbaly 10.11 to 10.14, too - have a bug where a race condition causes the kernel to return EPROTOTYPE because the socket isn't fully constructed. It's probably the result of the peer closing the connection and that is why libuv translates it to ECONNRESET. Previously, libuv retried until the EPROTOTYPE error went away but some VPN software causes the same behavior except the error is permanent, not transient, turning the retry mechanism into an infinite loop. Refs: libuv/libuv#482 Refs: libuv/libuv#3405 Fixes: nodejs#43916
This is a work in progress effort to introduce the optional
ability to localize node's own outputs. Currently, Node (and V8)
outputs english only error, debug and help output. This is a step
towards allowing translated versions of node to be built.
Currently, this is hidden behind the --with-intl=full-icu switch.
This is because there are certain capabilities of ICU that are
only enabled with the full data set.
This is a work in progress that SHOULD NOT BE LANDED in master yet.
/cc @srl295 @mhdawson