[devhelp/wip/misc: 3/3] parser: fix/improve error messages
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/wip/misc: 3/3] parser: fix/improve error messages
- Date: Thu, 11 May 2017 16:35:41 +0000 (UTC)
commit 6ba9508e5d17e7e87b2a36dd7b198668680c4212
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu May 11 15:02:05 2017 +0200
parser: fix/improve error messages
src/dh-parser.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/dh-parser.c b/src/dh-parser.c
index b728ce2..fe324e4 100644
--- a/src/dh-parser.c
+++ b/src/dh-parser.c
@@ -100,7 +100,7 @@ parser_start_node_book (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("Expected “%s”, got “%s” at line %d, column %d"),
+ _("Expected “%s” element, got “%s” at line %d, column %d."),
"book", node_name, line, col);
return;
}
@@ -115,7 +115,7 @@ parser_start_node_book (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("Invalid namespace “%s” at line %d, column %d"),
+ _("Invalid namespace “%s” at line %d, column %d."),
xmlns, line, col);
return;
}
@@ -138,8 +138,8 @@ parser_start_node_book (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("“title”, “name” and “link” elements are "
- "required at line %d, column %d"),
+ _("“title”, “name” and “link” attributes are required "
+ "inside the <book> element at line %d, column %d."),
line, col);
return;
}
@@ -201,7 +201,7 @@ parser_start_node_chapter (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("Expected “%s” element, got “%s” at line %d, column %d"),
+ _("Expected “%s” element, got “%s” at line %d, column %d."),
"sub", node_name, line, col);
return;
}
@@ -218,8 +218,8 @@ parser_start_node_chapter (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("“name” and “link” elements are required "
- "inside the <sub> element at line %d, column %d"),
+ _("“name” and “link” elements are required inside "
+ "the <sub> element at line %d, column %d."),
line, col);
return;
}
@@ -267,7 +267,7 @@ parser_start_node_keyword (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("Expected “%s” element, got “%s” at line %d, column %d"),
+ _("Expected “%s” element, got “%s” at line %d, column %d."),
"keyword", node_name, line, col);
return;
} else if (parser->version == 1 &&
@@ -276,7 +276,7 @@ parser_start_node_keyword (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("Expected “%s” element, got “%s” at line %d, column %d"),
+ _("Expected “%s” element, got “%s” at line %d, column %d."),
"function", node_name, line, col);
return;
}
@@ -297,8 +297,8 @@ parser_start_node_keyword (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("“name” and “link” attributes are required "
- "inside “%s” element on line %d, column %d"),
+ _("“name” and “link” attributes are required inside "
+ "the <%s> element on line %d, column %d."),
parser->version == 2 ? "keyword" : "function",
line, col);
return;
@@ -309,8 +309,8 @@ parser_start_node_keyword (DhParser *parser,
g_set_error (error,
DH_ERROR,
DH_ERROR_MALFORMED_BOOK,
- _("“type” attribute is required inside "
- "<keyword> element on line %d, column %d"),
+ _("“type” attribute is required inside the "
+ "<keyword> element on line %d, column %d."),
line, col);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]