1 (edited by matteo.frakka 2013-02-25 00:41:28)

Topic: Translation issue.

As promised here, even if with some month of delay, I'm trying to update and test the IT language file for iRedAdmin Pro.

I'm following this tutorial but I'm having some trouble:

1) Instructions should be updated: Currently, also on Debian stable "python-babel" must be replaced with "python-pybabel".

2) Please, specify to install Python2. With Python3 your script "translation.sh" won't work:

[matteo@arch-uefi i18n]$ sh ./translation.sh it_IT
* Extract localizable messages from template files to iredadmin.po...
Traceback (most recent call last):
  File "/usr/bin/pybabel", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

3) I've got some problem with your script "translation.sh": Editing it with "vi" I've found it full of character "^M" so I must remove them before use it (seem it was opened and saved on a Windows system. Maybe a my mistake but, please, someone check it).

Anyway, I can't get a functional iredmail.mo... Running translation.sh against my translated iredmail.po always remove from the file any line starting with "#" and put a "#" at beginning of any line starting with "msgid" or "msgstr".
So compiling procedure always create an empty iredmail.mo with no translations.

What's I'm doing wrong?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Translation issue.

matteo.frakka wrote:

2) Please, specify to install Python2. With Python3 your script "translation.sh" won't work:

translation.sh doesn't use Python directly, it invokes pybabel, but pybabel invokes Python.
You can create symbol link of Python-2 to /usr/bin/python.

matteo.frakka wrote:

3) I've got some problem with your script "translation.sh": Editing it with "vi" I've found it full of character "^M" so I must remove them before use it (seem it was opened and saved on a Windows system. Maybe a my mistake but, please, someone check it).

I use Mac OS X as development OS, all files were modified by Vim (MacVim). Did you try to open translation.sh with Vim instead of vi?
Another solution is converting it before running it with command "dos2unix":

# dos2unix translation.sh