diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-04-17 16:50:22 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-04-17 16:50:22 +0200 |
commit | 2e1c4aa678a0191c011daef206e72016f94d1dc1 (patch) | |
tree | 5b5da369c8ef1cb6c6334455d013c50e4fff7e92 /src | |
parent | 73ee24ffefa6bd11789217a92f4cd842323f547f (diff) | |
download | abrt-2e1c4aa678a0191c011daef206e72016f94d1dc1.tar.gz abrt-2e1c4aa678a0191c011daef206e72016f94d1dc1.tar.xz abrt-2e1c4aa678a0191c011daef206e72016f94d1dc1.zip |
make <note-html> translatable
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/event_xml_parser.c | 17 | ||||
-rw-r--r-- | src/plugins/report_Bugzilla.xml.in | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/event_xml_parser.c b/src/lib/event_xml_parser.c index 00c3cba2..17e8a72e 100644 --- a/src/lib/event_xml_parser.c +++ b/src/lib/event_xml_parser.c @@ -181,6 +181,7 @@ static void start_element(GMarkupParseContext *context, || strcmp(element_name, DESCRIPTION_ELEMENT) == 0 || strcmp(element_name, LONG_DESCR_ELEMENT) == 0 || strcmp(element_name, NAME_ELEMENT) == 0 + || strcmp(element_name, NOTE_HTML_ELEMENT) == 0 ) { free(parse_data->attribute_lang); parse_data->attribute_lang = get_element_lang(parse_data, attribute_names, attribute_values); @@ -257,9 +258,19 @@ static void text(GMarkupParseContext *context, if (strcmp(inner_element, NOTE_HTML_ELEMENT) == 0) { - VERB2 log("html note:'%s'", text_copy); - free(opt->eo_note_html); - opt->eo_note_html = text_copy; + if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */ + { + /* set the value only if we found a value for the current locale + * OR the label is still not set and we found the default value + */ + if (parse_data->attribute_lang[0] != '\0' + || !opt->eo_note_html /* && parse_data->attribute_lang is "" - always true */ + ) { + VERB2 log("html note:'%s'", text_copy); + free(opt->eo_note_html); + opt->eo_note_html = text_copy; + } + } return; } diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in index 123235ea..8a53f611 100644 --- a/src/plugins/report_Bugzilla.xml.in +++ b/src/plugins/report_Bugzilla.xml.in @@ -8,7 +8,7 @@ <allow-empty>no</allow-empty> <_description>Address of Bugzilla server</_description> <default-value>https://bugzilla.redhat.com</default-value> - <note-html>You can create bugzilla.redhat.com account <a href="https://bugzilla.redhat.com/createaccount.cgi">here</a></note-html> + <_note-html>You can create bugzilla.redhat.com account <a href="https://bugzilla.redhat.com/createaccount.cgi">here</a></_note-html> </option> <option type="text" name="Bugzilla_Login"> <_label>User name</_label> |