Seahub (Seafile Server 7.1 and above)¶
Translate and try locally¶
1. Locate the translation files in the seafile-server-latest/seahub directory:
- For Seahub (except Markdown editor):
- For Markdown editor:
For example, if you want to improve the Russian translation, find the corresponding strings to be edited in either of the following three files:
If there is no translation for your language, create a new folder matching your language code and copy-paste the contents of another language folder in your newly created one. (Don't copy from the 'en' folder because the files therein do not contain the strings to be translated.)
2. Edit the files using an UTF-8 editor.
3. Save your changes.
4. (Only necessary when you created a new language code folder) Add a new entry for your language to the language block in the
/seafile-server-latest/seahub/seahub/settings.py file and save it.
LANGUAGES = ( ... ('ru', 'Русский'), ... )
5. (Only necessary when you edited either django.po or djangojs.po) Apply the changes made in django.po and djangojs.po by running the following two commands in
msgfmt -o django.mo django.po
msgfmt -o djangojs.mo djangojs.po
Note: msgfmt is included in the gettext package.
Additionally, run the following two commands in the seafile-server-latest directory:
./seahub.sh python-env python3 seahub/manage.py compilejsi18n -l <lang-code>
./seahub.sh python-env python3 seahub/manage.py collectstatic --noinput -i admin -i termsandconditions --no-post-process
6. Restart Seahub to load changes made in django.po and djangojs.po; reload the Markdown editor to check your modifications in the seafile-editor.json file.
Submit your translation¶
Please submit translations via Transifex: https://www.transifex.com/projects/p/seahub/
- Create a free account on Transifex (https://www.transifex.com/).
- Send a request to join the language translation.
- After accepted by the project maintainer, then you can upload your file or translate online.