I'm currently in the process of translating Merengue to German, so I
had the same problem.
I managed to create the .po files for the plugins, but didn't find a
good way to create the .po files for the "merengue" folder.
The plugins:
To create the .po files for the plugins, there is a management
command, makepluginsmessages.
It doesn't accept the --locale parameter, so the folders for the
translation have to exist beforehand.
I think you should be able to add the folders for the plugins like this:
(run in "plugins" folder)
find ./* -name "locale" -exec mkdir -v {}/pt \;
Then you can just execute "python manage.py makepluginsmessages" from
your project directory, and the .po files should be created in the
"pt" subdirectories of each plugin's locale directory.
I didn't find a way to create all the .po files for the "merengue"
folder. I created a .po file for "merengue/locale/" by running
manage.py from inside the "merengue" folder.
For this, I had to give the complete path to manage.py (../manage.py
didn't work), and had to copy my sql-database file into the merengue
folder.
While this works for "merengue/locale", it doesn't work for
"merengue/block/locale" for example.
There surely has to be a better way, maybe it would be easier to just
copy the "en" folder for each "locale" directory, and rename it to
"pt".
If you find a good way to create the translations for the
merengue-folder, let me know!
Hi Paolo,
I'm currently in the process of translating Merengue to German, so I
had the same problem.
I managed to create the .po files for the plugins, but didn't find a
good way to create the .po files for the "merengue" folder.
The plugins:
To create the .po files for the plugins, there is a management
command, makepluginsmessages.
It doesn't accept the --locale parameter, so the folders for the
translation have to exist beforehand.
I think you should be able to add the folders for the plugins like this:
(run in "plugins" folder)
find ./* -name "locale" -exec mkdir -v {}/pt \;
Then you can just execute "python manage.py makepluginsmessages" from
your project directory, and the .po files should be created in the
"pt" subdirectories of each plugin's locale directory.
I didn't find a way to create all the .po files for the "merengue"
folder. I created a .po file for "merengue/locale/" by running
manage.py from inside the "merengue" folder.
For this, I had to give the complete path to manage.py (../manage.py
didn't work), and had to copy my sql-database file into the merengue
folder.
While this works for "merengue/locale", it doesn't work for
"merengue/block/locale" for example.
There surely has to be a better way, maybe it would be easier to just
copy the "en" folder for each "locale" directory, and rename it to
"pt".
If you find a good way to create the translations for the
merengue-folder, let me know!
On Sat, Feb 11, 2012 at 5:24 PM, Paolo <calvi...@gmail.com> wrote:
> I have sucessfully added a new language (Portuguese) using the ./
> manage.py sync_transmeta_db command, how can I then generate the .po
> files for translating the rest?
>
> Thanks!
You are correct of course, I never thought about putting the new
language into settings.py.
Do you have any advice on how to create the .po files for the "merengue" folder?