}
for (label_x* label : GListRange<label_x*>(app->label)) {
- xmlTextWriterStartElement(writer, BAD_CAST "label");
- if (label->lang && strcmp(DEFAULT_LOCALE, label->lang) != 0) {
- xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
- BAD_CAST label->lang);
+ if (label->name && strcmp(label->name, "") != 0) {
+ xmlTextWriterStartElement(writer, BAD_CAST "label");
+ if (label->lang && strcmp(DEFAULT_LOCALE, label->lang) != 0) {
+ xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
+ BAD_CAST label->lang);
+ }
+ xmlTextWriterWriteString(writer, BAD_CAST label->name);
+ xmlTextWriterEndElement(writer);
}
- xmlTextWriterWriteString(writer, BAD_CAST label->name);
- xmlTextWriterEndElement(writer);
}
if (app->icon) {
void StepGenerateXml::GenerateLangLabels(xmlTextWriterPtr writer) {
for (label_x* label :
GListRange<label_x*>(context_->manifest_data.get()->label)) {
- xmlTextWriterStartElement(writer, BAD_CAST "label");
- if (label->lang && strcmp(DEFAULT_LOCALE, label->lang) != 0) {
+ if (label->name && strcmp(label->name, "") != 0) {
+ xmlTextWriterStartElement(writer, BAD_CAST "label");
+ if (label->lang && strcmp(DEFAULT_LOCALE, label->lang) != 0) {
xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
- BAD_CAST label->lang);
+ BAD_CAST label->lang);
+ }
+ xmlTextWriterWriteString(writer, BAD_CAST label->name);
+ xmlTextWriterEndElement(writer);
}
- xmlTextWriterWriteString(writer, BAD_CAST label->name);
- xmlTextWriterEndElement(writer);
}
}