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

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

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

Патч: gkrellshoot-0.4.1-alt-i18n.patch
Скачать


diff -Naur gkrellShoot-0.4.1/gkrellshoot.c gkrellShoot-0.4.1.new/gkrellshoot.c
--- gkrellShoot-0.4.1/gkrellshoot.c	2002-08-18 19:06:38 +0300
+++ gkrellShoot-0.4.1.new/gkrellshoot.c	2003-03-29 17:05:07 +0200
@@ -25,7 +25,7 @@
 #define SHOOT_WINDOW		"import"
 #define DEFAULT_VIEW		"ee"
 #define DEFAULT_IMAGE		"jpg"
-#define WINDOW_LABEL	"Grab selected window/area ( unchecking this will grab whole screen)"
+#define WINDOW_LABEL	_("Grab selected window/area ( unchecking this will grab whole screen)")
 
 #define DEFAULT_OUTFILE	"/tmp/mk.jpg"
 #define	CONFIG_NAME	"GkrellShoot"	/* Name in the configuration window */
@@ -1479,7 +1479,7 @@
         |  First draw the initial text into the text decal button and then
         |  put the text decal into a meter button.  
         */
-        gkrellm_draw_decal_text(panel, decal_lock, "Lock", 0 ); 
+	gkrellm_draw_decal_text(panel, decal_lock, "Lock", 0 ); 
         gkrellm_put_decal_in_meter_button(panel, decal_lock, cb_button,
                                 GINT_TO_POINTER(0), NULL);
 
