Re: [greenstone-devel] making icons with gimp/translate.pl

From Michael Dewsnip
DateFri, 19 Sep 2003 13:39:01 +1200
Subject Re: [greenstone-devel] making icons with gimp/translate.pl
In-Reply-To (OF2DD7FD5C-297C0D54-ON69256DA6-00064CC1-69256DA6-00064CF9-ntu-edu-au)
Hi Stephen,

We use Perl 5.6.1 here, so I don't think that is the problem.

>From my experience the "procedural database execution failed" message is
caused by Gimp looking for a font that is not installed. The
flash_button-1.2.pl etc. scripts use a "Lucida medium" font by default. You
can try running xfontsel and checking that you have an appropriate font
installed, or specify a font you *do* have on your system by using the
-fontname arguments to the Gimp scripts.

You might be pleased to know that I'm in the process of rewriting these
scripts to use ImageMagick instead of Gimp. These should be much simpler, but
the big benefit is that ImageMagick can do Unicode/multibyte fonts like a
dream (we've never been able to do these with Gimp/Perl).

Hope this helps.

Regards,

Michael

Stephen.DeGabrielle@cdu.edu.au wrote:

> Hi,
>
> I know I don't do this often enough, but I believe I am doing the right
> thing here.
>
> Unfortunately this creates my new 'faculty.dm.new' file but none of the
> desired images.
> I have a horrible creepy feeling that the version of perl is the wrong one.
>
> Since this seems to happen to me every time I do this.
> How do you create your icons/etc. ? Is there a better way?
>
> Thanks for any help/advice you can offer.
>
> regards,
>
> Stephen De Gabrielle
>
> Copies of relevant bits follow;
>
> --perl bit ending with line 541-
> } elsif (_gimp_procedure_available ($sub)) {
> *{$AUTOLOAD} = sub {
> shift unless ref $_[0];
> unshift @_, $sub;
> #goto &gimp_call_procedure; # does not work, PERLBUG! #FIXME
> my @r = eval { gimp_call_procedure (@_) };
> recroak $@ if $@; wantarray ? @r : $r[0];
> };
> ----
> ------
> [sdegabrielle@bustard exam]$ translate.pl -save_orig_file -language_symbol
> en macros/faculty.dm
> Subroutine gimp_palette_set_foreground redefined at
> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Gimp.pm line 541.
> flash_button-1.2.pl: gimp_text: procedural database execution failed at
> /home/sdegabrielle/myhome/ereserve/gsdl/bin/script/gimp/flash_button-1.2.pl
> line 189 (DIE)
> Subroutine gimp_palette_set_foreground redefined at
> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Gimp.pm line 541.
> green_bar-1.2.pl: gimp_text: procedural database execution failed at
> /home/sdegabrielle/myhome/ereserve/gsdl/bin/script/gimp/green_bar-1.2.pl
> line 173 (DIE)
> ERROR (translate.pl): couldn't open
> /var/www/ereserve/gsdl/collect/exam/images/tfacultyon.gif to get dimensions
> Subroutine gimp_selection_none redefined at
> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Gimp.pm line 541.
> Subroutine gimp_palette_set_foreground redefined at
> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Gimp.pm line 541.
> title_icon-1.2.pl: gimp_text: procedural database execution failed at
> /home/sdegabrielle/myhome/ereserve/gsdl/bin/script/gimp/title_icon-1.2.pl
> line 278 (DIE)
>
> translation of macro file macros/faculty.dm completed
> the translated macro file is macros/faculty.dm.new
>
> To add your new interface translation to Greenstone you'll need to:
> 1. Copy your new macro file to your GSDLHOME/macros directory
> 2. Add your new macro file to the macrofiles list in your
> GSDLHOME/etc/main.cfg configuration file
> 3. Copy your newly created images from
> /var/www/ereserve/gsdl/collect/exam/images to
> GSDLHOME/images/en/
>
> Access your new interface language by setting the language (l) cgi
> argument to 'en'
> --END--
>
> # faculty.dm
>
> # This file defines a set of images and titles for a new metadata element.
> # Usually these images are defined in several seperate macro files.
>
> # Usually defined in base.dm
>
> package Global
>
> _Facultywidth_ [l=en] {_widthtfacultyx_}
>
> _imageFaculty_ [l=en] {_gsimage_(_httpbrowseFaculty_,_httpicontfacultyof_,
> _httpicontfacultyon_,faculty,_textimageFaculty_)}
>
> _icontabFacultygreen_ [l=en] {<img src="_httpicontfacultygr_" width="
> _widthtfacultyx_" border=0>}
> _icontabFacultygreen_ [v=1,l=en] {_texticontabFacultygreen_}
>
> # Usually defined in document.dm
>
> package document
>
> _textFacultypage_ [l=en] {_texticonhfaculty_}
>
> _iconFacultypage_ [l=en] {<img src="_httpiconhfaculty_" width
> =_widthhfaculty_ height=_heighthfaculty_}
> _iconFacultypage_ [v=1,l=en] {<h2>_texticonhfaculty_</h2>}
>
> # Usually defined in language-specific files
>
> package Global
>
> _textimageFaculty_ [l=en] {Browse Faculty}
> _texticontabFacultygreen_ [l=en] {faculty}
>
> ## "faculty" ## nav_bar_button ## tfaculty ##
> _httpicontfacultygr_ [l=en] {/gsdl/web/images/en/tfacultygr.gif}
> _httpicontfacultyof_ [l=en] {/gsdl/web/images/en/tfacultyof.gif}
> _httpicontfacultyon_ [l=en] {/gsdl/web/images/en/tfacultyon.gif}
> _widthtfacultyx_ [l=en] {0}
>
> package document
>
> _texticonhfaculty_ [l=en] {faculty}
>
> ## "faculty" ## green_title ## h_faculty ##
> _httpiconhfaculty_ [l=en] {/gsdl/web/images/en/h_faculty.gif}
> _widthhfaculty_ [l=en] {200}
> _heighthfaculty_ [l=en] {57}
>
> package help
>
> _textFacultyshort_ [l=en] {access items by faculty}
>
> _textFacultylong_ [l=en] { <p>You can <i>access items by faculty</i> by
> pressing the <i>faculty</i> button.
> }
>
> -
>
> _______________________________________________
> greenstone-devel mailing list
> greenstone-devel@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel