Translation workflow?

To properly deploy a custom translation that’s not part of any official release, you need to build your own Indico wheel, so you need a development environment…

Once you built that wheel you can copy it to your production server and install it there.

so if I install development environment on my local machine (Windows) can I transfer the translation files into current production installation on Centos server?

Windows isn’t supported. WSL (windows subsystem for linux) may work though - it’s been a while since I tested it though…

ok i can use Virtual machine to setup local Linux dev installation. Then will it be doable to transfer from local install to my current production installation? I mean the language files.

you’ll build a full indico package that includes your translation but yes, that package can then be copied to your production server and installed there.

hi,

trying to install dev but following error: Should i use user indico when installing or root?

[root@indico ~]# sudo -u postgres psql indico_template -c "CREATE EXTENSION unaccent; CREATE EXTENSION pg_trgm;"
could not change directory to "/root"
ERROR:  extension "unaccent" already exists

The command is correct, but if the extension is already there trying to create it again fails (but it’s fine, since it exists).

hi, again thanks but next command returing following errors.
command: pip install -r requirements.dev.txt

ERROR: Could not find a version that satisfies the requirement freezegun==1.1.0 (from -r requirements.dev.txt (line 50)) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.1.16, 0.1.17, 0.1.18, 0.1.19, 0.1.19.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15)
ERROR: No matching distribution found for freezegun==1.1.0 (from -r requirements.dev.txt (line 50))
(env) [indico@indico src]$ pip install -e .
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Obtaining file:///opt/indico/dev/indico/src
    ERROR: Command errored out with exit status 1:
     command: /opt/indico/dev/indico/env/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/indico/dev/indico/src/setup.py'"'"'; __file__='"'"'/opt/indico/dev/indico/src/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-2G2HNY
         cwd: /opt/indico/dev/indico/src/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/opt/indico/dev/indico/src/setup.py", line 18
        return [dep for d in f.readlines() if (dep := d.strip()) and not (dep.startswith(('-', '#')) or '://' in dep)]
                                                   ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Most likely you did not take this part into account. git checkout v2.3.4

i run this git clone https://github.com/indico/indico.git src

should I run following?

`git clone -b 2.3.3  https://github.com/indico/indico.git src`

since i am using 2.3.3 on my production server?

Please update ASAP; v2.3.4 contains important security fixes.

And no need to clone again, you can just do git checkout v2.3.4 inside the src folder.

following errors with: npm ci
Usage: npm
where is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
help, help-search, i, init, install, install-test, it, link,
list, ln, login, logout, ls, outdated, owner, pack, ping,
prefix, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, tag, team, test, tst, un, uninstall,
unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /opt/indico/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

You do not need to install npm on your production system!!

And it looks like you are using a VERY old nodejs/npm version.

i am installing on development/test server. had npm 3.10.10 updated to 7.7.6 now running

got following error:

(env) [indico@indico indico]$ indico i18n compile-catalog
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
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:845: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:973: unknown named placeholder u'n'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:1719: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:2738: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:2744: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:3643: unknown named placeholder u'tpls_count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:5263: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:6388: unknown named placeholder u'missing_groups'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:6394: unknown named placeholder u'missing_groups'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:6589: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:9070: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:10461: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:11338: unknown named placeholder u'num'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:11784: unknown named placeholder u'total'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:12555: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:13150: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:13432: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:13692: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:14410: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:14721: unknown named placeholder u'count'
error: indico/translations/zh_Hans_CN/LC_MESSAGES/messages.po:15862: unknown named placeholder u'count'

next command hangs waiting now almost 15 minutes no action/messages does it take that long?
(env) [indico@indico indico]$ indico i18n compile-catalog-react

Those errors are normal and safe to ignore.

That shouldn’t happen… not sure why it hangs for you :confused:

i used new installation of centos 7.6 and followed the instructions in the manual …

What I mean is that none of us ever had this problem, and “just hangs” is something we can’t really help much with debug…

Maybe try calling the underlying tool directly and see if you get anything more useful there…

npx react-jsx-i18n compile indico/translations/mn/LC_MESSAGES/messages-react.po indico/translations/mn/LC_MESSAGES/messages-react.json

If that doesn’t help I’ll see if I can reproduce it here with your translation file…