Bugzilla – Attachment 28380 Details for
Bug 12279
Diacritics in system preference editor broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12279: Diacritics in system preference editor broken
Bug-12279-Diacritics-in-system-preference-editor-b.patch (text/plain), 1.98 KB, created by
Jonathan Druart
on 2014-05-21 06:43:36 UTC
(
hide
)
Description:
Bug 12279: Diacritics in system preference editor broken
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-05-21 06:43:36 UTC
Size:
1.98 KB
patch
obsolete
>From 769c34c988f78818a92d0dee3635c483079968d0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Tue, 20 May 2014 14:22:38 -0300 >Subject: [PATCH] Bug 12279: Diacritics in system preference editor broken > >This patch changes how .pref files are read. Instead of going through >all our global ultra-tweaked template object, we only use gettemplate >to build the correct file name (path included) and load it using the >(at functional) YAML::Syck::LoadFile method. > >Pros: Doesn't break anything for YAML::Syck pre-1.27 (the ones shipped with > Ubuntu 14.04) >Cons: something is wrong with C4::Templates encoding/decoding, or at least > our default setup using C4::Templates->new doesn't work properly for > all file types. > >To test: >- On clean master, install a translation like: > cd misc/translator ; perl translate install fr-FR >- Go to sysprefs, opac >=> FAIL: descriptions are encoding-broken >- Apply the patch, reload >=> SUCCESS: Everything shows ok > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Works ok, no errors >Test: >1) with YAML::Syck 1.19, no problems before, translated preferences >encode diacritics, ej. '\xC3\xA8' for grave accented e >Page shows correctly >2) with YAML:Syck 1.27, translated preferences have unencoded diacritics, >without patch display is broken, with patch it shows correctly > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > admin/preferences.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 8bcdb0a..b885e3e 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -54,7 +54,7 @@ sub GetTab { > local_currency => $local_currency, # currency code is used, because we do not know how a given currency is formatted. > ); > >- return YAML::Syck::Load( $tab_template->output() ); >+ return YAML::Syck::LoadFile( $tab_template->{filename} ); > } > > sub _get_chunk { >-- >2.0.0.rc2
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 12279
:
28316
|
28317
|
28318
|
28375
|
28377
|
28378
|
28380
|
28424
|
28438
|
28517
|
28557
|
28614