Servus, folks.

Trying to translate various contributed modules to German I found quite some which don't provide that .pot file. Is there an easy way for me to create such a file from the PHP sources of that module? Or have I to bug the respective authors to provide such a file?

TIA,

Norbert

Comments

killes@www.drop.org’s picture

The POT files are created by running extractor.php on the module files. the script comes with the Drupal POT files.
--
Drupal services
My Drupal services

nofue’s picture

Servus.

I found that by googeling already, but I can't figure how to engage the script. There's a cryptic statement that reads like "you may open extractor.php in your browser. It will recursively search and convert all modules". Well, opening that file in Safari/Firefox on a Mac yields a nice view of that script, but nothing gets converted... Any hints?

Norbert

-- form follows function

Norbert

-- form follows function

killes@www.drop.org’s picture

I usually run the script from the commandline. What that text probably means is that you can copy the file to ths docroot of your Drupal install and then access it in your browser. Then you'd get a POT fo your whole install including all contrib modules.
--
Drupal services
My Drupal services

nofue’s picture

Servus, Gerhard.

Just for the sake of anybody trying to get POV files from modules:

I put all the module-folders into a single folder, downloaded extractor.php, and ran it from the commandline

php extractor.php --auto

When the program finished I got a bunch of never seen POT files in that folder. One is general.pot, where all the modules' strings get, and a bunch of per module files.

That's less desirable, as one has to assemble several .pot files to get a single file for just that module. Hence it's wiser to cd to each subdir, run extractor there and rename the general.pot to modulename.pot...

Hacking the extractor.php also helps to get the POT file header right -- i.e. replacing the template with your name, email, ... so you don't have to do that over and over.

One minor issue:
I'm going to translate a bunch of modules and I have still no idea how/where to submit. Probably it's supposed to open an issue for every single module translation, but this feels even more cumbersome than translation itself... Is there another way to get a bunch of translated files across?

Happy translating :)

Norbert

-- form follows function

Norbert

-- form follows function

killes@www.drop.org’s picture

You can either create issues per module or apply for a cvs account and commit the translations (and POT files) yourself.
--
Drupal services
My Drupal services