Skip to content

Commit

Permalink
remove carriage return from translation (#6778)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Jan 30, 2025
1 parent 45cbc33 commit 79f5923
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion po/data.table.pot
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ msgstr ""
#: dogroups.c:454 dogroups.c:468
#, c-format
msgid ""
"\rProcessed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."
"Processed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."
msgstr ""

#: dogroups.c:473
Expand Down
6 changes: 4 additions & 2 deletions src/dogroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ SEXP dogroups(SEXP dt, SEXP dtcols, SEXP groups, SEXP grpcols, SEXP jiscols, SEX
int ETA = (int)(avgTimePerGroup*(ngrp-i-1));
if (hasPrinted || ETA >= 0) {
if (verbose && !hasPrinted) Rprintf(_("\n"));
Rprintf(_("\rProcessed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), i+1, ngrp, 100.0*(i+1)/ngrp, (int)(now-startTime), ETA);
Rprintf("\r"); // \r is not internationalizable
Rprintf(_("Processed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), i+1, ngrp, 100.0*(i+1)/ngrp, (int)(now-startTime), ETA);
}
nextTime = now+1;
hasPrinted = true;
Expand All @@ -465,7 +466,8 @@ SEXP dogroups(SEXP dt, SEXP dtcols, SEXP groups, SEXP grpcols, SEXP jiscols, SEX
else UNPROTECT(1); // the jval. Don't want them to build up. The first jval can stay protected till the end ok.
}
if (showProgress && hasPrinted) {
Rprintf(_("\rProcessed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), ngrp, ngrp, 100.0, (int)(wallclock()-startTime), 0);
Rprintf("\r"); // \r is not internationalizable
Rprintf(_("Processed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), ngrp, ngrp, 100.0, (int)(wallclock()-startTime), 0);
Rprintf("\n"); // separated so this & the earlier message are identical for translation purposes.
}
if (isNull(lhs) && ans!=NULL) {
Expand Down

0 comments on commit 79f5923

Please sign in to comment.