Skip to content

Commit

Permalink
Revert "Simplify translation data structure"
Browse files Browse the repository at this point in the history
This reverts commit 4dc5ab7
  • Loading branch information
floppyhammer committed Feb 7, 2025
1 parent f6009c7 commit 54eda20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/servers/translation_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ void TranslationServer::load_translations(const std::string& filename) {

rapidcsv::Document doc(filename);
auto row_count = doc.GetRowCount();
auto locale_count = doc.GetColumnCount();
auto locale_count = doc.GetColumnCount() - 1;
auto locale_names = doc.GetColumnNames();

for (size_t row_idx = 0; row_idx < row_count; row_idx++) {
auto row = doc.GetRow<std::string>(row_idx);

for (int i = 0; i < locale_count; i++) {
const auto& locale = locale_names[i];
db_[locale][row[0]] = row[i];
auto locale = locale_names[1 + i];
db_[locale][row[0]] = row[1 + i];
}
}
}
Expand Down

0 comments on commit 54eda20

Please # to comment.