I have a vue app that uses vue-i18n, and some dynamic components that set the label for table headers, with some of them blank, the problem is that im getting the warning:
[intlify] Not found '' key in 'en' locale messages.
the table is based on:
//template
<th v-for="header in headers" class="text-center">
{{ $t(header.label) }}
</th>
//script
const header = [
{ label: "sector", show: "always" },
{ label: "price", show: "left" },
{ label: "", show: "right" },
{ label: "forecastTicket", show: "right" },
{ label: "forecastSales", show: "right" },
{ label: "ticketPrice", show: "right" },
{ label: "elasticity", show: "right" },
{ label: "", show: "left" },
];
As some of the table labels are empty strings, I don’t want to modify all the tables to use or not the translate function
i’ve tried adding the message:
['']: ''
the solution i’ve come to is changing the blank string to something like ‘–empty–‘, but i’d like to keep it clean with the empty label, is this possible?
Leonardo Gomez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.