devhelp r1075 - in trunk: . src
- From: rhult svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1075 - in trunk: . src
- Date: Thu, 2 Oct 2008 14:44:48 +0000 (UTC)
Author: rhult
Date: Thu Oct 2 14:44:48 2008
New Revision: 1075
URL: http://svn.gnome.org/viewvc/devhelp?rev=1075&view=rev
Log:
2008-10-02 Richard Hult <richard imendio com>
* src/dh-link.[ch] (dh_link_get_type_as_string): Add UI strings
for the link types.
Modified:
trunk/ChangeLog
trunk/src/dh-link.c
trunk/src/dh-link.h
Modified: trunk/src/dh-link.c
==============================================================================
--- trunk/src/dh-link.c (original)
+++ trunk/src/dh-link.c Thu Oct 2 14:44:48 2008
@@ -22,6 +22,7 @@
#include "config.h"
#include <string.h>
#include <glib-object.h>
+#include <glib/gi18n.h>
#include "dh-link.h"
GType
@@ -141,3 +142,47 @@
{
link->is_deprecated = is_deprecated;
}
+
+const gchar *
+dh_link_get_type_as_string (DhLink *link)
+{
+ switch (link->type) {
+ case DH_LINK_TYPE_BOOK:
+ /* i18n: a documentation book */
+ return _("Book");
+ case DH_LINK_TYPE_PAGE:
+ /* i18n: a "page" in a documentation book */
+ return _("Page");
+ case DH_LINK_TYPE_KEYWORD:
+ /* i18n: a search hit in the documentation, could be a
+ * function, macro, struct, etc */
+ return _("Keyword");
+ case DH_LINK_TYPE_FUNCTION:
+ /* i18n: in the programming language context, if you don't
+ * have an ESTABLISHED term for it, leave it
+ * untranslated. */
+ return _("Function");
+ case DH_LINK_TYPE_STRUCT:
+ /* i18n: in the programming language context, if you don't
+ * have an ESTABLISHED term for it, leave it
+ * untranslated. */
+ return _("Struct");
+ case DH_LINK_TYPE_MACRO:
+ /* i18n: in the programming language context, if you don't
+ * have an ESTABLISHED term for it, leave it
+ * untranslated. */
+ return _("Macro");
+ case DH_LINK_TYPE_ENUM:
+ /* i18n: in the programming language context, if you don't
+ * have an ESTABLISHED term for it, leave it
+ * untranslated. */
+ return _("Enum");
+ case DH_LINK_TYPE_TYPEDEF:
+ /* i18n: in the programming language context, if you don't
+ * have an ESTABLISHED term for it, leave it
+ * untranslated. */
+ return _("Type");
+ }
+
+ return "";
+}
Modified: trunk/src/dh-link.h
==============================================================================
--- trunk/src/dh-link.h (original)
+++ trunk/src/dh-link.h Thu Oct 2 14:44:48 2008
@@ -57,21 +57,21 @@
#define DH_TYPE_LINK dh_link_get_type ()
-GType dh_link_get_type (void);
-
-DhLink * dh_link_new (DhLinkType type,
- const gchar *name,
- const gchar *book,
- const gchar *page,
- const gchar *uri);
-DhLink * dh_link_copy (const DhLink *link);
-void dh_link_free (DhLink *link);
-gint dh_link_compare (gconstpointer a,
- gconstpointer b);
-DhLink * dh_link_ref (DhLink *link);
-void dh_link_unref (DhLink *link);
-gboolean dh_link_get_is_deprecated (DhLink *link);
-void dh_link_set_is_deprecated (DhLink *link,
- gboolean is_deprecated);
+GType dh_link_get_type (void);
+DhLink * dh_link_new (DhLinkType type,
+ const gchar *name,
+ const gchar *book,
+ const gchar *page,
+ const gchar *uri);
+DhLink * dh_link_copy (const DhLink *link);
+void dh_link_free (DhLink *link);
+gint dh_link_compare (gconstpointer a,
+ gconstpointer b);
+DhLink * dh_link_ref (DhLink *link);
+void dh_link_unref (DhLink *link);
+gboolean dh_link_get_is_deprecated (DhLink *link);
+void dh_link_set_is_deprecated (DhLink *link,
+ gboolean is_deprecated);
+const gchar *dh_link_get_type_as_string (DhLink *link);
#endif /* __DH_LINK_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]