This fork contains tools to support gettext utilities. User's manual contains short chapter devoted to theese tools and detailed documentation of new builders and construction variables. End to end tests are provided that cover all examples given in user's manual.
See also small fix within src/engine/Environment.py (FindSourceFiles), so the functions returns final sources only (leafs). I've created for that a test under 'test/FindSourceFiles.py'.
During the development, I've also found and cleaned'up some garbage in test files.
Hi Paweł; this looks great. Thanks for the good work! There's just one thing I can see that needs doing though; could you make it skip the tests if gettext is not installed? The LaTeX tests do something pretty similar, using code like this:
gettext = test.where_is('gettext')
if not gettext:
test.skip_test("Could not find gettext; skipping test(s).\n")
I was also thinking about reorganizing the tests (before it'll be eventually merged).
Currently the tests are split over many files (one file per user example in docs),
but maybe it would be better if I created just one test file per tool?
E.g. POTUpdate.py, POUpdate.py, and so on.
PS. Is there a chance that this changeset will be merged?
Yes, I was just about to merge this changeset in but the tests fail on Windows (where there is no gettext). With that fix, I see no reason not to merge it in. I like your idea of coalescing the tests into just a few files; if you can do that and update the pull request that would be most excellent. Thanks!
There is also one "feature" missing for the moment. As I've seen, in autotools there is an `autopoint' script,
which incorporates all necessary files into project. For example, user may request to copy the gettext library files
(in appropriate version) to be copied into project tree, so the application may be linked against local copy of libgettext and work independently of system libraries. I didn't manage to develop such script, because to me it was too hard (too many modifications to developer's scripts). Maybe someone, who knows the internals of SCons development tree better could prepare such thing?
I think, it's only required if we want to have an applications which compiles (with translaitons enabled) on non-GNU platforms. On such platforms libgettext (dev version) may be hardly available (especially as an installable package). We may always try to prepare our project with original GNU `autopoint' script, but this needs files, that are not used in SCons-based projects (configure.ac, ..) and generates files that are also not used (Makefile.in.in, ...). So Scons-based autopoint script would be very handy here. On the other hand .. maybe it would be easier to implement it as SCons tool, not a plain script...
I've followed your suggestions.
1. Tests are refactored, so now there is one file per tool (the file covers all examples from the tool documentation)
2. Tests are skipped when there is no gettext tools on testing platform.
There is tarball with generated docs at:
I've added one chapter to user manual, but I'm not sure if it is in appropriate place. Also, I'm not native english speaker, so it would be great if someone could take a look into it and make eventual remarks/corrections.