]> git.koha-community.org Git - koha.git/commit
Bug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 6 Jul 2017 12:39:20 +0000 (14:39 +0200)
committerKatrin Fischer <katrin.fischer.83@web.de>
Wed, 19 Jul 2017 21:24:33 +0000 (23:24 +0200)
commitbc17760bc2ac665ee6697c953d43b025b68ea2a6
treed9e6269a4fdaa06b05c51b86abc20dd794d12d05
parente0bf7dc8d6fde72678d6011609b2b09cae5978b6
Bug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)

Text editors can create temporary files in this folder and this can
confuse the translator.
For instance, vim can create a file named '.opac.pref.swp' which will
make the translator dies with the following error message:

Can't use string ("b0VIM 8.0") as a HASH ref while "strict refs" in use
at LangInstaller.pm line 248.

Test plan:
1. echo 'Oops' > .../en/modules/admin/preferences/whatever.pref.whatever
2. cd misc/translator && ./translate update fr-FR
3. Verify that you have the error message mentioned above
4. Apply patch
5. cd misc/translator && ./translate update fr-FR
6. No more errors!

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ec51335e9cc4e090ef80f592cc0cc7a0786661f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4f8fac147633c7272959e058dc7ea56ae7ecc403)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
misc/translator/LangInstaller.pm