| 97 | } |
| 98 | |
| 99 | void processTranslation(const Map& map, TranslationEntries& translation_entries) |
| 100 | { |
| 101 | auto const id = map.symbolSetId(); |
| 102 | |
| 103 | auto num_colors = map.getNumColors(); |
| 104 | for (int i = 0; i < num_colors; ++i) |
| 105 | { |
| 106 | auto* color = map.getColor(i); |
| 107 | auto const& source = color->getName(); |
| 108 | auto comment = QString{QLatin1String("Color ") + QString::number(color->getPriority())}; |
| 109 | addSource(translation_entries, id, source, comment); |
| 110 | } |
| 111 | |
| 112 | auto num_symbols = map.getNumSymbols(); |
| 113 | for (int i = 0; i < num_symbols; ++i) |
| 114 | { |
| 115 | auto symbol = map.getSymbol(i); |
| 116 | auto source = symbol->getName(); |
| 117 | auto comment = QString{QLatin1String("Name of symbol ") + symbol->getNumberAsString()}; |
| 118 | addSource(translation_entries, id, source, comment); |
| 119 | |
| 120 | source = symbol->getDescription(); |
| 121 | comment = QString{QLatin1String("Description of symbol ") + symbol->getNumberAsString()}; |
| 122 | if (source.isEmpty()) |
| 123 | qInfo("%s: empty", qPrintable(comment)); |
| 124 | else |
| 125 | addSource(translation_entries, id, source, comment); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | |
| 130 | /// \todo Review unused function |
no test coverage detected