about summary refs log tree commit diff stats
path: root/dwm.h
blob: 0d00c254479c4020772d3274c9508112bfea9907 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
 * See LICENSE file for license details.
 *
 * dynamic window manager is designed like any other X client as well. It is
 * driven through handling X events. In contrast to other X clients, a window
 * manager selects for SubstructureRedirectMask on the root window, to receive
 * events about window (dis-)appearance.  Only one X connection at a time is
 * allowed to select for this event mask.
 *
 * Calls to fetch an X event from the event queue are blocking.  Due reading
 * status text from standard input, a select()-driven main loop has been
 * implemented which selects for reads on the X connectio
Some of this discussion is obsolete - lynx does not bundle the "intl"
directory, and consequently the "--with-included-gettext" configure option is
not supported.
------------------------------------------------------------------------------

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 August 1998:

     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 August
1998.  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 el en es fi fr it
                     .----------------------------.
     bash            |       []             []    |
     bison           |       []             []    |
     clisp           |       []    [] []    []    |
     cpio            |       []       []    []    |
     diffutils       |       []       []    []    |
     enscript        |       []       [] [] []    |
     fileutils       | []    []       []    []    |
     findutils       |       []       []    [] [] |
     flex            |                []    []    |
     gcal            |       []             []    |
     gettext         |    [] [] []    []    []    |
     grep            |       [] []    []    []    |
     hello           |    [] []       []    [] [] |
     id-utils        |       []             []    |
     indent          |    [] []                   |
     libc            |       []       []    []    |
     m4              |       []             []    |
     make            |       []       []    []    |
     music           |                      []    |
     ptx             |       []       []    []    |
     recode          |    [] []       []    []    |
     sed             |                            |
     sh-utils        |       []       []    []    |
     sharutils       | []    [] []    []    []    |
     tar             | []    []             [] [] |
     texinfo         | []    []             []    |
     textutils       | []    []       []    []    |
     wdiff           | []    []       []    []    |
     wget            | []    [] []             [] |
                     `----------------------------'
                       cs da de el en es fi fr it
                        7  4 26  4  1 18  1 26  4
     
                       ja ko nl no pl pt ru sl sv
                     .----------------------------.
     bash            |       []                   |  3
     bison           |       []                   |  3
     clisp           |                            |  4
     cpio            |    [] []    []             |  6
     diffutils       |             []          [] |  5
     enscript        |       []             []    |  6
     fileutils       |    [] []    [] [] [] [] [] | 11
     findutils       |    [] []    []    []    [] |  9
     flex            |    []                   [] |  4
     gcal            |       []    []          [] |  5
     gettext         |    [] [] [] [] []    [] [] | 13
     grep            |    [] [] [] []    [] [] [] | 11
     hello           |    [] [] [] [] []    [] [] | 12
     id-utils        |             []             |  3
     indent          |    []       []    []       |  5
     libc            |    [] [] [] []          [] |  8
     m4              | []    []          []    [] |  6
     make            |    [] []    []             |  6
     music           |             []             |  2
     ptx             |       [] [] [] []       [] |  8
     recode          |       []    [] []    [] [] |  9
     sed             |                            |  0
     sh-utils        |       [] [] [] []       [] |  8
     sharutils       |       []                [] |  7
     tar             |    [] [] [] [] []    [] [] | 11
     texinfo         |       []                   |  4
     textutils       |    [] [] [] []          [] |  9
     wdiff           |       [] [] []          [] |  8
     wget            |          []                |  5
                     `----------------------------'
       18 teams        ja ko nl no pl pt ru sl sv
       29 domains       1 12 21 11 19  7  5  7 17  191

   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 August 1998 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites.

Using `gettext' in new packages
===============================

   If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package.  Of course the GNU General Public License applies to your
sources from then if you include `gettext' directly in your distribution
on but since you are writing free software anyway this is no
restriction.

   Once the sources are change appropriately and the setup can handle to
use of `gettext' the only thing missing are the translations.  The Free
Translation Project is also available for packages which are not
developed inside the GNU project.  Therefore the information given above
applies also for every other Free Software Project.  Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to
the translation teams.
tern
void manage(Window w, XWindowAttributes *wa); /* manage new client */ extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/ extern void resizetitle(Client *c); /* resizes c->twin correctly */ extern void updatesize(Client *c); /* update the size structs of c */ extern void updatetitle(Client *c); /* update the name of c */ extern void unmanage(Client *c); /* destroy c */ /* draw.c */ extern void drawall(void); /* draw all visible client titles and the bar */ extern void drawstatus(void); /* draw the bar */ extern void drawtitle(Client *c); /* draw title of c */ extern unsigned long getcolor(const char *colstr); /* return color of colstr */ extern void setfont(const char *fontstr); /* set the font for DC */ extern unsigned int textw(const char *text); /* return the width of text in px*/ /* event.c */ extern void grabkeys(void); /* grab all keys defined in config.h */ extern void procevent(void); /* process pending X events */ /* main.c */ extern int getproto(Window w); /* return protocol mask of WMProtocols property of w */ extern void quit(Arg *arg); /* quit dwm nicely */ extern void sendevent(Window w, Atom a, long value); /* send synthetic event to w */ extern int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ /* tag.c */ extern void initrregs(void); /* initialize regexps of rules defined in config.h */ extern Client *getnext(Client *c); /* returns next visible client */ extern Client *getprev(Client *c); /* returns previous visible client */ extern void settags(Client *c, Client *trans); /* sets tags of c */ extern void tag(Arg *arg); /* tags c with arg's index */ extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ /* util.c */ extern void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */ extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */ extern void *erealloc(void *ptr, unsigned int size); /* reallocates memory, exits on error */ extern void spawn(Arg *arg); /* forks a new subprocess with to arg's cmd */ /* view.c */ extern void detach(Client *c); /* detaches c from global client list */ extern void dofloat(Arg *arg); /* arranges all windows floating, arg is ignored */ extern void dotile(Arg *arg); /* arranges all windows, arg is ignored */ extern void focusnext(Arg *arg); /* focuses next visible client, arg is ignored */ extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ignored */ extern Bool isvisible(Client *c); /* returns True if client is visible */ extern void resizecol(Arg *arg); /* resizes the master percent with arg's index value */ extern void restack(void); /* restores z layers of all clients */ extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */ extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ extern void view(Arg *arg); /* views the tag with arg's index */ extern void viewall(Arg *arg); /* views all tags, arg is ignored */ extern void zoom(Arg *arg); /* zooms the focused client to master area, arg is ignored */