Skip to content

UX: [ERROR i18n_embed::requester] Unable to parse your locale when $LANG is not set #156

@gendx

Description

@gendx

What were you trying to do

I tried running rage in a minimalist Docker container on Linux. In particular, most "common" environment variables were not set, including $LANG.

What happened

Running rage to encrypt a file with an ed25519 SSH key caused an error message: "Unable to parse your locale". Surprisingly though, the encrypted file was actually created.

This error message disappears when setting $LANG to a "correct" value, for example LANG=en_US.UTF-8.

$ rage -r id_ed25519.pub -o hello.txt.age hello.txt
[ERROR i18n_embed::requester] Unable to parse your locale: ParserError(InvalidLanguage)

$ LANG=en_US.UTF-8 rage -r id_ed25519.pub -o hello.txt.age hello.txt
Error: File exists (os error 17)

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report

$ rm output/hello.txt.age

$ LANG=en_US.UTF-8 rage -r id_ed25519.pub -o hello.txt.age hello.txt

$

All in all, there are two surprising things in terms of UX.

  • I don't expect a simple encryption/decryption tool like rage to require a particular environment variable such as $LANG to work. It could use it but should fallback gracefully if the variable is not set.
  • I don't expect to see an error message while an encrypted file was actually successfully created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions