Bugzilla – Attachment 180156 Details for
Bug 38339
Standard backend _get_core_fields are not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38339: Make core field descriptions translatable
Bug-38339-Make-core-field-descriptions-translatabl.patch (text/plain), 4.59 KB, created by
Pedro Amorim
on 2025-04-01 12:42:09 UTC
(
hide
)
Description:
Bug 38339: Make core field descriptions translatable
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-04-01 12:42:09 UTC
Size:
4.59 KB
patch
obsolete
>From 7536d65e3bd7c8be1f64476f52fd94b26abc282c Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 1 Apr 2025 12:12:34 +0000 >Subject: [PATCH] Bug 38339: Make core field descriptions translatable > >Test plan, before applying patches: >1) Enable ILLModule and create an ILL request (make sure it has an author and a title) >2) Install es-ES, on ktd run: > koha-translate -i es-ES --dev kohadev >3) Access the OPAC ILL requests table: > http://localhost:8080/cgi-bin/koha/opac-illrequests.pl >4) Notice both the title and author show. >5) Back on the Staff UI, enable es-ES for OPACLanguages and enable opaclanguagesdisplay >6) Repeat 3). Notice: >- The title and author column headers are not translated to es-ES >- The title and author data values are not displayed on the columns >7) Apply patches, restart plack and update es-ES installation: >- koha-plack --restart kohadev >- koha-translate --update es-ES --dev kohadev >8) Repeat 3). Notice the column headers are translated and the data is shown. >--- > Koha/ILL/Backend/Standard.pm | 73 ++++++++++++++++-------------------- > 1 file changed, 33 insertions(+), 40 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 4f8f3a5adef..47e47ea7996 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -912,47 +912,40 @@ Return a hashref of core fields > =cut > > sub _get_core_fields { >- >- # FIXME: This should all be made translatable as is basically a >- # code => description mapping. The metadata() sub is using this >- # descriptions as keys. I thought this was a bug on this backend >- # but it turns out opac-illrequests.tt is using those descriptions >- # as keys. for example: >- # [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]... > return { >- article_author => 'Article author', >- article_title => 'Article title', >- associated_id => 'Associated ID', >- author => 'Author', >- chapter_author => 'Chapter author', >- chapter => 'Chapter', >- conference_date => 'Conference date', >- doi => 'DOI', >- editor => 'Editor', >- format => 'Format', >- genre => 'Genre', >- institution => 'Institution', >- isbn => 'ISBN', >- issn => 'ISSN', >- issue => 'Issue', >- item_date => 'Date', >- language => 'Language', >- pages => 'Pages', >- pagination => 'Pagination', >- paper_author => 'Paper author', >- paper_title => 'Paper title', >- part_edition => 'Part / Edition', >- publication => 'Publication', >- published_date => 'Publication date', >- published_place => 'Place of publication', >- publisher => 'Publisher', >- sponsor => 'Sponsor', >- studio => 'Studio', >- title => 'Title', >- type => 'Type', >- venue => 'Venue', >- volume => 'Volume', >- year => 'Year', >+ article_author => __('Article author'), >+ article_title => __('Article title'), >+ associated_id => __('Associated ID'), >+ author => __('Author'), >+ chapter_author => __('Chapter author'), >+ chapter => __('Chapter'), >+ conference_date => __('Conference date'), >+ doi => __('DOI'), >+ editor => __('Editor'), >+ format => __('Format'), >+ genre => __('Genre'), >+ institution => __('Institution'), >+ isbn => __('ISBN'), >+ issn => __('ISSN'), >+ issue => __('Issue'), >+ item_date => __('Date'), >+ language => __('Language'), >+ pages => __('Pages'), >+ pagination => __('Pagination'), >+ paper_author => __('Paper author'), >+ paper_title => __('Paper title'), >+ part_edition => __('Part / Edition'), >+ publication => __('Publication'), >+ published_date => __('Publication date'), >+ published_place => __('Place of publication'), >+ publisher => __('Publisher'), >+ sponsor => __('Sponsor'), >+ studio => __('Studio'), >+ title => __('Title'), >+ type => __('Type'), >+ venue => __('Venue'), >+ volume => __('Volume'), >+ year => __('Year'), > }; > } > >-- >2.39.5
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 38339
:
180155
|
180156
|
180176
|
180177
|
180529
|
181136