Bug 16749: Adjustments for koha-translate
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 16 Jun 2016 08:38:54 +0000 (10:38 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Feb 2017 13:20:57 +0000 (13:20 +0000)
commit306e2c5fa74af614496ac1ab31ff1316e2f54126
treecc33fb7217b1958d62d6274bf230d5c321383688
parent35fad66881f77b3f569f9081fdcbf04f6e1a8ed0
Bug 16749: Adjustments for koha-translate

[AMENDED February 10, 2017]

[1] Added reading /etc/default/koha-common as in the other debian scripts.
    We need it for KOHA_HOME.
[2] Add a -d|--dev parameter for dev installs.
[3] No hardcoded PERL5LIB or KOHA_INSTALL_DIR (KOHA_HOME).
    They are read from default file or set by adjust_paths_dev_install.
[4] Adjust template paths for dev installs: OPAC_TMPL, INTRANET_TMPL.
[5] Remove references to obsolete themes ccsr and prog.

Test plan:
[1] Regular package install:
    Copy koha-translate to /usr/sbin.
    Run koha-translate -l to show installed languages.
    Run koha-translate -l -a to show available languages.
    Add a language: koha-translate -i nl-NL.
    Check template folders in regular location (/usr/share/koha/...)
    Remove a language: koha-translate -r nl-NL. Check again.
[2] Dev install or kohadevbox:
    Copy koha-translate to /usr/sbin.
    If needed, add the <dev_install> line to koha-conf.xml.
    Run koha-translate -l -d yourinstance to show installed languages.
    (Note: You only see the languages installed in this instance.)
    Add a language: koha-translate -i nl-NL -d yourinstance.
    Check template folders in the clone.
    Remove a language: koha-translate -r nl-NL -d yourinstance.

    Note: Make sure you have sufficient file permissions for the kohaclone
    files and koha-conf.xml. On kohadevbox you might need to run sudo
    koha-translate within the the vagrant user context.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested on Jessie (Debian VM and Kohadevbox)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Tested in a package installation of master+16749

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
debian/scripts/koha-translate