#19004·nushell

`uucore` translations are once per-thread, which can lead to untranslated error names

Author: pickxCreated Sep 10, 2026Updated Sep 16, 2026
Labelsstatus:needs-triage

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

disclaimer: based on my very shallow understanding of uutils. hopefully it's correct.

  • uucore has a translate! macro which uses localized names for error message ids
  • to use this, you first call an initializer with the name of the util. this initialization is thread local
  • so this system assumes one uucore util per thread
  • ...which nushell doesn't do
  • this means if it was already loaded for one util, an error for a different util in the same nu thread might give an untranslated error name

How to reproduce

both of these must start from a fresh session of nu

> mktemp foo
Error: nu::shell::error

  × too few X's in template 'foo'
   ╭────
 1 │ crates/nu-command/src/filesystem/mktemp.rs:119:48
   · ────────────────────────┬────────────────────────
   ·                         ╰── too few X's in template 'foo'
   ╰────

vs.

> uname | ignore
> mktemp foo
Error: nu::shell::error

  × mktemp-error-too-few-xs
   ╭────
 1 │ crates/nu-command/src/filesystem/mktemp.rs:119:48
   · ────────────────────────┬────────────────────────
   ·                         ╰── mktemp-error-too-few-xs
   ╰────

Expected behavior

calling uname before mktemp should not affect mktemp's translations

Configuration

key value
version 0.115.2
major 0
minor 115
patch 2
branch master
commit_hash 9cb59b9c6d69ad0dc0e0d5f5bf0fedb7d4395835
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.98.0 (88d9e12ae 2026-08-18)
rust_channel stable-aarch64-apple-darwin
cargo_version cargo 1.98.0 (797e8a9bc 2026-08-05)
build_time 2026-09-10 13:37:52 +03:00
build_rust_channel release
allocator standard
features default, lsp, mcp, network, plugin, rustls-tls, sqlite, trash-support
installed_plugins desktop_notifications 0.107.0, formats 0.107.0, highlight 1.4.9+0.107.0, json_path 0.17.1, query 0.107.0, regex 0.19.0, skim 0.22.0, strutils 0.21.0
experimental_options example=false, dc-glob=true, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=true, cell-path-types=true