Bug 35200 - Patron attributes should be translatable
Summary: Patron attributes should be translatable
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-31 14:00 UTC by Caroline Cyr La Rose
Modified: 2023-10-31 21:09 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-10-31 14:00:03 UTC
I ran into this problem with a library that needed a lot of patron attributes, and they use self-registration. Their OPAC is in fr-CA, en, and es-ES.

I created the patron attributes with labels in french. But then I had to write JQuery to translate them in en and es-ES.

This is a sample of the js (I'm not a developer, so it might not be great, but it seems to work)

$("html[lang='en'] body#opac-patron-registration a[name='patron-attr-start-1_NOM'] + li label").text("Baby's surname:");
$("html[lang='en'] body#opac-patron-registration a[name='patron-attr-start-2_DOSSIER'] + li label").text("Baby's file number:");
$("html[lang='es-ES'] body#opac-patron-registration a[name='patron-attr-start-1_NOM'] + li label").text("Apellido del bebe:");
$("html[lang='es-ES'] body#opac-patron-registration a[name='patron-attr-start-2_DOSSIER'] + li label").text("Número de expediente del bebé:");

I wonder if it would be possible to use the same process as translating the itemtypes (entry in localization table).