diff --git a/xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/UNKNOWN_CATEGORY_0.guildpoint b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/myemptycategory.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/UNKNOWN_CATEGORY_0.guildpoint rename to xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/myemptycategory.guildpoint diff --git a/xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/UNKNOWN_CATEGORY_1.guildpoint b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/mymissingcategory.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/UNKNOWN_CATEGORY_1.guildpoint rename to xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/mymissingcategory.guildpoint diff --git a/xml_converter/integration_tests/test_cases/xml_display_name_valid/output_proto/nestedlevel1.guildpoint b/xml_converter/integration_tests/test_cases/xml_display_name_valid/output_proto/nestedlevelone.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/xml_display_name_valid/output_proto/nestedlevel1.guildpoint rename to xml_converter/integration_tests/test_cases/xml_display_name_valid/output_proto/nestedlevelone.guildpoint diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index c6cae2f7..1640bfdf 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -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, diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 7f5f59b8..283d2a2c 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -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 {