Skip to content

backwards-compatibility issue in LocaleSwitcher.vue #2565

@EffakT

Description

@EffakT

Description of the bug

Looks like commit 56c8393 caused a backwards compatibility issue.
When changing the clientSettings.locale.value default from auto to undefined, this caused a bug where if you don't re-select the locale from the dropdown the audio/subtitle selectors don't work, therefore you are unable to play a video.

Error caused is invalid language tag: "auto" in new Intl.DisplayNames() calls, where the first parameter is "auto", instead of "undefined".

Adding a logic of toCode !== "auto" ? toCode : undefined to the utils/i18n.ts file would likely work as a fallback.

Seeing how this UI is still experimental, I understand if this bug is not resolved, as it only affects past releases updating to the latest.

Steps to reproduce

  1. Update from an older version, prior to 56c8393
  2. Set locale to "auto"
  3. Update to a version newer than 56c8393
  4. Attempt to load a video
  5. See select boxes failing to load

Expected behavior

Update should be backwards compatible.
After updating, settings should have updated automatically, or had a fallback.

Logs


Screenshots

No response

Platform

macOS

Browser

Firefox

Jellyfin server version

N/A

Additional context


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions