Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create en@quot translation? #232

Open
hadley opened this issue Oct 28, 2021 · 6 comments
Open

Don't create en@quot translation? #232

hadley opened this issue Oct 28, 2021 · 6 comments

Comments

@hadley
Copy link
Collaborator

hadley commented Oct 28, 2021

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.

@MichaelChirico
Copy link
Owner

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.

@hadley
Copy link
Collaborator Author

hadley commented Oct 29, 2021

You mean like “” vs ""?

Is this a different system to options(useFancyQuotes) + shQuote()?

@HenrikBengtsson
Copy link

... shQuote() ...

Just in case others spot this, I think you meant sQuote() and dQuote().

@MichaelChirico
Copy link
Owner

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"

@hadley
Copy link
Collaborator Author

hadley commented Nov 5, 2021

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)

@MichaelChirico
Copy link
Owner

Yep... copy/pasted from the wrong example, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants