Repository navigation
Normalizing verbose messages in bmerge.R #6554
Description
Activity
- addedtranslationissues/PRs related to message translation projectsissues/PRs related to message translation projects
on Sep 30, 2024 If leaving, e.g.,
factoranddoubleuntranslated, perhaps it might be better to use"Coercing '%s' column %s to type '%s' to match type of %s.\n", with extra quotes. Otherwise it might look a bit jarring in languages with non-Latin scripts.There is some improvement here after #6603. The only fragment-ish piece left is this one:
Line 107 in a36caac
if (verbose) catf("Coercing %s column %s%s to type integer64 to match type of %s.\n", wclass, nm[1L], if (wclass=="double") " (which contains no fractions)" else "", nm[2L]) How doable is a translation with only one optional parenthesized clause being hidden in
%s?I think %s%s is ok, at least in spanish. Only that the parentherized explanation should be enclosed in
gettext()
I cite the final version here:
Line 107 in a9cd0bf
if (verbose) catf("Coercing %s column %s%s to type integer64 to match type of %s.\n", wclass, nm[1L], if (wclass=="double") " (which has integer64 representation, e.g. no fractions)" else "", nm[2L]) Perhaps for aesthetics, all "coercing" messages could be pushed down to
coerce_col, and only pass the required clarifications at the end of the message as a parameter, to append at the end. This would reduce the translation need.I pushed a branch in which the "coercing" messages are moved to
coerce_col. Some notes:- Currently, tests 2297.01 and 2297.02 silently match a "for join" wording after "to type double" which appears to be ok but in my branch the wording come before the type, because of the format template. This and other tests were adapted although.
- Coerce_col does the coercions, but some coercions on bmerge were done "inline". So I moved them to coerce_col. There is the case of 'factor' to 'character' in which attributes were not copied (ok as it prevents 'levels' to go to the character column), so that logic was added to coerce_col also.
If you think it is of value i'll PR the proposal.
Besides that think this issue is closed for now.
Reacted by aitapBranch looks pretty good, I only have small tweaks to recommend -- let's start from a PR. Thanks!
Hello.
These are a some observations in verbose messages in bmerge.R I wish to share.
" (which contains no fractions)"could be unified.Here is the code with example proposals: