Репозитории 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 |
Группа :: Мониторинг
Пакет: gkrellm-shoot
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: gkrellshoot-0.4.4-alt-i18n.patch
Скачать
Скачать
--- gkrellShoot/Makefile.orig 2008-09-06 18:12:30 +0600
+++ gkrellShoot/Makefile 2008-09-06 18:12:40 +0600
@@ -5,19 +5,32 @@ FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
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 \
--- gkrellShoot/gkrellshoot.c.orig 2008-09-06 18:12:30 +0600
+++ gkrellShoot/gkrellshoot.c 2008-09-06 18:12:40 +0600
@@ -26,7 +26,7 @@
#define SHOOT_WINDOW "import"
#define DEFAULT_VIEW "display"
#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 "mk.jpg"
#define CONFIG_NAME "GkrellShoot" /* Name in the configuration window */
@@ -1610,7 +1610,7 @@ create_plugin(GtkWidget *vbox, gint firs
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[0]->drawing_area,
shoot_tips_text, NULL);
gtk_tooltips_set_delay(shoot_tips, 1000);
@@ -1848,7 +1848,7 @@ static GtkWidget *create_anim_config_tab
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++ )
{
@@ -1867,7 +1867,7 @@ static GtkWidget *create_anim_config_tab
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)
@@ -1880,7 +1880,7 @@ static GtkWidget *create_anim_config_tab
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);
@@ -2025,7 +2025,7 @@ create_shoot_tab (GtkWidget *tab)
/* 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);
@@ -2107,7 +2107,7 @@ create_shoot_tab (GtkWidget *tab)
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);
@@ -2115,7 +2115,7 @@ create_shoot_tab (GtkWidget *tab)
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 );
@@ -2124,23 +2124,23 @@ create_shoot_tab (GtkWidget *tab)
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);
- grayscale_option = gtk_check_button_new_with_label( "grayscale" );
+ grayscale_option = gtk_check_button_new_with_label( _("grayscale") );
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(grayscale_option),
grayscale );
gtk_container_add(GTK_CONTAINER(vbox), grayscale_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);
@@ -2151,7 +2151,7 @@ create_shoot_tab (GtkWidget *tab)
gtk_container_add(GTK_CONTAINER(vbox), hbox);
ybox = gtk_hbox_new(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);
wait_adjust = (GtkAdjustment *) gtk_adjustment_new((gfloat)
wait_seconds, 0, 180.0, 1.0, 5.0, 0.0);
@@ -2162,7 +2162,7 @@ create_shoot_tab (GtkWidget *tab)
wait_seconds);
gtk_box_pack_start(GTK_BOX(ybox), wait_seconds_option, 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);
@@ -2173,7 +2173,7 @@ create_shoot_tab (GtkWidget *tab)
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);
@@ -2200,19 +2200,19 @@ create_shoot_tab (GtkWidget *tab)
/* about */
about_text = g_strdup_printf(
- "GKrellShoot %s\n" \
+ _("GKrellShoot %s\n" \
"GKrellM Shoot Plugin\n" \
"\n" \
"Copyright (C) %s 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 comes with ABSOLUTELY NO WARRANTY\n") \
, GKRELLSHOOT_VER, GKRELLSHOOT_YEAR
);
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);
}
@@ -2283,7 +2283,11 @@ read_default(void)
GkrellmMonitor *
gkrellm_init_plugin( void )
{
- /* 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
--- gkrellShoot/po/Makefile.orig 2008-09-06 18:12:40 +0600
+++ gkrellShoot/po/Makefile 2008-09-06 18:11:23 +0600
@@ -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)
+