diff --git a/docs.php b/docs.php index 9cc6255..e3b9df2 100644 --- a/docs.php +++ b/docs.php @@ -34,7 +34,8 @@
A guide to enable support for language translations +in WINDOW MAKER and to the contributors +who want to help translating. +
+ +This manual is for Window Maker, version git#next. +
+ + + +WINDOW MAKER has the possibility to be translated in many languages, but by default none of +them will be installed, and the support for translation will not be compiled. +
+To enable the translation capabilities, you have to specify which language(s) you want to be
+installed: this is done with the variable LINGUAS when running the configure script.
+This variable should contain the space-separated list of languages you want to install.
+
You could for instance enable both French (fr) and Dutch (nl) with this:
+
./configure LINGUAS="fr nl" +
You can of course add any other option that you want to the configure command.
+From the moment you specify the variable, the configure script will check that you have
+the appropriate dependencies for this (basically the gettext function and the libintl
+library); when you run make to compile the project, it will also compile the translation
+(mo files) for the language(s) you asked (if available, of course), and during
+make install it will install them in the usual directory.
+
The installation directory can be changed with the standard option --localedir to the
+configure script, the default path being
+<prefix>/share/locale/<lang>/LC_MESSAGES).
+
The naming convention for the languages follows the ISO 639-1 standard, +for which you can find a summary list in the +GNU gettext manual. +
+But as WINDOW MAKER does not support all of them, the configure script will print a
+warning for each language you specify that it does not know, and sum up at the end the list of
+enabled languages that will be installed.
+
There is a non-standard possibility to set LINGUAS to list, in which case the
+configure script will provide you the list of languages it supports, and stop:
+
./configure LINGUAS="list" +
There is also another non-standard possibility to enable all the languages that WINDOW MAKER
+supports by setting LINGUAS to *.
+This is an internal trick implemented so the development team can have the command
+make distcheck include some checks on translations:
+
./configure LINGUAS='*' +
In order to propose an Application Menu (also called Root Menu) that is also +translated in the language of the interface, WINDOW MAKER implements two complementary +mechanisms: +
+The first, always enabled when i18n support is enabled, is to look for the menu file containing the
+name of the locale.
+For example, if the file is called menu and the language is set as LANG=fr_FR.utf-8,
+then WINDOW MAKER will search for, and use the first match found:
+
menu.fr_FR.utf-8
+menu.fr_FR
+menu.fr
+menu
+The second possibility, which is not enabled by default, is to be able to use a custom po
+file which contains the translations for the text of the menu.
+This feature is enabled at compile time, using the option --with-menu-textdomain to the
+configure script. For example, if you specify:
+
./configure --with-menu-textdomain=WMMenu +
then the translations for the menu will be searched in the file WMMenu.mo located +at the standard location, the default path being +<prefix>/share/locale/<lang>/LC_MESSAGES/WMMenu.mo. +
+If you do not enable the feature (the default behaviour, or with an explicit +--without-menu-textdomain), then WINDOW MAKER will not try to translate the +strings, even using its own domain file (WindowMaker.mo). +
+ + +LINGUAS at system levelAs the variable LINGUAS is quite standard, you also have the possibility to set its value in
+the config.site file for AUTOCONF.
+This file can be placed in one of these paths:
+
This way, the same language list will be used for all the programs that use AUTOCONF that you +would compile. +Please note that if you also specify a value on the command line, it will have precedence over the +value in that file. +
+ +If you have compiled and installed WINDOW MAKER with support for your language,
+the effective translation is done is the very same way as any other application on an UNIX
+system, you just have to set the shell variable LANG to your language before wmaker
+is started.
+In sh type of shell (SH, KSH, BASH, ...), this is done for example with
+(fr is for French):
+
export LANG=fr +
There is also a command line option --locale for WINDOW MAKER which may be used to set +the language: +
+wmaker --locale fr +
When using this option, WINDOW MAKER will use the locale you specified, redefining the
+LANG environment variable to this value so all program started from WINDOW MAKER will
+inherit its value.
+
If your system is using SYSTEMD, you can also configure the locale at system level using the +command: +
+localectl set-locale LANG=fr +
You can check if the current value is properly supported with the command: +
+locale +
If this does not work, you may need first to activate the support for your locale in the system; +you can get the list of currently enabled locales with the command: +
+locale -a +
You should be able to enable a new language support by editing the file /etc/locale.gen to
+uncomment the locale(s) you need (by removing the # character and space(s) in front of it,
+and by running the command locale-gen as root.
+
For further information, you may wish to read dedicated documentation, for example from +the Linux Documentation Project +or through pages like +Shell Hacks’ note on Changing Locale. +
+ +If I18N support does not work for you, check these: +
+LANG environment variable is set to your locale, and
+the locale is supported by your OS’s locale or X’s locale
+emulation. you can display all supported locales by
+executing "locale -a" command if it is available; you
+can check if your locale is supported by X’s locale emulation,
+see /usr/share/X11/locale/locale.alias
+
+LANG
+variable, like ru_RU.KOI8-R. Again, see
+/usr/share/X11/locale/locale.alias
+
+WindowTitleFont = "Trebuchet MS:bold:pixelsize=12"; + MenuTitleFont = "Trebuchet MS:bold:pixelsize=12"; +
then you can’t display Asian languages (ja, ko, ch, ...) characters using
+Trebuchet MS. A font that is guaranteed to work for any language is
+sans (or sans-serif). sans is not a font itself, but an alias which
+points to multiple fonts and will load the first in that list that
+has the ability to show glyphs in your language. If you don’t know
+a font that is suited for your language you can always set all your
+fonts to something like:
+
"sans:pixelsize=12" +
However, please note that if your font is something like: +
+"Trebuchet MS,sans serif:pixelsize=12" +
this will not be able to display Asian languages if any of the
+previous fonts before sans are installed. This is because unlike
+the proper font pickup that sans guarantees for your language,
+this construct only allows a font fallback mechanism, which tries
+all the fonts in the list in order, until it finds one that is
+available, even if it doesn’t support your language.
+
Also you need to change font settings in style files in +the $HOME/Library/WindowMaker/Style directory. +
+LC_CTYPE environment variable is unset or it has the correct
+value. If you don’t know what is the correct value, unset it.
+
+You may have noticed that many translations are not up to date, because the code has evolved but the +persons who initially contributed may not have had the time to continue, so any help is welcome. +
+Since WINDOW MAKER 0.95.7 there are some targets to make that can help you in that
+task.
+
If you want to contribute, the first step is get the development branch of the code;
+this is done using git.
+If you do not feel confident at all with using git, you may also try to ask for a
+snapshot on the developer’s mailing list wmaker-dev@lists.windowmaker.org.
+With git the procedure is:
+
# Get your working copy of the sources +git clone git://repo.or.cz/wmaker-crm.git + +# Go into that newly created directory +cd wmaker-crm + +# Switch to the branch where everything happens +git checkout next + +# Generate the configuration script +./autogen.sh +
Now you should have an up-to-date working copy ready to be compiled;
+you will not need to go the full way but you should run the configure script, so it will
+create the Makefiles, and you may want to compile the code once so it will not do it again
+automatically later while you are doing something else:
+
# Setup the build, enabling at least the language you want to work on +./configure LINGUAS="<list of iso 639 country code>" + +# Compile the code once +make +
The typical process for translating one program is: +
+xgettext which searches for all the strings from the sources that can be
+translated;
+
+msgmerge which compares the PO file and aligns it to the latest
+template;
+
+msgstr, review the
+possible fuzzy matches, ...
+
+git.
+In WINDOW MAKER, you have actually 4 po files to take care of:
+
As stated previously, there is a make target that can help you to automatically generate
+the POT and update the PO for these 4 cases:
+
make update-lang PO=<lang> +
Once run, it will have updated as needed the 4 po files against the latest source code.
+You may wish to use the command git gui to view the changes;
+you can now edit the files to complete the translation, correct them, remove deprecated stuff, ...
+Please note that the encoding should be set to UTF-8 as this is now the standard.
+
If you think an error message is too obscure, just ask on the developer mailing list +wmaker-dev@lists.windowmaker.org: in addition to clarifications there’s even a chance for the original message +to be improved! +
+You may find some information on working with po file in the
+GNU gettext documentation.
+
You may want to extend the translation to the documentation that is provided to users in the form +of Unix man pages. +The sources of the man pages are located in the doc/ directory; +the translation should be placed in the directory doc/lang/ with the same file name. +
+The directory will also need a file Makefile.am which provides the list of man pages to be +included in the distribution package and to be installed. +You can probably get inspiration from an existing one from another language; +if you do not feel confident about it do not hesitate to ask on the project’s mailing list +(wmaker-dev@lists.windowmaker.org), either for help or to ask someone to make it for you. +
+Please note that although most man pages sources are directly in man page format +(nroff, the file extension being a number), a few of them are processed by a script +(those with the .in extension, like wmaker.in). +This is done because in some case we want the man page to reflect the actual compilation options. +
+You may not want to bother with this hassle, in which case you can simply name your translation
+file with the .1 and remove the special @keyword@ marks.
+If you are sure you want to keep that processing but do not feel confident about hacking the
+Makefile.am do not hesitate to ask on the project’s mailing list (wmaker-dev@lists.windowmaker.org).
+
In the WINDOW MAKER build tree you also have another target that can help you, it is
+make check.
+
At current time, it does not check much, but if during the make update-lang new po
+file have been created you may get some errors, because you have to add these new files to the
+variable EXTRA_DIST in the corresponding Makefile.
+
If you do not feel confident about doing it, do not worry, just tell about it when you submit your +work, and some developer on the mailing list will just be happy to do it for you when integrating +your valuable contribution (we always like when someone helps making WINDOW MAKER better). +
+ + +Preliminary Remark: if the update process made changes in a po file but you did not
+change any msgstr content, it is probably a good idea to not submit the changes to that
+po file because it would just add noise.
+
When you feel ready to send your changes, the first step is to prepare them.
+This is done with git: if you have not run the git gui previously then it is a
+good time to do it now.
+This window offers you the possibility to show your changes and to decide what you want to send.
+
The window is divided in 4 panes: +
The idea here is to pick your changes to the po files;
+for the commit message you may wish to stuck to a simple, single line:
+
++ +"Updated translations for <lang>" +
The penultimate step is to click on the button Sign Off (it will add a line in the commit +message), and then click on the button Commit. +From this time, the commit message will clear itself and the "Staged Changes" also, showing that +your action was done. +
+You may now quit the git gui, the final step begins by running this command:
+
git format-patch HEAD^ +
This will generate a file named like 0001-updated-translations-for-XX.patch
+which contains your changes, ready for sending.
+The goal will now be to email this file to wmaker-dev@lists.windowmaker.org.
+If you feel confident in having git send it for you, you may want to read the file
+The-perfect-Window-Maker-patch.txt to see how to configure git for mailing, so you
+can run:
+
git send-email 0001-updated-translations-for-XX.patch +
A guide to configure, compile and install +WINDOW MAKER from sources. +
+ +This manual is for Window Maker, version git#next. +
+ + +Patches to make it work on other platforms are welcome. +
+ + +The following software is required to use WINDOW MAKER: +
Window Maker can be compiled in older versions of X, like X11R5 (Solaris) +or X11R4 (OpenWindows) but it will not work 100% correctly. +In such servers there will not be application icons and you’ll have trouble using the dock. +Upgrading the client libraries (Xlib, Xt, etc.) will help if you can’t upgrade +the server. +
The following is required to build WINDOW MAKER: +
Dependencies include freetype2 and fontconfig. +You will also need the development files for them (xft2-devel). +Sources are available at: http://www.freedesktop.org/wiki/Software/Xft/ +
+Note: +WINDOW MAKER is known to compile with gcc and clang; +the code source is mostly ANSI C (also known as C89 and C90) but is uses very few of the C99 +novelties; +it also uses a few attributes introduced in the C11 standard but those are detected automatically, +so most compilers should work. +
+ + +If you want to compile using the sources from the git repository instead of the distribution +package, you will also need: +
These libraries are not required to make WINDOW MAKER work, but they are supported in case you +want to use them. Version numbers are indicative, but other versions might work too. +
+Older versions may not work! +
+Available from http://xlibs.freedesktop.org/release/ +
+There is built-in support for XPM files, but it will not +load images in some uncommon encodings. +
+For PNG image support, +http://www.libpng.org/pub/png/libpng.html +
+For TIFF image support, +http://www.libtiff.org/ +
+For JPEG image support, +http://www.ijg.org/ +
+Note that if you don’t have it, configure will issue a big warning in the end,
+this is because JPEG images are often used in themes and for background images
+so you probably want this format supported.
+
For GIF image support, +http://giflib.sourceforge.net/ +
+The reference library from Google for their image format, +https://developers.google.com/speed/webp/download +
+If you want to use translated messages, you will need GNU gettext. +Other versions of gettext are not compatible and will not work. +Get the GNU version from http://www.gnu.org/software/gettext/ +
+This library can be used by the WINGs toolkit to improve support for UTF-8 and for +languages written in right-to-left direction, in some widgets. +You have to explicitly ask for its support through (see Configure Options). +You can get it from http://www.pango.org/Download +
+This library can be used by the WINGs utility library to make use of strlcat and
+strlcpy instead of using built-in functions if your system does not provide them in its
+core libc.
+You should let WINDOW MAKER’s configure detect this for you.
+You can get it from http://libbsd.freedesktop.org/wiki/
+
If you have Linux’s inotify support, WINDOW MAKER will use it to check for configuration +updates instead of polling regularly the file. +The needed header comes with the kernel, typical packages names include: +
If found, then the library WRaster can use the ImageMagick library to let +WINDOW MAKER support more image formats, like SVG, BMP, TGA, ... +You can get it from http://www.imagemagick.org/ +
+This library can be used by the WINGs utility toolkit to use a
+Boehm-Demers-Weiser Garbage Collector instead of the traditional
+malloc/free functions from the libc.
+You have to explicitly ask for its support though (see Configure Options).
+You can get it from http://www.hboehm.info/gc/
+
The latest version of WINDOW MAKER (-crm) can be downloaded from +http://www.windowmaker.org/ +
+Alternatively, the development branch, called #next is in the git repository at +http://repo.or.cz/w/wmaker-crm.git +
+If you want to use the git versions, you can get it with: +
git clone -b next git://repo.or.cz/wmaker-crm.git +
then, assuming you have the dependencies listed in Special Dependencies, you have to +type: +
./autogen.sh +
to generate the configuration script. +
+ + +For a quick start, type the following in your shell prompt: +
+./configure +make +
then, login as root and type: +
+make install +ldconfig +
or if you want to strip the debugging symbols from the binaries to make them smaller, +you can type instead: +
+make install-strip +ldconfig +
This will build and install WINDOW MAKER with default parameters. +
+If you want to customise some compile-time options, you can do the following: +
+./configure --help +
to get a complete list of options that are available. +
+./configure --enable-modelock +
make +
su root +make install +
These instructions do not need to be followed when upgrading WINDOW MAKER +from an older version, unless stated differently in the NEWS file. +
+Every user on your system that wishes to run WINDOW MAKER must do the +following: +
+wmaker.inst +
wmaker.inst will install WINDOW MAKER configuration files and will
+setup X to automatically launch WINDOW MAKER at startup.
+
That’s it! +
+You can type man wmaker to get some general help for configuration
+and other stuff.
+
Read the User Guide for a more in-depth explanation of WINDOW MAKER. +
+You might want to take a look at the FAQ too. +
+ + +WINDOW MAKER has national language support. The procedure to enable national +language support is described in the dedicated +Enabling Languages support in README.i18n. +
+ + +These options can be passed to the configure script to enable/disable +some WINDOW MAKER features. Example: +
./configure --enable-modelock --disable-gif +
will configure WINDOW MAKER with modelock supported and disable gif support. +Normally, you won’t need any of them. +
+To get the list of all options, run ./configure --help
+
The default installation path will be in the /usr/local hierarchy; +a number of option can customise this: +
+Standard options from autoconf to define target paths, +you probably want to read Installation Names in INSTALL. +
+More standard options from autoconf, today these are not used by WINDOW MAKER; +they are provided automatically by autoconf for consistency. +
+Specific to WINDOW MAKER, defines the directory where WPrefs.app will be installed, +if you want to install it like a GNUstep applications. +If not specified, it will be installed like usual programs. +
+Specific to WINDOW MAKER, this option defines an additional path where pixmaps will be +searched. Nothing will be installed there; the default path taken is DATADIR/pixmaps, +where DATADIR is the path defined from --datadir. +
+Specific to WINDOW MAKER, defines the directory where system configuration +files, e.g., WindowMaker, WMRootMenu, etc., are installed. The +default value is SYSCONFDIR/WindowMaker, where SYSCONFDIR is +the path defined from --sysconfdir. +
+Unless specifically written, configure will try to detect automatically for the libraries;
+if you explicitly provide --enable-FEATURE then it will break with an error message
+if the library cannot be linked;
+if you specify --disable-FEATURE then it will not try to search for the library.
+You can find more information about the libraries in the
+Optional Dependencies.
+
Never enabled by default, use Boehm GC instead of the default libc malloc()
+
Disable GIF support in WRaster library; when enabled use libgif or libungif. +
+Disable JPEG support in WRaster library; when enabled use libjpeg. +
+Refuse use of the libbsd compatibility library in WINGs utility library, +even if your system provides it. +
+Disable ImageMagick’s MagickWand support in WRaster, used to support for image formats. +
+Disabled by default, enable Pango text layout support in WINGs. +
+Disable PNG support in WRaster; when enabled use libpng. +
+Disable TIFF support in WRaster. when enabled use libtiff. +
+Disable WEBP support in WRaster. when enabled use libwebp. +
+Disable use of libXpm for XPM support in WRaster, use internal code instead. +
+The following options can be used to tell configure about extra paths that needs to be
+used when compiling against libraries:
+
specify additional paths for libraries to be searched. +The -L flag must precede each path, like: +
--with-libs-from="-L/opt/libs -L/usr/local/lib" +
specify additional paths for header files to be searched. +The -I flag must precede each paths, like: +
--with-incs-from="-I/opt/headers -I/usr/local/include" +
configure will try to detect automatically the compilation paths for X11 headers and
+libraries, and which X Extensions support can be enabled.
+if you explicitly provide --enable-FEATURE then it will break with an error message
+if the extension cannot be used;
+if you specify --disable-FEATURE then it will not check for the extension.
+
Autoconf’s option to specify search paths for X11, +for the case were it would not have been able to detect it automatically. +
+If you activated support for Native Languages, then X11 may use a hack to also configure its
+locale support when the program configure the locale for itself.
+The configure script detects if the Xlib supports this or not;
+this options explicitly disable this initialisation mechanism.
+
XKB language status lock support. If you don’t know what it is you probably don’t need it. +The default is to not enable it. +
+Disable use of the MIT shared memory extension. +This will slow down texture generation a little bit, but in some cases it seems to be necessary due +to a bug that manifests as messed icons and textures. +
+Disables support for shaped windows (for oclock, xeyes, etc.).
+
The Xinerama extension provides information about the different screens connected when +running a multi-head setting (if you plug more than one monitor). +
+The RandR extension provides feedback when changing the multiple-monitor configuration in X11 +and allows to re-configure how screens are organised. +
+At current time, it is not enabled by default because it is NOT recommended (buggy); +WINDOW MAKER only restart itself when the configuration change, to take into account the new +screen size. +
+Disable animations permanently, by not compiling the corresponding code into WINDOW MAKER. +When enabled (the default), you still have a run-time configuration option in WPrefs. +
+Disable support for Motif’s MWM Window Manager hints. +These attributes were introduced by the Motif toolkit to ask for special window appearance requests. +Nowadays this is covered by the NetWM/EWMH specification, but there are still applications that rely on MWM Hints. +
+Add support for the ICCCM protocol for cooperative window manager replacement. +This feature is disabled by default because you probably don’t need to switch seamlessly the window manager; +if you are making a package for a distribution you’d probably want to enable this because it allows users to give +a try to different window managers without restarting everything for an extra cost that is not really big. +
+Disable support for dragging and dropping files on the dock, which launches a user-specified command +with that file. +Starting from version 0.65.6 this feature is enabled by default. +
+This feature is auto-detected, and you should not use this option. +When compiling a library (wrlib, ...), gcc has the possibility to filter the list of +functions that will be visible, to keep only the public API, because it helps running programs +faster. +
+The configure script checks if this feature is available;
+if you specify this option it will not check anymore and blindly trust you that it is supposed to
+work, which is not a good idea as you may encounter problems later when compiling.
+
This feature, disabled by default, allows to add a user-defined custom menu to applications; +when choosing an entry of the menu it will send the key combination defined by the user to that +application. See Application User Menu in NEWS for more information. +
+Selection of the domain used for translation of the menus; +see Translations for Menus in README.i18n. +
+These options are disabled by default: +
+If you intend to re-run the configure script often, you probably want to include this
+option, so it will save and re-use the status of what have been detected in the file
+config.cache.
+
Enable debugging features (debug symbol, some extra verbosity and checks) and add a number of +check flags (warnings) for the compiler (in gcc fashion). +
+Enable generation of code coverage and profiling data; +if the DIRECTORY is not specified, use coverage-report. +
+This option was meant to be use with gcc;
+it was not used recently so it is probable that is does not work anymore;
+the configure script will not even check that your compiling environment has the
+appropriate requirements and works with this.
+Despite all this, if you think there’s a use for it and feel in the mood to help, do not hesitate to
+discuss on the mailing list wmaker-dev@lists.windowmaker.org to get it working.
+
Make sure you have /usr/local/lib in /etc/ld.so.conf and that you
+run ldconfig after installing.
+Uninstall any packaged version of WINDOW MAKER before installing a new version.
+
RedHat systems have several annoying problems. +If you use it, be sure to follow the steps below or WINDOW MAKER will not work: +
+PATH environment variable;
+
+ldconfig;
+You will need to have the latest version of Xpmac. +Older versions seem to have bugs that cause the system to hang. +
+If you want JPEG and TIFF support, make sure you have libtiff-dev +and libjpeg-dev installed. +
+If you installed the WINDOW MAKER package from SuSE, uninstall it before trying to +compile Window Maker or you might have problems. +
+MetroX has a bug that corrupts pixmaps that are set as window backgrounds. +If you use MetroX and have weird problems with textures, do not use textures in title bars. +Or use a different X server. +
+If you can’t get superuser privileges (can’t be root) you can install Window Maker in your own
+home directory.
+For that, supply the --prefix option when running configure in step 2 of building
+WINDOW MAKER.
+You will also need to supply the --with-gnustepdir option, to specify the path for
+WPrefs.app.
+Example:
+
./configure --prefix=/home/jshmoe --with-gnustepdir=/home/jshmoe/GNUstep/Applications +
Then make /home/jshmoe/bin be included in your search PATH, add /home/jshmoe/lib
+to your LD_LIBRARY_PATH environment variable and run bin/wmaker.inst
+
Of course, /home/jshmoe is supposed to be replaced by your actual home directory path. +
+ + +If you are upgrading from an older version of WINDOW MAKER: +
+wmaker.inst)
+When you have some trouble during configuration (while running configure), like not being able to +use a graphic format library you think you have installed, look at the config.log file for +clues of the problem. +
+ + +This is probably a problem with NLS (Native Language Support), you probably want to look at the +Troubleshooting in README.i18n +or try rebuilding without NLS support, which is done with: +
./configure LINGUAS="" +
Delete config.cache, then rerun configure adding the following options to configure
+(among the other options you use):
+
--with-libs-from="-L/usr/local/lib" +--with-incs-from="-I/usr/local/include -I/usr/local/include/tiff" +
Put the paths where your graphic libs and their corresponding header files are located. +You can put multiple paths in any of these options, as the example of --with-incs-from shows. +Just put a space between them. +
+ + +Check if you have a symbolic link from libXpm.so.4.9 to libXpm.so +
+ + +If you’re not sure, try renaming ~/GNUstep to ~/GNUtmp
+and then run wmaker.inst
+
the host name of your machine is set to something invalid, that starts with a parenthesis.
+Do a man hostname for info about how to set it.
+
WINDOW MAKER could not read your menu definition file.
+You should check the output of wmaker for an error, it may be visible in the console or in the
+.xsession-errors file.
+