Skip to content

[opencode][Linux] default player pw-play will not play anything due to l10n issues for LANG=de #424

@enolive

Description

@enolive

I installed the main peon cli via

curl -fsSL https://raw.githubusercontent.com/PeonPing/peon-ping/main/install.sh | bash

I also installed the OpenCode adapter via

curl -fsSL https://raw.githubusercontent.com/PeonPing/peon-ping/main/adapters/opencode.sh | bash

the sound playback works perfectly in both the Terminal and Claude CLI

unfortunately, the sound setup does not work in the Plugin

after some for and back I found out that the plugin uses pw-play for its setup

and for some reasons this CLI tool honors the current LANG settings in the Terminal for its volume control ;-)

in Germany and many other countries, point is used as a thousands separator while comma is used for fractional numbers.

tbh, I did not suspect a CLI tool to pick up something like that.

example:

> echo $LANG
de_DE.UTF-8
# won't play anything
> pw-play --volume '0.5' /home/chris/.openpeon/packs/peon/sounds/PeonAngry1.wav
# will play the sound file
> pw-play --volume '0,5' /home/chris/.openpeon/packs/peon/sounds/PeonAngry1.wav
# will also play the sound file
LANG=en pw-play --volume '0.5' /home/chris/.openpeon/packs/peon/sounds/PeonAngry1.wav

I suggest that you set the env variable when executing the CLI commands for playing sounds to minimize confusion with international users.

For now, I just changed the volume in the peon-ping plugin config to "0,5" 😉

{
  "default_pack": "peon",
  "volume": "0,5",
  "enabled": true,
  "....
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions