xref: /openbsd-src/gnu/usr.bin/binutils-2.17/opcodes/opintl.h (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* opintl.h - opcodes specific header for gettext code.
2*3d8817e4Smiod    Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
3*3d8817e4Smiod 
4*3d8817e4Smiod    Written by Tom Tromey <tromey@cygnus.com>
5*3d8817e4Smiod 
6*3d8817e4Smiod    This file is part of the opcodes library used by GAS and the GNU binutils.
7*3d8817e4Smiod 
8*3d8817e4Smiod    You should have received a copy of the GNU General Public License
9*3d8817e4Smiod    along with GAS; see the file COPYING.  If not, write to the Free
10*3d8817e4Smiod    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
11*3d8817e4Smiod    02110-1301, USA. */
12*3d8817e4Smiod 
13*3d8817e4Smiod #ifdef ENABLE_NLS
14*3d8817e4Smiod # include <libintl.h>
15*3d8817e4Smiod /* Note the use of dgetext() and PACKAGE here, rather than gettext().
16*3d8817e4Smiod 
17*3d8817e4Smiod    This is because the code in this directory is used to build a library which
18*3d8817e4Smiod    will be linked with code in other directories to form programs.  We want to
19*3d8817e4Smiod    maintain a seperate translation file for this directory however, rather
20*3d8817e4Smiod    than being forced to merge it with that of any program linked to
21*3d8817e4Smiod    libopcodes.  This is a library, so it cannot depend on the catalog
22*3d8817e4Smiod    currently loaded.
23*3d8817e4Smiod 
24*3d8817e4Smiod    In order to do this, we have to make sure that when we extract messages we
25*3d8817e4Smiod    use the OPCODES domain rather than the domain of the program that included
26*3d8817e4Smiod    the opcodes library, (eg OBJDUMP).  Hence we use dgettext (PACKAGE, String)
27*3d8817e4Smiod    and define PACKAGE to be 'opcodes'.  (See the code in configure).  */
28*3d8817e4Smiod # define _(String) dgettext (PACKAGE, String)
29*3d8817e4Smiod # ifdef gettext_noop
30*3d8817e4Smiod #  define N_(String) gettext_noop (String)
31*3d8817e4Smiod # else
32*3d8817e4Smiod #  define N_(String) (String)
33*3d8817e4Smiod # endif
34*3d8817e4Smiod #else
35*3d8817e4Smiod # define gettext(Msgid) (Msgid)
36*3d8817e4Smiod # define dgettext(Domainname, Msgid) (Msgid)
37*3d8817e4Smiod # define dcgettext(Domainname, Msgid, Category) (Msgid)
38*3d8817e4Smiod # define textdomain(Domainname) while (0) /* nothing */
39*3d8817e4Smiod # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
40*3d8817e4Smiod # define _(String) (String)
41*3d8817e4Smiod # define N_(String) (String)
42*3d8817e4Smiod #endif
43