Skip to content

Commit

Permalink
Reset cache on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Jan 9, 2024
1 parent f97bb1f commit a7c16d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/language.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ local_language <- function(lang, .local_envir = parent.frame()) {
))
}

local_envvar(LANGUAGE = lang, .local_envir = .local_envir)
# Reset cache to avoid gettext() retrieving cached value from a previous
# language (idea from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931456)
bindtextdomain("reset", local_tempdir())
defer(bindtextdomain("reset", local_tempdir()))

local_envvar(LANGUAGE = lang, .local_envir = .local_envir)

invisible()
}
Expand Down

0 comments on commit a7c16d3

Please sign in to comment.