Bugzilla – Attachment 64846 Details for
Bug 18901
Sysprefs translation: translate only *.pref files (not *.pref*)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)
Bug-18901-Sysprefs-translation-translate-only-pref.patch (text/plain), 1.39 KB, created by
Julian Maurice
on 2017-07-06 12:54:16 UTC
(
hide
)
Description:
Bug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-07-06 12:54:16 UTC
Size:
1.39 KB
patch
obsolete
>From 25422161a3d23f4a21d0a3406f60fd5026497e9f Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 6 Jul 2017 14:39:20 +0200 >Subject: [PATCH] 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! >--- > misc/translator/LangInstaller.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index 683897ddf1..a3aea90cdc 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -82,7 +82,7 @@ sub new { > > # Get all .pref file names > opendir my $fh, $self->{path_pref_en}; >- my @pref_files = grep { /.pref/ } readdir($fh); >+ my @pref_files = grep { /.pref$/ } readdir($fh); > close $fh; > $self->{pref_files} = \@pref_files; > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18901
:
64846
|
64932
|
65005
|
65006