@@ -1498,7 +1498,7 @@
         if (shoot_tips == NULL)
         {
           shoot_tips = gtk_tooltips_new();
-          shoot_tips_text = g_strdup("Click <Shoot> to grab window or screen\nClick <Lock> to lock the screen");
+          shoot_tips_text = g_strdup(_("Click <Shoot> to grab window or screen\nClick <Lock> to lock the screen"));
           gtk_tooltips_set_tip(shoot_tips, panel->drawing_area,
                                shoot_tips_text, NULL);
           gtk_tooltips_set_delay(shoot_tips, 1000);
@@ -1706,7 +1706,7 @@
 	hbox = gtk_hbox_new( FALSE, 0 );
 
 
-    label = gtk_label_new("Select Animation " );
+    label = gtk_label_new(_("Select Animation ") );
 
     for ( j = 0; j < MAX_ANIM; j++ )
 	{
@@ -1725,7 +1725,7 @@
     gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
 
 	hbox = gtk_hbox_new( FALSE, 0 );
-    label = gtk_label_new("Cycle through Animation every " );
+    label = gtk_label_new(_("Cycle through Animation every ") );
     gtk_box_pack_start(GTK_BOX(hbox), label , FALSE, FALSE, 0);
 
     cycle_anim_adjust = (GtkAdjustment *) gtk_adjustment_new((gfloat)
@@ -1738,7 +1738,7 @@
 
     gtk_box_pack_start(GTK_BOX(hbox), cycle_anim_option[i], FALSE, FALSE, 0);
 
-    label = gtk_label_new(" minutes (0 means animation will not cycle)" );
+    label = gtk_label_new(_(" minutes (0 means animation will not cycle)") );
     gtk_box_pack_start(GTK_BOX(hbox), label , FALSE, FALSE, 0);
 
     gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
@@ -1827,28 +1827,28 @@
     static gchar *help_text[] =
     {
       "<b>" CONFIG_NAME " " GKRELLSHOOT_VER "\n\n" ,
-      "Grabs screen/window when Shoot is clicked (uses ImageMagick) \n" ,
-      "Locks the screen when Lock is clicked. And optionally will display " ,
-      "Animation. \n\n" ,
-      "<b> Options \n\n" ,
-      "Image Format - any valid image format supported by ImageMagick.\n",
-      "Maximum of 3 animation panels are possible.Each can have its\n",
-      "own animation. To Disable animation choose 0.\n\n",
-      "<b> Animation Panel \n\n" ,
-      "Select Animation from dropdown. To cycle through animation choose\n",
-      "number of minutes between cycle.\n",
-      "Middle-click the Animation to cycle through all available animations.\n",
-      "Right-click to open config window .\n\n",
-      "<i> Usage \n\n" ,
-      "Once Shoot is clicked if window grab is selected then cross prompt \n",
-      "appears on the screen using which one can select a window\n",
-      "by clicking on a window or hold down mouse and choose an area \n",
-      "to be grabbed, otherwise whole screen is grabbed. If with window \n",
-	  "frame is selected, windows are grabbed with their frame. Grabbed image is \n",
-      "saved on to current users home directory with the following name : \n",
-      "gkrellShoot_MM-DD-YY_HHMMSS.imageFormat(jpg,gif etc). \n\n",
-      "If View Image is selected Grabbed Image is passed onto given ",
-      "Image Viewer. "
+      N_("Grabs screen/window when Shoot is clicked (uses ImageMagick) \n" \
+      "Locks the screen when Lock is clicked. And optionally will display " \
+      "Animation. \n\n") ,
+      N_("<b> Options \n\n") ,
+      N_("Image Format - any valid image format supported by ImageMagick.\n" \
+      "Maximum of 3 animation panels are possible.Each can have its\n" \
+      "own animation. To Disable animation choose 0.\n\n"),
+      N_("<b> Animation Panel \n\n") ,
+      N_("Select Animation from dropdown. To cycle through animation choose\n" \
+      "number of minutes between cycle.\n" \
+      "Middle-click the Animation to cycle through all available animations.\n" \
+      "Right-click to open config window .\n\n"),
+      N_("<i> Usage \n\n") ,
+      N_("Once Shoot is clicked if window grab is selected then cross prompt \n" \
+      "appears on the screen using which one can select a window\n" \
+      "by clicking on a window or hold down mouse and choose an area \n" \
+      "to be grabbed, otherwise whole screen is grabbed. If with window \n" \
+      "frame is selected, windows are grabbed with their frame. Grabbed image is \n" \
+      "saved on to current users home directory with the following name : \n" \
+      "gkrellShoot_MM-DD-YY_HHMMSS.imageFormat(jpg,gif etc). \n\n" \
+      "If View Image is selected Grabbed Image is passed onto given " \
+      "Image Viewer. ")
     };
 
 	if ( laptop ) { gtk_object_unref( GTK_OBJECT( laptop ) ); }
@@ -1866,7 +1866,7 @@
 
     /* Lock */
     hbox = gtk_hbox_new(FALSE, 0);
-    label = gtk_label_new("Screen Lock Command" );
+    label = gtk_label_new(_("Screen Lock Command") );
     xlock_cmd_option = gtk_entry_new_with_max_length(512);
     gtk_entry_set_text(GTK_ENTRY(xlock_cmd_option), xlock_cmd);
     gtk_entry_set_editable(GTK_ENTRY(xlock_cmd_option), TRUE);
@@ -1893,7 +1893,7 @@
 
     gtk_box_pack_start(GTK_BOX(hbox), num_panel_option, FALSE, FALSE, 0);
 
-    label = gtk_label_new("Number of Animation Panels ( To disable animation choose 0 ) " );
+    label = gtk_label_new(_("Number of Animation Panels ( To disable animation choose 0 ) ") );
     gtk_box_pack_start(GTK_BOX(hbox), label , FALSE, FALSE, 5);
 
     gtk_container_add(GTK_CONTAINER(vbox), hbox);
@@ -1901,7 +1901,7 @@
     separator = gtk_hseparator_new();
     gtk_box_pack_start(GTK_BOX(vbox), separator, FALSE, FALSE, 4);
     /* Shoot */
-    label = gtk_label_new("Screen Shoot Options");
+    label = gtk_label_new(_("Screen Shoot Options"));
     gtk_container_add(GTK_CONTAINER(vbox), label);
 
     window_option = gtk_check_button_new_with_label( WINDOW_LABEL );
@@ -1910,18 +1910,18 @@
 
     gtk_container_add(GTK_CONTAINER(vbox), window_option);
 
-    frame_option = gtk_check_button_new_with_label( "with window frame" );
+    frame_option = gtk_check_button_new_with_label( _("with window frame") );
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frame_option),
             with_frame );
     gtk_container_add(GTK_CONTAINER(vbox), frame_option);
 
-    view_image_option = gtk_check_button_new_with_label( "View Image after click" );
+    view_image_option = gtk_check_button_new_with_label( _("View Image after click") );
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(view_image_option),
             view_image );
     gtk_container_add(GTK_CONTAINER(vbox), view_image_option);
 
     hbox = gtk_hbox_new(FALSE, 0);
