A trivial string patch to update the error message displayed to
user if koha-translate is used to attempt removal of a language
that is not installed.
Test plan
=========
1/ attempt to remove a non-existent language by
<installdir>/debian/scripts/koha-translate --remove <langcode>
2/ it should show "Error: the selected language is not already
installed."
3/ apply patch
4/ repeat step 1; it should show "Error: the selected language is
not installed."
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The debian/scripts/koha-translate script was still testing for the old naming
schema files. I also made sure all files are tested, to warn the user if
any of them is absent.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch corrects the call to 'basename' inside the script so it correctly
shows the language code when asked to list the available languages.
To test:
- On a packages install, run:
$ koha-translate --list --available
=> FAIL: It shows:
am-Ethi-opac-bootstrap.po
ar-Arab-opac-bootstrap.po
az-AZ-opac-bootstrap.po
be-BY-opac-bootstrap.po
ben-opac-bootstrap.po
...
- Apply the patch
- Copy the patched debian/scripts/koha-translate script to your packages setup.
- Run:
$ koha-translate --list --available
=> SUCCESS: It shows:
am-Ethi
ar-Arab
az-AZ
be-BY
ben
...
- Sign off :-D
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To test:
* Build a package and install it, and verify that there are no errors.
* Play around with koha-translate, listing, adding, and removing
languages.
Note: one reference to prog and ccsr remains in koha-translate. This is
to allow it to remove any pre-existing translations on an upgrade.
Note 2: prog translations are still being installed, I think this is due
to the underlying translation system doing it.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
As asked by Robin, a bash lib of functions is introduced with the common
functions to be reused. Most of the scripts are modified (reduced) to
include this file and the repeated functions cleaned.
No noticeable change in behaviour should be noticed.
As I've been todl in #debian-mentors, it is used that files for inclusion
should be installed at the apps directory (i.e. /usr/share/koha/) so this
patch makes the install script put the file in the bin/ directory.
All koha-* scripts assume the file is there already (and fail otherwise).
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
'en' is not a translation and it doesn't make any sense to return it as
part of the installed translations or the available ones.
It becomes relevant to remove it as users upgrading their installed
translations end up grepping the output to remove 'en' like in:
for lang in $(koha-translate --list | grep -v -x -e 'en') ; do
koha-translate --update $lang
done
instead of simply issuing the koha-translate --list command.
To test:
- Run
./koha-translate --list
./koha-translate --list --available
=> It shouldn't return 'en' in the result list.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The -v and --verbose option switches add the --verbose switch to the
misc/translator/translate script call in the packages' 'koha-translate'
command.
The docs are updated accordingly.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as expected with and without -v. Man page looks good.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The koha-translate's usage message has a couple of inconsistencies:
'--all' should be '--available'
and '--help' is missing from the usage examples.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested using instructions on
http://wiki.koha-community.org/wiki/Testing_man_pages
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Until we have solved the packaging of koha template translations, provide a command that manages the installed translations in a proper way.
To test, build a Debian package of current master+the patches from this bug :-D and try the many options running koha-translate --help provide.
The command itself can be grabbed from a git checkout with this patch applied to test the script's funcionality. If it (and its docs) fits the package building stuff, I'll test on monday when I can be back on my workstation.
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Good adition. Work as described. No errors.
Copied to /usr/local/bin. No errors on install, update, remove, list and check.
Passed-QA-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>