Giter Club home page Giter Club logo

Comments (3)

36degrees avatar 36degrees commented on September 25, 2024

I don't think there's anything currently built in that would allow us to document the params in the YAML but only have them included in the Nunjucks macro options only once.

If we wanted to do the 'easiest thing' we could include the various pluralisable phrases in the YAML, document them as 'objects', but not to list the individual params in the YAML file. Instead we could put a link in the description to somewhere else (in the frontend docs?) where we can explain how they work in more detail.

Something like:

- name: charactersOverLimitText
  type: object
  required: false
  description: Override the phrases used when the user has entered a number of characters that exceeds the limit. See [Understanding pluralisation rules](https://frontend.design-system.service.gov.uk/localising-govuk-frontend#understanding-pluralisation-rules).
- name: charactersUnderLimitText
  type: object
  required: false
  description: Override the phrases used when the user has entered a number of characters that is under the limit. See [Understanding pluralisation rules](https://frontend.design-system.service.gov.uk/localising-govuk-frontend#understanding-pluralisation-rules).

There's lots of reasons why this might be confusing (it's inconsistent with how we document other options with known key/value pairs, for example) but it wouldn't avoid any code changes.

from govuk-design-system.

romaricpascal avatar romaricpascal commented on September 25, 2024

Do I remember correctly that, when we met to discuss this, we agreed to get started using Ollie's solution of linking to wherever the documentation about pluralisation lives?

If so, let's remove this issue from the milestone 😄 I'd be keen to keep it open, as we may want to work out how not to send people somewhere else (unless there's a wider issue for addressing the rendering of that Nunjucks table).

from govuk-design-system.

claireashworth avatar claireashworth commented on September 25, 2024

We're adding links between the options table and the pluralisation rules. The URLs will need to be double-checked once the documentation is added in a PR.

from govuk-design-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.