-    label = gtk_label_new("Image Viewer " );
+    label = gtk_label_new(_("Image Viewer ") );
     view_cmd_option = gtk_entry_new_with_max_length(512);
     gtk_entry_set_text(GTK_ENTRY(view_cmd_option), view_cmd);
     gtk_entry_set_editable(GTK_ENTRY(view_cmd_option), TRUE);
@@ -1940,10 +1940,10 @@
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(wait_seconds_option),
             wait_seconds);
     gtk_box_pack_start(GTK_BOX(ybox), wait_seconds_option, FALSE, FALSE, 0);
-    label = gtk_label_new(" seconds to wait before Screen Shot");
+    label = gtk_label_new(_(" seconds to wait before Screen Shot"));
     gtk_box_pack_start(GTK_BOX(ybox), label, FALSE, FALSE, 0);
 
-    label = gtk_label_new("Image Format" );
+    label = gtk_label_new(_("Image Format") );
     image_format_option = gtk_entry_new_with_max_length(8);
     gtk_entry_set_text(GTK_ENTRY(image_format_option), image_format);
     gtk_entry_set_editable(GTK_ENTRY(image_format_option), TRUE);
@@ -1954,7 +1954,7 @@
 
     gtk_container_add(GTK_CONTAINER(vbox), ybox);
 
-    label = gtk_label_new("Options");
+    label = gtk_label_new(_("Options"));
     gtk_container_add(GTK_CONTAINER(frame), vbox);
     gtk_notebook_append_page(GTK_NOTEBOOK(laptop), frame, label);
 
@@ -1982,28 +1982,29 @@
 
     text = gtk_text_view_new();
 
-    gkrellm_gtk_text_view_append_strings(text, help_text, sizeof(help_text)/sizeof(gchar*));
+    for (i=0; i < sizeof(help_text)/sizeof(gchar *); ++i)
+	gkrellm_gtk_text_view_append(text, _(help_text[i]));
     gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
     gtk_container_add(GTK_CONTAINER(info_window), text);
 
-    label = gtk_label_new("Help");
+    label = gtk_label_new(_("Help"));
     gtk_notebook_append_page(GTK_NOTEBOOK(laptop), frame, label);
 
         /* about */
     about_text = g_strdup_printf(
-        "GKrellShoot %s\n" \
+        _("GKrellShoot %s\n" \
         "GKrellM Shoot Plugin\n" \
         "\n" \
         "Copyright (C) 2002 M.R.Muthu Kumar\n" \
         "m_muthukumar@users.sourceforge.net\n" \
         "\n" \
         "Released under the GNU Public License\n" \
-	"GkrellShoot comes with ABSOLUTELY NO WARRANTY\n" \
-        , GKRELLSHOOT_VER
+	"GkrellShoot comes with ABSOLUTELY NO WARRANTY\n"),
+        GKRELLSHOOT_VER
     );
     about_label = gtk_label_new(about_text);
     g_free(about_text);
-    label = gtk_label_new("About");
+    label = gtk_label_new(_("About"));
     gtk_notebook_append_page(GTK_NOTEBOOK(laptop), about_label, label);
 }
 
