On Fri, 29 Sep 2000, Ole Sebastian Stein wrote:
> Hi, I started using BB just a few weeks ago and I must say BB is
> wonderful. Enough backrubbing.
>
> Now, I took a look into the source tree for the 0.60.x-version (if I'm
> right) and saw that there are some language stuff there. Seems to me I
> should be able to compile with another language.
Blackbox is translatable, all you need to do is create the new
translation, install it, and then set your locale to the new translation.
> How do I do it?
in the blackbox-0.61.0 directory, there is an nls/ subdirectory with these
files/directories in it:
[bhughes@reticent] ~/src/blackbox-0.61.0/nls% ls
C/ convert.awk et_EE/ ru_RU/
Makefile.am da_DK/ fr_FR/ sv_SE/
Makefile.in es_ES/ pt_BR/ tr_TR/
To start a new translation, copy one of the above to the locale name you
want to translate (no_NO if you want to do the Norwegian translation)
For instance:
[bhughes@reticent] ~/src/blackbox-0.61.0/nls% cp -r C no_NO
[bhughes@reticent] ~/src/blackbox-0.61.0/nls% cd no_NO
[bhughes@reticent] ~/src/blackbox-0.61.0/nls/no_NO% ls
BaseDisplay.m Makefile.in Workspace.m
Basemenu.m Screen.m Workspacemenu.m
Configmenu.m Slit.m blackbox.m
Icon.m Toolbar.m bsetroot.m
Image.m Window.m common.m
Makefile.am Windowmenu.m main.m
You can see all the *.m files, which are the actual translations.
The quickest see progress on your translation is to edit Configmenu.m
first (which is has most of the user displayed text).
And now all you do is translate :)
For example:
$ #LeftRight
# Left to Right
$ #RightLeft
# Right to Left
would become:
$ #LeftRight
# Fra venstre mot h�yre
$ #RightLeft
# Fra h�yre mot venstre
(Pardon me if my Norwegian isn't perfectly correct, I've only started my
norskkurs a few weeks ago :))
Also, the order in the .m files does matter, If you rearrange things, then
the translation will look quite wierd :)
To get the translation installed, you need to edit the Makefile.am file
and change the install-data-local target from (using the Norwegian example
again):
install-data-local: blackbox.cat
@if test x$(NLSTEST) =
"x-DNLS"; then \
echo "Installing catalog in
$(DESTDIR)$(pkgdatadir)/nls/C"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/C; \
$(INSTALL_DATA) blackbox.cat
$(DESTDIR)$(pkgdatadir)/nls/C; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
ln -fs C $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
ln -fs C $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
ln -fs C $(DESTDIR)$(pkgdatadir)/nls/en_US; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
ln -fs C $(DESTDIR)$(pkgdatadir)/nls/en; \
fi
to:
install-data-local: blackbox.cat
@if test x$(NLSTEST) = "x-DNLS"; then \
echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/C"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/no_NO; \
$(INSTALL_DATA) blackbox.cat $(DESTDIR)$(pkgdatadir)/nls/no_NO; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/no; \
ln -fs C $(DESTDIR)$(pkgdatadir)/nls/no; \
fi
(And the same for the uninstall-local rule)
Now, we add no_NO to the nls/Makefile.am:
SUBDIRS = C da_DK es_ES et_EE fr_FR pt_BR ru_RU sv_SE tr_TR
to
SUBDIRS = C da_DK es_ES et_EE fr_FR pt_BR ru_RU sv_SE tr_TR no_NO
You will need to rebuild the Makefile.in's and reconfigure (using aclocal,
automake, autoheader and autoconf).
Or you can send the translation to me or Jeff (or this list) and we can
put it in for the next release :)
> I also noticed that there was no Norwegian translation. If the author
> believes it would be of any interest, I will make one (unless someone is
> allready doing that and I am just another anoying user who cannot wait
> for proper releases:).
>
> Thanks.
>
> --
>
> Ole Sebastian Stein
> [EMAIL PROTECTED] / [EMAIL PROTECTED]
>
--
Bradley T. Hughes <[EMAIL PROTECTED]>
Waldemar Thranes gt. 98B N-0175 Oslo, Norway
Office: +47 21 60 48 92
Mobile: +47 92 01 97 81