You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please forgive me if this is a known issue or there is a simple reason for this that I haven't seen due to my R naivety!
When running the examples from the withr::with_language documentation across the three recent Ubuntu LTS versions, I see different behaviour.
24.04 fails to translate, whereas the earlier versions work correctly.
These are clean local Windows Subsystem for Linux (WSL) distributions with minimal R and package installations for the environments I need to test (see sessionInfos - for example my pandoc versions are different between the two, but this doesn't seem to affect the reported issue).
Ubuntu 20.04/22.04 (behaviour is consistent across these two):
> withr::with_language("en", try(mean[[1]]))
Error in mean[[1]] : object of type 'closure' is not subsettable
> withr::with_language("fr", try(mean[[1]]))
Error in mean[[1]] : objet de type 'closure' non indiçable
> withr::with_language("en", try(mean[[1]]))
Error in mean[[1]] : object of type 'closure' is not subsettable
> withr::with_language("fr", try(mean[[1]]))
Error in mean[[1]] : object of type 'closure' is not subsettable
My LANG setting on both systems is LANG=C.UTF-8. On Ubuntu 20/22, this works as expected and translations occur. On Ubuntu 24, the issue above is present. I presume this is down to how withr behaviour changed with respect to the "C" LANG handling.
Setting the locale with sudo dpkg-reconfigure locale to a specific locale, e.g. en_GB.UTF-8 results in the withr tests no longer being skipped due to LANG=C and the output is correct when using withr::with_language
Hi there,
Please forgive me if this is a known issue or there is a simple reason for this that I haven't seen due to my R naivety!
When running the examples from the withr::with_language documentation across the three recent Ubuntu LTS versions, I see different behaviour.
24.04 fails to translate, whereas the earlier versions work correctly.
These are clean local Windows Subsystem for Linux (WSL) distributions with minimal R and package installations for the environments I need to test (see sessionInfos - for example my pandoc versions are different between the two, but this doesn't seem to affect the reported issue).
I was taken down this route by our GitHub Actions starting to fail on 24.04, but not on 22.04: https://github.com/carpentries/sandpaper/actions/runs/12758402271
Ubuntu 20.04/22.04 (behaviour is consistent across these two):
20.04 session info
Ubuntu 24.04:
24.04 session info
Even though the
language
is correctly set tofr
to test withr::with_language, the output from these functions remains in English.I'm happy to provide dpkg lists too if required. Many thanks in advance!
The text was updated successfully, but these errors were encountered: