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)
committerMason James <mtj@kohaaloha.com>
Wed, 24 May 2017 02:58:15 +0000 (14:58 +1200)
commitaebc8a165ef870733ea752863acf48953e1bdd2c
tree88d72071332125127b42ac28ed2dffcc42705e4a
parenta470b372778d05685b87c7850947aedf107d0a86
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: Katrin Fischer <katrin.fischer.83@web.de>
debian/scripts/koha-translate