diff -Naur gkrellm-reminder-2.0.0/Makefile gkrellm-reminder-2.0.0.new/Makefile --- gkrellm-reminder-2.0.0/Makefile 2002-05-01 20:39:37 +0300 +++ gkrellm-reminder-2.0.0.new/Makefile 2003-03-30 19:46:01 +0300 @@ -7,17 +7,29 @@ LFLAGS = -shared -L/usr/pkg/lib +LOCALEDIR := $(DESTDIR)/usr/share/locale +PACKAGE ?= gkrellm-reminder + +ifeq ($(enable_nls),1) + CFLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\" + export enable_nls +endif +CFLAGS += -DPACKAGE="\"$(PACKAGE)\"" +export PACKAGE LOCALEDIR + CC = gcc all: reminder.so reminder.so: reminder.c calendar.xpm + (cd po && ${MAKE} all ) $(CC) $(CFLAGS) -o reminder.so $(LFLAGS) $(LIBS) reminder.c clean: rm -f *.o core *.so install: + (cd po && ${MAKE} install ) if [ -d /usr/lib/gkrellm2/plugins/ ] ; then \ install -c -s -m 644 reminder.so /usr/lib/gkrellm2/plugins/ ; \ elif [ -d /usr/local/lib/gkrellm2/plugins/ ] ; then \ diff -Naur gkrellm-reminder-2.0.0/po/Makefile gkrellm-reminder-2.0.0.new/po/Makefile --- gkrellm-reminder-2.0.0/po/Makefile 1970-01-01 03:00:00 +0300 +++ gkrellm-reminder-2.0.0.new/po/Makefile 2003-03-30 19:45:40 +0300 @@ -0,0 +1,33 @@ +MSGFMT = msgfmt +SUB_DIRS = +FILES_PO:=$(wildcard *.po) +FILES_MO:=$(FILES_PO:.po=.mo) + +LOCALEDIR ?= /usr/share/locale +PACKAGE ?= gkrellm-reminder + +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 gkrellm-reminder-2.0.0/po/README gkrellm-reminder-2.0.0.new/po/README --- gkrellm-reminder-2.0.0/po/README 1970-01-01 03:00:00 +0300 +++ gkrellm-reminder-2.0.0.new/po/README 2003-03-30 19:45:40 +0300 @@ -0,0 +1,92 @@ + Adding a translation to gkrellm-reminder + -------------------------------------- +0) History +---------- + This document is taken from the gkrellm source tree and adapted for + gkrellm-reminder + +1) Extract the strings from the source +-------------------------------------- +In the gkrellmkam top level directory, create the .po template (.pot): + + xgettext -k_ -kN_ *.c -o po/gkrellm-reminder.pot + + +2) Update or create .po files +----------------------------- +If there are any existing translations, XX.po files, then merge them: + + cd po + msgmerge XX.po gkrellm-reminder.pot > XX.po.new + mv XX.po.new XX.po + +Or, if this is a new translation, copy the template: + + cd po + cp gkrellm-reminder.pot XX.po + + +3) Add translations +------------------- +Edit XX.po to add translations for new strings, fix broken translations, +and touch up fuzzy translations. + + +4) Make and install gkrellm-reminder with i18n enabled +---------------------------------------------------- +If make is run from this directory instead of the top level dir, you must +explicitely enable i18n in all the below examples by adding enable_nls=1 +to the make command: + + make enable_nls=1 + +And for the install step: + + make install enable_nls=1 + +i18n will be automatically enabled when make is run from the top level dir. + + +In either case, a make install will for each XX.po file create a XX.mo file +and copy it to: + + $LOCALEDIR/XX/LC_MESSAGES/gkrellm-reminder.mo + +If there is no LOCALEDIR environment variable, then the default install +will be to: + + /usr/share/locale/XX/LC_MESSAGES/gkrellm-reminder.mo + + + +But, if you want a different explicit install directory, do for example: + + make install LOCALEDIR=/usr/local/share/locale + +or (for bash) + export LOCALEDIR=/usr/local/share/locale + make install + +Other export lines: + sh: export LOCALEDIR; LOCALEDIR=/usr/local/share/locale + csh: setenv LOCALEDIR /usr/local/share/locale + +You can also specify the textdomain package name. From bash: + make install PACKAGE=gkrellm-reminder + +============================================================================ +Using a translation +------------------- + +A user must have localizations enabled for a translation to be used. +To enable a localization, the LANG environment variable should be set +via the command line or the shell login startup files. + +For example, to see the French translation, a user should be able to: + +From bash: + export LANG=fr_FR +or from csh + setenv LANG fr_FR + +If fr_FR does not work, try fr_FR.ISO_8859-1 diff -Naur gkrellm-reminder-2.0.0/reminder.c gkrellm-reminder-2.0.0.new/reminder.c --- gkrellm-reminder-2.0.0/reminder.c 2002-12-04 07:29:31 +0200 +++ gkrellm-reminder-2.0.0.new/reminder.c 2003-03-30 19:45:40 +0300 @@ -1051,10 +1051,10 @@ { if( current->days == 1 ) //sprintf( string, "Everyday" ); - string = g_strdup_printf("Everyday"); + string = g_strdup_printf(_("Everyday")); else //sprintf( string, "Every %d days", current->days ); - string = g_strdup_printf("Every %d days", current->days); + string = g_strdup_printf(_("Every %d days"), current->days); } else if( current->occurs == OPT_WEEKLY ) { @@ -1064,35 +1064,35 @@ if( days == 127 ) { //pos = sprintf( string, "Everyday" ); - string = g_strdup_printf("Everyday"); + string = g_strdup_printf(_("Everyday")); } else if( days == 62 ) { //pos = sprintf( string, "Every weekday" ); - string = g_strdup_printf("Every weekday"); + string = g_strdup_printf(_("Every weekday")); } else if( days == 65 ) { //pos = sprintf( string, "Every weekend" ); - string = g_strdup_printf("Every weekend"); + string = g_strdup_printf(_("Every weekend")); } else { //pos = sprintf( string, "%s%s%s%s%s%s%s", string = g_strdup_printf("%s%s%s%s%s%s%s", - current->days & 1 ? "Sun " : str_null, - current->days & 2 ? "Mon " : str_null, - current->days & 4 ? "Tue " : str_null, - current->days & 8 ? "Wed " : str_null, - current->days & 16 ? "Thu " : str_null, - current->days & 32 ? "Fri " : str_null, - current->days & 64 ? "Sat" : str_null ); + current->days & 1 ? _("Sun ") : str_null, + current->days & 2 ? _("Mon ") : str_null, + current->days & 4 ? _("Tue ") : str_null, + current->days & 8 ? _("Wed ") : str_null, + current->days & 16 ? _("Thu ") : str_null, + current->days & 32 ? _("Fri ") : str_null, + current->days & 64 ? _("Sat") : str_null ); } if( weeks > 1 ) //sprintf( string + pos, "; Every %d weeks", weeks ); { - string2 = g_strdup_printf("; Every %d weeks", weeks ); + string2 = g_strdup_printf(_("; Every %d weeks"), weeks ); g_strconcat(string, string2, NULL); g_free(string2); } @@ -1104,26 +1104,26 @@ if( day % 10 == 1 ) //pos = sprintf( string, "%dst", day ); - string = g_strdup_printf("%dst", day ); + string = g_strdup_printf(_("%dst"), day ); else if( day % 10 == 2 ) //pos = sprintf( string, "%dnd", day ); - string = g_strdup_printf("%dnd", day ); + string = g_strdup_printf(_("%dnd"), day ); else if( day % 10 == 3 ) //pos = sprintf( string, "%drd", day ); - string = g_strdup_printf("%drd", day ); + string = g_strdup_printf(_("%drd"), day ); else //pos = sprintf( string, "%dth", day ); - string = g_strdup_printf("%dth", day ); + string = g_strdup_printf(_("%dth"), day ); if( month == 1 ) { //sprintf( string + pos, " of every month" ); - string2 = g_strdup_printf(" of every month" ); + string2 = g_strdup_printf(_(" of every month") ); g_strconcat(string, string2, NULL); g_free(string2); } else { //sprintf( string + pos, " of every %d months", month ); - string2 = g_strdup_printf(" of every %d months", month ); + string2 = g_strdup_printf(_(" of every %d months"), month ); g_strconcat(string, string2, NULL); g_free(string2); } @@ -1140,7 +1140,7 @@ name = (gchar *) gtk_entry_get_text( GTK_ENTRY( entry_event ) ); if( strlen( name ) < 1 ) { - gkrellm_message_window( str_title, "ERROR: You must enter a name for this event.", entry_event ); + gkrellm_message_window( str_title, _("ERROR: You must enter a name for this event."), entry_event ); return NULL; } // current->name = malloc( strlen( name ) ); @@ -1185,7 +1185,7 @@ if( current->end < current->start && current->end != FOREVER ) { - gkrellm_message_window( str_title, "ERROR: End date can't be smaller than start date.", spin_start_day ); + gkrellm_message_window( str_title, _("ERROR: End date can't be smaller than start date."), spin_start_day ); g_free( current->name ); return NULL; @@ -1211,7 +1211,7 @@ if( !current->days ) { - gkrellm_message_window( str_title, "ERROR: You must select at least one day.", check_sun ); + gkrellm_message_window( str_title, _("ERROR: You must select at least one day."), check_sun ); g_free( current->name ); return NULL; } @@ -1254,7 +1254,7 @@ strftime( array[3], 50, config.mdy ? str_mdy : str_dmy, localtime( &real_start ) ); if( event->end == FOREVER ) - strcpy( array[4], "Never" ); + strcpy( array[4], _("Never") ); else strftime( array[4], 50, config.mdy ? str_mdy : str_dmy, localtime( &event->end ) ); @@ -1864,7 +1864,7 @@ /* *entry_event */ hbox_event = gtk_hbox_new( FALSE, 2 ); - label_event = gtk_label_new( "Event:" ); + label_event = gtk_label_new( _("Event:") ); entry_event = gtk_entry_new(); gtk_box_pack_start( GTK_BOX( hbox_event ), label_event, FALSE, FALSE, 2 ); @@ -1889,7 +1889,7 @@ adj_time_hour = gtk_adjustment_new( 0, 0, 23, 1, 10, 0 ); adj_time_minute = gtk_adjustment_new( 0, 0, 59, 1, 10, 0 ); - label_time = gtk_label_new( "Time:" ); + label_time = gtk_label_new( _("Time:") ); spin_time_hour = gtk_spin_button_new( GTK_ADJUSTMENT( adj_time_hour ), 0.0, 0 ); spin_time_minute = gtk_spin_button_new( GTK_ADJUSTMENT( adj_time_minute ), 0.0, 0 ); button_ampm = gtk_button_new(); @@ -1941,7 +1941,7 @@ if( isStart ) { - label = gtk_label_new( "Start:" ); + label = gtk_label_new( _("Start:") ); spin_month = &spin_start_month; spin_day = &spin_start_day; @@ -1949,7 +1949,7 @@ } else { - label = gtk_label_new( "End:" ); + label = gtk_label_new( _("End:") ); spin_month = &spin_end_month; spin_day = &spin_end_day; @@ -1992,7 +1992,7 @@ hbox_start = create_calendar_date_date( TRUE ); hbox_end = create_calendar_date_date( FALSE ); - check_forever = gtk_check_button_new_with_label( "Forever" ); + check_forever = gtk_check_button_new_with_label( _("Forever") ); g_signal_connect( G_OBJECT( check_forever ), "clicked", G_CALLBACK( cb_forever ), NULL ); @@ -2014,10 +2014,10 @@ hbox_ops = gtk_hbox_new( TRUE, 2 ); - button_add = gtk_button_new_with_label( "Add" ); - button_remove = gtk_button_new_with_label( "Remove" ); - button_update = gtk_button_new_with_label( "Update" ); - button_reset = gtk_button_new_with_label( "Reset" ); + button_add = gtk_button_new_with_label( _("Add") ); + button_remove = gtk_button_new_with_label( _("Remove") ); + button_update = gtk_button_new_with_label( _("Update") ); + button_reset = gtk_button_new_with_label( _("Reset") ); gtk_widget_set_sensitive( GTK_WIDGET( button_remove ), FALSE ); gtk_widget_set_sensitive( GTK_WIDGET( button_update ), FALSE ); @@ -2046,7 +2046,7 @@ GtkWidget *list_scroll; /* *list_main */ - static gchar *list_titles[] = { "Event", "Days", "Time", "Start", "End" }; + gchar *list_titles[] = {_("Event"), _("Days"), _("Time"), _("Start"), _("End")}; hbox_list = gtk_hbox_new( FALSE, 2 ); @@ -2078,11 +2078,11 @@ vbox_occurs = gtk_vbox_new( FALSE, 2 ); - radio_daily = gtk_radio_button_new_with_label( NULL, "Daily" ); + radio_daily = gtk_radio_button_new_with_label( NULL, _("Daily") ); radio_weekly = gtk_radio_button_new_with_label( gtk_radio_button_group( GTK_RADIO_BUTTON( radio_daily ) ), - "Weekly" ); + _("Weekly") ); radio_monthly = gtk_radio_button_new_with_label( gtk_radio_button_group( GTK_RADIO_BUTTON( radio_daily ) ), - "Monthly" ); + _("Monthly") ); g_signal_connect( G_OBJECT( radio_daily ), "clicked", G_CALLBACK( cb_select_radio ), NULL ); @@ -2112,10 +2112,10 @@ vbox_daily = gtk_vbox_new( FALSE, 2 ); hbox_days = gtk_hbox_new( FALSE, 2 ); - label_every = gtk_label_new( "Every" ); + label_every = gtk_label_new( _("Every") ); adj_days = gtk_adjustment_new( 1, 1, 365, 1, 10, 0 ); spin_days = gtk_spin_button_new( GTK_ADJUSTMENT( adj_days ), 0.0, 0 ); - label_days = gtk_label_new( "day(s)" ); + label_days = gtk_label_new( _("day(s)") ); gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( spin_days ), TRUE ); @@ -2149,8 +2149,8 @@ hbox_weekly_label = gtk_hbox_new( FALSE, 2 ); /* labels */ - label_every = gtk_label_new( "Every" ); - label_weeks = gtk_label_new( "week(s)" ); + label_every = gtk_label_new( _("Every") ); + label_weeks = gtk_label_new( _("week(s)") ); adj_weeks = gtk_adjustment_new( 1, 1, 100, 1, 4, 0 ); spin_weeks = gtk_spin_button_new( GTK_ADJUSTMENT( adj_weeks ), 0.0, 0 ); @@ -2159,13 +2159,13 @@ gtk_box_pack_start( GTK_BOX( hbox_weekly_label ), label_weeks, FALSE, FALSE, 2 ); /* hbox_weekly_checks */ - check_sun = gtk_check_button_new_with_label( "Sun" ); - check_mon = gtk_check_button_new_with_label( "Mon" ); - check_tue = gtk_check_button_new_with_label( "Tue" ); - check_wed = gtk_check_button_new_with_label( "Wed" ); - check_thu = gtk_check_button_new_with_label( "Thu" ); - check_fri = gtk_check_button_new_with_label( "Fri" ); - check_sat = gtk_check_button_new_with_label( "Sat" ); + check_sun = gtk_check_button_new_with_label( _("Sun") ); + check_mon = gtk_check_button_new_with_label( _("Mon") ); + check_tue = gtk_check_button_new_with_label( _("Tue") ); + check_wed = gtk_check_button_new_with_label( _("Wed") ); + check_thu = gtk_check_button_new_with_label( _("Thu") ); + check_fri = gtk_check_button_new_with_label( _("Fri") ); + check_sat = gtk_check_button_new_with_label( _("Sat") ); gtk_box_pack_start( GTK_BOX( hbox_weekly_checks ), check_sun, FALSE, FALSE, 1 ); gtk_box_pack_start( GTK_BOX( hbox_weekly_checks ), check_mon, FALSE, FALSE, 1 ); @@ -2176,9 +2176,9 @@ gtk_box_pack_start( GTK_BOX( hbox_weekly_checks ), check_sat, FALSE, FALSE, 1 ); /* hbox_weekly_buttons */ - button_weekdays = gtk_button_new_with_label( " Weekdays " ); - button_weekends = gtk_button_new_with_label( " Weekends " ); - button_clear = gtk_button_new_with_label( " Clear " ); + button_weekdays = gtk_button_new_with_label( _(" Weekdays ") ); + button_weekends = gtk_button_new_with_label( _(" Weekends ") ); + button_clear = gtk_button_new_with_label( _(" Clear ") ); g_signal_connect( G_OBJECT( button_weekdays ), "clicked", G_CALLBACK( cb_set_days ), GINT_TO_POINTER( 1 ) ); @@ -2220,15 +2220,15 @@ hbox_top = gtk_hbox_new( FALSE, 2 ); hbox_bottom = gtk_hbox_new( FALSE, 2 ); - label_every = gtk_label_new( "Every" ); - label_months = gtk_label_new( "month(s)" ); + label_every = gtk_label_new( _("Every") ); + label_months = gtk_label_new( _("month(s)") ); adj_months = gtk_adjustment_new( 1, 1, 12, 1, 3, 0 ); spin_months = gtk_spin_button_new( GTK_ADJUSTMENT( adj_months ), 0.0, 0 ); - label_repeat = gtk_label_new( "Repeat on the" ); + label_repeat = gtk_label_new( _("Repeat on the") ); adj_daymonth = gtk_adjustment_new( tm_input.tm_mday, 1, 31, 1, 10, 0 ); spin_daymonth = gtk_spin_button_new( GTK_ADJUSTMENT( adj_daymonth ), 0.0, 0 ); - label_daymonth = gtk_label_new( "day of the month" ); + label_daymonth = gtk_label_new( _("day of the month") ); gtk_box_pack_start( GTK_BOX( hbox_top ), label_every, FALSE, FALSE, 2 ); gtk_box_pack_start( GTK_BOX( hbox_top ), spin_months, FALSE, FALSE, 2 ); @@ -2365,8 +2365,8 @@ /* remind early */ hbox_remind_early = gtk_hbox_new( FALSE, 2 ); - label_remind_early = gtk_label_new( "Remind me about events" ); - label_remind_early_end = gtk_label_new( "minutes early" ); + label_remind_early = gtk_label_new( _("Remind me about events") ); + label_remind_early_end = gtk_label_new( _("minutes early") ); adj_remind_early = gtk_adjustment_new( config.remind_early, 0, 120, 1, 10, 0 ); spin_remind_early = gtk_spin_button_new( GTK_ADJUSTMENT( adj_remind_early ), 0.0, 0 ); @@ -2379,7 +2379,7 @@ /* remind old */ hbox_remind_old = gtk_hbox_new( FALSE, 2 ); - check_remind_old = gtk_check_button_new_with_label( "Remind of events that I may have missed today" ); + check_remind_old = gtk_check_button_new_with_label( _("Remind of events that I may have missed today") ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( check_remind_old ), config.remind_old ); gtk_box_pack_start( GTK_BOX( hbox_remind_old ), check_remind_old, FALSE, FALSE, 2 ); @@ -2387,7 +2387,7 @@ /* delete old */ hbox_delete_old = gtk_hbox_new( FALSE, 2 ); - check_delete_old = gtk_check_button_new_with_label( "Automatically delete events that have expired" ); + check_delete_old = gtk_check_button_new_with_label( _("Automatically delete events that have expired") ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( check_delete_old ), config.delete_old ); gtk_box_pack_start( GTK_BOX( hbox_delete_old ), check_delete_old, FALSE, FALSE, 2 ); @@ -2395,11 +2395,11 @@ /* AM/PM */ hbox_time_format = gtk_hbox_new( FALSE, 2 ); - label_time_format = gtk_label_new( "Time format:" ); - radio_12hour = gtk_radio_button_new_with_label( NULL, "12-hour" ); + label_time_format = gtk_label_new( _("Time format:") ); + radio_12hour = gtk_radio_button_new_with_label( NULL, _("12-hour") ); radio_24hour = gtk_radio_button_new_with_label( gtk_radio_button_group( GTK_RADIO_BUTTON( radio_12hour ) ), - "24-hour" ); + _("24-hour") ); if( config.ampm ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( radio_12hour ), TRUE ); @@ -2413,11 +2413,11 @@ /* date format */ hbox_date_format = gtk_hbox_new( FALSE, 2 ); - label_date_format = gtk_label_new( "Date format:" ); - radio_mdy = gtk_radio_button_new_with_label( NULL, "MM/DD/YYYY" ); + label_date_format = gtk_label_new( _("Date format:") ); + radio_mdy = gtk_radio_button_new_with_label( NULL, _("MM/DD/YYYY") ); radio_dmy = gtk_radio_button_new_with_label( gtk_radio_button_group( GTK_RADIO_BUTTON( radio_mdy ) ), - "DD/MM/YYYY" ); + _("DD/MM/YYYY") ); if( config.mdy ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( radio_mdy ), TRUE ); @@ -2431,11 +2431,11 @@ /* alert */ hbox_alert = gtk_hbox_new( FALSE, 2 ); - label_alert = gtk_label_new( "Reminder method:" ); + label_alert = gtk_label_new( _("Reminder method:") ); - check_alert_flash = gtk_check_button_new_with_label( "Flash icon" ); - check_alert_popup = gtk_check_button_new_with_label( "Popup reminder" ); - check_alert_execute = gtk_check_button_new_with_label( "Execute command" ); + check_alert_flash = gtk_check_button_new_with_label( _("Flash icon") ); + check_alert_popup = gtk_check_button_new_with_label( _("Popup reminder") ); + check_alert_execute = gtk_check_button_new_with_label( _("Execute command") ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( check_alert_flash ), config.alert & ALERT_FLASH ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( check_alert_popup ), config.alert & ALERT_POPUP ); @@ -2449,7 +2449,7 @@ /* notify */ hbox_notify = gtk_hbox_new( FALSE, 2 ); - label_notify = gtk_label_new( "Notification (play sound) command:" ); + label_notify = gtk_label_new( _("Notification (play sound) command:") ); entry_notify = gtk_entry_new_with_max_length( 63 ); if( config.notify ) gtk_entry_set_text( GTK_ENTRY( entry_notify ), config.notify ); @@ -2477,52 +2477,54 @@ GtkWidget *vbox_main; GtkWidget *text_main; + gint i; static gchar *str_info[] = { - "Calendar\n", - "Event: ", "Name of event. This will be displayed when you are reminded.\n\n", - "Daily: ", "This will remind you every days starting with the start date. If the event\n", - "does not occur on the end date, the actual ending date may be several days earlier\n", - "than is indicated. ", "Note: ", "Setting to 1 will display the event every day in the\n", - "Start/End range.\n\n", - "Weekly: ", "This will remind you of the event at the same time every week. You can\n", - "select which days you would like to be reminded on with the check boxes and buttons.\n\n", - "Monthly: ", "This will remind you at the same time each month. Months can be skipped by\n", - "setting the repeat field. Setting this to 12 will result in a yearly reminder.\n\n", - "Start/End/Time: ", "This selects the range of days on which the event may occur. The\n", - "start and end dates are inclusive. Events will expire at the stroke of midnight on the\n", - "day after end date. Time indicates what time of the day the event will appear.\n\n", - "Add: ", "Adds the current event to the list.\n", - "Remove: ", "Removes the currently selected event in the list.\n", - "Update: ", "Replaces the currently selected list item with the current event.\n", - "Today: ", "Resets the Start/End/Time to the current time and date.\n\n", - "Settings\n", - "Remind Early: ", "Reminders will appear minutes before they are scheduled.\n", - "Remind Missed: ", "Reminders that happened before GKrellM was started will appear\n", - "at startup.\n", - "Delete Expired: ", "Events that will never occur again (after end date) will automatically\n", - "be deleted.\n", - "Time Format: ", "Select either 12 hour (with AM/PM) or 24-hour time display\n", - "Date Format: ", "The format to use when displaying dates.\n", - "Notification Command: ", "This command will be executed whenever a new event occurs\n\n", - "Reminders\n", - "Never: ", "Deletes the event from the calendar. It will never appear again.\n", - "Later: ", "Will display this reminder again in minutes.\n", - "Dismiss: ", "Acknowledges the reminder. It will not be displayed again today.\n\n", - "Panel\n", - "The first number indicates the number of events pending. The second number\n", - "indicates the total number of events for today. The calendar will also flash when\n", - "there are pending events.\n\n", - "Left mouse button: ", "Clicking on the numbers will display the first pending event.\n", - "Clicking on the calendar will list all events scheduled for today.\n", - "Right mouse button: ", "Clicking anywhere within the panel will display the calendar." + N_("Calendar\n"), + N_("Event: "), N_("Name of event. This will be displayed when you are reminded.\n\n"), + N_("Daily: "), N_("This will remind you every days starting with the start date. If the event\n" \ + "does not occur on the end date, the actual ending date may be several days earlier\n" \ + "than is indicated. "), N_("Note: "), N_("Setting to 1 will display the event every day in the\n" \ + "Start/End range.\n\n"), + N_("Weekly: "), N_("This will remind you of the event at the same time every week. You can\n" \ + "select which days you would like to be reminded on with the check boxes and buttons.\n\n"), + N_("Monthly: "), N_("This will remind you at the same time each month. Months can be skipped by\n" \ + "setting the repeat field. Setting this to 12 will result in a yearly reminder.\n\n"), + N_("Start/End/Time: "), N_("This selects the range of days on which the event may occur. The\n" \ + "start and end dates are inclusive. Events will expire at the stroke of midnight on the\n" \ + "day after end date. Time indicates what time of the day the event will appear.\n\n"), + N_("Add: "), N_("Adds the current event to the list.\n"), + N_("Remove: "), N_("Removes the currently selected event in the list.\n"), + N_("Update: "), N_("Replaces the currently selected list item with the current event.\n"), + N_("Today: "), N_("Resets the Start/End/Time to the current time and date.\n\n"), + N_("Settings\n"), + N_("Remind Early: "), N_("Reminders will appear minutes before they are scheduled.\n"), + N_("Remind Missed: "), N_("Reminders that happened before GKrellM was started will appear\n" \ + "at startup.\n"), + N_("Delete Expired: "), N_("Events that will never occur again (after end date) will automatically\n" \ + "be deleted.\n"), + N_("Time Format: "), N_("Select either 12 hour (with AM/PM) or 24-hour time display\n"), + N_("Date Format: "), N_("The format to use when displaying dates.\n"), + N_("Notification Command: "), N_("This command will be executed whenever a new event occurs\n\n"), + N_("Reminders\n"), + N_("Never: "), N_("Deletes the event from the calendar. It will never appear again.\n"), + N_("Later: "), N_("Will display this reminder again in minutes.\n"), + N_("Dismiss: "), N_("Acknowledges the reminder. It will not be displayed again today.\n\n"), + N_("Panel\n"), + N_("The first number indicates the number of events pending. The second number\n" \ + "indicates the total number of events for today. The calendar will also flash when\n" \ + "there are pending events.\n\n"), + N_("Left mouse button: "), N_("Clicking on the numbers will display the first pending event.\n" \ + "Clicking on the calendar will list all events scheduled for today.\n"), + N_("Right mouse button: "), N_("Clicking anywhere within the panel will display the calendar.") }; vbox_main = gtk_vbox_new( TRUE, 2 ); text_main = gkrellm_gtk_scrolled_text_view( vbox_main, NULL, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); // gkrellm_add_info_text( text_main, str_info, 59 ); - gkrellm_gtk_text_view_append_strings(text_main, str_info, 59); + for (i = 0; i < sizeof(str_info) / sizeof(gchar *); ++i) + gkrellm_gtk_text_view_append(text_main, _(str_info[i])); gtk_widget_show_all( vbox_main ); @@ -2581,25 +2583,25 @@ notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos( GTK_NOTEBOOK( notebook ), GTK_POS_TOP ); - label_calendar = gtk_label_new( "Calendar" ); + label_calendar = gtk_label_new( _("Calendar") ); frame_calendar = gtk_frame_new( NULL ); gtk_container_border_width( GTK_CONTAINER( frame_calendar ), 3 ); create_calendar_frame( frame_calendar ); gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), frame_calendar, label_calendar ); - label_settings = gtk_label_new( "Settings" ); + label_settings = gtk_label_new( _("Settings") ); frame_settings = gtk_frame_new( NULL ); gtk_container_border_width( GTK_CONTAINER( frame_settings ), 3 ); create_settings_frame( frame_settings ); gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), frame_settings, label_settings ); - label_help = gtk_label_new( "Help" ); + label_help = gtk_label_new( _("Help") ); frame_help = gtk_frame_new( NULL ); gtk_container_border_width( GTK_CONTAINER( frame_help ), 3 ); create_help_frame( frame_help ); gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), frame_help, label_help ); - label_about = gtk_label_new( "About" ); + label_about = gtk_label_new( _("About") ); frame_about = gtk_frame_new( NULL ); gtk_container_border_width( GTK_CONTAINER( frame_about ), 3 ); create_about_frame( frame_about ); @@ -2803,7 +2805,7 @@ GtkWidget *separator; GtkWidget *button_close; - static gchar *list_titles[] = { "Time", "Event" }; + gchar *list_titles[] = { _("Time"), _("Event") }; struct event_today *current; @@ -2861,7 +2863,7 @@ separator = gtk_hseparator_new(); - button_close = gtk_button_new_with_label( "Close" ); + button_close = gtk_button_new_with_label( _("Close") ); g_signal_connect_swapped( G_OBJECT( button_close ), "clicked", G_CALLBACK(cb_today_delete), GTK_OBJECT( window_today ) ); @@ -3126,8 +3128,8 @@ hbox_later = gtk_hbox_new( FALSE, 2 ); gtk_box_pack_start( GTK_BOX( vbox_main ), hbox_later, FALSE, FALSE, 2 ); - label_remind = gtk_label_new( "Remind me again in" ); - label_minutes = gtk_label_new( "minutes" ); + label_remind = gtk_label_new( _("Remind me again in") ); + label_minutes = gtk_label_new( _("minutes") ); adj_minutes = gtk_adjustment_new( 5, 1, 999, 1, 10, 0 ); spin_minutes = gtk_spin_button_new( GTK_ADJUSTMENT( adj_minutes ), 0.0, 0 ); gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( spin_minutes ), TRUE ); @@ -3140,9 +3142,9 @@ hbox_buttons = gtk_hbox_new( TRUE, 2 ); gtk_box_pack_start( GTK_BOX( vbox_main ), hbox_buttons, FALSE, FALSE, 2 ); - button_never = gtk_button_new_with_label( " Never " ); - button_later = gtk_button_new_with_label( " Later " ); - button_dismiss = gtk_button_new_with_label( " Dismiss " ); + button_never = gtk_button_new_with_label( _(" Never ") ); + button_later = gtk_button_new_with_label( _(" Later ") ); + button_dismiss = gtk_button_new_with_label( _(" Dismiss ") ); g_signal_connect( G_OBJECT( button_never ), "clicked", G_CALLBACK(reminder_window_never), @@ -3405,6 +3407,9 @@ bsd_timezone = gkrellm_get_current_time()->tm_gmtoff; #endif +#ifdef ENABLE_NLS + bind_textdomain_codeset(PACKAGE, "UTF-8"); +#endif /* ENABLE_NLS */ default_config(); style_id = gkrellm_add_meter_style(reminder_mon, STYLE_NAME);