Sha256: 9cb93eda90b22445b387dfde43a84d1abe3f0e56a65175802f33e0e812fe9a6d

Contents?: true

Size: 664 Bytes

Versions: 75

Compression:

Stored size: 664 Bytes

Contents

{#
  Renders the data attributes for the different plural forms of the given
  translation key.

  {@link https://cldr.unicode.org/index/cldr-spec/plural-rules}

  Helps reduce the boilerplate in component templates as they're quite verbose

  @private
  @param {string} translationKey - The kebab-cased name of the translation key
  @param {object} pluralForms - An object associating translation messages to
    the plural form they correspond to
#}
{% macro govukPluralisedI18nAttributes(translationKey, pluralForms) %}
  {% for pluralType, message in pluralForms %} data-i18n.{{translationKey}}.{{pluralType}}="{{message | escape}}"{% endfor %}
{% endmacro %}

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
govuk_publishing_components-39.2.5 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.2.4 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.2.3 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.2.2 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.2.1 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.2.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.1.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-39.0.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-38.4.2 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-38.1.1 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-38.1.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-38.0.1 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-38.0.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.10.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.9.1 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.9.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.8.1 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.8.0 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.7.1 node_modules/govuk-frontend/govuk/macros/i18n.njk
govuk_publishing_components-37.7.0 node_modules/govuk-frontend/govuk/macros/i18n.njk