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