Skip to content

Commit

Permalink
feat: add spell check for Spanish too
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Mar 1, 2024
1 parent e840091 commit ed97bed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions R/spelling-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ devguide_spelling <- function () {

path <- devguide_path ()

# English ----

f <- list.files (devguide_path (),
pattern = "\\.Rmd",
recursive = TRUE,
full.names = TRUE)
f <- f[!endsWith(f, ".es.Rmd")]
f <- f[!endsWith(f, ".pt.Rmd")]
ig <- scan (file.path (devguide_path (), "inst", "WORDLIST"),
what = "",
quiet = TRUE)

spelling::spell_check_files (f, ignore = ig)

es_f <- list.files (devguide_path (),
pattern = "\\.es\\.Rmd",
recursive = TRUE,
full.names = TRUE)
ig <- scan (file.path (devguide_path (), "inst", "WORDLIST"),
what = "",
quiet = TRUE)

spelling::spell_check_files (es_f, lang = "es_AR", ignore = ig)
}

0 comments on commit ed97bed

Please sign in to comment.