Skip to content

Commit 6b2e25b

Browse files
authored
Merge branch 'master' into issue6626
2 parents 63369a1 + 5623b7a commit 6b2e25b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

R/onAttach.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
if (gettext("TRANSLATION CHECK") != "TRANSLATION CHECK") {
2828
packageStartupMessagef(
2929
"**********\nRunning data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-<locale>.po and po/<locale>.po files in the package source, where the native language and English error messages can be found side-by-side.%s\n**********",
30-
if (exists('Sys.setLanguage', envir=baseenv())) " You can also try calling Sys.setLanguage('en') prior to reproducing the error message." else ""
30+
if (exists('Sys.setLanguage', envir=baseenv())) gettext(" You can also try calling Sys.setLanguage('en') prior to reproducing the error message.") else ""
3131
)
3232
}
3333
if (dev && (Sys.Date() - as.Date(d))>28L)

R/test.data.table.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,11 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
384384
assign("lasttime", proc.time()[3L], parent.frame(), inherits=TRUE) # after gc() to exclude gc() time from next test when memtest
385385
}, add=TRUE )
386386
if (showProgress) {
387+
# nocov start
387388
cat("\r") # notranslate: \r can't be in gettextf msg
388-
catf("Running test id", numStr, " ") # nocov.
389+
catf("Running test id %s", numStr)
390+
cat(" ") # notranslate
391+
# nocov end
389392
}
390393
# See PR #4090 for comments about change here in Dec 2019.
391394
# If a segfault error occurs in future and we'd like to know after which test, then arrange for the

inst/tests/tests.Rraw

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7888,7 +7888,7 @@ test(1551.5, fread(str),
78887888
rhs = setDT(read.table(testDir("issue_1095_fread.txt.bz2"), sep=",", comment.char="", stringsAsFactors=FALSE, quote="", strip.white=TRUE))
78897889
if (test_R.utils) {
78907890
test(1551.61, fread(testDir("issue_1095_fread.txt.bz2"), logical01=FALSE), rhs, warning=w)
7891-
rhs[, names(.SD) := lapply(.SD, \(x) x == "Y"), .SDcols = c("V16", "V17", "V45")]
7891+
rhs[, names(.SD) := lapply(.SD, function(x) x == "Y"), .SDcols = c("V16", "V17", "V45")]
78927892
test(1551.62, fread(testDir("issue_1095_fread.txt.bz2"), logical01=FALSE, logicalYN=TRUE), rhs, warning=w)
78937893
}
78947894

@@ -18525,7 +18525,9 @@ rm(.datatable.aware)
1852518525
# tests for trunc.char handling wide characters # 5096
1852618526
local({
1852718527
lc_ctype = Sys.getlocale('LC_CTYPE')
18528-
Sys.setlocale('LC_CTYPE', "en_US.UTF-8") # Japanese multibyte characters require utf8
18528+
# Japanese multibyte characters require utf8. As of 2025, we're likely to be already running in a UTF-8 locale, but if not, try this setlocale() call as a last chance.
18529+
# Unfortunately, there is no guaranteed, portable way of switching to UTF-8 US English.
18530+
if (!l10n_info()$`UTF-8`) Sys.setlocale('LC_CTYPE', "en_US.UTF-8")
1852918531
on.exit(Sys.setlocale('LC_CTYPE', lc_ctype))
1853018532
accented_a = "\u0061\u0301"
1853118533
ja_ichi = "\u4E00"

0 commit comments

Comments
 (0)