sbuild
1.4.26
|
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 3 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, see 00015 * <http://www.gnu.org/licenses/>. 00016 * 00017 *********************************************************************/ 00018 00024 #ifndef SBUILD_I18N_H 00025 #define SBUILD_I18N_H 00026 00027 #include <sbuild/sbuild-config.h> 00028 00029 #include <libintl.h> 00030 00031 // Undefine macros which would interfere with our functions. 00032 #ifdef gettext 00033 #undef gettext 00034 #endif 00035 #ifdef _ 00036 #undef _ 00037 #endif 00038 #ifdef gettext_noop 00039 #undef gettext_noop 00040 #endif 00041 #ifdef N_ 00042 #undef N_ 00043 #endif 00044 00045 namespace sbuild 00046 { 00053 inline const char * 00054 gettext (const char *message) 00055 { 00056 return dgettext (SBUILD_MESSAGE_CATALOGUE, message); 00057 } 00058 00066 inline const char * 00067 _ (const char *message) 00068 { 00069 return gettext (message); 00070 } 00071 00078 inline const char * 00079 gettext_noop (const char *message) 00080 { 00081 return message; 00082 } 00083 00091 inline const char * 00092 N_ (const char *message) 00093 { 00094 return gettext_noop (message); 00095 } 00096 00097 } 00098 00099 #endif /* SBUILD_I18N_H */ 00100 00101 /* 00102 * Local Variables: 00103 * mode:C++ 00104 * End: 00105 */