Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

For plurals, we create different versions of a key followed by an underscore and the plural/singular version it represents.

In our JSON file:

        "status_known_zero": "We don't know about any Host LMS instances that are needed for {{consortium_name}}.",
        "status_known_one": "We know about {{count}} Host LMS instance that is needed for {{consortium_name}}.",
        "status_known_other": "We know about {{count}} Host LMS instances that are needed for {{consortium_name}}.",
  • zero = the string rendered when there are 0 of count

  • one = the string rendered when there is 1 of count

  • other = the string rendered when there is more than 1 of count

In our code, we use the string without the underscore and number, and the string will automatically adapt to count.

t('onboarding.stage.introduce_libraries.status_known', {count: 81, consortium_name: 'MOBIUS'})

Here are examples of all keys which will be adapted:

{
  "key_zero": "zero",
  "key_one": "singular",
  "key_two": "two",
  "key_few": "few",
  "key_many": "many",
  "key_other": "other"
}

Multiple 'Counts'

Has not been used yet, but the documentation can be read here.

  • No labels