Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37548080
en ru br
Репозитории ALT
S:0.2-alt1
5.1: 0.2-alt1
4.1: 0.2-alt1
4.0: 0.2-alt1
3.0: 0.2-alt1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: gkrellm-alltraxclock2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alltraxclock2-0.2-alt-i18n.patch
Скачать


diff -ruN alltraxclock2_0.2.orig/alltraxclock.c alltraxclock2_0.2/alltraxclock.c
--- alltraxclock2_0.2.orig/alltraxclock.c	2003-01-27 00:24:39 +0300
+++ alltraxclock2_0.2/alltraxclock.c	2003-06-19 10:44:14 +0400
@@ -15,7 +15,6 @@
  * copyright : Your are free to distribute this program under the terms of the GNU GPL.
  */
 
-//#include <gkrellm/gkrellm.h>
 #include <gkrellm2/gkrellm.h>
 
 #include <stdio.h>
@@ -310,20 +309,20 @@
    
    /* -- Options tab */
    //vbox = gkrellm_create_framed_tab(tabs, "Options");
-   vbox = gkrellm_gtk_framed_notebook_page(tabs, "Options");
-   vbox1 = gkrellm_gtk_framed_vbox(vbox, "aLLtraX clock options", 4, FALSE, 0, 2);
+   vbox = gkrellm_gtk_framed_notebook_page(tabs, _("Options"));
+   vbox1 = gkrellm_gtk_framed_vbox(vbox, _("aLLtraX clock options"), 4, FALSE, 0, 2);
    gkrellm_gtk_check_button(vbox1, &plugin_enable_button, g_nClockMask,
-                        FALSE, 0, "Display numbers");
+                        FALSE, 0, _("Display numbers"));
 
    /* About tab */
    plugin_about_text = g_strdup(
-       "aLLtraX-Clock2 0.2\n"
+       _("aLLtraX-Clock2 0.2\n"
        "GKrellM analog clock Plugin\n\n"
        "Copyright (C) 2003 aLLtraX\n"
        "alltrax@users.sourceforge.net\n"
        "http://perso.wanadoo.fr/alltrax/\n\n"
-       "Released under the GNU General Public License\n");
-   vbox = gtk_label_new("About");
+       "Released under the GNU General Public License\n"));
+   vbox = gtk_label_new(_("About"));
    text = gtk_label_new(plugin_about_text);
    gtk_notebook_append_page(GTK_NOTEBOOK(tabs),text,vbox);
    g_free(plugin_about_text);
@@ -358,6 +357,11 @@
    |  This routine will be called for all plugins GKrellM finds, but if
    |  the user does not enable the plugin, nothing else will be called.
    */
+
+#ifdef ENABLE_NLS
+   bind_textdomain_codeset(PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
    plugin_style_id = gkrellm_add_chart_style(&plugin_mon, STYLE_NAME);
    mon = &plugin_mon;
    return &plugin_mon;
diff -ruN alltraxclock2_0.2.orig/Makefile alltraxclock2_0.2/Makefile
--- alltraxclock2_0.2.orig/Makefile	2002-11-19 12:15:53 +0300
+++ alltraxclock2_0.2/Makefile	2003-06-19 10:31:53 +0400
@@ -8,6 +8,15 @@
 LIBS = $(GTK_LIB) $(IMLIB_LIB)
 LFLAGS = -g -shared
 
+LOCALEDIR ?= /usr/share/locale
+ifeq ($(enable_nls),1)
+    FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
+    export enable_nls
+endif
+PACKAGE = gkrellm-alltraxclock
+FLAGS += -DPACKAGE="\"$(PACKAGE)\""
+export PACKAGE LOCALEDIR
+
 CC = gcc $(CFLAGS) $(FLAGS)
 
 OBJS = alltraxclock.o
@@ -15,8 +24,10 @@
 alltraxclock.so: $(OBJS)
 	$(CC) $(OBJS) -o alltraxclock.so $(LFLAGS) $(LIBS)  -lpthread
 
+	(cd po && ${MAKE} all)
 clean:
 	rm -f *.o core *.so* *.bak *~
+	(cd po && ${MAKE} clean)
 
 alltraxclock.o: alltraxclock.c
 
@@ -24,6 +35,7 @@
 	gkrellm -p alltraxclock.so
 
 install:
+	(cd po && ${MAKE} install)
 	if [ -d $(PLUGIN_DIR) ] ; then \
 		install -c -s -m 644 alltraxclock.so $(PLUGIN_DIR) ; \
 	else \
diff -ruN alltraxclock2_0.2.orig/po/Makefile alltraxclock2_0.2/po/Makefile
--- alltraxclock2_0.2.orig/po/Makefile	1970-01-01 03:00:00 +0300
+++ alltraxclock2_0.2/po/Makefile	2003-06-19 10:32:03 +0400
@@ -0,0 +1,33 @@
+MSGFMT = msgfmt
+SUB_DIRS = 
+FILES_PO:=$(wildcard *.po)
+FILES_MO:=$(FILES_PO:.po=.mo)
+
+LOCALEDIR ?= /usr/share/locale
+PACKAGE = gkrellm-alltraxclock
+
+ifeq ($(enable_nls),1)
+all: mo-files
+
+mo-files: $(FILES_MO)
+
+install: 
+	$(MAKE) all
+	for f in *.mo ; do mkdir -p \
+		$(INSTALL_PREFIX)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES ; \
+		cp $$f $(INSTALL_PREFIX)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo ; done
+
+%.mo: %.po
+	$(MSGFMT) -f -v -o $@ $<
+
+else
+
+all:
+
+install:
+
+endif
+
+clean:
+	$(RM) $(FILES_MO)
+
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin