mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
WRaster: Create header for i18n helper functions
This patch is just adding a single header, but because it also modifies all the C files to add the #include, it was made as a patch on its own to ease review. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
aadd694a6b
commit
19202fd2db
41
wrlib/wr_i18n.h
Normal file
41
wrlib/wr_i18n.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Window Maker window manager
|
||||
*
|
||||
* Copyright (c) 2021 Window Maker Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program, see the file COPYING.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file defines the basic stuff for WRaster's message
|
||||
* internationalization in the code
|
||||
*/
|
||||
|
||||
#ifndef WRASTER_I18N_H
|
||||
#define WRASTER_I18N_H
|
||||
|
||||
#if defined(HAVE_LIBINTL_H) && defined(I18N)
|
||||
# include <libintl.h>
|
||||
# define _(text) dgettext("WRaster", (text))
|
||||
#else
|
||||
# define _(text) (text)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* the N_ macro is used for initializers, it will make xgettext pick the
|
||||
* string for translation when generating PO files
|
||||
*/
|
||||
#define N_(text) (text)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user