Skip to content

Commit

Permalink
changed to track normalized display name in order to make xml and pro…
Browse files Browse the repository at this point in the history
…to parsing the same
  • Loading branch information
klingbolt committed Oct 1, 2024
1 parent a0c5648 commit 5c63f62
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion xml_converter/src/packaging_protobin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,16 @@ void write_protobuf_file(
for (auto iterator = marker_categories->begin(); iterator != marker_categories->end(); iterator++) {
StringHierarchy category_filter;
category_filter.add_path({iterator->first}, true);
string name;
if (iterator->second.display_name_is_set) {
name = normalize(iterator->second.display_name);
}
else {
name = normalize(iterator->first);
}

_write_protobuf_file(
join_file_paths(state.marker_pack_root_directory, iterator->first + ".guildpoint"),
join_file_paths(state.marker_pack_root_directory, name + ".guildpoint"),
category_filter,
marker_categories,
category_to_pois,
Expand Down
3 changes: 3 additions & 0 deletions xml_converter/src/packaging_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ string parse_marker_categories(
for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) {
parse_marker_categories(child_node, &(category->children), category, errors, state, depth + 1);
}
if (category->display_name_is_set) {
return normalize(category->display_name);
}
return name;
}
else {
Expand Down

0 comments on commit 5c63f62

Please sign in to comment.