From 039214754f0816dc9056a6faa538de2643952419 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 15 Oct 2024 11:36:32 -0300 Subject: [PATCH] Bug 35570: Revert some strings translatability This patch reverts making core field descriptions translatable. It was an obvious move and a needed one. But it turns out our core templates are using those keys ('Author' and 'Title' in particular) and as such translating them would break display (at least in the OPAC). Without this patch, the ILL requests table in the OPAC doesn't display the title and author columns values (i.e. displays 'N/A' instead) Added a FIXME in the code, and will file a bug soo we fix this properly. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- Koha/ILL/Backend/Standard.pm | 64 ++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm index 8696b32207..5222e96528 100644 --- a/Koha/ILL/Backend/Standard.pm +++ b/Koha/ILL/Backend/Standard.pm @@ -912,36 +912,42 @@ 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'), - institution => __('Institution'), - isbn => __('ISBN'), - issn => __('ISSN'), - issue => __('Issue'), - item_date => __('Date'), - 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'), - 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', + institution => 'Institution', + isbn => 'ISBN', + issn => 'ISSN', + issue => 'Issue', + item_date => 'Date', + 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', + title => 'Title', + type => 'Type', + venue => 'Venue', + volume => 'Volume', + year => 'Year', }; } -- 2.39.5