How to include a new language to Indico?


#1

Hi there,

weve just finished translating Indico to pt_BR, 100%, using transifex.

How do we use these files in our Indico installation, is there any tutorial on how to include a new language to a running instance of indico?

Ive just copied all .po files to /translations/pt_BR, but the option to change langue to Portuguese does not appear on Indico menu?

Help!

Thanks in advance


#2

You need to use indico i18n compile-catalog to build the corresponding .mo file.

Example with the french one:

[adrian@claptrap:~/dev/indico/src:master]> ll indico/translations/fr_FR/LC_MESSAGES/
total 788
drwxr-xr-x 2 adrian users   4096 Dec 28 14:06 .
drwxr-xr-x 3 adrian users   4096 Dec 28 14:06 ..
-rw-r--r-- 1 adrian users  88475 Dec 28 14:06 messages-js.po
-rw-r--r-- 1 adrian users 708123 Dec 28 14:06 messages.po

[adrian@claptrap:~/dev/indico/src:master]> indico i18n compile-catalog
error: indico/translations/fr_FR/LC_MESSAGES/messages.po:2318: placeholders are incompatible
error: indico/translations/fr_FR/LC_MESSAGES/messages.po:2326: placeholders are incompatible
error: indico/translations/es_ES/LC_MESSAGES/messages.po:2640: placeholders are incompatible
error: indico/translations/es_ES/LC_MESSAGES/messages.po:2648: placeholders are incompatible
4 errors encountered.

[adrian@claptrap:~/dev/indico/src:master]> ll indico/translations/fr_FR/LC_MESSAGES/
total 1148
drwxr-xr-x 2 adrian users   4096 Jun  6 23:41 .
drwxr-xr-x 3 adrian users   4096 Dec 28 14:06 ..
-rw-r--r-- 1 adrian users  88475 Dec 28 14:06 messages-js.po
-rw-r--r-- 1 adrian users 365578 Jun  6 23:41 messages.mo
-rw-r--r-- 1 adrian users 708123 Dec 28 14:06 messages.po

#3

Thanks ThiefMaster, but i have some questions.

Indico already have Fr language incorporated right? Now we are trying to build a new language, in this case, PT-BR. So i have some files that i downloaded from Transifex (.po files). Where do i put them.

Sorry, im not a linux user.


#4

You should put them in <INDICO_PATH>/indico/translations/pt_BR/LC_MESSAGES. However, we have already incorporated those translations in the latest commit in Indico. So, if you clone the repository you will see that the translations are already there :wink:


#5

Dear Kolodzie,

Sorry to bother, but how do i do that? I have absolute no knowledge ofn how to do it. I could only install Indico on my machine using this version: https://getindico.io/getting-started/ and following these procedures https://docs.getindico.io/en/latest/installation/production/
How do I “clone” a repository? Is there any tutorial about that?
Thanks in advance.


#6

If you are not a developer and/or intend to use it for production I would recommend you to wait until we release 2.2 (likely to happen beginning of July). The translations are for that version, so even if you did include them in 2.1.x (the current stable release), some strings would be missing/incorrect in case they were changed between 2.1 and 2.2.