[translations] new extractor, should work on Windows

Gabor Hojtsy gabor at hojtsy.hu
Wed Feb 1 21:11:27 UTC 2006


Hi,

Today I committed several improvements to the translation template
generator. These include:

 - new automatic file discovery (no need to pass all parsed
   filenames directly) [control freaks can still use the old
   mode with the --files option]

 - speedier operation: now uses a lot less memory, and a lot
   less computational power, due to some trivial optimisations

Previously people complained that the extractor is not easy to run on
Windows due to the command line nature of how file names were passed in.
Actually I did not fix this issue intentionally, I discovered that the
previously suggested file wildcards were missing some important files,
and only ugly wildcards would have helped. Anway, now the extractor
autodiscovers files starting from the current working directory, so it
should work out of the box for Windows users.

Now those following the PHP.net manual setup suggestions on Windows (ie.
they have the php.exe on PATH), should be able to run

  php extractor.php

in their drupal folder (given they copy extractor.php there), and get
all the translation templates. Extractor.php itself will be excluded
from the source files, when generating the templates. This can be easily
done with any contrib project too.

It was never easier to run the extractor. Please try on Windows, I don't
have a Windows system here, so I cannot do it myself.

BTW I also posted updated templates generated with this new script.
There were quite some changes lately in the Drupal 4.7 source strings.

http://cvs.drupal.org/viewcvs/drupal/contributions/translations/drupal-pot/extractor.php

Goba


More information about the translations mailing list