Bug 22347 - Translatability of ILSDI results for getavaibility
Summary: Translatability of ILSDI results for getavaibility
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 31177
  Show dependency treegraph
 
Reported: 2019-02-15 12:44 UTC by Koha Team University Lyon 3
Modified: 2024-11-07 16:08 UTC (History)
6 users (show)

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


Attachments
BZ22347: Translatability of ILSDI GetAvailability (4.98 KB, patch)
2021-10-26 12:41 UTC, Marion Durand
Details | Diff | Splinter Review
BZ22347: Translatability of ILSDI GetAvailability (5.13 KB, patch)
2022-03-30 09:33 UTC, Matthias Meusburger
Details | Diff | Splinter Review
BZ22347: Translatability of ILSDI GetAvailability (5.19 KB, patch)
2022-03-30 09:48 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22347: Translatability of ILSDI GetAvailability (5.20 KB, patch)
2022-04-01 12:49 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2019-02-15 12:44:17 UTC
It would be very useful if we could translate information provided by ILS-DI as availability status, availability msg. It would be useful when you use it with a discovery tool which can't translate it.
Comment 1 Katrin Fischer 2019-02-15 21:34:56 UTC
Would you want it to be only in one langauge or should there be something like a language parameter to get different translations when needed?
Comment 2 Koha Team University Lyon 3 2019-02-25 14:14:51 UTC
Hello Katrin,
I think that the best would be a language parameter to get different translations if needed.
Comment 3 Katrin Fischer 2019-02-25 14:38:03 UTC
(In reply to Koha Team Lyon 3 from comment #2)
> Hello Katrin,
> I think that the best would be a language parameter to get different
> translations if needed.

I agree, that seems like it would be the best solution. I wonder if the ILS-DI standard had something in mind for I18N or if the application was supposed to handle the translations.
Comment 4 Marion Durand 2021-10-26 12:41:02 UTC
Created attachment 126910 [details] [review]
BZ22347: Translatability of ILSDI GetAvailability

Some discovery tools can't translate ISL-DI results, it would be useful
if we can get ISL-DI output already translate.

This patch add an optional parameter language to GetAvailability, and
make GetAvailability results translatable.
If no parameter is given the output language is the language of the
cookies is present or the first language in the opac language list.

Test plan:
1. Enable the ILS-DI system preference
2. Locate a record
3. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice.)
4. Apply the patch
5. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio&language=[LANGUAGE]
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item&language=[LANGUAGE]
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice, [LANGUAGE] is a language code ex: 'en' or 'fr-FR')
6. The results should now be in the requested langugage

Sponsored-by: University Lyon 3
Comment 5 Matthias Meusburger 2022-03-30 09:33:35 UTC
Created attachment 132545 [details] [review]
BZ22347: Translatability of ILSDI GetAvailability

Some discovery tools can't translate ISL-DI results, it would be useful
if we can get ISL-DI output already translate.

This patch add an optional parameter language to GetAvailability, and
make GetAvailability results translatable.
If no parameter is given the output language is the language of the
cookies is present or the first language in the opac language list.

Test plan:
1. Enable the ILS-DI system preference
2. Locate a record
3. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice.)
4. Apply the patch
5. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio&language=[LANGUAGE]
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item&language=[LANGUAGE]
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice, [LANGUAGE] is a language code ex: 'en' or 'fr-FR')
6. The results should now be in the requested langugage

Sponsored-by: University Lyon 3
Comment 6 Matthias Meusburger 2022-03-30 09:34:10 UTC
Rebased patch
Comment 7 Biblibre Sandboxes 2022-03-30 09:48:03 UTC
Created attachment 132550 [details] [review]
BZ22347: Translatability of ILSDI GetAvailability

Some discovery tools can't translate ISL-DI results, it would be useful
if we can get ISL-DI output already translate.

This patch add an optional parameter language to GetAvailability, and
make GetAvailability results translatable.
If no parameter is given the output language is the language of the
cookies is present or the first language in the opac language list.

Test plan:
1. Enable the ILS-DI system preference
2. Locate a record
3. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice.)
4. Apply the patch
5. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio&language=[LANGUAGE]
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item&language=[LANGUAGE]
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice, [LANGUAGE] is a language code ex: 'en' or 'fr-FR')
6. The results should now be in the requested langugage

Sponsored-by: University Lyon 3

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Comment 8 Koha Team University Lyon 3 2022-03-30 10:04:19 UTC
Hi,
I've tested with a specific translation po for FR-fr language.
I tried ILS-DI for a biblio level with :
- an available item
- a checked out item
- a lost item
- a withdrawn item
- 2 items (one available and one checked out)

I also tried ILS-DI for a item level with :
- an available item
- a checked out item
- a lost item
- a withdrawn item

The answer in the <dlf:simpleavailability> was always correctly translated.

Sonia
Comment 9 Kyle M Hall (khall) 2022-04-01 12:49:15 UTC
Created attachment 132861 [details] [review]
Bug 22347: Translatability of ILSDI GetAvailability

Some discovery tools can't translate ISL-DI results, it would be useful
if we can get ISL-DI output already translate.

This patch add an optional parameter language to GetAvailability, and
make GetAvailability results translatable.
If no parameter is given the output language is the language of the
cookies is present or the first language in the opac language list.

Test plan:
1. Enable the ILS-DI system preference
2. Locate a record
3. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice.)
4. Apply the patch
5. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio&language=[LANGUAGE]
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item&language=[LANGUAGE]
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice, [LANGUAGE] is a language code ex: 'en' or 'fr-FR')
6. The results should now be in the requested langugage

Sponsored-by: University Lyon 3

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Comment 10 Fridolin Somers 2022-04-12 15:14:01 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