(v1.2.0.9011) mo_domain(), improved error handling

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2020-06-22 11:18:40 +02:00
1 parent e88d7853f5
commit 93a158aebd
49 files changed
+523 -590

No files matched your search

+4 -5
View File
@@ -108,11 +108,10 @@ translate_AMR <- function(from, language = get_locale(), only_unknown = FALSE) {
df_trans <- translations_file # internal data file
if (!language %in% df_trans$lang) {
stop("Unsupported language: '", language, "' - use one of: ",
paste0("'", sort(unique(df_trans$lang)), "'", collapse = ", "),
call. = FALSE)
}
stop_ifnot(language %in% df_trans$lang,
"unsupported language: '", language, "' - use one of: ",
paste0("'", sort(unique(df_trans$lang)), "'", collapse = ", "),
call = FALSE)
df_trans <- df_trans %>% subset(lang == language)
if (only_unknown == TRUE) {