Skip to content

Commit

Permalink
Deal with multiple languages in DESCRIPTION.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek committed Nov 6, 2024
1 parent 2920e56 commit cc6ea44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ get_pkg_lang <- function(pkg) {
}

if (pkg$desc$has_fields("Language")) {
return(pkg$desc$get_field("Language"))
field <- pkg$desc$get_field("Language")
if (length(field) && nchar(field) > 0) {
return(regmatches(field, regexpr("[^,]+", field)))

Check warning on line 117 in R/package.R

View check run for this annotation

Codecov / codecov/patch

R/package.R#L115-L117

Added lines #L115 - L117 were not covered by tests
}
}

return("en")
Expand Down

0 comments on commit cc6ea44

Please sign in to comment.