Skip to content

govuk_text_area count messages are untranslatable #594

@m-dango

Description

@m-dango

This is a 2 part issue for the character/word count text on govuk_text_area:

  1. The static message looks to be only available in English:
    "You can enter up to #{limit_quantity} #{limit_type}"
  2. js-character-count is always added, which hides the static message and AFAIK is also only currently available in English:
    build_classes(%(textarea), %(textarea--error) => has_errors?, %(js-character-count) => limit?).prefix(brand)
    (There is some progress with changing this elsewhere: Character count alphagov/govuk-design-system-backlog#67 (comment))

The error prefix was previously updated to support translations so perhaps something similar could be accomplished here?

I18n.translate("helpers.error.message_prefix", default: nil) || config.default_error_message_prefix

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