From ed97beddd2a2a0e6febe4b6421df7fb0717ab553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Fri, 1 Mar 2024 15:31:53 +0100 Subject: [PATCH] feat: add spell check for Spanish too --- R/spelling-check.R | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/R/spelling-check.R b/R/spelling-check.R index 844d004..4f10deb 100644 --- a/R/spelling-check.R +++ b/R/spelling-check.R @@ -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) }