xref: /dflybsd-src/contrib/binutils-2.27/opcodes/opintl.h (revision e656dc90e3d65d744d534af2f5ea88cf8101ebcf)
1*a9fa9459Szrj /* opintl.h - opcodes specific header for gettext code.
2*a9fa9459Szrj    Copyright (C) 1998-2016 Free Software Foundation, Inc.
3*a9fa9459Szrj 
4*a9fa9459Szrj    Written by Tom Tromey <tromey@cygnus.com>
5*a9fa9459Szrj 
6*a9fa9459Szrj    This file is part of the GNU opcodes library.
7*a9fa9459Szrj 
8*a9fa9459Szrj    This library is free software; you can redistribute it and/or modify
9*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
10*a9fa9459Szrj    the Free Software Foundation; either version 3, or (at your option)
11*a9fa9459Szrj    any later version.
12*a9fa9459Szrj 
13*a9fa9459Szrj    It is distributed in the hope that it will be useful, but WITHOUT
14*a9fa9459Szrj    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15*a9fa9459Szrj    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16*a9fa9459Szrj    License for more details.
17*a9fa9459Szrj 
18*a9fa9459Szrj    You should have received a copy of the GNU General Public License
19*a9fa9459Szrj    along with this file; see the file COPYING.  If not, write to the
20*a9fa9459Szrj    Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
21*a9fa9459Szrj    MA 02110-1301, USA.  */
22*a9fa9459Szrj 
23*a9fa9459Szrj #ifdef ENABLE_NLS
24*a9fa9459Szrj # include <libintl.h>
25*a9fa9459Szrj /* Note the use of dgetext() and PACKAGE here, rather than gettext().
26*a9fa9459Szrj 
27*a9fa9459Szrj    This is because the code in this directory is used to build a library which
28*a9fa9459Szrj    will be linked with code in other directories to form programs.  We want to
29*a9fa9459Szrj    maintain a seperate translation file for this directory however, rather
30*a9fa9459Szrj    than being forced to merge it with that of any program linked to
31*a9fa9459Szrj    libopcodes.  This is a library, so it cannot depend on the catalog
32*a9fa9459Szrj    currently loaded.
33*a9fa9459Szrj 
34*a9fa9459Szrj    In order to do this, we have to make sure that when we extract messages we
35*a9fa9459Szrj    use the OPCODES domain rather than the domain of the program that included
36*a9fa9459Szrj    the opcodes library, (eg OBJDUMP).  Hence we use dgettext (PACKAGE, String)
37*a9fa9459Szrj    and define PACKAGE to be 'opcodes'.  (See the code in configure).  */
38*a9fa9459Szrj # define _(String) dgettext (PACKAGE, String)
39*a9fa9459Szrj # ifdef gettext_noop
40*a9fa9459Szrj #  define N_(String) gettext_noop (String)
41*a9fa9459Szrj # else
42*a9fa9459Szrj #  define N_(String) (String)
43*a9fa9459Szrj # endif
44*a9fa9459Szrj #else
45*a9fa9459Szrj # define gettext(Msgid) (Msgid)
46*a9fa9459Szrj # define dgettext(Domainname, Msgid) (Msgid)
47*a9fa9459Szrj # define dcgettext(Domainname, Msgid, Category) (Msgid)
48*a9fa9459Szrj # define textdomain(Domainname) while (0) /* nothing */
49*a9fa9459Szrj # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
50*a9fa9459Szrj # define _(String) (String)
51*a9fa9459Szrj # define N_(String) (String)
52*a9fa9459Szrj #endif
53