ResourcePackManager: Translate unknown author string

This is text that should be translated, since it'll show up as English
for non-English speakers.
This commit is contained in:
Lioncash 2021-08-24 11:31:05 -04:00
parent 89ceef2a8a
commit 8c67f13256
1 changed files with 4 additions and 3 deletions

View File

@ -108,13 +108,14 @@ void ResourcePackManager::RepopulateTable()
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
{ {
const auto& pack = ResourcePack::GetPacks()[size - 1 - i]; const auto& pack = ResourcePack::GetPacks()[size - 1 - i];
auto* manifest = pack.GetManifest(); const auto* manifest = pack.GetManifest();
const auto& authors = manifest->GetAuthors();
auto* logo_item = new QTableWidgetItem; auto* logo_item = new QTableWidgetItem;
auto* name_item = new QTableWidgetItem(QString::fromStdString(manifest->GetName())); auto* name_item = new QTableWidgetItem(QString::fromStdString(manifest->GetName()));
auto* version_item = new QTableWidgetItem(QString::fromStdString(manifest->GetVersion())); auto* version_item = new QTableWidgetItem(QString::fromStdString(manifest->GetVersion()));
auto* author_item = new QTableWidgetItem( auto* author_item =
QString::fromStdString(manifest->GetAuthors().value_or("Unknown author"))); new QTableWidgetItem(authors ? QString::fromStdString(*authors) : tr("Unknown author"));
auto* description_item = auto* description_item =
new QTableWidgetItem(QString::fromStdString(manifest->GetDescription().value_or(""))); new QTableWidgetItem(QString::fromStdString(manifest->GetDescription().value_or("")));
auto* website_item = auto* website_item =