gpe-expenses  0.1.9
translate.c
Go to the documentation of this file.
1 /***************************************************************************
2  * translate.c
3  *
4  * Wed 11 Jul 2007 13:11:53 BST
5  * Copyright 2007 Neil Williams <linux@codehelp.co.uk>
6  ****************************************************************************/
7 /*
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  */
22 
56 #define _GNU_SOURCE
57 #include "config.h"
58 #include <libintl.h>
59 #include <locale.h>
60 #include "qof-expenses.h"
61 #define _(String) dgettext (LIBRARY_GETTEXT_PACKAGE, String)
62 
63 #define STRING(name, value) \
64  gchar * G_GNUC_UNUSED name##noop = _(#name);
65 
66 #define MARKUP(name, list) \
67 static void G_GNUC_UNUSED name##translate (void) \
68 { \
69  list(STRING) \
70 }
71 
72 MARKUP(ExpenseType, EXPENSE_TYPE_LIST)
73 
74 MARKUP(ExpensePayment, PAYMENT_TYPE_LIST)
75 
76