@@ -2069,7 +2070,11 @@
 GkrellmMonitor *
 gkrellm_init_plugin()
 	{
-	/* If this call is made, the background and krell images for this plugin
+#ifdef ENABLE_NLS
+   bind_textdomain_codeset(PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
+   	/* If this call is made, the background and krell images for this plugin
 	|  can be custom themed by putting bg_meter.png or krell.png in the
 	|  subdirectory STYLE_NAME of the theme directory.  Text colors (and
 	|  other things) can also be specified for the plugin with gkrellmrc
diff -Naur gkrellShoot-0.4.1/Makefile gkrellShoot-0.4.1.new/Makefile
--- gkrellShoot-0.4.1/Makefile	2002-08-18 19:06:38 +0300
+++ gkrellShoot-0.4.1.new/Makefile	2003-03-29 17:14:25 +0200
@@ -5,19 +5,32 @@
 LIBS = $(GTK_LIB) 
 LFLAGS = -shared
 
+PACKAGE ?= gkrellshoot
+LOCALEDIR ?= /usr/local/share/locale
+
+ifeq ($(enable_nls),1)
+    FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
+    export enable_nls
+endif
+FLAGS += -DPACKAGE="\"$(PACKAGE)\""
+export PACKAGE LOCALEDIR
+
 CC = gcc $(CFLAGS) $(FLAGS)
 
 OBJS = gkrellshoot.o
 
 gkrellshoot.so: $(OBJS)
+	(cd po && ${MAKE} all )
 	$(CC) $(OBJS) -o gkrellshoot.so $(LFLAGS) $(LIBS) 
 
 clean:
+	(cd po && ${MAKE} clean )
 	rm -f *.o core *.so* *.bak *~
 
 gkrellshoot.o: gkrellshoot.c
 
 install:
+	(cd po && ${MAKE} install )
 	if [ -d /usr/local/lib/gkrellm2/plugins/ ] ; then \
 		install -c -s -m 644 gkrellshoot.so /usr/local/lib/gkrellm2/plugins/ ; \
 	elif [ -d /usr/lib/gkrellm2/plugins/ ] ; then \
diff -Naur gkrellShoot-0.4.1/po/Makefile gkrellShoot-0.4.1.new/po/Makefile
--- gkrellShoot-0.4.1/po/Makefile	1970-01-01 03:00:00 +0300
+++ gkrellShoot-0.4.1.new/po/Makefile	2003-03-29 17:08:11 +0200
@@ -0,0 +1,33 @@
+MSGFMT = msgfmt
+SUB_DIRS = 
+FILES_PO:=$(wildcard *.po)
+FILES_MO:=$(FILES_PO:.po=.mo)
+
+LOCALEDIR ?= /usr/share/locale
+PACKAGE ?= gkrellshoot
+
+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)
+
diff -Naur gkrellShoot-0.4.1/po/Makefile.orig gkrellShoot-0.4.1.new/po/Makefile.orig
--- gkrellShoot-0.4.1/po/Makefile.orig	1970-01-01 03:00:00 +0300
+++ gkrellShoot-0.4.1.new/po/Makefile.orig	2003-03-29 13:07:20 +0200
@@ -0,0 +1,33 @@
+MSGFMT = msgfmt
+SUB_DIRS = 
+FILES_PO:=$(wildcard *.po)
+FILES_MO:=$(FILES_PO:.po=.mo)
+
+LOCALEDIR ?= /usr/share/locale
+PACKAGE ?= gkrellshoot
+
+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)
+
diff -Naur gkrellShoot-0.4.1/po/Makefile.rej gkrellShoot-0.4.1.new/po/Makefile.rej
--- gkrellShoot-0.4.1/po/Makefile.rej	1970-01-01 03:00:00 +0300
+++ gkrellShoot-0.4.1.new/po/Makefile.rej	2003-03-29 17:08:11 +0200
@@ -0,0 +1,36 @@
+***************
+*** 0 ****
+--- 1,33 ----
++ MSGFMT = msgfmt
++ SUB_DIRS = 
++ FILES_PO:=$(wildcard *.po)
++ FILES_MO:=$(FILES_PO:.po=.mo)
++ 
++ LOCALEDIR ?= /usr/share/locale
++ PACKAGE ?= gkrellshoot
++ 
++ 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