Open hadley opened 3 years ago
My understanding is it's just about adding "pretty" directional quotes. See https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Localization-of-messages.
It could certainly be an option to turn off, but will need to be kept for translating R itself.
You mean like “”
vs ""
?
Is this a different system to options(useFancyQuotes)
+ shQuote()
?
...
shQuote()
...
Just in case others spot this, I think you meant sQuote()
and dQuote()
.
Yes, e.g.
Sys.setenv(LANGUAGE='en@quot')
gettext("candidate point in 'optim' evaluated to length %d not %d", domain="R")
# [1] "candidate point in ‘optim’ evaluated to length %d not %d"
https://www.gnu.org/software/gettext/manual/html_node/po_002fRules_002d_002a.html
It's also unrelated to useFancyQuotes
(from grep
-ing the source, I only see this option mentioned in the signature of sQuote()
and dQuote()
):
options(useFancyQuotes = FALSE)
sQuote('hi')
Sys.setenv(LANGUAGE='en@quot')
gettext("candidate point in 'optim' evaluated to length %d not %d", domain="R")
# [1] "candidate point in 'optim' evaluated to length %d not %d"
I think your example got slightly mangled — your explanation is correctly but the code doesn't show it.
options(useFancyQuotes = FALSE)
sQuote('hi')
#> [1] "'hi'"
Sys.setenv(LANGUAGE='en@quot')
gettext("candidate point in 'optim' evaluated to length %d not %d", domain="R")
#> [1] "candidate point in ‘optim’ evaluated to length %d not %d"
Created on 2021-11-05 by the reprex package (v2.0.1)
Yep... copy/pasted from the wrong example, thanks
It doesn't seem useful. OTOH I can't understand what it's supposed to do, so maybe it is useful and I just don't know why.