Mercurial > octave
changeset 31560:9d9b31c8458b stable
fix missing translations of workspace header
* workspace-model.cc (headerData): use tr() here again
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sun, 27 Nov 2022 11:27:40 +0100 |
parents | 26f1ef8fa1ce |
children | 4e77f48d92ff 8029e9b88950 |
files | libgui/src/workspace-model.cc |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/workspace-model.cc Sun Nov 27 11:27:32 2022 +0100 +++ b/libgui/src/workspace-model.cc Sun Nov 27 11:27:40 2022 +0100 @@ -44,6 +44,8 @@ workspace_model::workspace_model (QObject *p) : QAbstractTableModel (p) { + // The header names. Use tr () again when accessing them since + // the translator si not yet initialized when this ctor is called m_columnNames.append (tr ("Name")); m_columnNames.append (tr ("Class")); m_columnNames.append (tr ("Dimension")); @@ -92,7 +94,7 @@ int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) - return m_columnNames[section]; + return tr (m_columnNames[section].toStdString ().data ()); else return QVariant (); }