��������� ���������� NLS (Greek NLS translations)
����� ����������,
[email protected]
v0.9, 21 ������� 1999
��� �� ������� ��������� ��� ���������� ����������� �� GNU
�����������. �� GNU ����������� (������ �� ���������� �����������
������� �� ��������� ����� �� Unix �������� ��� ls, mutt, kde,
gnome) ��� �� �������� �� ����������� ������ ���� �� �������
�� ��� ��� ��� ������� ��� �� ������ ����. �� ���� ��������� ��
��� ����� �� �������� ��� ��������.
______________________________________________________________________
Table of Contents
1. �������
1.1 ������� ����������
1.2 �� ����� �� "NLS";
2. ������ �� NLS
2.1 �� �� ������� ���������� �� ����� ������;
2.2 ���� ���������� �������� ����������� �� NLS;
2.3 �������������, �� ��������� �� NLS;
2.4 ���� ����������� ����������� NLS;
2.5 ���� �� ���������
3. NLS ���� �����
3.1 ���������� ������ �� NLS
3.2 �� �������� ���� ��� ������!
3.3 �� ����(�����) ����� ����������� � ����� �� ��� ����� ����������� �� ������� ��� ���������;
3.4 �������� ����� �� �������� ������� ���������
3.5 ����������������� ����������
4. ���������� ��� ���������
4.1 ����� ������� � ������� ��� ��������� �� �������;
4.2 �����������, ��� �������� �� ����������� NLS �� �������;
4.3 ���� ����� �� ����������� �� ������ �� �������� ��� �� ���������;
4.3.1 ������ gettext
4.3.2 ��������
4.3.3 ��������
4.3.4 ����� �����������
5. ������� �������� ����� ��� �������
5.1 �� �� ������� �� ���������� �� �.�. "Broken pipe"; "�������� �����";
5.2 LEXIS
5.3 �������� �����������
6. ������� ���������
6.1 ������� ���������
6.2 ������ ���������
6.3 ������� ���������
6.4 ������� ������������
6.5 ����� ����� �� ������� ���� ��������� �� ������� ��� ��������;
7. ������ ��������� �� ���������
8. �����������
8.1 ����� ����������� �� ��������� �������� ��������
9. ���������� ����������
10. ��������� ���������� ���� ������� Linux
11. PO �����
12. ����������
12.1 ����� ����� � ����� ������� �� �������� ���������;
______________________________________________________________________
1. �������
1.1. ������� ����������
� v0.1 - 09 �������� 1999 - ����� ���������� - ����� ������
� v0.2 - 24 �������� 1999 - ����� ���������� - ������ �������
� v0.3 - 14 ��������� 1999 - ����� ���������� - ������ �������
� v0.4 - 24 ��������� 1999 - ����� ���������� - ���� ���������
��� Hellug (
http://www.hellug.gr)
� v0.5 - 15 ����� 1999 - ����� ���������� - ������ ���������,
�������� KDE, Gnome
� v0.6 - 22 ����� 1999 - ����� ���������� - ��������� �� ���
��������, �������� ��� ���������
� v0.7 - 24 ����� 1999 - ����� ���������� - �������� ���
���������, �������� ������ ����������� ��������� ��� ��������,
�������� ��������� ��� �� Lyx, �������� ������ �� ����������
����������, �������� ������ �� �����������, ������ ����������
�������� �� ������� �� Linux, ������ ���������
� v0.8 - 25 ����� 1999 - ����� ���������� - ������ �������
� v0.9 - 21 ������� 1999 - ����� ���������� - �������� ����������
shadow utils
1.2. �� ����� �� "NLS";
�� NLS (National Language Support) ����� ��� �������� �� ������ ��
�������� ��� �������� ��� ���� �� ����� ����� ��� ������� ���
�� ������� ��� ����� �� ������ � ������ ������� ���� ������
�� �����. ������, �������� �������� ���������� ��� �����������
�� ��� ������ ����� ��� ������� ����. ���� �� �� �������,
������ �� �������������� ��� ��� ��������� ��� ������� ������������
�������, ��� ������� ����, �� ������ ����� �������� ��
������� ����� �� �� ������� ��� ����. ��� ���� ��������� ��
����� �� ���� �� �������� �� ������� ��� ��������.
2. ������ �� NLS
2.1. �� �� ������� ���������� �� ����� ������;
�� ���������� ������������ ������ ���������� �� ��� ��� �������
���� ���� ��� �������� ��� ��� ������� �� ���������. ����,
������ ���������� �� ������ �� ��� ����� ������ ����������� ���
�� ���������. ����������, ��� ���� ������ ������ ��� �� �������,
�� ���������, �� ����������, �� �������� ��� �� ���������. � ����
��� �� ������ ����� �� ������� ������ ������ ��������� ��
������������ ��� �����, ���� �� ��� ���������� �� ��� ����� ��
Linux �� ����� ����� ������� �� ����������� �� ����������� NLS.
2.2. ���� ���������� �������� ����������� �� NLS;
�� ��������� ������ Linux ����� ����� ������� �� ����������� ��
����������� NLS. �� Linux <
http://www.linux.gr> ����������� ��
����������� ������� �� ����������� �� ��� ����� �������� GNU
<
http://www.gnu.org>. �� �������� ��, ����������� ���� ���� �� NLS.
���� �� �� Linux, �� ���������� ���������� �������� Unix �
���-Unix ������ �� ����������� NLS.
2.3. �������������, �� ��������� �� NLS;
��� �� ���������� �����������, � ���������� ������� �� �� ������
gettext. ��� ������ �� ��������������� ��� ���������� ���� �����
�������� (link) �� �������� �������� ��� ���� ��� ������������. ���
���� �� ��������, ������������ ������� ������� ��� �����������. ��
������� ���� ������ ���������� �� ������������� �� ��������� ��
����� ��� ������������ �� ������� �� �� ����������� �������.
2.4. ���� ����������� ����������� NLS;
�� �������� �� ����������� �� ����������.
1. ������� GNU �����������
� �������� �� ����������� ��� ���������� �� �� GNU
Translation Project �� ����� ��� ������ ������ �� �� FSF (Free
Software Foundation). �� ��� ������ ����������� ��� ���������
Unix ���������� ��. �� ������ ��� �� ����������� ����� �������
GNU �������� ��� �� ����� �� ���������� ����������, ������ ��
������ �������� ��� ����� �� ��� ����� �������� GNU. ����,
�� ���������� ���� ������ ������ �� ��� ��� ������ �� ��
�������� �� ����������. ����� �� ������� �������������, �� ���
��������� ��� ���������� ��� ����������, ����� ��������� ��� ���
���� ����� ��� ������ �������� GNU �� ������� ������.
2. ��������� GNU �����������
���� ��������� ������ �����������, �� �� ��������������� ���
�������� �� �������� �� ��� ����� �������� GNU, ����������� NLS.
��� ��� �� �����������, ����� � �������� ��� ��������� ����
����� ��� ��������������� ��� �� �� �����������. �� ������
��� �� ������ ������������ KDE ��� Gnome, ����� ��� ���
���������� �� ���� ���������� �� ��� ������� �������� ���.
3. KDE
�� ����� ���������� KDE <
http://www.kde.org> ����������� �� ���
�������� ����� ����������� �� ����� ����������� NLS. �� KDE
����� ��� �������� ��� ������ ������ ������ �� ������ ���
������, ������ ��� ������� ���������� ��������.
4. Gnome
�� ����� ���������� Gnome <
http://www.gnome.org>, �����������,
��� �� KDE, �� ��� �������� ����� ����������� ����������� ��
����������� NLS. To Gnome ������ �� ���������� ��� ���������� ��
������ ��� �������� ��� ��� ��� ����� ���������� ��� ��������
Unix.
2.5. ���� �� ���������
�������� ���� ���������� �� ������ ��� ������� ����
� �������� ��� �������� �� ������� ��� ������ �����
� �������� ��� ���������
� ������� ��� ���������
� ����������� ��� ��������� ��� ����� ���������
� ���������� �� ��������� ����� ������
3. NLS ���� �����
3.1. ���������� ������ �� NLS
�������� ��� ��������
RedHat-6.0: /usr/share/locale (���� ���������)
RedHat-5.x: /usr/share/locale
RedHat-4.x: /usr/share/locale (���� ���������)
Open Linux 2.2: /usr/share/locale (���� ���������)
SuSe 6.�: /usr/share/locale (���� ���������)
Slackware 4.0: /usr/share/locale (���� ���������)
Debian 2.x: /usr/share/locale (���� ���������)
��� ������ ��� ��� ����������� �� ����� ��� �������������� �����.
�� ������ ������ �������, ��������, ���������, ��������� ���.
�������� ��� ����������� es ��� ���� LC_MESSAGES, ������
/usr/share/es/LC_MESSAGES/ ��� ��� ��� �������� �� "fileutils.mo".
���, ���� ���������� ��� �������� ��� ls, mkdir ���. (�� ����
����������� el ��� �������� ��� �� ��������� ����� ��� ������ ���,
�������� �� ��������������� �� ������ �� ���� �� es).
T�����
� setenv LANGUAGE es (��� ���� ��� ���� tcsh � ����� ��
csh) �
� export LANGUAGE es (��� ���� ��� ���� bash � ����� �� sh)
��� ������ "ls --help" ��� �� ����� �������� �������!
3.2. �� �������� ���� ��� ������!
�� ��� ��� ��������� ������ �� ���������� �� ������� �� ����� ������
�� Linux.
��� ������ ��� ������ �� ������ ����������� ��������� ��
���������� ��� ���������� ����������� (��������� locale). �� �����
�� ������� �� ���������, �������� �� �� ��������� �������������
NLSPATH. ����� ������ ������� ��������� �� �� ������ ����� ��
������, �� ������ ��� ������������� ��� ������ ���������� ��
�������� ���, �� libc. ��������� "strace -o output.log ls --help"
��� ���� "grep open output.log" ��� �� ����� �� ����� �� ������.
���� ��������� ������� �� NLSPATH.
3.3. �� ����(�����) ����� ����������� � ����� �� ��� �����
����������� �� ������� ��� ���������;
��� ��������� �������������. ��� ������ ���, ������ ���� ������
�� ���������� �� ����� ���� ��� ���� ������. � ��������� ��
������� �� ������������ �� ����������� ������� ����� � LANG, �� ��
����
� setenv LANG el (��� ���� ��� ���� tcsh � ����� �� csh) �
� export LANG=el (��� ���� ��� ���� bash � ����� �� sh)
����������, ������ � ��������� LANGUAGE, � ����� ��� ������������
������ ��� LANG.
��� �� �������� �� glibc 2.1 (��� �� ������ RedHat 6.0), � �������
������ �� ��������� (���� ���������)
� setenv LANG greek (��� ���� ��� ���� tcsh � ����� �� csh)
�
� export LANG=greek (��� ���� ��� ���� bash � ����� �� sh)
3.4. �������� ����� �� �������� ������� ���������
T�����
� setenv LANGUAGE 'it:fr' (��� ���� ��� ���� tcsh � �����
�� csh) �
� export LANGUAGE='it:fr' (��� ���� ��� ���� bash � �����
�� sh)
�� ���� ��� ����������, ������ � ������ �������� ���� �������.
3.5. ����������������� ����������
�� ������� ���� ��������� �� �� ���� �������������
<mailto:
[email protected]>.
���� ��� �� nls ��������������� ��� ��� ���������� ��� ���
����������� (��������� ��� �� �������� �� GNU ������), �����
�������� �� ������ ��� �������� ��� ����������� �� ���������� ���
�� �� ���������� ��� ��� ���� ��� �����������.
� ����� �� gettext ��� �� �������� �� �� ���������� ��� ��������
��� ����� � GNU LGPL �� ��� ��� ���������� ���� �������� ��� ������
�� ����������� ���. �������� ��� ����� ��� �� ����� �� �����
�������(!).
�� ������������ ��� �� "�����" ��� �� �������� ��� ���. ��
����������� �� �� ���������� ����� �� GNU autoconf ��� gettext-0.10,
��� ���������� ��� ��� ������ gnu mirror.
�� �� ������������ �� ���������� ���������� �������/������� ������
(nls) �� ��� �������� �������� �� C. �� ���� ��� ��� ��������, ��
����� ��� ��� ���� ����:
______________________________________________________________________
#include <stdio.h>
#include <time.h>
main ()
{
time_t tv;
printf( "The time is: " );
time(&tv);
printf ( "%s",ctime(&tv) );
}
______________________________________________________________________
� ��� ��� ��� �� ����� ������� ��� �������. ������ � ��������
������ �� ����� ������ - ������ �� ���� �������� �� ����� ��� ���
��������� ��� ��� �������� ��� �� ����������� ���� ����� - ���
���������� ��'������ �� �������. ������������� �� localedata ���
�� ���������� intl ��� C �����������.
�� ��������������� �� localedata (������ ��������) ��� ��� ���.
�� ���� �������� ��� �������:
______________________________________________________________________
#include <stdio.h>
#include <time.h>
#include <locale.h>
main ()
{
struct tm *tp;
char buf[80];
time_t date;
/* ����� �� locale ���� �� ��� ��������� ������������� LANG � LANGUAGE
* ��� �� �������� ������ �� ����� el (ISO639) */
setlocale (LC_TIME, ""); /* ��� ��� ��� ��� ��� */
printf( "The time is: " );
time(&date);
/* ���������� ��� ��� ������ �� �������� �� ��� ��� ���� */
tp = localtime(&date);
strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %z %Y", tp);
/* ������� ��� ��� */
printf ("%s\n",buf);
}
______________________________________________________________________
� ��� ��� �� ����� ���� ����: ��� ��� 11 22:44:29 +0200 1998 ��
��������� ���������� ��� �������(�� LANG=el � gr ��� ��� ������
glibc2). ��'�� ������ �� ctime ��� ���������� �� �� strftime().
�� �������� �� ��� ������ ��������� ���������� ������� �� ���
/usr/share/locale/el ������ �� ���������� �����. �� ��� ������
������������ ��� ��� localedata - ���������������� ����� ���� libc
� ������������ �� tarball �� ��������� ���
ftp://argeas.cs-
net.gr/pub/unix/linux/GREEK/locale.glibc2.el.tar.gz <
ftp://argeas.cs-
net.gr/pub/unix/linux/GREEK/locale.glibc2.el.tar.gz>
��� ��� �������� �� �������, �� ����� ��� � ������� �������
�� NLS ��������������� � ���� �����:
______________________________________________________________________
#include <stdio.h>
#include <time.h>
#include <locale.h>
#include <libintl.h> /* ����� ��� GNU libc */
main ()
{
struct tm *tp;
char buf[80];
time_t date;
/* ���� ��� �� LC_ALL ������ �� LC_TIME, LC_MESSAGES ���, �� �����
* ������������ ��'������ �� ���������� �� ���������������.
*/
setlocale (LC_ALL, "");
bindtextdomain ("my_time", "/usr/share/locale");
textdomain ("my_time");
printf( gettext("The time is: ") );
time(&date);
tp = localtime(&date);
strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %z %Y", tp);
printf ("%s\n",buf);
}
______________________________________________________________________
�� ������� bindtextdomain() ��� textdomain() ����� ��� nls
���������� (libintl) ��� ��� ��������� ��� � �������� ��
������������ ��������� ��� my_time.mo ���� ��������
/usr/share/locale/XX, ��� �� � ����� �� ������ (����������� ��� ���
��������� LANG � LANGUAGE).
������ ������ ����� �� �� ������ gettext(...) ����� ������� ���
����� �������, ������������� ��:
______________________________________________________________________
#define _(Text) gettext(Text) /* ���� ����������� */
printf( _("The time is: ") );
______________________________________________________________________
�� �������� ��� �� ����������� ���� �� ��������. ���������� ����
�� ��������� �� .po �����. ��� ����� ������ ��� �� ����� �� ��
�������� xgettext (�� �� ������ GNU gettext).
��� �� ����������� �������� � ������ �� xgettext �����: (������
"xgettext my_time.c")
______________________________________________________________________
# messages.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1998-11-11 22:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <
[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
#: c.c:16
msgid "The time is: "
msgstr ""
#end of messages.po
______________________________________________________________________
��� �� ������������ �� messages.po �� el.po, ������������ �������
��� msgstr ��� ��������, �:
______________________________________________________________________
msgstr "� ��� �����: "
______________________________________________________________________
�������� ������ �� �������������� ����� �� ��������� �� �� .po
����� �� .mo � .gmo ����. ��� ����������� �� �� �������� msgfmt
(�� �� GNU gettext ����).
______________________________________________________________________
� msgfmt el.po -o el.gmo
______________________________________________________________________
��� ���� �� ��������� ��� /usr/share/locale/el/LC_MESSAGES/ �� el.gmo
��� my_time.mo (��� �� �������� ��� ����� �� ����� ��� ������
makefile).
�� ������������ ��� ����� �� ��������������� ��� �� ����������.
��� ����������� �� �� GNU autoconf. �� �������� ��� configure.in
�� �� ������ ���� ��� ������ ���������� nls �� ��� libc ��� ����
��� �� strftime. (��� �������� ���������� �������� ���:
http://teamball.sdsu.edu/doc/texi/gettext_toc.html
<
http://teamball.sdsu.edu/doc/texi/gettext_toc.html>)
��� �� ������������ �� �������� ������ ��� ���� ������� ��
����� �� ������������: (��� ��� �� �������� ����� ��� /xxx) ����
�������� /xxx/
configure.in: ���������� ��� �� autoconf (����� �������)
config.h.in : (����� �������)
���� �������� /xxx/src/
my_time.c : �� ��������
���� �������� /xxx/po/
my_time.pot : ��� ����� �� messages.po �� ������������ ��� ��
xgettext ���� �������������
el.po : �� my_time.pot ����������� ��� ��������
POTFILES.in : �� ���������� ��� �� .c ����� ��� src �� ������������
�� gettext. �:
/xxx/src/my_time.c
����� ��� �� ���������� ��� �� ������ gettext-0.10 �� po/Makefile.in
���� �������� �� ����������� /xxx/po/ , ��� ��� �������� intl/ ����
/xxx/intl/ ��� �� ABOUT-NLS, aclocal.m4 ���� /xxx .
���� ��� ���� ������� �������� �� ����������� ��� (/xxx) ��� ��
�������� �� configure.in ��� �� ����� �� ������ �� ����(;) script
configure.
______________________________________________________________________
# configure.in for my_time.c
AC_INIT()
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PATH_PROG(MAKE,make)
AC_PROG_INSTALL
VERSION=1.0
PROGRAMS="my_time"
AC_PREFIX_DEFAULT(/usr/local)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(PROGRAMS)
dnl ������������ �������� (�� el ����� ��� �� iso639 �� ������ ��
dnl ��������������� ��� ��� ������� ������ ���� ���������� ���� �� ��
dnl ��������� �� gettext.)
ALL_LINGUAS="el"
dnl ��� �� gettext 0.10.
ud_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_FUNC_STRFTIME
AC_OUTPUT([Makefile src/Makefile intl/Makefile po/Makefile.in
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
#end of configure.in
______________________________________________________________________
��� ����� ���� ���������� ��� config.h.in (����� ���� �� �����
config.h �� �� ���������������� ��� �������� ���. � ��������� ��
config.h ������� ��� �� script configure.) �� config.h.in ��
�������:
______________________________________________________________________
# config.h.in for my_time.c
/* �� ����� �� ������ (�� �������������� ��� �� textdomain) */
#undef PACKAGE
#undef VERSION
/* strftime */
#undef HAVE_STRFTIME
#undef ENABLE_NLS
#end of config.h.in
______________________________________________________________________
�� Makefile.in ��� �� �������� (�� Makefile ������������ ������
������ ��� �� configure), ������ �� ��� �� ������� ������� ��:
______________________________________________________________________
# Makefile.in
CC = @CC@
LIBS = @LIBS@
CCOPTS = @CFLAGS@ -I. -I..
LN = @LN_S@
INSTALL = @INSTALL@
prefix = @prefix@
exec_prefix = @prefix@
datadir = $(prefix)/lib
bin = $(prefix)/bin
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\"
SUBDIRS = @INTLSUB@ src @POSUB@
MAKE = @MAKE@
INSTALL = @INSTALL@
#��� � ������ ��� ��� ����� ���� src/ �������� ���������� ��������� �������
all:
@for subdir in $(SUBDIRS); do \
echo making all in $$subdir; \
(cd $$subdir && $(MAKE) all) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
install:
@$(INSTALL) my_time $(bin)
@$(MAKE) -C po/ install
# end of makefile.in
______________________________________________________________________
______________________________________________________________________
# src/Makefile.in
# �� �� ����������� ����� ������ ����� �� ����:
CC = @CC@
LIBS = @LIBS@
CCOPTS = @CFLAGS@ -I../intl -I. -I..
LN = @LN_S@
INSTALL = @INSTALL@
prefix = @prefix@
exec_prefix = @prefix@
datadir = $(prefix)/lib
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\"
all: my_time
my_time: my_time.o
$(CC) $(OBJECTS) -o ../my_time $(LIBDIRS) $(LIBS)
my_time.o: my_time.c
$(CC) -c my_time.c $(CCOPTS) $(DEFS)
#end of src/Makefile.in
______________________________________________________________________
�� �������� ��� �� �����:
______________________________________________________________________
# src/my_time.c
#include <stdio.h>
#include <time.h>
#include <config.h> /* � "config.h" �� ��� ������ �� -I. ��� Makefile */
#ifdef ENABLE_NLS
#include <libintl.h>
#endif
main ()
{
#ifdef HAVE_STRFTIME
struct tm *tp;
char buf[80];
time_t date;
#else
time_t tv;
#endif
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
# define _(Text) gettext(Text)
#else
# define _(Text) (Text)
#endif
printf( _("The time is: ") );
#ifdef HAVE_STRFTIME_H
time(&date);
tp = localtime(&date);
strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %z %Y", tp);
printf ("%s\n",buf);
#else
time(&tv);
printf ( "%s",ctime(&tv) );
#endif
}
#end of src/my_time.c
______________________________________________________________________
��� ������ �� autoconf �� ��������� �� configure script. A� ���
����� ���� ���� ��� �������� �� ������ ����� ������!
�� ������� ������� ����� ��� ������� ��� ��� ����. ��� ����� ��
����� �������� ������, �� ������ ������� ���������� �����������
�� ��������� �� ����������� autoconf, gettext. ���������� ��� ��
gettext (��� ��� ����� �� �� �� autoconf) ���:
http://teamball.sdsu.edu/doc/texi/gettext_toc.html
<
http://teamball.sdsu.edu/doc/texi/gettext_toc.html>
4. ���������� ��� ���������
4.1. ����� ������� � ������� ��� ��������� �� �������;
��� ����� ������ �������. �� ��� ������� ����� ����� � �����
�������� ��� �� ���� �� �������. ������, �� ��� �������� ���
������ �� ���� ������������, ����� � �������� �� ��� �������,
�� ����� ����� ���� ���� �����. ������ ������ �������� ��
������� �� ������� �� ��� ������� ����� �� ������ ��� ��
�������� ��� ��������.
4.2. �����������, ��� �������� �� ����������� NLS �� �������;
� ��������������� ����� �� ������� �� ����:
______________________________________________________________________
...
/* ������� ������� ����� ��� ����������� �� ��������� NLS */
...
/* Second: Login with proper USER/PASS sequence. */
printf( _("connected!\n") );
...
______________________________________________________________________
������ ���������� �� ������� �� ������� �������� �� _( ). �� ���
�� �������� ��� �������� �� ������������, � ��������������� ���
��������� �� �� ������ NLS ���� ��� �� ���������� �� _() ��
������� �� ������ � �������. �� �������� ������ �� ���.
������, � ��������������� ����� ��� �������� �������� ��
���������� �� ������� �� ������������� �� _() �� ��� �����. ���
����� �� ����� �� ���������� ��� �� ��������� �� �������� ��
�������. ������, �� ���� �������� ��������, �� ���� �����
������������ �� ��� ������ ���� �� ������ �� �������������� �� ��
����������. ���� �������� ��, �� �������� ������� ��� ���������
������������� ��� ��� ������� ��� ������ �������� �� �������.
���� ��� ������, ������������ ��� �� ������� �������. �� ��
������� ��� ����� ������, ��� ������������ �� �������, �� �����
���������� ��� ���� �� ���������� ��������.
4.3. ���� ����� �� ����������� �� ������ �� �������� ��� ��
���������;
4.3.1. ������ gettext
�� ����������� �� ������ ��� ������� ��� ��������� ����� �� ��
������ gettext, ��� �� �� ������ �� ��� �� ���� GNU mirror sites.
������ ������: 0.10.XX ��� �� ������ �� ������� �� ���� ��=35
��� gettext-0.10.35.tar.gz
<
http://www.iro.umontreal.ca/contrib/po/gettext-0.10.35.tar.gz>
�� ���������� ����������� �������� �� NLS �� �� ������ gettext.
������ ������ ���� �� ����������� ��� �������� ������, ���
catgets. �� �������� ��� ��� gettext.
4.3.2. �������� xgettext
�������: ����� *.c � *.h �� ������������ ��� ����� _("blah blah").
������: ����� ������� *.pot �� �� ������������ ���� ��������.
�� ����� *.pot ����� �� ����� ��������, �� �� ������� �������
���������� �������� ��� �� �� �������� �� el.po. ��� ����� el.po
������� � ��������.
�� ��� �� ������ �� ���������� "gettext", ������ ���� ������������
po/ �� ������� �� ����� �������� "��������.pot", �� ����� �����
��� �� ����������� �������. �������, ��� ��� ��������������
������ ������ ��������� ����� *.po, ��� de.po, fr.po, nl.po ��
����� �������� �� ����� ����� ������������ .pot �� �����������
��� ����������.
4.3.3. �������� msgfmt
�������: ����� *.po (portable object)
������: ����� *.mo (machine object)
�� ����� .mo ����� ������ �� �� ����������� ��� ��������
/usr/share/locale/el/LC_MESSAGES ��� �� ���������� � �����������.
4.3.4. ����� �����������
���� ����������� �� ������ gettext �����
� msgmerge, ����� ������ �� .po �����
� msgcomm, ����� ����� ������� �� .po �����
� msgcmp, ������� �� .po �����
� msgunfmt, ��������� �� .mo �� .po
5. ������� �������� ����� ��� �������
����� �������� �� ������ ��� ����������� ��� ���������� ��
���������. ��� �� �� ���, ����� ��� �� ��������� ������
�����, ��� ����, ���, ����������� ������ ����������� ��� ��������
(�.�. ���������� �������� �� A.S.Tanenbaum) ��� �����������
����������.
5.1. �� �� ������� �� ���������� �� �.�. "Broken pipe"; "��������
�����";
�� ����� ������� �� ���, ������� �� ����� ������ ����������. �
�������� ����� ����� ���� ��� ����� ������ ������. ���� ��������
���� ��� �� ������� ���������� �� ���� "���������� ������".
5.2. LEXIS
�� LEXIS <
http://server.hellug.gr/lexis/> ����� ��� ����� ��
��������� ���������� ������� ������ �� ��������������� ���
����������.
5.3. �������� �����������
� ������� ���� ���������� ��������� & ���������� - ������������
�������� (������� ��� ���������)
� ���������� �������� � (�������� �� ������ �� �.Tannembaum ��
�� �.�.�.�.;)(���� ���������)
� �.�.�.(���� ��������)
6. ������� ���������
6.1. ������� ���������
�� ����� �� ��� ��������� � �������� ������ �� ���
� ����� ���� �������� �����
� ���� ���� ��� ��� �����������
� �������� �� �� �������� ���� ��������
������� ������ ��� ������� ��������� �� ������������ ��� ���
������ ����� ��������� �� �� ���������� ��� ���������� (reviewing).
������ �� ���������� ��� ���������� ��������� ��� ��� �����
������� ��� ���������.
6.2. ������ ���������
���� ��������� �� ������ �� ������ �� ����������, ������������ ��
��� ������� ������ �� ��������� ��� ��� ��������� � ����������
��� ���������. ��� ����������� �� ��������, � ���������� ���
������ ��� ��� ������� ��� ���� ��� ��������� ��� ������. ����
�� ������� ���, �������� ��� ������ ������ � ����� �����������
���� ��������� ��� ������ ���������. ��� ��� ����������� �������
�� ������ �������� �� �������� ��������� ��� ����������
����������.
6.3. ������� ���������
� ���������� ������ �� ��������� �� ������� �� ���������� �� ���
����� �� ����� po/��������.pot ��� ������ �� ������������. ��
����������� ����� ��� �� ����
msgid "Connecting to %s:%hu... "
msgstr ""
O��� ���������� ��� ����� msgstr ��� �������� ��������, ������:
� msgid "Connecting to %s:%hu... "
� msgstr "������ �� %s:%hu... "
����������� ������� �������� �� ������ ��� GNU Translation Project
<
http://www.iro.umontreal.ca/contrib/po>
6.4. ������� ������������
���� �������� �� ���������� ��� �������� �� ������ ��� �������
GNU �����������, ������ �� ���������� ��� �� ���������
������������. ��� ������� �� ��� �������� �� ������� DISCLAIMER
<
http://www.iro.umontreal.ca/contrib/po/doc/>. ��� �����������
����������, ������������ �� �o� ������ �� ��������� ���
����������� ����������. ����� ``������� ���������''
�� ����� ��� ��������� ������������ ������, �� ����� ��� ���������
��� ���������� ���������� �����
� ������� ��������� <mailto:
[email protected]>
� ����� �������������� <mailto:
[email protected]>
� ������ �������� <mailto:
[email protected]>
� ����� ���������� <mailto:
[email protected]>
� ������� ����� <mailto:
[email protected]>
6.5. ����� ����� �� ������� ���� ��������� �� ������� ���
��������;
1. � ����������� ������ �� ����������� ��� ����� �� Linux ���
������������ ��� ����������� ���������.
2. �� ������� �������� �� Linux �� ������� �� ������ �� ��������
������� ��� �� ����������� �� ����� �� ��������.
3. ������������ ��� ����� �� ��������� ���� ��� ����������.
4. ��������� �� ������� ����� �� Unix �� ��� ������ ����������
�������� ��� Solaris.
5. � ����������� ����� ���� �� ������ �� ����� ��� �� ����� ������
�� Linux. ��� ���� ����� �������� �����������, �������� ��� �����
��� �� ������� �� ��� ���� ��������� (software house) ��� ��� ��
��������� �� �������� ����� �� ������ ����� �������� ���� ������
��� �� ��������.
6. ��� �� �������������� �� Linux ���� ���������, ����� ��������
����� �� ����� �������������. ��� ��, ���� ��� ��� ����������
�����������, ���� ��� ��� ������� �� ������� ��� �������.
7. ������ ��������� �� ���������
� ������� GNU �����������
1. enscript, �������� ������ �������
<mailto:
[email protected]>, ��������� ����� ����������
<mailto:
[email protected]>
2. fileutils, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
3. gettext, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
4. grep, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
5. hello, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
6. libc, �������� ����� �������������� <mailto:
[email protected]>,
��������� ����� ���������� <mailto:
[email protected]>
7. m4, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
8. recode, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
9. sharutils, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
10.
sh-utils, �������� ����� ��������������
<mailto:
[email protected]>, ��������� ���
11.
sed, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
12.
textutils, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
13.
wget, �������� ����� ����������
<mailto:
[email protected]>, ��������� ���
����������� ���������� ������� ��������� #1
<
http://www.iro.umontreal.ca/contrib/po/doc/matrix.texi>, �������
��������� #2 <
http://www.iro.umontreal.ca/contrib/po/trans/el/>
� ��������� GNU �����������
1. mutt, �������� ����� ���������� <mailto:
[email protected]>,
��������� ����� ���������� <mailto:
[email protected]>
2. shadow, �������� ����� ��������������
<mailto:
[email protected]>, ��������� ���
3. windowmaker, �������� ������������ �������
<mailto:
[email protected]>, ��������� ���
4. lyx, �������� �������� ������� <mailto:
[email protected]>,
��������� ���, ���������� �������� ������ Lyx
<
http://users.otenet.gr/~maglis/lyx>
� KDE
1. ������ ������� KDE, �������� ������ ��������
<mailto:
[email protected]>, ��������� ���
����������� ���������� ������� ��������� KDE
<
http://www.kde.org/i18n.html>
� Gnome
����������� ���������� ������� ��������� Gnome
<
http://www.gnome.org/i18n/status.shtml>
8. �����������
8.1. ����� ����������� �� ��������� �������� ��������
1. ������� ������������ RedHat, RedHat <
http://www.redhat.com>
2. ������� ������������ SuSE, SuSE <
http://www.suse.com>
3. Fortify, Fortify <
http://www.fortify.net/localization.html>, �����
��������� ���������� �� NLS
4. freetype, FreeType font rendering engine <
http://www.freetype.org>
5. rpm, RPM, package manager <
http://www.redhat.com>
6. Squid, Squid 2 Cache Proxy Server <
http://squid.nlanr.net>
7. Console tools, Console-tools
<
http://www.multimania.com/ydirson/en/lct/l10n.html>
9. ���������� ����������
� �������� ������ <mailto:
[email protected]>
� ����� �������������� <mailto:
[email protected]>
� ����� ���������� <mailto:
[email protected]>
������ ����� ���������� �� ��������� �� ���������� ���������, ��
������������ �� ��� ``������ ���������'' ��� ��� �������� ��/���
��� �����.
10. ��������� ���������� ���� ������� Linux
� RedHat Linux 5.2
1. WindowMaker
� RedHat Linux 6.0
1. WindowMaker
2. fileutils
3. grep
4. KDE, ������ 1.1
5. libc
� OpenLinux 2.2
1. fileutils, ������ 4.0-b6
2. KDE, ������ 1.1
� SuSE Linux 6.2 (���� ��������)
11. PO �����
1. ������� GNU �����������
������� GNU �����������
<
http://www.iro.umontreal.ca/contrib/po/trans/el/>
2. ��������� GNU �����������
� Lyx, Lyx <
http://users.otenet.gr/~maglis/lyx/elpo>
� Mutt, mutt, international version <
http://www.mutt.org>
� Shadow suite, shadow-suite
<
http://linux.forthnet.gr/pub/linux/shadow>
� WindowMaker, WindowMaker
<
http://www.windowmaker.org/ftp/pub/beta/srcs/WindowMaker-0.60.0.tar.gz>
3. KDE <
http://www.kde.org/messages/el.messages>
4. Gnome
���
12. ����������
12.1. ����� ����� � ����� ������� �� �������� ���������;
������� ��� ��� ���������� �� ������� GNU ����������� ����
�������� ����� ����� � ����� ����������
<mailto:
[email protected]> (
[email protected]). ���
��������� ���������, ������� e-mail.
��� �� ��������� GNU �����������, ���������� ����� ������� ��
������� ���������.
��� �� ����� ���������� KDE, ������� ����� � ������ �. ��������
<mailto:
[email protected]>.
��� �� ����� ���������� Gnome, ���������� ����� � ����� ����������
<mailto:
[email protected]>. ��� �� Gnome ��� ������ ����
��� �� ������ ��������� ����������. �� �������� �� ��������� ��
������� ��� �� ��������� ����� ������� ������� ������ ���.
�������� ��� ��� ����� ������ ������ �� ��������� � �������� ���
���� ������ ���.