Bugzilla – Attachment 49410 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]
Bug 16114: Koha::ItemType->translated_description should return a string
Bug-16114-KohaItemType-translateddescription-shoul.patch (text/plain), 1.28 KB, created by
Jonathan Druart
on 2016-03-22 09:50:45 UTC
(
hide
)
Description:
Bug 16114: Koha::ItemType->translated_description should return a string
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-22 09:50:45 UTC
Size:
1.28 KB
patch
obsolete
>From d8d32f07273df0b71a026faed5c548ad5ca5f7e1 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] Bug 16114: Koha::ItemType->translated_description should > return a string > >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... >--- > 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.7.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 16114
:
49410
|
49415
|
49416