I am trying to create my own CMP, so I have used BobRay's MyComponent Example extra and the Doodles tutorial as examples.
The problem that I am having is the column headers for the table. Using BobRay's Example code the widget/chunk.grid.js file defines the columns with
, columns: [this.sm, {
header: _('id')
,dataIndex: 'id'
,sortable: true
,width: 50
}, {
header: _('name')
,dataIndex: 'name'
,sortable: true
,width: 100
}, {
header: _('category'),
dataIndex: 'category',
sortable: true,
width: 120
}, {
header: _('description')
, dataIndex: 'description'
, sortable: false
, width: 300
}]
My question is how does the line "header: _('name')" translate to "Name" when displayed on the page? Notice the capital "N"? However, the _('name') function does not just capitalize the first letter. Because if I change it to _('junk') and leave the dataIndex: 'name' the header is blank?
The lexicon file does not have translations for any of the field names, so where is this coming from?
I have followed the same steps on my CMP (header description matches the name of the dataIndex), and the headers are all blank, so must be missing some file of something.
It would seem like I could put any value in the header to describe the dataIndex, but I can't see how to do this.