Re: Adding I18N support to ATK



Padraig,

On Mon, Nov 04, 2002 at 03:00:35PM +0000, Padraig O'Briain wrote:
> I have found this very useful and found a number of errors in what I had done 
> for ATK.

And found a number of errors in my work, too. Thanks for the feedback.
:-)

[...]
> > It is in gnome-devel-docs/tutorials/i18n/C in GNOME CVS. If you have a
> > reasonably sensible Docbook setup (including the stylesheets), it should
> > be possible to check out the directory, change into it and then run
> > 
> > 	mkdir html && xsltproc -o html/i18n-guide.xml
> > 
> > to get some html files to view.
> > 
> 
> When I ran this command I did not generate any html files. I tried the
> command xsltproc i18n-guide.xml and I created some html files.

Ah, yeah. That is because I am a bozo. There should be a space between
the "-o html/" (specifying the output directory) and the
"i18n-guide.xml" (the input file). Sorry about that.

Obviously no harm done in just generating the files in the current
directory; I just prefer to whack them into their own directory for
neatness.

> In section 2.1. you mention ".. you may want to skip ahead to the
> section about library markup requirements to find out the couple of
> lines that need to be changed here.
> 
> I am not sure what section and what lines you are referring to here.
> Do you mean section 2.2.1?

Hmm, it does mean section 2.2.1. There is meant to be a hyperlink from
"library markup requirements" to the right section. Maybe I will remove
all of the labels between sections so that they all say "Section X.Y.Z"
(afaik, you can't have both and I preferred run-in descriptions, but if
it's confusing I'll change it).

> Is adding intl*.in to EXTRA_DIST necessary?

Yes. You should not ship the non-.in versions. When configure is run on
the build machine, it replaces the "#!@INTLTOOL_PERL@ -w" line at the
head of each script with the true location of perl on your machine. It
does this via some poking about inside the m4 macros, so that you don't
need to put those files in AC_OUTPUT yourself.

Looking at ATK, though, you don't use intltool. You clearly don't need
to package those files in that case. :)

> I found the section Changes to autogen.sh confusing as atk was copied
> originally from gtk+.
> 
> I created the file acinclude.m4 (based on gtk+ version) and added code to 
> autogen.sh to refer to glib-2.0.m4 and glib-gettext.m4 (again based on gtk+).

OK, so I need to add another possibility to that section (for people who
copied the gtk+ file). The file I was using as an example is the sort of
thing used in gconf and metacity (which is really just a slightly
modified copy of the autogen.sh in gnome-common/macros2/).

The method you have used is designed to force glib-gettextize to be
used, which is probably a bit safer in the long wrong; the generic
method will run gettextize if glib-gettextize is not found and this has
"interesting" (a.k.a. annoying) side-effects for gettext-0.11. What you
have done looks right, so I'll add it as another possibility to the
document.

I'm not quite sure why you need po2tbl.sed.in in po/ for ATK, but gtk+
has it, too, so that looks like another side-effect of the way that
particular autogen'ing gets done. Normally that file is created as part
of 'glib-gettextize --copy'. [That's not a problem for you, btw, it's
just me thinking out loud.]

> I also found that if I commented out the line AM_GLIB_GNU_GETTEXT in 
> configure.in, the makefile was not generated in the po directory.

That would be correct. Sorry, I forgot to test that before writing it
down. :-(

If you don't have AM_GLIB_GNU_GETTEXT run, you need to remove
po/Makefile.in from AC_OUTPUT and not have po in SUBDIRS in the
top-level Makefile.am. However, from looking at your code, you seem to
be getting away with an empty ALL_LINGUAS string. So it's possible that
something has changed there (it used to explode spectacularly). I will
test some options and fix that section.

Like I said, thanks for all the feedback. It's much appreciated.

Cheers,
Malcolm

-- 
Atheism is a non-prophet organization.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]