Continuing on my seafile experiments, I’ve found that they’ve done a pretty good job in offering local language support and this includes italian.
Well, sort of.
I mean, the tranlsation is nice and mostly well done… but sometimes you see part of the UI in… cyrillic???
After my first WTF reaction 🙂 I started checking how to fix this and I got good hints from Seafile as well. I ended up improving the italian language support they offer, and they promise to integrate my efforts in next version (good!).
In case you’re interested in modifying some part of an existing language support in Seafile web UI, what you need to have on your server machine is the following (commands refers to Ubuntu 12.04 LTS):
- Python 2.7 (if you don’t have it, give a “apt-get install python-2.7” to get it)
- Django extension to Python (if you don’t have it, give a “apt-get install python-django” to get it)
- gettext command (if you don’t have it, give a “apt-get install gettext” to get it)
Then, modify the file <seafile_install_directory>/seahub/locale/<your_language_country_code>/LC_MESSAGES/django.po
Replace <your_language_country_code> with the language code your interested in, for example it for Italian.
Change/correct/replace/add the strings you’re missing.
The file logic is based on the string in English, followed by the one in the local language, for example:
#: forms.py:56 templates/snippets/repo_create_js.html:28 msgid "Name can't be empty" msgstr "Il nome non può essere vuoto"
Once you’re done with your django.po file, copy the existing django.mo file (language file compiled) in the same directory to some other safe place and from <seafile_install_directory>/seahub/ directory type the command:
This should generate a new django.mo file with the modifications you have made.
As a bonus, if you just want to get rid of cyrillic you can copy these two files into <seafile_install_directory>/seahub/locale/<your_language_country_code>/LC_MESSAGES/ in your installation and restart the servers (seafile and seahub).