Skip to content

Navigation Menu

Sign in
Sign up

[enhanced-readabilities] ON/OFF button text should use locale instead of hardcoded strings #631

Open

Description

The ON/OFF toggle buttons in the Spotlight component use hardcoded strings:

  • text: 'ON'
  • text: 'OFF'

These should use the locale system (like optionOn/optionOff already defined in locales) so that translations work properly.

Current behavior:
Setting custom optionOn/optionOff via app.provide(InjectionKey, {...}) does not change button text.

Expected behavior:
Button text should reflect the locale value (e.g., t('spotlight.optionOn') instead of 'ON').

Files affected:

  • packages/vitepress-plugin-enhanced-readabilities/src/components/Spotlight.vue
  • packages/vitepress-plugin-enhanced-readabilities/src/components/ScreenSpotlight.vue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      AltStyle によって変換されたページ (->オリジナル) /