diff options
author | fiaxh <git@mx.ax.lt> | 2017-04-12 22:42:23 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-04-13 14:13:57 +0200 |
commit | e3b69538bacd14283374f5e7619db610cafd81d6 (patch) | |
tree | ac3e1d04ee05355bdb995e1ffea55c5720e1dffb /libdino/src | |
parent | a37b5ac823cc5daefac6ab33a16d6f44c747ba9c (diff) | |
download | dino-e3b69538bacd14283374f5e7619db610cafd81d6.tar.gz dino-e3b69538bacd14283374f5e7619db610cafd81d6.zip |
gettext improvements (more strings, times, plural, de lang)
Diffstat (limited to 'libdino/src')
-rw-r--r-- | libdino/src/dino_i18n.h | 3 | ||||
-rw-r--r-- | libdino/src/util.vala | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libdino/src/dino_i18n.h b/libdino/src/dino_i18n.h index e1a65f41..bf6e1347 100644 --- a/libdino/src/dino_i18n.h +++ b/libdino/src/dino_i18n.h @@ -3,6 +3,7 @@ #include<libintl.h> -#define dino_gettext(String) ((char *) dgettext (GETTEXT_PACKAGE, String)) +#define dino_gettext(MsgId) ((char *) dgettext (GETTEXT_PACKAGE, MsgId)) +#define dino_ngettext(MsgId, MsgIdPlural, Int) ((char *) dngettext (GETTEXT_PACKAGE, MsgId, MsgIdPlural, Int)) #endif
\ No newline at end of file diff --git a/libdino/src/util.vala b/libdino/src/util.vala index 29186aa0..03d6ee26 100644 --- a/libdino/src/util.vala +++ b/libdino/src/util.vala @@ -23,6 +23,9 @@ public class SearchPathGenerator { [CCode (cname = "dino_gettext", cheader_filename = "dino_i18n.h")] public static extern unowned string _(string s); +[CCode (cname = "dino_ngettext", cheader_filename = "dino_i18n.h")] +public static extern unowned string n(string msgid, string plural, ulong number); + [CCode (cname = "bindtextdomain", cheader_filename = "libintl.h")] private static extern unowned string? bindtextdomain(string domainname, string? dirname); |