Bug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)
commit4f8fac147633c7272959e058dc7ea56ae7ecc403
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 6 Jul 2017 12:39:20 +0000 (6 14:39 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 18 Jul 2017 14:46:43 +0000 (18 16:46 +0200)
tree7c4856f28bae75f197364f0f392bb50735688ab5
parent97498a6a7b2ab43fc1d0a42bb93b91f3020e9ffd
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>
misc/translator/LangInstaller.pm