sbuild-i18n.h

Go to the documentation of this file.
00001 /* Copyright © 2005-2007  Roger Leigh <rleigh@debian.org>
00002  *
00003  * schroot is free software; you can redistribute it and/or modify it
00004  * under the terms of the GNU General Public License as published by
00005  * the Free Software Foundation; either version 2 of the License, or
00006  * (at your option) any later version.
00007  *
00008  * schroot is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00016  * MA  02111-1307  USA
00017  *
00018  *********************************************************************/
00019 
00025 #ifndef SBUILD_I18N_H
00026 #define SBUILD_I18N_H
00027 
00028 #include <sbuild/sbuild-config.h>
00029 
00030 #include <libintl.h>
00031 
00032 // Undefine macros which would interfere with our functions.
00033 #ifdef gettext
00034 #undef gettext
00035 #endif
00036 #ifdef _
00037 #undef _
00038 #endif
00039 #ifdef gettext_noop
00040 #undef gettext_noop
00041 #endif
00042 #ifdef N_
00043 #undef N_
00044 #endif
00045 
00046 namespace sbuild
00047 {
00054   inline const char *
00055   gettext (const char *message)
00056   {
00057     return dgettext (SBUILD_MESSAGE_CATALOGUE, message);
00058   }
00059 
00067   inline const char *
00068   _ (const char *message)
00069   {
00070     return gettext (message);
00071   }
00072 
00079   inline const char *
00080   gettext_noop (const char *message)
00081   {
00082     return message;
00083   }
00084 
00092   inline const char *
00093   N_ (const char *message)
00094   {
00095     return gettext_noop (message);
00096   }
00097 
00098 }
00099 
00100 #endif /* SBUILD_I18N_H */
00101 
00102 /*
00103  * Local Variables:
00104  * mode:C++
00105  * End:
00106  */

Generated on Sun Jul 8 21:23:22 2007 for sbuild by  doxygen 1.5.2