Bugzilla – Attachment 49415 Details for
Bug 16114
Regression: Bug 14828 broke display of localized item type descriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16114: Koha::ItemType->translated_description should return a string
SIGNED-OFF-Bug-16114-KohaItemType-translateddescri.patch (text/plain), 1.39 KB, created by
Owen Leonard
on 2016-03-22 14:21:52 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16114: Koha::ItemType->translated_description should return a string
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-03-22 14:21:52 UTC
Size:
1.39 KB
patch
obsolete
>From 5d7b84bad83136bf2a115558b9f4f13bba468db2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 22 Mar 2016 09:38:52 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 16114: > Koha::ItemType->translated_description should return a string >Content-Type: text/plain; charset="utf-8" > >This patch fixes a regression introduce by bug 14828. >If an itemtype is translated, its description won't be displayed >correctly on the item search form. > >Koha::ItemType->translated_description is only used once. > >Test plan: >- define a translation for an item type (Administration -> > Item types -> Edit -> Translate into other languages) >- go on the item search form, the item type should be displayed > correctly. > >QA note: This module is not covered by tests, it seems that I forgot to >write them... > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/ItemType.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm >index 99c0728..48df808 100644 >--- a/Koha/ItemType.pm >+++ b/Koha/ItemType.pm >@@ -57,7 +57,9 @@ sub translated_description { > entity => 'itemtypes', > lang => $lang > })->next; >- return $translated_description || $self->description; >+ return $translated_description >+ ? $translated_description->translation >+ : $self->description; > } > > =head3 translated_descriptions >-- >2.1.4
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 16114
:
49410
|
49415
|
49416