From 06254612dd3f8f9e24ab4fa72c1b9fe42a094a81 Mon Sep 17 00:00:00 2001 From: Rob Ashton Date: Tue, 1 Oct 2024 15:13:51 +0100 Subject: [PATCH] Use glue_data when data is a list This changed in https://github.com/tidyverse/glue/issues/317 and is not in current CRAN version of glue causing fairly confusing downstream failures. --- DESCRIPTION | 4 ++-- R/i18n.R | 2 +- R/lint_report.R | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cd82e5d..27fec03 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: traduire Title: Internationalisation on the Fly -Version: 0.1.0 +Version: 0.1.1 Authors@R: c(person(given = "Rich", family = "FitzJohn", @@ -18,7 +18,7 @@ Encoding: UTF-8 Imports: V8, R6, - glue + glue (>= 1.8.0) Suggests: jsonlite, knitr, diff --git a/R/i18n.R b/R/i18n.R index 80adb85..94c2206 100644 --- a/R/i18n.R +++ b/R/i18n.R @@ -176,7 +176,7 @@ i18n_backend_read <- function(pattern, language, namespace) { return(jsonlite::unbox("null")) } data <- list(language = language, namespace = namespace) - path <- glue::glue(pattern, .envir = data) + path <- glue::glue_data(data, pattern) tryCatch( read_input(path), error = function(e) { diff --git a/R/lint_report.R b/R/lint_report.R index 937b293..102deb6 100644 --- a/R/lint_report.R +++ b/R/lint_report.R @@ -14,7 +14,7 @@ lint_translations_html_report <- function(x) { d <- list(title = title, style = style, script = script, tabs = tabs, content = content) - unclass(glue::glue(template, .envir = d)) + unclass(glue::glue_data(d, template)) }