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

check_cracked_messages() doesn't know about the call. argument to stop #227

Closed
hadley opened this issue Oct 27, 2021 · 1 comment · Fixed by #250
Closed

check_cracked_messages() doesn't know about the call. argument to stop #227

hadley opened this issue Oct 27, 2021 · 1 comment · Fixed by #250

Comments

@hadley
Copy link
Collaborator

hadley commented Oct 27, 2021

stop("Can't find article called ", src_path(name), call. = FALSE)
< File:build-articles.R, Line:207 >
Potential replacement:
stop(domain=NA, gettextf("Can't find article called %s%s", src_path(name), FALSE))

Should be:

stop("Can't find article called ", src_path(name), call. = FALSE)
< File:build-articles.R, Line:207 >
Potential replacement:
stop(domain=NA, gettextf("Can't find article called %s", src_path(name)), call. = FALSE)

I'm also surprised that domain is set to NA since according to the docs that turns suppresses translations.

@MichaelChirico
Copy link
Owner

I'm also surprised that domain is set to NA since according to the docs that turns suppresses translations.

That's because gettextf() is doing the translation. So domain=NA in the outer call says "skip the look-up, because it's already done".

Agree the suggested replacement should be cognizant of named arguments and keep them in the outer call.

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

Successfully merging a pull request may close this issue.

2 participants