Bug 38339 - Standard backend _get_core_fields are not translatable
Summary: Standard backend _get_core_fields are not translatable
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on:
Blocks: 38340 39444
  Show dependency treegraph
 
Reported: 2024-11-04 12:01 UTC by Pedro Amorim
Modified: 2025-05-16 15:23 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 38339: Preparation: Access value of attribute by its key, not by display label (2.83 KB, patch)
2025-04-01 12:42 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38339: Make core field descriptions translatable (4.59 KB, patch)
2025-04-01 12:42 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38339: Preparation: Access value of attribute by its key, not by display label (2.83 KB, patch)
2025-04-01 12:54 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38339: Make core field descriptions translatable (4.54 KB, patch)
2025-04-01 12:54 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38339: Make core field descriptions translatable (4.59 KB, patch)
2025-04-03 13:39 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 38339: Make core field descriptions translatable (4.64 KB, patch)
2025-04-17 19:15 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-11-04 12:01:23 UTC
Following FIXME lines on ILL/Backend/Standard.pm:

    # 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 %]...
Comment 1 Pedro Amorim 2025-04-01 12:42:07 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2025-04-01 12:42:09 UTC Comment hidden (obsolete)
Comment 3 Pedro Amorim 2025-04-01 12:54:54 UTC Comment hidden (obsolete)
Comment 4 Pedro Amorim 2025-04-01 12:54:56 UTC Comment hidden (obsolete)
Comment 5 Magnus Enger 2025-04-03 13:39:47 UTC
Created attachment 180529 [details] [review]
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>
Comment 6 Pedro Amorim 2025-04-10 11:12:40 UTC
Marking this as duplicate of bug 39600 as the work done there implicitly fixes the issue described here.

*** This bug has been marked as a duplicate of bug 39600 ***
Comment 7 Pedro Amorim 2025-04-10 15:52:47 UTC
Reopening this and leaving just the i18n patch, making it depend on bug 39600 for the reasons stated above.
Comment 8 Tomás Cohen Arazi (tcohen) 2025-04-17 19:15:10 UTC
Created attachment 181136 [details] [review]
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>
Comment 9 Katrin Fischer 2025-04-25 14:55:44 UTC
Is this not breaking this line in the OPAC?

<td> [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %] </td>


If we translate Author?
Comment 10 Katrin Fischer 2025-04-25 15:00:08 UTC
Tomas says this is fixed later on, so adding "additional_work_needed" as a reminder to check back on this once we got through the tree.
Comment 11 Katrin Fischer 2025-04-25 16:36:24 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 12 Katrin Fischer 2025-05-16 15:23:40 UTC
(In reply to Katrin Fischer from comment #9)
> Is this not breaking this line in the OPAC?
> 
> <td> [% IF request.metadata.Author %][% request.metadata.Author | html %][%
> ELSE %]<span>N/A</span>[% END %] </td>
> 
> 
> If we translate Author?

The line in question doesn't appear to exist anymore. Assuming fixed.