Commit 380568d7 authored by Kevin Vandersloot's avatar Kevin Vandersloot

Initial revision

parents
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do *not*
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
One advise in advance
=====================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias or message inheritance) as the
implementation here. It is also not possible to offer this additional
functionality on top of a `catgets' implementation. Future versions of
GNU `gettext' will very likely convey even more functionality. So it
might be a good idea to change to GNU `gettext' as soon as possible.
So you need not provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system provides
usable `catgets' (if using this is selected by the installer) or
`gettext' functions. If neither is available, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is *not* required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --with-catgets
./configure --disable-nls
will respectively bypass any pre-existing `catgets' or `gettext' to use
the internationalizing routines provided within this package, enable
the use of the `catgets' functions (if found on the locale system), or
else, *totally* disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
By default the configuration process will not test for the `catgets'
function and therefore they will not be used. The reasons are already
given above: the emulation on top of `catgets' cannot provide all the
extensions provided by the GNU `gettext' library. If you nevertheless
want to use the `catgets' functions use
./configure --with-catgets
to enable the test for `catgets' (this causes no harm if `catgets' is
not available on your system). If you really select this option we
would like to hear about the reasons because we cannot think of any
good one ourself.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
ISO 639 `LL' two-letter code prior to using the programs in the
package. For example, let's suppose that you speak German. At the
shell prompt, merely execute `setenv LANG de' (in `csh'),
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
can be done from your `.login' or `.profile' file, once and for all.
An operating system might already offer message localization for
many of its programs, while other programs have been installed locally
with the full capabilities of GNU `gettext'. Just using `gettext'
extended syntax for `LANG' would break proper localization of already
available operating system programs. In this case, users should set
both `LANGUAGE' and `LANG' variables in their environment, as programs
using GNU `gettext' give preference to `LANGUAGE'. For example, some
Swedish users would rather read translations in German than English for
when Swedish is not available. This is easily accomplished by setting
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list, courtesy of Linux
International. You may reach your translation team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as the country codes given
in ISO 3166. The following translation teams exist, as of December
1997:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
Swedish `sv', and Turkish `tr'.
For example, you may reach the Chinese translation team by writing to
`zh@li.org'.
If you'd like to volunteer to *work* at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is *not* the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
*actively* in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of December
1997. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination.
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
.----------------------------------------------------.
bash | [] [] [] | 3
bison | [] [] [] | 3
clisp | [] [] [] [] | 4
cpio | [] [] [] [] [] [] | 6
diffutils | [] [] [] [] [] | 5
enscript | [] [] [] [] [] [] | 6
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
findutils | [] [] [] [] [] [] [] [] [] | 9
flex | [] [] [] [] | 4
gcal | [] [] [] [] [] | 5
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
grep | [] [] [] [] [] [] [] [] [] [] | 10
hello | [] [] [] [] [] [] [] [] [] [] [] | 11
id-utils | [] [] [] | 3
indent | [] [] [] [] [] | 5
libc | [] [] [] [] [] [] [] | 7
m4 | [] [] [] [] [] [] | 6
make | [] [] [] [] [] [] | 6
music | [] [] | 2
ptx | [] [] [] [] [] [] [] [] | 8
recode | [] [] [] [] [] [] [] [] [] | 9
sh-utils | [] [] [] [] [] [] [] [] | 8
sharutils | [] [] [] [] [] [] | 6
tar | [] [] [] [] [] [] [] [] [] [] [] | 11
texinfo | [] [] [] | 3
textutils | [] [] [] [] [] [] [] [] [] | 9
wdiff | [] [] [] [] [] [] [] [] | 8
`----------------------------------------------------'
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If December 1997 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites.
Kevin Vandersloot <kfv101@psu.edu>
Erik Johnsson <zaphod@linux.nu> - icon support
I want procman to remain beautiful. The initial
inspiration for the interface comes from the OS-X
process viewer.
I would rather procman have fewer, more complete
features, rather than a million half completed features.
I would like to complete a nice finished 1.0 version
that just works and then newer stuff can be pushed in
a development version. Read the TODO for what I think
should go in the initial version
## Process this file with automake to produce Makefile.in
SUBDIRS = intl po macros src
EXTRA_DIST = \
procman.desktop \
procman.spec \
autogen.sh
Applicationsdir = $(datadir)/gnome/apps/System
Applications_DATA = procman.desktop
install-data-local:
@$(NORMAL_INSTALL)
if test -d $(srcdir)/pixmaps; then \
$(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
$(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \
fi \
done \
fi
dist-hook:
if test -d pixmaps; then \
mkdir $(distdir)/pixmaps; \
for pixmap in pixmaps/*; do \
if test -f $$pixmap; then \
cp -p $$pixmap $(distdir)/pixmaps; \
fi \
done \
fi
New in 0.5:
* process tree view
* renice actually works
* bug fixes
* no longer hard code some paths
should get icons if you hadn't already
* % cpu, mem, and swap meters
Procman is a nicer, simpler, easier to use replacement
to gtop. It uses libgtop for the process monitoring
and e-table for the viewing.
It requires libgtop 1.0.6 or greater. It also requires gal
version 0.8.99.2 or greater.
-- Things for 1.0 --
[x] Get %cpu done right
[x] Icons for processes
A preliminary patch to do this by reading in all
the .desktop files has been done by Erik Johnsson <zaphod@linux.nu>.
[3x/4 ] Get the more info interface done along with updating the values
correctly
[x/2 ] Throw in a few more column displays such as nice, process state.
But do not show them by default. It is easy to add them with e-table.
[x] Maybe a cpu meter on top?
[ ] right click menu - send some signals - at least kill
[x] save the e-table state
[x] remove the process meter on the bottom ( or make it the cpu meter ?)
[x] dialog notifying the user the end process button will not save
any data ( of course with the "show dialog next time" option )
[x] need to create spec file in order to build packages. I don't
know anything about packages for other distros than RedHat.
Neither do I know anything about RedHat packages at the moment.
[x] need a .desktop entry
[ ] need an icon :) I have no skills at doing this.
Perhaps we can just steal the one that Ximian uses right now for gtop
[x] process tree - almost done except for bug in that children don't show
up - Done!
[x] put some system info in the status bar like %cpu %mem %swapped
[ ] memmaps dialog
[ ] menu stuff
[ ] make sure everything is navigatable by keyboard and we have
accelerators
[ ] hook up to session management. What does this give us ?
[ ] I'm thinking of maybe doing a graphical system monitor
thingamabob like memory usage, cpu usage, disk space. This would be
a separate tab or just a seperate screen. The View: menu could
become a View as: like nautilus.
[ ] Fix bugs of course.
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY
#undef HAVE_LIBSM
#undef PACKAGE_LOCALE_DIR
#undef PACKAGE_DATA_DIR
#undef PACKAGE_SOURCE_DIR
#undef HAVE_LIBGTOP
#undef NEED_LIBGTOP
/* Define if LibGTop has support for multiple processors. */
#undef HAVE_LIBGTOP_SMP
/* Define if you have the LibGTop Documentation. */
#undef HAVE_LIBGTOP_DOCU
/* Define if there is no `u_int64_t' and `int64_t'. */
#undef u_int64_t
#undef int64_t
/* LibGTop major, minor and micro version. */
#undef LIBGTOP_MAJOR_VERSION
#undef LIBGTOP_MINOR_VERSION
#undef LIBGTOP_MICRO_VERSION
/* LibGTop version and numerical version code ("1.234.567" -> 1234567). */
#undef LIBGTOP_VERSION
#undef LIBGTOP_VERSION_CODE
/* LibGTop server version, increased each time the protocol changes. */
#undef LIBGTOP_SERVER_VERSION
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="the package."
(test -f $srcdir/configure.in) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level directory"
exit 1
}
. $srcdir/macros/autogen.sh
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(procman, 0.4)
AM_CONFIG_HEADER(config.h)
dnl Stolen from evolution
AC_DEFUN(PROCMAN_CHECK_LIB, [
dispname="$1"
pkgname="$2"
minvers="$3"
maxvers="$4"
AC_MSG_CHECKING(for $dispname)
if gnome-config --libs $pkgname > /dev/null 2>&1; then
pkgvers=`gnome-config --modversion $pkgname | sed -e 's/^[[^0-9]]*//'`
else
pkgvers=not
fi
AC_MSG_RESULT($pkgvers found)
pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
cmpminvers=`echo $minvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
cmpmaxvers=`echo $maxvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
ok=yes
if test "$pkgvers" -lt $cmpminvers; then
ok=no
elif test -n "$maxvers" -a "$pkgvers" -ge $cmpmaxvers; then
ok=no
fi
if test $ok = no; then
case $maxvers in
"")
dispvers="$minvers or higher"
;;
$minvers)
dispvers="$minvers (exactly)"
;;
*)
dispvers="$minvers or higher, but less than $maxvers,"
;;
esac
AC_MSG_ERROR([
""
"You need $dispname $dispvers to build procman"
"If you think you already have this installed, consult the README."])
fi
])
dnl Pick up the Gnome macros.
AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
GNOME_COMPILE_WARNINGS
GNOME_X_CHECKS
dnl Check for LibGTop
GNOME_INIT_LIBGTOP(1.0.6, fail)
dnl Get gal
PROCMAN_CHECK_LIB(GAL, gal, 0.8.99.2)
GAL_CFLAGS="`gnome-config --cflags gal`"
GAL_LIBS="`gnome-config --libs gal`"
AC_SUBST(GAL_CFLAGS)
AC_SUBST(GAL_LIBS)
dnl Add the languages which your application supports here.
ALL_LINGUAS=""
AM_GNU_GETTEXT
dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi
AC_OUTPUT([
Makefile
macros/Makefile
src/Makefile
intl/Makefile
po/Makefile.in
])
# List of source files containing translatable strings.
src/procman.c
src/interface.c
src/callbacks.c
src/proctable.c
src/infoview.c
src/procdialogs.c
[Desktop Entry]
Name=Process Manager
Comment=View Running Processes
TryExec=procman
Exec=procman
Icon=
Terminal=0
Type=Application
# Note that this is NOT a relocatable package
%define ver 0.4
%define RELEASE 1
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define prefix /usr
Summary: Simple process monitor
Name: procman
Version: %ver
Release: %rel
Copyright: GPL
Group: Applications/System
Source: http://www.personal.psu.edu/kfv101/procman/procman-%{ver}.tar.gz
BuildRoot: /var/tmp/procman-root
Requires: gnome-libs >= 1.2.5
Requires: gal-devel >= 0.8.99.2
Requires: libgtop >= 1.0.6
%description
Procman is a simple process and system monitor.
%prep
%setup -q
%build
if [ ! -f configure ]; then
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $MYARCH_FLAGS --prefix=%prefix
else
CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS --prefix=%prefix
fi
if [ "$SMP" != "" ]; then
make -j$SMP MAKE="make -j$SMP"
else
make
fi
%install
rm -rf $RPM_BUILD_ROOT
make -k prefix=$RPM_BUILD_ROOT%{prefix} install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%{prefix}/bin/procman
%{prefix}/share/gnome/apps/System/procman.desktop
## Process this file with automake to produce Makefile.in
INCLUDES = \
-I$(top_srcdir)/intl \
$(GNOME_INCLUDEDIR) \
$(LIBGTOP_INCS) \
$(GAL_CFLAGS)
bin_PROGRAMS = procman
procman_SOURCES = \
procman.c procman.h\
interface.c interface.h \
callbacks.c callbacks.h \
proctable.c proctable.h \
infoview.c infoview.h \
procdialogs.c procdialogs.h \
prettytable.c prettytable.h \
defaulttable.h
procman_LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) \
$(INTLLIBS) $(LIBGTOP_LIBS) $(GAL_LIBS)
/* Procman - callbacks
* Copyright (C) 2001 Kevin Vandersloot
*
* 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 Library 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.
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include <signal.h>
#include "callbacks.h"
#include "interface.h"
#include "proctable.h"
#include "infoview.h"
#include "procdialogs.h"
void
cb_properties_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
cb_preferences_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
cb_about_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkWidget *about;
const gchar *authors[] = {
"Kevin Vandersloot (kfv101@psu.edu)",
"Erik Johnsson (zaphod@linux.nu)",
NULL
};
about = gnome_about_new (_("Process Manager"), VERSION,
_("(C) 2001 Kevin Vandersloot"),
authors,
_("Simple process viewer using libgtop"),
NULL);
gtk_widget_show (about);
}
void
cb_app_destroy (GtkObject *object,
gpointer user_data)
{
ProcData *procdata = user_data;
if (procdata)
{
proctable_save_state (procdata);
procman_save_config (procdata);
}
gtk_main_quit ();
/*FIXME: we need to free the Procdata and any other stuff here
*/
}
void
cb_all_process_menu_clicked (GtkWidget *widget,
gpointer data)
{
ProcData *procdata = data;
procdata->config.whose_process = ALL_PROCESSES;
proctable_clear_tree (procdata);
proctable_update_all (procdata);
}
void
cb_my_process_menu_clicked (GtkWidget *widget,
gpointer data)
{
ProcData *procdata = data;
procdata->config.whose_process = MY_PROCESSES;
proctable_clear_tree (procdata);
proctable_update_all (procdata);
}
void
cb_end_process_button_pressed (GtkButton *button,
gpointer data)
{
ProcData *procdata = data;
ProcInfo *info;
GtkWidget *dialog;
if (!procdata->selected_node)
return;
if (procdata->config.show_kill_warning)
{
dialog = procdialog_create_kill_dialog (procdata);
gtk_widget_show (dialog);
}
else
{
info = e_tree_memory_node_get_data (procdata->memory,
procdata->selected_node);
kill (info->pid, SIGTERM);
proctable_update_all (procdata);
}
}
void
cb_info_button_pressed (GtkButton *button,
gpointer user_data)
{
ProcData *procdata = user_data;
GtkLabel *label;
label = GTK_LABEL (button->child);
if (procdata->config.show_more_info == FALSE)
{
gtk_widget_show_all (procdata->infoview->infobox);
procdata->config.show_more_info = TRUE;
infoview_update (procdata);
gtk_label_set_text (label, _("Less Info"));
}
else
{
gtk_widget_hide (procdata->infoview->infobox);
procdata->config.show_more_info = FALSE;
gtk_label_set_text (label, _("More Info"));
}
}
void
cb_table_selected (ETree *tree, int row, ETreePath path, gpointer data)
{