Skip to content

playground: allow setting the locale with a ?lang= URL parameter - #77

Merged
sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:playground-lang-param
Aug 31, 2026
Merged

playground: allow setting the locale with a ?lang= URL parameter#77
sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:playground-lang-param

Conversation

@sylvestre

Copy link
Copy Markdown
Collaborator

A shared link can now carry the language alongside the command, e.g. /playground?lang=fr-FR&cmd=cut+-f+1,4-2,9-12+fruits.txt to show a localized error message.

The value accepts both the short (fr) and full (fr-FR) form, is validated against the locales the build ships, and is applied before the ?cmd= commands run. The share-link button appends it when the locale is not the default, and the Language dropdown stays in sync via a new uutils:locale-changed event.

A shared link can now carry the language alongside the command, e.g.
/playground?lang=fr-FR&cmd=cut+-f+1,4-2,9-12+fruits.txt to show a
localized error message.

The value accepts both the short (fr) and full (fr-FR) form, is
validated against the locales the build ships, and is applied before
the ?cmd= commands run. The share-link button appends it when the
locale is not the default, and the Language dropdown stays in sync
via a new uutils:locale-changed event.
Copilot AI lite review requested due to automatic review settings August 31, 2026 16:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sylvestre
sylvestre merged commit 0c461ce into uutils:main Aug 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants