After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 131114 - specify gettext-package without using autoconf
specify gettext-package without using autoconf
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks: 129482
 
 
Reported: 2004-01-10 20:11 UTC by Stephen Kennedy
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Sample Makevars (1.77 KB, text/plain)
2004-01-10 21:22 UTC, Carlos Perelló Marín
  Details
Read parameters from Makevars; don't require autoconf files (3.93 KB, patch)
2004-06-14 11:15 UTC, Danilo Segan
committed Details | Review

Description Stephen Kennedy 2004-01-10 20:11:14 UTC
Currently intltool automatically finds the gettext package name if not
specified on the command line by examining configure.in.

Packages which do not use autoconf must therefore specify the -g option on
every invocation. intltool should provide an alternative mechanism to
determine the gettext package without using autoconf. For example by
reading the contents of POTFILES.package if it exists.
Comment 1 Christian Rose 2004-01-10 21:14:52 UTC
I believe this is very much needed, as I think it cannot be assumed
that every package that needs intltool uses autoconf (see bug 129482). 
Comment 2 Carlos Perelló Marín 2004-01-10 21:22:22 UTC
Yes, this is a good addition, but I we add this feature, we should do
it correctly.

Use the gettext way to define it:

http://www.gnu.org/software/gettext/manual/html_chapter/gettext_12.html#SEC179

Comment 3 Carlos Perelló Marín 2004-01-10 21:22:59 UTC
Created attachment 23213 [details]
Sample Makevars
Comment 4 Carlos Perelló Marín 2004-01-10 21:25:09 UTC
I forgot to say that I think we should move to the new gettext layout
for GNOME 2.8, so we need intltool support for it.

That will be the end of GLIB_GETTEXT_PACKAGE glib-gettextize and other
ugly hacks needed int the past.
Comment 5 Kenneth Rohde Christiansen 2004-04-26 08:52:43 UTC
Are you up to making such a patch Carlos? It should be quite easy when you've
figured out how you want it to work. I will review it ofcourse.
Comment 6 Carlos Perelló Marín 2004-04-26 09:07:59 UTC
I cannot do it now, but I will try to prepare a migration plan for GNOME 2.8
that could include this patch, but I don't think it will come from me, as you
know, my perl knowledge is null
Comment 7 Danilo Segan 2004-06-14 11:13:57 UTC
I've made a patch to do this: use "Makevars" file to read DOMAIN name and
top_builddir (Makevars has priority over everything else).

Autoconf-style files are not needed anymore, and if there's not even Makevars,
it will assume domain name of "untitled".  So, you can simply put POTFILES.in in
"po/" and have intltool-update work.

I've kept the old Makefile.in.in (XGETTEXT_KEYWORDS) option for sake of
compatibility, though it'd be wiser if everybody started using Makevars instead
(which currently means gtk+/po-properties only).

Please comment on the patch.
Comment 8 Danilo Segan 2004-06-14 11:15:30 UTC
Created attachment 28686 [details] [review]
Read parameters from Makevars; don't require autoconf files

2004-06-14  Danilo Šegan  <dsegan@gmx.net>

	* intltool-update.in.in (FindMakevarsDomain): Read $DOMAIN from 
	po/Makevars.
	(FindPOTKeywords): Try Makevars/XGETTEXT_OPTIONS first, then
	Makefile.in.in/XGETTEXT_KEYWORDS.
	(FindPackageName): Try FindMakevarsDomain first.
	Don't bork out if there's no configure.in or configure.ac.
	(CONF_Handle_Open): Try Makevars first, don't bork out if
	there're no autoconf-style files.
Comment 9 Carlos Perelló Marín 2004-06-14 11:20:57 UTC
Why do you say "(which currently means gtk+/po-properties only)."?

The new gettext layout supports without problems multiple po directories easily.

Also, I had in my mind a migration plan from the old layout to the new one, but
I will not be able to redact and execute it before GNOME 2.8 freeze, take care
we should add also libintl inside tarballs and use it when GNU Gettext is not
available so the plural forms will work always. And we must depend on GNU
Gettext to generate/merge the .po/.pot file If someone has the time to do it, I
will try to help, but I cannot do anything more.
Comment 10 Kenneth Rohde Christiansen 2004-06-14 12:23:24 UTC
I don't see anything wrong with the patch

Regarding:

+		if (/^top_builddir[ \t]*=/) 
+		{
+		    $src_dir = $_;
+		    $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
+

Any reason why you don't do something like this:

if (/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/)
{
   $src_dir = $1;

Just wondering...since it doesn't really matter :)

Feel free to commit

Kenneth
Comment 11 Danilo Segan 2004-06-14 12:55:48 UTC
Carlos: I only meant to say that gtk+/po-properties is currently the only known
user of XGETTEXT_KEYWORDS variable in Makefile.in.in.  There's nothing stopping
others from using this, and new functionality is even much better.

Kenneth, I copied that logic verbatim from finding top_srcdir in Makefile --
it's a bit below the added code in the same function :)  It looked funny to me
as well, but I didn't bother cleaning it up right away.

I'll commit it as-is now (since I'm leaving the house in 15 minutes), and
perhaps clean both of these later on (I hope it's ok to clean that up without
approval?). I'll mark this as RESOLVED/FIXED as soon as I commit.