Bugzilla – Attachment 181136 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.64 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-04-17 19:15:10 UTC
(
hide
)
Description:
Bug 38339: Make core field descriptions translatable
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-04-17 19:15:10 UTC
Size:
4.64 KB
patch
obsolete
>From 3e6e6bf1ddbadfadd513ae69ba348471b720510e 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 ILL request on the OPAC: > http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=view&illrequest_id=1 >4) Activate es-ES language from the footer. Notice 'Title' and 'Author' still show as english >5) Apply patches. restart plack and update translation > koha-plack --restart kohadev > koha-translate --update es-ES --dev kohadev >6) Repeat 3). Notice those labels are now translated. >7) Ensure the table renders correctly and displays the data author and title data: > http://localhost:8080/cgi-bin/koha/opac-illrequests.pl > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > 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 08891086b07..9f783893066 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -930,47 +930,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.49.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 38339
:
180155
|
180156
|
180176
|
180177
|
180529
| 181136