8000 Update translations so there's a fallback available without loading translation files. · Issue #682 · ableplayer/ableplayer · GitHub
[go: up one dir, main page]

Skip to content

Update translations so there's a fallback available without loading translation files. #682

@joedolson

Description

@joedolson

Right now, if the translation files can't be loaded, the entire player falls back to a native player.

This is excessively fragile. There should be a default language that's loaded by default.

A few possible options:

  • Add en.json as an object declared directly in getTranslationText() to ensure it's always available.
  • Add a fallback string in all calls to text. This means changing this.tt to be a method, instead of a property, so that a fallback argument can be passed.

The second is a lot of work, but has the advantage that you can more easily tell what the relevant text is when editing code in context.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0