1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 20:21:55 +02:00

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

This commit is contained in:
2020-06-22 11:18:40 +02:00
parent e88d7853f5
commit 93a158aebd
49 changed files with 523 additions and 590 deletions

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) {