-
Notifications
You must be signed in to change notification settings - Fork 991
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
test.data.table() fails on non-English locale #3039
Comments
Is there a way to stop translation of error and warnings in R, so they appear as English? Just for during the test suite. |
@mattdowle there's supposed to be a way to do it with
Literally is the translation of
Which R has stored in its internals somewhere. So in principle for these errors we should be able to replace the English-specified |
But gettext translates English input to Japanese. You're proposing, iiuc, to add gettext to our test() internals to convert error= and warning= strings that appear in tests.Rraw to Japanese and for test() to compare the two Japanese strings? I'm suggesting the other way around : temporarily stopping R from translating its messages to Japanese, so the R session outputs base R errors and warnings in English, just for the duration of test.data.table. |
Oh, I see. That should just (?) be a matter of setting/resetting locale variables? Though I'm not sure if a restart is required for these env settings to take effect... |
And yes that's what I was suggesting -- using |
How would that be more non-Engligh friendly? |
Non-English user runs
Probably they can infer what's going wrong & most users of
i.e. the whole error is in their native script/vocab & so friendlier for them to parse. The corollary though is what they should do with this information since it may make it harder for them to communicate such errors to us meaningfully... it's murky territory |
But what I'm proposing would result in :
i.e. English compared to English, even in Japanese locale. I see what you mean though : they might not be able to understand the difference because it is in English. |
|
This is correct. There's no internal translation mechanism; translations are hard-coded, e.g. I see the error above in
|
Searching around a bit, seems like |
We might be able to fix this with a
gettext
approach if I can ever figure out how that works.Closely related to (not quite sure if duplicate) of #630.
This terminal's
sessionInfo()
:(given the
locale
I'm not sure why everything comes up in Japanese on my Mac terminal...)Output of
test.data.table()
on current masterThe text was updated successfully, but these errors were encountered: