aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am1
-rw-r--r--src/colors.c2
-rw-r--r--src/command.c1
-rw-r--r--src/conf.c2
-rw-r--r--src/i18n.h39
-rw-r--r--src/main.c1
-rw-r--r--src/ncmpc.h19
-rw-r--r--src/screen.c1
-rw-r--r--src/screen_artist.c2
-rw-r--r--src/screen_browser.c1
-rw-r--r--src/screen_file.c2
-rw-r--r--src/screen_help.c2
-rw-r--r--src/screen_keydef.c2
-rw-r--r--src/screen_lyrics.c2
-rw-r--r--src/screen_play.c1
-rw-r--r--src/screen_search.c2
-rw-r--r--src/screen_utils.c2
-rw-r--r--src/support.c3
18 files changed, 56 insertions, 29 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 4cc501c10..59af3b51e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,7 @@ ncmpc_headers = \
utils.h\
ncmpc.h\
defaults.h \
+ i18n.h \
screen_browser.h \
lyrics.h \
str_pool.h \
diff --git a/src/colors.c b/src/colors.c
index 9f4f6cdcc..67f3319ca 100644
--- a/src/colors.c
+++ b/src/colors.c
@@ -19,7 +19,7 @@
*/
#include "colors.h"
-#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include <stdio.h>
diff --git a/src/command.c b/src/command.c
index 0ae903381..71ae50e7d 100644
--- a/src/command.c
+++ b/src/command.c
@@ -21,6 +21,7 @@
#include "command.h"
#include "config.h"
#include "ncmpc.h"
+#include "i18n.h"
#include "mpdclient.h"
#include "screen.h"
diff --git a/src/conf.c b/src/conf.c
index 66f125d0d..05eb28ff7 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -22,7 +22,7 @@
#include "conf.h"
#include "config.h"
#include "defaults.h"
-#include "ncmpc.h"
+#include "i18n.h"
#include "support.h"
#include "command.h"
#include "colors.h"
diff --git a/src/i18n.h b/src/i18n.h
new file mode 100644
index 000000000..f99505ed1
--- /dev/null
+++ b/src/i18n.h
@@ -0,0 +1,39 @@
+/* ncmpc
+ * Copyright (C) 2008 Max Kellermann <max@duempel.org>
+ * This project's homepage is: http://www.musicpd.org
+ *
+ * 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; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef I18N_H
+#define I18N_H
+
+#include "config.h"
+
+/* i18n */
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#include <glib/gi18n.h>
+#else
+#define _(x) x
+#define N_(x) x
+#endif
+
+#define YES _("y")
+#define NO _("n")
+
+#endif
diff --git a/src/main.c b/src/main.c
index f6043d48a..641b12e35 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,6 +29,7 @@
#include "screen.h"
#include "screen_utils.h"
#include "strfsong.h"
+#include "i18n.h"
#include "gcc.h"
#ifdef ENABLE_LYRICS_SCREEN
diff --git a/src/ncmpc.h b/src/ncmpc.h
index e7da71778..a1cd9f9fd 100644
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
@@ -1,25 +1,6 @@
#ifndef NCMPC_H
#define NCMPC_H
-#ifndef PACKAGE
-#include "config.h"
-#endif
-
-/* i18n */
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <glib/gi18n.h>
-#else
-#define _(x) x
-#define N_(x) x
-#endif
-
-#define YES _("y")
-#define NO _("n")
-
/* welcome message time [s] */
#define SCREEN_WELCOME_TIME 10
diff --git a/src/screen.c b/src/screen.c
index d0a3c7467..da758b10d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -23,6 +23,7 @@
#include "screen_utils.h"
#include "config.h"
#include "ncmpc.h"
+#include "i18n.h"
#include "support.h"
#include "mpdclient.h"
#include "utils.h"
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 0593fee3c..351dcf081 100644
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
@@ -16,7 +16,7 @@
*
*/
-#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include "support.h"
#include "mpdclient.h"
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 6d2398020..ab10299c6 100644
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -19,6 +19,7 @@
#include "screen_browser.h"
#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include "support.h"
#include "strfsong.h"
diff --git a/src/screen_file.c b/src/screen_file.c
index fa741cd27..0e1800abc 100644
--- a/src/screen_file.c
+++ b/src/screen_file.c
@@ -17,7 +17,7 @@
*/
#include "config.h"
-#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include "support.h"
#include "mpdclient.h"
diff --git a/src/screen_help.c b/src/screen_help.c
index 2637af963..700bc8b65 100644
--- a/src/screen_help.c
+++ b/src/screen_help.c
@@ -17,7 +17,7 @@
*/
#include "config.h"
-#include "ncmpc.h"
+#include "i18n.h"
#include "mpdclient.h"
#include "command.h"
#include "screen.h"
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index a37d27d2a..6e9cb9a25 100644
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
@@ -16,7 +16,7 @@
*
*/
-#include "ncmpc.h"
+#include "i18n.h"
#include "mpdclient.h"
#include "options.h"
#include "conf.h"
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 83bffdf8d..927b3dd9c 100644
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
@@ -18,7 +18,7 @@
*/
#include <sys/stat.h>
-#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include "mpdclient.h"
#include "command.h"
diff --git a/src/screen_play.c b/src/screen_play.c
index 8c564c3fd..309b9a54e 100644
--- a/src/screen_play.c
+++ b/src/screen_play.c
@@ -18,6 +18,7 @@
#include "config.h"
#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include "support.h"
#include "mpdclient.h"
diff --git a/src/screen_search.c b/src/screen_search.c
index 9d80e15a1..af34baf7b 100644
--- a/src/screen_search.c
+++ b/src/screen_search.c
@@ -16,7 +16,7 @@
*
*/
-#include "ncmpc.h"
+#include "i18n.h"
#include "options.h"
#include "support.h"
#include "mpdclient.h"
diff --git a/src/screen_utils.c b/src/screen_utils.c
index 5dfc42630..d83015503 100644
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
@@ -20,7 +20,7 @@
#include "screen.h"
#include "mpdclient.h"
#include "config.h"
-#include "ncmpc.h"
+#include "i18n.h"
#include "support.h"
#include "options.h"
#include "colors.h"
diff --git a/src/support.c b/src/support.c
index bde8d1914..94aab41d1 100644
--- a/src/support.c
+++ b/src/support.c
@@ -19,7 +19,8 @@
*/
#include "support.h"
-#include "ncmpc.h"
+#include "i18n.h"
+#include "config.h"
#include <assert.h>
#include <time.h>