Skip to content

Commit

Permalink
Make sure layer title and renderer are translated.
Browse files Browse the repository at this point in the history
Should fix #950

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
  • Loading branch information
ghutchis committed Jun 16, 2022
1 parent ee934ca commit 31195bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avogadro/qtgui/layermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ QVariant LayerModel::data(const QModelIndex& idx, int role) const
if (idx.column() == ColumnType::Name) {
switch (role) {
case Qt::DisplayRole: {
return QString("Layer %1").arg(layer + 1); // count starts at 0 internally
return QString(tr("Layer %1")).arg(layer + 1); // count starts at 0 internally
}
case Qt::ForegroundRole:
if (layer == static_cast<int>(getMoleculeLayer().activeLayer()))
Expand Down Expand Up @@ -110,7 +110,7 @@ QVariant LayerModel::data(const QModelIndex& idx, int role) const
if (idx.column() == ColumnType::Name) {
switch (role) {
case Qt::DisplayRole: {
return (" " + name).c_str();
return " " + tr(name.c_str()); // should already be translated
}
}
}
Expand Down

0 comments on commit 31195bd

Please sign in to comment.