Nova · i18n

Depth and display fields

Prose is found at any depth: a column’s label two levels down in a table’s spec is the same rule as a bare label. And a data field can be marked as words by its name: here every field ending in _display is prose, so the status a query made up is translated while person_name beside it is never touched, though “Pass” is in the book.

The action, as it is written
{
  id: 'i18n-depth',
  data: {
    rows: [{ person_name: 'Pass', ticket_display: 'Standing' }],
  },
  layout: {
    component: 'Table',
    props: {
      columns: [
        { key: 'person_name', label: 'Member' },
        { key: 'ticket_display', label: 'Ticket' },
      ],
      rows: '$.rows',
    },
  },
}
The book it is drawn through
{
  Member: 'Mitglied',
  Ticket: 'Karte',
  Standing: 'Stehplatz',
  Pass: 'Zehnerblock',
}
What is done to it
Nothing. It is only drawn.
What it then holds
{
  rows: [{ person_name: 'Pass', ticket_display: 'Standing' }],
}
What it then says
Mitglied
Karte
Stehplatz
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.