mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Fix non-I18N build
* Remove directly include of <libintl.h> and include src/wconfig.h, that already include libintl.h and declare _() function * Replace some gettext() calls to _() These changes fixes build with LINGUAS is unset, and removes I18N support in this case.
This commit is contained in:
committed by
Carlos R. Mafra
parent
1f2b9999b9
commit
0f5c36a67e
@@ -32,7 +32,6 @@
|
|||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <libintl.h>
|
|
||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
#include <wraster.h>
|
#include <wraster.h>
|
||||||
@@ -561,13 +560,13 @@ getuserinput(WScreen *scr, char *line, int *ptr, Bool advanced)
|
|||||||
|
|
||||||
if(advanced)
|
if(advanced)
|
||||||
rv = wAdvancedInputDialog(scr,
|
rv = wAdvancedInputDialog(scr,
|
||||||
title ? gettext(title):_("Program Arguments"),
|
title ? _(title):_("Program Arguments"),
|
||||||
prompt ? gettext(prompt):_("Enter command arguments:"),
|
prompt ? _(prompt):_("Enter command arguments:"),
|
||||||
name, &ret);
|
name, &ret);
|
||||||
else
|
else
|
||||||
rv = wInputDialog(scr,
|
rv = wInputDialog(scr,
|
||||||
title ? gettext(title):_("Program Arguments"),
|
title ? _(title):_("Program Arguments"),
|
||||||
prompt ? gettext(prompt):_("Enter command arguments:"),
|
prompt ? _(prompt):_("Enter command arguments:"),
|
||||||
&ret);
|
&ret);
|
||||||
|
|
||||||
if(title) wfree(title);
|
if(title) wfree(title);
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <libintl.h>
|
|
||||||
#define _(text) gettext(text)
|
#include "../src/wconfig.h"
|
||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
@@ -33,6 +33,7 @@ int main(int argc, char *argv[])
|
|||||||
locale = getenv("LANG");
|
locale = getenv("LANG");
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
|
#if HAVE_LIBINTL_H && I18N
|
||||||
if (getenv("NLSPATH"))
|
if (getenv("NLSPATH"))
|
||||||
bindtextdomain("wmgenmenu", getenv("NLSPATH"));
|
bindtextdomain("wmgenmenu", getenv("NLSPATH"));
|
||||||
else
|
else
|
||||||
@@ -40,6 +41,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bind_textdomain_codeset("wmgenmenu", "UTF-8");
|
bind_textdomain_codeset("wmgenmenu", "UTF-8");
|
||||||
textdomain("wmgenmenu");
|
textdomain("wmgenmenu");
|
||||||
|
#endif
|
||||||
|
|
||||||
printf("\(\"Window Maker\",\n");
|
printf("\(\"Window Maker\",\n");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user