Last updated February 27, 2011.
If you want to make a single po file from a git folder or a downloaded module from containing all the small .po files, the following commands will have to be performed.
UNIX
You should execute this from a shell prompt in the folder with the .po files:
$ msgcat --use-first general.po [^g]*.po | msgattrib --no-fuzzy -o nl.poOf course, you should change nl into your own language code.
Windows
Open the "Command Prompt" and type in the folder with the .po files:
for %f in (*.po) do type "%f" >> module.po
Comments
single po file to multiple module files
For those of you looking to split the large .po file into its respective module files:
http://drupal.org/node/11311
Combining all nl.po files
Combining all nl.po files (*nix only) from the root of your Drupal installation:
cat `find . -name *.nl.po` > total.po. Then import into the corresponding language (here Dutch as the prefix is 'nl').Is there anything Bash can't do?
Thank you so much for this snippet. My colleague and I were having the same problem as the one described at http://drupal.org/node/239477. We had to do it manually and merging all the content into one PO file using your command saved us a lot of time!
Rémi
remiplourde.com
Rémi
remiplourde.com
Combining all nl.po files
Thanks for this tip. But I had to quote the search string because I got an error.
This is what it done right do for me:
cat `find . -name "*.nl.po"` > total.poThe msgcat command requires
The msgcat command requires gettext.
Installation on Debian/Ubuntu:
aptitude install -y gettext...of je stopt de stekker erin.