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.
Created attachment 64846 [details] [review] 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!
Created attachment 64932 [details] [review] 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>
Created attachment 65005 [details] [review] 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>
Created attachment 65006 [details] [review] Bug 18901: [QA Follow-up] Do not translate zzpref either Adding one backslash makes a difference :) We need to escape the dot in the regex to exclude a file like zzpref from translation too. Perfect_regexes++ Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.02
This patch has been pushed to 16.11.x and will be in 16.11.10.
Pushed to 16.05.x, for 16.05.15 release