Opened 15 years ago

Closed 12 years ago

#432 closed enhancement (wontfix)

scripts/ Makefile bug in i18N string extraction

Reported by: neteler Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: svn-releasebranch64
Keywords: Cc:
CPU: All Platform: All

Description

As far as I understand the scripts/Makefile process in GRASS 6, the "make pot" command does not take into account that the scripts have to be "compiled" (see g.parser part below):

# i.tasscap example: long lines broken for convenience
make[2]: Leaving directory `/home/neteler/grass64/scripts/i.tasscap'
GISRC=/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc64 \
GISBASE=/home/neteler/grass64/dist.x86_64-unknown-linux-gnu PATH=/home/neteler/grass64 \
/dist.x86_64-unknown-linux-gnu/bin:$PATH \
LD_LIBRARY_PATH="/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/lib:" \
g.parser -t i.tasscap | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' \
> ../../locale/scriptstrings/i.tasscap_to_translate.c ; true
make[1]: Leaving directory `/home/neteler/grass64/scripts/i.tasscap'

Typically "make pot" is run on a clean source code tarball, could the procedure be changed to either trap this or improve it? I am sure that currently many scripts/ strings are missing from the .po files (unverified).

Markus

Change History (2)

in reply to:  description comment:1 by glynn, 15 years ago

Type: defectenhancement

Replying to neteler:

As far as I understand the scripts/Makefile process in GRASS 6, the "make pot" command does not take into account that the scripts have to be "compiled"

This is the case generally. Makefiles will not attempt to build prerequisites which are outside of the directory containing the Makefile. E.g. if you build a module and libgis hasn't been compiled, the module's Makefile won't try to build it. You just have to build the components in the correct order.

Typically "make pot" is run on a clean source code tarball,

That's a mistake.

could the procedure be changed to either trap this or improve it? I am sure that currently many scripts/ strings are missing from the .po files (unverified).

It would be easy enough to check for an empty scriptstrings directory. It could either generate an error or "cd .. && make" to build GRASS.

It isn't realistic to perform partial compilation. Building the scripts directory requires g.parser, which requires libgis; in 7.0 it also requires lib/python, and there may be other dependencies I've overlooked. Also, gui/wxpython does something similar for menudata.xml. r.mapcalc's lex/yacc files contain strings which should be localised; that would require mapcalc.tab.c and mapcalc.yy.c to be generated prior to "make pot".

comment:2 by neteler, 12 years ago

Resolution: wontfix
Status: newclosed
Version: svn-develbranch6svn-releasebranch64

Working ok. Closing.

Note: See TracTickets for help on using tickets.