You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix up procedure for extracting strings to .pot, and add newly-found messages (#6793)
* update .pot again
* Update CRAN_Release procedure
* Add 'notranslate' in R files, add a mark new strings for translation
* More R-side notranslate
* Mark many src* strings for non-translation
* Caught a few more untranslated messages
* sloppy find-and-replace
* Un-translate internal error
* oops, this is C
* nocov hard-to-cover regions
* Double-Pl_ for row(s), thread(s)
* Make the full message plural for better translator context
* Superfluous ')'
* rm ws
plural_part<- sprintf(ngettext(length(tt), "The item in the 'by' or 'keyby' list is length %s.", "The items in the 'by' or 'keyby' list have lengths %s."), brackify(tt))
896
-
stopf("%s Each must be length %d; the same length as there are rows in x (after subsetting if i is provided).", plural_part, xnrow)
895
+
stopf(ngettext(length(tt),
896
+
"The item in the 'by' or 'keyby' list is length %s. Each must be length %d; the same length as there are rows in x (after subsetting if i is provided).",
897
+
"The items in the 'by' or 'keyby' list have lengths %s. Each must be length %d; the same length as there are rows in x (after subsetting if i is provided)."),
898
+
brackify(tt), xnrow, domain=NA)
897
899
}
898
900
if (is.null(bynames)) bynames= rep.int("",length(byval))
899
901
if (length(idx<- which(!nzchar(bynames))) &&!bynull) {
cat("getDTthreads(verbose=TRUE):\n") # for tracing on CRAN; output to log before anything is attempted
113
+
cat("getDTthreads(verbose=TRUE):\n") #notranslate: for tracing on CRAN; output to log before anything is attempted
114
114
getDTthreads(verbose=TRUE) # includes the returned value in the verbose output (rather than dangling '[1] 4'); e.g. "data.table is using 4 threads"
115
115
catf("test.data.table() running: %s\n", fn) # print fn to log before attempting anything on it (in case it is missing); on same line for slightly easier grep
@@ -376,14 +378,15 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
376
378
if (memtest==1L) gc() # see #5515 for before/after
377
379
inum= as.integer(num)
378
380
timings[inum, RSS:=max(rss(),RSS), verbose=FALSE] # TODO prefix inum with .. for clarity when that works
379
-
if (length(memtest.id) &&memtest.id[1L]<=inum&&inum<=memtest.id[2L]) cat(rss(),"\n") # after 'testing id ...' output; not using between() as it has verbose output when getOption(datatable.verbose)
381
+
if (length(memtest.id) &&memtest.id[1L]<=inum&&inum<=memtest.id[2L]) cat(rss(),"\n") #notranslate. after 'testing id ...' output; not using between() as it has verbose output when getOption(datatable.verbose)
380
382
if (memtest==2L) gc()
381
383
}
382
384
assign("lasttime", proc.time()[3L], parent.frame(), inherits=TRUE) # after gc() to exclude gc() time from next test when memtest
383
385
}, add=TRUE )
384
-
if (showProgress)
385
-
# \r can't be in gettextf msg
386
-
cat("\rRunning test id", numStr, "") # nocov.
386
+
if (showProgress) {
387
+
cat("\r") # notranslate: \r can't be in gettextf msg
388
+
catf("Running test id", numStr, "") # nocov.
389
+
}
387
390
# See PR #4090 for comments about change here in Dec 2019.
388
391
# If a segfault error occurs in future and we'd like to know after which test, then arrange for the
389
392
# try(sys.source()) in test.data.table() to be run in a separate R process. That process could write out
@@ -534,15 +537,15 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
534
537
if (!fail) {
535
538
catf("Test %s ran without errors but failed check that x equals y:\n", numStr)
0 commit comments